Joss Whedon’s Dr. Horrible: don’t miss it

Joss Whedon's pet project, in answer to the writer's guild nonsense, came out yesterday: Dr. Horrible's sing-along blog. A mini-series exclusively for internet and for free, done on the cheap with his friends.

It's a mix between Pinky and the Brain, Mistery Men and a video blog, executed musical-style. It's brilliant, especially since I was a big Doogie Howser fan as a kid (Neil Patrick Harris) and burned through Whedon's Firefly series in a straight 2-days stand.

Act 2 will come out July 17th and Act 3 on July 19th. Catch it while it lasts!

Special rules for Gaijin buying an iPhone

If you're planning on buying an iPhone (it's a little too late now since they're already out of stock everywhere in Kanto) and you're a foreigner, there's a couple of things you need to be aware of before you head out to the Softbank shop:

  1. Bring your Gaikokujin Torokusho (Alien Card) + Passport. It seems they now require the passport too.
  2. Check your visa expiration date, the following rules apply:

From Softbank's website
本人確認書類を「外国人登録証明書+外国パスポート」にてお申込される場合、以下項目をご注意ください。

  1. 在留期限が90日未満の場合は回線契約ができません。
  2. 在留期限が申込日より15ヵ月以内の場合、割賦購入(あっせん)契約による受付はできません。(店頭一括払いのみの受付となります)
  3. 在留期限が申込日より15ヵ月超、27ヵ月以内の場合、割賦購入(あっせん)契約による支払回数は12回払いもしくは一括払いのみの受付となります。
  4. 在留期限が申込日より27ヵ月を超える場合、支払い回数に関係なく割賦購入(あっせん)が可能です。

Which translates to:

  1. If you're on a 90 days tourist visa, no soup (or iPhone) for you!
  2. If you have less than 15 months left on your visa, you wont be able to make a contract, but they'll sell the phone to you without a plan for ¥80.000
  3. Between 15 and 27 months left on your visa, you can either pay it cash for ¥80.000 or negociate take a 12 months contract (instead of the normal 24) possibly at the discounted ¥20.000 price-tag, but whether the discount applies or not is not clear in the document
  4. Over 27 months and you're clear, you can buy the phone like any native

With my 3 years visa expiring in 27 months and 24 days, I might hurry my purchase plans...

Note: the maximum length visa you can have (apart from being a permanent resident) is 3 years, so you'd better work on your timing or you might have to wait a very long time to get a phone

Update: as John points out in the comments, if you have a Japanese health insurance card or driver's licence accompanied by a utility bill to your name, then this should suffice and Softbank's people should not ask you for anything else. That'll help quite a bit.

iPhone in Japan: it’s the new Wii

So people have been lined up in front of the flagship Softbank shop in Omotesando since Monday, all reservations that were taken in the first days after announcement have been canceled and now my friend Jon tells me that he called the main Softbank shop in Kumagaya, Saitama-ken and they are having a raffle for what will probably be 5 measly units on Friday.

japanese crowd can be crazy

If you want to get an iPhone here in Japan, you'd better start tossing a lot of 5円 coins at the local shinto shrine to buff up on luck and scour the raffles every weekend arount the countryside as we all did 2 years ago during the darkest times of Wii hunting.

Note: the photo is one of mine at Meiji shrine for New Year, that's the image that comes to mind when I think about a crowd in Japan...

Update: Jon won the lottery and got his iPhone, only problem is Softbank's servers are on their knees and they couldn't activate his phone. It's that crazy...

iPhone pricing details announced officially

A press release just appeared on Softbank's website and suddenly Twitter went ablaze: the official pricing details for the iPhone have been published.

iphone on softbank

Here's the lowdown:

  • 7,280円 per month for basic white plan and unlimited data
  • 960円 per month for the 8GB version, 1,440円 per month for the 16GB version (for 24 months)
  • specific email address for xxxx@i.softbank.jp (normal plans are xxxx@softbank.ne.jp)

Of course, these prices are without any calling minutes. I wonder if I'm going to be able to get the iPhone without any plan, activate it and use my corporate Softbank SIM card in it.

Custom Django filters in Google App Engine

You want to create your own custom Django filters in App Engine without running a whole Django stack? Here's how in a few lines of code.

First create a specific python file to hold your custom filters at the root of your application. In my case I use customfilters.py like this:

import re
from google.appengine.ext import webapp
 
register = webapp.template.create_template_register()
 
