Saturday, October 3, 2009
I spoke at BarCamp Phnom Penh
Now BarCamp Phnom Penh is being held. I gave a presentation. The title is Introducing Japanese cool web services. This was my first presentation in BarCamp. I was a little nervous but had fun. I would like to give another presentation in the coming BarCamp Saigon on next month.
Tuesday, August 25, 2009
TweetMonkey for Google Chrome
TweetMonkey allows you to tweet from any page on the web. I've created a Google Chrome version of it. It looks different due to Chrome's specific issues. An input box is always displayed at the bottom of the window and you can tweet from it anytime you like!

References
I used Google Chrome's "extension" functionality. It is yet mature and development seems to be going on vigorously. It looks like an alpha version. Documents are also not sufficient yet. I'd like to pay respect to a few pioneers who don't hesitate to explore this wild and unmanned field.
Extensions
Official document. Still coarse.
Building a Twitter Extension for Google Chrome
There's sample code.
How to install
It seems that extension functionality is not available in stables version of Chrome. "Dev" version or latest Chromium snapshot is recommended to install. Chromium is a flavor of Chrome for developers. Personally I suggest you use Chromium because it does not affect Windows registry. You can just unzip and use it. My Chromium is version 4.0.203.0 (24088).
To install TweetMonkey for Google Chrome:
1. First, you need to install Chromium.
2. Download TweetMonkey for Chrome.
3. Unzip it into C:\twmk directory. (This is just an example. In fact, any directory is OK)
4. Edit C:\twmk\tweetmonkey.html.
Put your Twitter information on the lines of username/password at the beginning of the source code.
5. Run Chromium with --load-extension="C:\twmk" option. It can be convenient if you register it to a shortcut.
6. It's done. You should see a Twitter input box at the bottom of the Chromium window. (It might take a few seconds to show up)
How to use
An input box is always displayed at the bottom of the window. You can tweet from it anytime. If you click on the chain icon, you can enter the short URL of the current site. You can click on Update button to post your message on Twitter.
Personal notes
Nowadays, we spend most of time using web browsers. So customizing them with Javascript can be the most productive programming now. The age of cloud computing is coming soon. Once it comes, the server side will be taken care of by big corporations like Google and Amazon. We small individuals won't have to pay attention to trivial server side stuff like scaling. Maybe, client programming using Javascript will be more interesting and useful in the future for ordinary programmers.

References
I used Google Chrome's "extension" functionality. It is yet mature and development seems to be going on vigorously. It looks like an alpha version. Documents are also not sufficient yet. I'd like to pay respect to a few pioneers who don't hesitate to explore this wild and unmanned field.
Extensions
Official document. Still coarse.
Building a Twitter Extension for Google Chrome
There's sample code.
How to install
It seems that extension functionality is not available in stables version of Chrome. "Dev" version or latest Chromium snapshot is recommended to install. Chromium is a flavor of Chrome for developers. Personally I suggest you use Chromium because it does not affect Windows registry. You can just unzip and use it. My Chromium is version 4.0.203.0 (24088).
To install TweetMonkey for Google Chrome:
1. First, you need to install Chromium.
2. Download TweetMonkey for Chrome.
3. Unzip it into C:\twmk directory. (This is just an example. In fact, any directory is OK)
4. Edit C:\twmk\tweetmonkey.html.
Put your Twitter information on the lines of username/password at the beginning of the source code.
var username = '(your twitter account)';
var password = '(your password)';
5. Run Chromium with --load-extension="C:\twmk" option. It can be convenient if you register it to a shortcut.
6. It's done. You should see a Twitter input box at the bottom of the Chromium window. (It might take a few seconds to show up)
How to use
An input box is always displayed at the bottom of the window. You can tweet from it anytime. If you click on the chain icon, you can enter the short URL of the current site. You can click on Update button to post your message on Twitter.
Personal notes
Nowadays, we spend most of time using web browsers. So customizing them with Javascript can be the most productive programming now. The age of cloud computing is coming soon. Once it comes, the server side will be taken care of by big corporations like Google and Amazon. We small individuals won't have to pay attention to trivial server side stuff like scaling. Maybe, client programming using Javascript will be more interesting and useful in the future for ordinary programmers.
Sunday, August 23, 2009
TweetMonkey allows you to tweet from any page on the web
I have just created a tool that allows you to post messages on twitter from any web page. It's called TweetMonkey. This is something like a Twitter version of commonsmarker.com.

