2011-02-08

From Sri-Lanka

Hi, I'm ENDOH takanao (@MiCHiLU).

I am staying for leaning English in Sri-Lanka, for about 4weeks from last week. My home stay location is Warakapola, between Colombo and Kandy. It's a small town surrounded by tropical forest.

Now, Sri-Lanka has been raining for 4 months. It has made big problems, flood and landslide. Can not go to some ancient ruins.

2011-01-31

Some pics from Japan

Hi! It is @akio0911.

Today, I post some pics taked in Japan.


抹茶マフィンと、ホットカフェオレ green tea muffin

野菜たっぷりチャンポン!

秋葉原の空 sky in akihabara

表参道のファーマーズマーケットで撮影したフルーツです! I took this pic at Farmer's Market in Omotesando, Tokyo.

僕、ドラえもんです my name is Doraemon

お茶~ tea 

寿司 Sushi 

僕のロディアは、少し変わってます。 my rhodia is strange.

天丼です!ししとう、海老、レンコンなど! Tempura Donburi TEN-DON 

天丼、ごちそうさまでした!食後はやっぱりお茶ですね!  I have finished TEN-DON

先日食べた煮魚です!美味しかった!

nihonbashi, Tokyo


Photographer : @akio0911.

2011-01-28

"HATE" is to use Facebook - Google Translation said.

Hi, it is NISHIO Hirokazu. My colleague SUZUKI Shoma told me an interesting miss-translation.

"He HATE it" means "He uses Facebook" in Japanese, Google Translation answers such a ridiculous translation.



I'm interested in why it happened. Maybe Google Translation uses machine learning from their corpus and in it "HATE" and "use Facebook" may strongly related. What a strange corpus is it! Where it come from?



P.S.
SUZUKI Shoma said the original is Google Translate Answers What Most Googlers Won't.

2011-01-20

'git add -p'

This entry was moved to NISHIO Hirokazu's blog

2010-11-30

What is 4277075694

This entry was moved to NISHIO Hirokazu's blog

2010-08-04

Thing you should know before moving your Django app into Google App Engine

Django's model has "id" field. It is auto-increment, unique integer for each models. GAE Datastore also has "id" field. It is *not* auto-increment, unique integer for *all* models. And you can not set the field as you want. This is annoying.

If you use Django's "id" field in permalink etc. (as I did), you need to add some field like "oldid", move old "id" value in it and write some code to put such a value in new coming items. For your information, when you can't inherit User models, you need to make a wrapper model. And also, you should change all code searching items with "id". You should change all "get_absolute_url" methods to use "oldid" in place of "id".

That is not all problem you should overcome. GAE Datastore doesn't allow inequality filter on more than one fields. If you use it, you should change the logic. Some of them are solvable with result caching. If you use SQL directly for speed-up, it won't work. Some query take more time or doesn't return correct value and there is DeadlineExceededException. You need tune-up in GAE way. You can't know how much items in your Datastore if it is more than 1000, in such case count() always return 1000.

Three month before, I thought it is easy task. Now I am convinced that I should rewrite the app. I hope it helps some people like me.