def escapeimg(body):
	return re.sub(r'

', '[IMG]', body)
 
register.filter(escapeimg)

Then in your main application source file, call the following line outside of the main() definition, for example just after your modules loading:

"""Load custom Django template filters"""
webapp.template.register_template_library('customfilters')

You should then be able to use the new filters you registered in customfilters.py straight away in any of your Django templates without any % load foobar % call

Crossdomain proxy on Google App Engine

Here's a crossdomain proxy to pipe Javascript Ajax calls from you Google App Engine application to the Flickr API, since most browser will not let you call another domain directly.

import cgi
import urllib
from google.appengine.ext import webapp
from google.appengine.api import urlfetch
 
class FlickrController(webapp.RequestHandler):
	"""Proxy for Ajax calls to flickr"""
	def get(self):
		flickrapiendpoint = 'http://api.flickr.com/services/rest/'
		flickrapikey = 'you_flicker_api_key'
 
		params = self.request.GET
		params.add('api_key', flickrapikey)
		params.add('format', 'json')
		apiquery = urllib.urlencode(params)
 
		result = urlfetch.fetch(url=flickrapiendpoint + '?' + apiquery, method=urlfetch.GET)
		self.response.out.write(result.content)
 
def main():
	application = webapp.WSGIApplication(
		[('/flickr/', FlickrController)],
		debug=True)
	wsgiref.handlers.CGIHandler().run(application)
 
if __name__ == "__main__":
	main()

I didn't see examples of such a script anywhere else so I thought I'd post it here for all to see.

Otaku rush on the new Fukutoshin

Last Saturday morning I was leaving a party at 5 A.M. in Shibuya and decided it would be nice to come back home to Shiki with the new Tokyo Metro Fukutoshin line which was opening the very day and interfaces with my usual Tobu Tojo line for an almost direct trip to and from Shibuya (I just have to hop from one side of the platform to another at Wakoushi) in a breeze.

fukutoshin line - map

So my girlfriend and I arrived at 5:30 after being guided by cops that were all over the station for the opening and got there to climb in the first train to arrive at Shibuya station and reversing for the journey back to Saitama.

Ruiko said:
Do not under-estimate the Japanese Otaku...

Remembering this saying by a good friend of mine, I wasn't surprised when that first train came in Shibuya station packed full of weirdos with backpacks and cameras (the classic Otaku costume). They came out of the train clapping and cheering, taking photos of each other in front of the driving cabin and macroing on every little details of the new train and station.

After the flow ebbed, we climbed on the train and were followed by a dozen of guys who must've missed the very first train. Losers... One of them was recording the trip and announcements with a microphone, bobbing his head to each of the stations' distinctive music as if to music from heaven... One of them had long pommeled hair and wore a flowery dress...

I didn't take any photos of them as my girlfriend was afraid I would get shanked by one of the weirdos like what happened in Akihabara 2 weeks ago, but I do have some photos of the brand new piece of station in Shibuya.

WWDC Keynote

Tonight (at least in Japanese time) is Steve Job's WWDC Keynote. It is widely accepted that he will be announcing the new 3G enabled iPhone and I am secretly hoping he will give us a release date for Japan live from the Moscone West.

These past weeks, I've been developing a live-blogging system for my other website to cover the event minute by minute. It's a challenge to devise a system, both software and hardware-wise, capable of handling the huge loads involved in such a big event. We are expecting more than 50.000 persons to follow the Keynote via MacBidouille.

Until now, all our attempts have failed. But this time, I'm trying something new with an Ajax based interface running on the new Google App Engine platform. It's been really fun using a new technology, Python, on Google's own architecture.

I have no idea if this new system will withstand the load this year, especially with the tight quotas in place for the beta phase of App Engine. But I sure hope Steve announces the iPhone launch in Japan starting tomorrow and I'll take the day-off to rush to the Apple Store in Ginza as soon as it opens...

iPhone on Softbank

やった!

「iPhone」について
2008年6月4日 - ソフトバンクモバイル株式会社

この度、ソフトバンクモバイル株式会社は、今年中に日本国内において「iPhone」を発売することにつきまして、アップル社と契約を締結したことを発表いたします。

SOFTBANK MOBILE Corp. today announced it has signed an agreement with Apple® to bring the iPhone™ to Japan later this year.

Why am I so happy? Because my corporate phone is a Softbank, so I should legally be able to change my crappy Sharp phone whose battery cannot hold more than 10min of conversation anymore for a snazzy 3G iPhone and still have my company pay for it. :)

Contact Juggling

Found this video on Digg, looks like Yoyogi Park. This guy is a million times more impressive than all those stupid jugglers and beanbag fanatics you find in such parks.

Yes, there's only one crowd I despise more than beanbaggers, it's the drum players. That's probably the main reason why I never hang out at Yoyogi Park...

Let’s leave 20 teeth at age 80!

More cool Dental Health info from my Japanese health insurance society. Coming back from Golden Week vacation, I find the following letter on my desk at work:

Information for Dental Checkup and Treatment:

Announcing the "Let's leave 20 teeth at age 80" campaign

Aren't your decayed teeth or pyorrhea getting worse while you are unaware ofr them? Health Insurance society has been sending application forms of dental checkup to the insured persons in numeric order of Insurance Card.

This time your insurance card number is in range of an applicable object: you are entitled to a complete dental checkup including teeth, gum and supporting bone X-rays at 10% of the medical care cost.

This is actually a pretty good deal, apart from the goofy tag-name for the campaign, and I've signed up for a long overdue checkup on the cheap.

ctype_digit error in WordPress 2.5

wordpress-image-uploadI've upgraded my blog to WordPress 2.5 last weekend. The new design of the admin backend is great and seeing things evolve like that really motivates me to pour more time into my blog and add some nice little functionalities that I've been thinking about lately.

But it happens that I came upon an error when trying out the new image uploader and I'm sure many people will get it too:

PHP Fatal error: Call to undefined function ctype_digit() in wp-includes/link-template.php on line 182

What happens is that my flavor of PHP5 is not compiled with the ctype flag. This seems to be the default on Gentoo, so if you run it be sure to add the ctype use flag to your portage config. But if you can't recompile PHP, you can just open up the file wp-includes/link-template.php and replace the line 182 as follows:

Replace ctype_digit with is_numeric

That should do the trick until the version 2.5.1 that should patch things up according to what I see in the bug tracker (pending issue on link-template.php and a similar issue in another file already merged in 2.5).