Prerequisites
TweetMonkey is a Greasemonkey user script.
Firefox 3 or above with Greasemonkey 0.8 or above must be installed.(My testing environment is Firefox 3.013/Greasemonkey 0.8.3)
Greasemonkey 0.8 is a Firefox plugin and you can get it here.
Greasemonkey allows you to customize Firefox. Ask Dr. Google for details.
How to install
1. Access to the link below with Firefox 3
download TweetMonkey
Install the Greasemonkey by following the instructions.
2. Click a monkey icon at the bottom right corner of Firefox to edit the TweetMonkey source code.
Put your twitter information on the lines of username/password at the beginning of the source code.
3. It's done. Access to any web page to see if a Twitter input box will show up at the bottom right corner of the screen.
How to use
A Twitter input box will show up at the bottom right corner of the screen on any web page. You can enter a short URL by clicking on "Add short URL of this site" link. Tweet by clicking on "Update" button. You can use it just as on Twitter.
Private note
To tell you the truth, I usually use Google Chrome. I don't really use Firefox so often recently. I hear that Chrome can be customize in a similar way to Greasemonkey. Probably, I should give it a try on Chrome.
Any feedback will be greatly appreciated!!

Prerequisites
TweetMonkey is a Greasemonkey user script.
Firefox 3 or above with Greasemonkey 0.8 or above must be installed.(My testing environment is Firefox 3.013/Greasemonkey 0.8.3)
Greasemonkey 0.8 is a Firefox plugin and you can get it here.
Greasemonkey allows you to customize Firefox. Ask Dr. Google for details.
How to install
1. Access to the link below with Firefox 3
download TweetMonkey
Install the Greasemonkey by following the instructions.
2. Click a monkey icon at the bottom right corner of Firefox to edit the TweetMonkey source code.
Put your twitter information on the lines of username/password at the beginning of the source code.
var username = '(your twitter account)';
var password = '(your password)';
3. It's done. Access to any web page to see if a Twitter input box will show up at the bottom right corner of the screen.
How to use
A Twitter input box will show up at the bottom right corner of the screen on any web page. You can enter a short URL by clicking on "Add short URL of this site" link. Tweet by clicking on "Update" button. You can use it just as on Twitter.
Private note
To tell you the truth, I usually use Google Chrome. I don't really use Firefox so often recently. I hear that Chrome can be customize in a similar way to Greasemonkey. Probably, I should give it a try on Chrome.
Any feedback will be greatly appreciated!!
Thursday, August 20, 2009
Failed to write a twitter client bookmarklet
I saw somebody say that we could post your tweets by GET method using twitter API on the internet. This made me excited because it would mean that we could build very easy-to-use client bookmarklets. Before making sure of this information on twitter's official API guide, I started writing code like below. After a while, it turned out that twitter API allows only POST methods when we tweet. That's REST. My dream was short-lived. It's gone now. Sigh.
<html>
<head><title>Twitter Bookmark</title></head>
<body>
<script type="text/javascript">
(function() {
// This code does not work for IE6 or below.
// It is OK since IE6 has died. Good bye IE6!!
var xmlhttp = false;
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
if(!xmlhttp) return;
// Well, you can never update any information by GET method...that's REST.
xmlhttp.open('GET', 'http://twitter.com/statuses/update.json', false, "twitter_user", "twitter_password");
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.setRequestHeader('X-Twitter-Client', 'TwitterBookmark js by Eiji Sakai');
xmlhttp.setRequestHeader('X-Twitter-Client-Version', '0.1');
xmlhttp.setRequestHeader('X-Twitter-Client-URL', 'http://elm200.blogspot.com/');
xmlhttp.send('status=' + encodeURIComponent("Hello World!"));
if(xmlhttp.status != 200) alert(xmlhttp.status + ' ' + xmlhttp.statusText);
})();
</script>
hello
</body>
</html>
Monday, August 17, 2009
How can Japan be respected by the international communities?
TED Talks: Gordon Brown: Wiring a web for global good
Gordon Brown is the current Prime Minister of the United Kingdom and Leader of the Labour Party. According to Wikipedia, "Brown has a PhD in history from the University of Edinburgh and spent his early career working as a television journalist". This speech given by him does not really contain anything special. The content itself is rather mediocre and totally predicable judging by his socialistic tendencies. Yet I admire that he can express his thoughts clearly with humor in front of the large audience. At least, he has a set of coherent political ideas. He sticks to his beliefs and his policies are by and large implemented based on them. Easy to understand.
Take a look at Japanese prime ministers in the past. Very few Japanese prime ministers managed to convey their political beliefs effectively to the Japanese public. (Perhaps, one of a few exceptions was Junichiro Koizumi) Japanese political processes are very hard to understand to outsiders, even to the Japanese public. Japanese politicians have been accused of its lack of political philosophy. There are neither long-term goals nor strategies to achieve those goals.
Japan still has the world's second largest economy. Japan has been donating a large sum of money to the world's poorer countries in the last few decades. However, Japan has yet received sufficient respect from the international communities in proportion to its vital role in the global economy. Why?
I think it's because Japanese politicians don't have clear political philosophy. When certain important values such as human rights are threatened, British politicians like Gordon Brown are determined to object to such a move. They don't hesitate to speak up against other countries that violate such fundamental values on humanitarian basis. Their attitude is consistent and predicable. On the contrary, nobody knows what the Japanese government values the most. They look just inconsistent and opportunistic.
Japanese politicians should define what are the most important for them, prioritize the goals and take actions strategically to achieve them. The goals must serve the good of both Japan and the rest of the world. Only when do they succeed in doing so, Japan will be respected by the international communities.
Gordon Brown is the current Prime Minister of the United Kingdom and Leader of the Labour Party. According to Wikipedia, "Brown has a PhD in history from the University of Edinburgh and spent his early career working as a television journalist". This speech given by him does not really contain anything special. The content itself is rather mediocre and totally predicable judging by his socialistic tendencies. Yet I admire that he can express his thoughts clearly with humor in front of the large audience. At least, he has a set of coherent political ideas. He sticks to his beliefs and his policies are by and large implemented based on them. Easy to understand.
Take a look at Japanese prime ministers in the past. Very few Japanese prime ministers managed to convey their political beliefs effectively to the Japanese public. (Perhaps, one of a few exceptions was Junichiro Koizumi) Japanese political processes are very hard to understand to outsiders, even to the Japanese public. Japanese politicians have been accused of its lack of political philosophy. There are neither long-term goals nor strategies to achieve those goals.
Japan still has the world's second largest economy. Japan has been donating a large sum of money to the world's poorer countries in the last few decades. However, Japan has yet received sufficient respect from the international communities in proportion to its vital role in the global economy. Why?
I think it's because Japanese politicians don't have clear political philosophy. When certain important values such as human rights are threatened, British politicians like Gordon Brown are determined to object to such a move. They don't hesitate to speak up against other countries that violate such fundamental values on humanitarian basis. Their attitude is consistent and predicable. On the contrary, nobody knows what the Japanese government values the most. They look just inconsistent and opportunistic.
Japanese politicians should define what are the most important for them, prioritize the goals and take actions strategically to achieve them. The goals must serve the good of both Japan and the rest of the world. Only when do they succeed in doing so, Japan will be respected by the international communities.
Sunday, August 16, 2009
The conditions of creativity
TED Talks: Paul Romer's radical idea: Charter cities
Stanford economist Paul Romer has come up with a radical concept, "charter cities". Basically, this idea comes from the outstanding success of Chinese special economic zones. In 1979, China designated Shenzhen, a small village next to the prosperous economic city, Hong Kong, as one of four economic special zones. At that time, China's national economy was strictly managed based on economic plans built by the central government. China had few private companies and virtually no economic freedom. But things were total different in economic special zones like Shenzhen. Economic freedom was secured and foreign companies was able to invest there without restriction. A lot of companies from Taiwan and Hong Kong actually made a direct investment in Shenzhen and it changed the destiny of Shenzhen forever. Since 1979, Shenzhen has achieved an incredibly rapid economic growth. Now it is a prosperous metropolitan with the population of 6 million.
Shenzhen's success would have never taken place if not for the neighboring Hong Kong, which had been governed by Britain before it was returned to China in 1997. Hong Kong was allowed to rely on sophisticated British legal system(good rules). It brought huge benefits to businesses operating in Hong Kong. Shenzhen learned how to make good rules from Hong Kong.
Paul Romer generalized this particular success in Hong Kong and China into an idea "charter cities". A "host country"(e.g. China) provides a "partner country"(e.g. Britain) with a small tip of territory or a "charter city"(e.g. Hong Kong). In return, the partner country provides the chartered city with a set of rules the most suitable for economic and social growth.
In other words, now Paul Romer is trying to "reproduce" Hong Kong all over the world.
How audacious he is! A typical conformist Japanese would think that his idea was too radical and "unrealistic". They would say "well, a good idea, but it is simply impossible to implement". They would even laugh at his idea. But is it a right thing to do? Maybe, we Japanese should not shut down one idea simply because it looks impossible to realize now. If we want to be imaginative and innovative, we must be open to any idea no matter how absurd it looks.
I don't know how realistic he idea is. But I do respect him by speaking up an idea that he believes worth spreading. It might have taken him a courage to express this idea because it would look too radical and almost impossible. I also respect the culture of English speaking societies where any ideas are not rejected just because they are against their common sense. As long as your idea makes sense, they allow you to give it a try. If we don't tolerate this kind of try and error, we will never be able to produce creative results.
Stanford economist Paul Romer has come up with a radical concept, "charter cities". Basically, this idea comes from the outstanding success of Chinese special economic zones. In 1979, China designated Shenzhen, a small village next to the prosperous economic city, Hong Kong, as one of four economic special zones. At that time, China's national economy was strictly managed based on economic plans built by the central government. China had few private companies and virtually no economic freedom. But things were total different in economic special zones like Shenzhen. Economic freedom was secured and foreign companies was able to invest there without restriction. A lot of companies from Taiwan and Hong Kong actually made a direct investment in Shenzhen and it changed the destiny of Shenzhen forever. Since 1979, Shenzhen has achieved an incredibly rapid economic growth. Now it is a prosperous metropolitan with the population of 6 million.
Shenzhen's success would have never taken place if not for the neighboring Hong Kong, which had been governed by Britain before it was returned to China in 1997. Hong Kong was allowed to rely on sophisticated British legal system(good rules). It brought huge benefits to businesses operating in Hong Kong. Shenzhen learned how to make good rules from Hong Kong.
Paul Romer generalized this particular success in Hong Kong and China into an idea "charter cities". A "host country"(e.g. China) provides a "partner country"(e.g. Britain) with a small tip of territory or a "charter city"(e.g. Hong Kong). In return, the partner country provides the chartered city with a set of rules the most suitable for economic and social growth.
In other words, now Paul Romer is trying to "reproduce" Hong Kong all over the world.
How audacious he is! A typical conformist Japanese would think that his idea was too radical and "unrealistic". They would say "well, a good idea, but it is simply impossible to implement". They would even laugh at his idea. But is it a right thing to do? Maybe, we Japanese should not shut down one idea simply because it looks impossible to realize now. If we want to be imaginative and innovative, we must be open to any idea no matter how absurd it looks.
I don't know how realistic he idea is. But I do respect him by speaking up an idea that he believes worth spreading. It might have taken him a courage to express this idea because it would look too radical and almost impossible. I also respect the culture of English speaking societies where any ideas are not rejected just because they are against their common sense. As long as your idea makes sense, they allow you to give it a try. If we don't tolerate this kind of try and error, we will never be able to produce creative results.
Saturday, August 15, 2009
English-speaking blogs by Japanese
I've just kicked off a movement called "English-speaking blogs by Japanese".
We Japanese people are often too shy to express ourselves in English. I'd like to help Japanese people make their voice heard to all the people in the world by blogging in English. There are so many interesting Japanese people, but it's too bad that many of them are little known outside of Japan. It's a huge loss to both Japanese and non-Japanese people, I guess.
Because of the linguistic distance that lies between English and Japanese, it's very hard for Japanese to master English. We are not perfect English writers. But we still have valuable ideas worth spreading. The most important thing is communication. I am sure that reading these blogs listed below will be enjoyable and help broaden your horizon.
I'd like to introduce English-speaking blogs updated by Japanese people.
31o5 - http://31o5.com/
31o5 is a co-founder of an IT company in Bangkok, Thailand. She is very active in geek communities including BarCamps in Thailand and well-known in ASEAN countries. In her blog, she talks about technology, business, life, etc in both English and Japanese (she tends to blog in English more often than in Japanese)
Ujihisa - http://ujihisa.blogspot.com/
Ujihisa is a Japanese hard-core hacker who is interested in software technologies such as Ruby, Vim, Haskell and mathematics. He lives in Vancouver, Canada. He's been blogging in English since March, 2009.
Koshian - http://koshian.typepad.com/
Koshian is a Japanese IT geek living in Bangkok, Thailand. His interest includes technologies, social issues, life and Japanese subcultures(animation & manga). He has just started his blog.
Kenji - http://kenjioh.com/
According to his profile posted on his blog, "Kenji Oh is a Film music composer / Web programmer, was also gymnastics player. Composed scores for films, TV show, ad DVD, video games etc. and female gymnastics floor."
He is so versatile. He began blogging in English just recently, but is very eager to present himself in English to a broader audience in the world.
tittea - http://tittea.blogspot.com/
Tittea is a Japanese blogger who is interested in reading books and organic cooking, and wishes to communicate with people of aspiration and independent life style.
rawell - http://turquoise.tm.land.to/
A Japanese blogger rawell discusses tech-related topics based on various news source. For rawell's more complete profile: http://iddy.jp/profile/rawwell/
EI "RAY" MURAKAMI - http://ehealthcarekawaraban.blogspot.com/
Health IT Analyst working for public hospitals in Auckland, New Zealand. He is interested in improving health care system by leveraging information technology. He is an excellent English writer.
SeekingSearchin - http://sssking.wordpress.com/
SeekingSearchin just started his English-speaking blog. He(she) is interested in expressing himself(herself) by blogging in English.
This list will be updated. Please don't hesitate to contact me if you are or you know any Japanese blogger who writes in English.
We Japanese people are often too shy to express ourselves in English. I'd like to help Japanese people make their voice heard to all the people in the world by blogging in English. There are so many interesting Japanese people, but it's too bad that many of them are little known outside of Japan. It's a huge loss to both Japanese and non-Japanese people, I guess.
Because of the linguistic distance that lies between English and Japanese, it's very hard for Japanese to master English. We are not perfect English writers. But we still have valuable ideas worth spreading. The most important thing is communication. I am sure that reading these blogs listed below will be enjoyable and help broaden your horizon.
I'd like to introduce English-speaking blogs updated by Japanese people.
31o5 - http://31o5.com/
31o5 is a co-founder of an IT company in Bangkok, Thailand. She is very active in geek communities including BarCamps in Thailand and well-known in ASEAN countries. In her blog, she talks about technology, business, life, etc in both English and Japanese (she tends to blog in English more often than in Japanese)
Ujihisa - http://ujihisa.blogspot.com/
Ujihisa is a Japanese hard-core hacker who is interested in software technologies such as Ruby, Vim, Haskell and mathematics. He lives in Vancouver, Canada. He's been blogging in English since March, 2009.
Koshian - http://koshian.typepad.com/
Koshian is a Japanese IT geek living in Bangkok, Thailand. His interest includes technologies, social issues, life and Japanese subcultures(animation & manga). He has just started his blog.
Kenji - http://kenjioh.com/
According to his profile posted on his blog, "Kenji Oh is a Film music composer / Web programmer, was also gymnastics player. Composed scores for films, TV show, ad DVD, video games etc. and female gymnastics floor."
He is so versatile. He began blogging in English just recently, but is very eager to present himself in English to a broader audience in the world.
tittea - http://tittea.blogspot.com/
Tittea is a Japanese blogger who is interested in reading books and organic cooking, and wishes to communicate with people of aspiration and independent life style.
rawell - http://turquoise.tm.land.to/
A Japanese blogger rawell discusses tech-related topics based on various news source. For rawell's more complete profile: http://iddy.jp/profile/rawwell/
EI "RAY" MURAKAMI - http://ehealthcarekawaraban.blogspot.com/
Health IT Analyst working for public hospitals in Auckland, New Zealand. He is interested in improving health care system by leveraging information technology. He is an excellent English writer.
SeekingSearchin - http://sssking.wordpress.com/
SeekingSearchin just started his English-speaking blog. He(she) is interested in expressing himself(herself) by blogging in English.
This list will be updated. Please don't hesitate to contact me if you are or you know any Japanese blogger who writes in English.
Subscribe to:
Posts (Atom)