<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-27975173</atom:id><lastBuildDate>Wed, 08 Apr 2009 01:49:00 +0000</lastBuildDate><title>Simon's Space</title><description>Enjoy life and coding.</description><link>http://blog.loveforlife.net/simon/</link><managingEditor>noreply@blogger.com (Simon Li)</managingEditor><generator>Blogger</generator><openSearch:totalResults>95</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/simon-space" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="simon-space" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-8498843502098016859</guid><pubDate>Wed, 08 Apr 2009 01:48:00 +0000</pubDate><atom:updated>2009-04-08T09:49:00.537+08:00</atom:updated><title>Don't say hi to me</title><description>&lt;p&gt;One of the biggest achievement I made last year is I bought my mother a laptop and taught her how to use internet.&lt;br&gt;She had refused to do so for years until my aunt showed her how to use video conference.&lt;/p&gt; &lt;p&gt;She soon addictted to online game like a teenage. She will play about 1 hour everyday. So whenever I met her online, I&amp;#39;d say hi to her and sometimes followed by a kind reminder that she needed to go out for a walk.&lt;br&gt; And finally, when we talked last night, my mom said to me: &amp;quot;Don&amp;#39;t say hi to me online. Feel like being watched.&amp;quot;&lt;/p&gt; &lt;p&gt;Haha, she never knows how annoying she was when she stopped me reading books years ago!&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-8498843502098016859?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2009/04/dont-say-hi-to-me.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-2733453414220964780</guid><pubDate>Thu, 31 May 2007 02:22:00 +0000</pubDate><atom:updated>2007-05-31T10:22:40.496+08:00</atom:updated><title>Out of blog</title><description>I am very busy these months. I won&amp;#39;t update my blog (frequently) until Oct.&lt;br&gt;The only blog that will be updated is the baby diary (&lt;a href="http://shun.loveforlife.net"&gt;http://shun.loveforlife.net&lt;/a&gt;), but also mostly by my wife. &lt;br&gt;Thank you and take care!&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-2733453414220964780?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2007/05/out-of-blog.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-3261689919202229623</guid><pubDate>Wed, 14 Mar 2007 10:16:00 +0000</pubDate><atom:updated>2007-03-14T18:16:32.452+08:00</atom:updated><title>To recruit a boss</title><description>Life was like a box of chocolates. You never know what you&amp;#39;re gonna get.(Forrest Gump)&lt;br&gt;And this time, it&amp;#39;s really special.&lt;br&gt;&lt;br&gt;It doesn&amp;#39;t happen to everyone, in a manner of speaking, I&amp;#39;m recruiting my boss. &lt;br&gt;&lt;br&gt;Below is part of the mail from my CTO:&lt;br&gt;&lt;br&gt;Simon,&lt;br&gt;&lt;br&gt;I&amp;#39;d like to start looking for a technical director for the Beijing office. ....&amp;nbsp; So here is what I&amp;#39;d like to have happen: &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 1. Candidates:&amp;nbsp; The person should have the following abilities: &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Technical experience: have created web sites using our technologies (i.e., Hibernate, Spring, Tapestry, etc.). They should have as broad a background on web technologies &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Recent Experience : led a development team in building web sites based on this technology focused on consumer space &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. US experience: worked in the US and understands US corporate culture&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. Fluent in English : needs a good working knowledge of English. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. Education: comes from a good schools with a BS and hopefully a MS in Computer Science  &lt;br&gt;&amp;nbsp;&amp;nbsp; 2. Position: The person will be the manager for all the developers in the Beijing office and will report directly to me. &lt;br&gt;&lt;br&gt;&lt;br&gt;CTO&lt;br&gt;&lt;br&gt;Further more, my CTO mentioned the candidate should be from really good school. I didn&amp;#39;t ask the criteria, but according to requirements 3. &lt;br&gt;An IVY degree will be a strong plus.&lt;br&gt;&lt;br&gt;It&amp;#39;s not easy to find such a candidate, so I will take some responsibilities for the time being. This will be another interesting experience.&lt;br&gt;&lt;br&gt;&lt;br&gt;P.S. This is a translated version from my Chinese blog, but I can&amp;#39;t help posting it here for it&amp;#39;s too interesting. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-3261689919202229623?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2007/03/to-recruit-boss.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-7587916808123836357</guid><pubDate>Thu, 25 Jan 2007 04:39:00 +0000</pubDate><atom:updated>2007-01-25T12:39:21.100+08:00</atom:updated><title>I'm not kidding</title><description>This morning, I asked my wife:&amp;quot;It&amp;#39;s Wednesday, isn&amp;#39;t it?&amp;quot;&lt;br&gt;&amp;quot;No, it is Thursday. You hear that? IT, IS, THURSDAY.&amp;quot;&lt;br&gt;We looked at each other, and laughed.&lt;br&gt;&lt;br&gt;This is a little secret between us. &lt;br&gt;Last Friday morning, my wife said to me:&amp;quot;Tomorrow is weekend, do you have any plan?&amp;quot;&lt;br&gt;&amp;quot;But it&amp;#39;s Thursday, let&amp;#39;s discuss it tomorrow.&amp;quot; I said.&lt;br&gt;My wife smiled and said nothing.&lt;br&gt;&lt;br&gt;And that night, I looked into calender by chance and found it WAS Friday, actually I&amp;#39;d made a mistake! &lt;br&gt;&amp;quot;Why didn&amp;#39;t you correct me this morning?&amp;quot; I asked my wife.&lt;br&gt;&amp;quot;I&amp;#39;d thought you were just kidding.&amp;quot;&lt;br&gt;&amp;quot;Oh my, have you ever remember me kidding on you?&amp;quot;&lt;br&gt;&lt;br&gt;But the result was, I had to go office last Saturday to stop a running software. &lt;br&gt;I don&amp;#39;t know why I always make such mistake these weeks, maybe a sign of I&amp;#39;m lost in my work.&lt;br&gt;&lt;br&gt;Anyway, the Spring Festival is coming! &lt;br&gt;I&amp;#39;m not kidding.&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-7587916808123836357?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2007/01/im-not-kidding.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-7423174638090370162</guid><pubDate>Sun, 31 Dec 2006 11:14:00 +0000</pubDate><atom:updated>2007-01-05T10:52:17.277+08:00</atom:updated><title>Happy ending</title><description>&lt;p&gt;I noticed that in Dec I posted only 1 blog entry, and the title reads "I hate  ...".&lt;br /&gt;That doesn't reflect my current status.&lt;/p&gt; &lt;p&gt;Well, I'm not getting lazier, nor do I have any complaint for my  life.&lt;br /&gt;Instead, this year is extremly happy and enjoyable for me. Everything  is perfect. And I'm  still on my way to be a better man.&lt;/p&gt; &lt;p&gt;Yes, I'm much busier than last year. But I enjoyed my job and learned a lot.  The most important thing is, when I went home late at night, as I looked at the  face of my sleeping angel, nothing bothered me at all.&lt;/p&gt; &lt;div&gt;So, I just write to end this year with a happy ending, and everyone loves  happy ending, isn't it?&lt;br /&gt;And wish you all a very happy new year!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-7423174638090370162?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/12/happy-end.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-7657886174812101694</guid><pubDate>Mon, 04 Dec 2006 10:17:00 +0000</pubDate><atom:updated>2006-12-04T18:17:57.227+08:00</atom:updated><title>I hate the Lunar Calender</title><description>I called my parents recently. I felt my mom was not happy. She refused to tell why until I asked it the second time.&lt;br&gt;&amp;quot;Do you still remember what the date was yesterday?&amp;quot;&lt;br&gt;&lt;br&gt;Oh my, it's my father's birthday! &lt;br&gt;I always remembered my parents birthday and called them. But one thing troubles me a little bit is they use Chinese lunar calenders.&lt;br&gt;It changes every year for solar calendar.&lt;br&gt;&lt;br&gt;I can do nothing but keep saying sorry. What can I say else? Just because I don't have a lunar calender? &lt;br&gt;In fact, I've set an alert on my cell phone. But either it didn't work, or I didn't noticed it.&lt;br&gt;&lt;br&gt;I'm sorry, father. I love you.&lt;br&gt;&lt;br&gt;Tags: calender family &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-7657886174812101694?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/12/i-hate-lunar-calender.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-6121333320348159543</guid><pubDate>Mon, 20 Nov 2006 02:27:00 +0000</pubDate><atom:updated>2006-12-09T15:49:45.121+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">virtural hosting</category><category domain="http://www.blogger.com/atom/ns#">bluehost</category><category domain="http://www.blogger.com/atom/ns#">hostgator</category><category domain="http://www.blogger.com/atom/ns#">dreamhost</category><category domain="http://www.blogger.com/atom/ns#">ipower</category><category domain="http://www.blogger.com/atom/ns#">vhosting</category><title>Virtual hosting provider out of China</title><description>This month, I helped a website to change its hosting service provider. &lt;p&gt;China is a fast growing market for virtual hosting, foreign hosting&lt;br /&gt;providers have good business opportunities because:&lt;br /&gt;1. In general, many Chinese hosting providers are not good enough. They&lt;br /&gt;either provides low price but poor service, or simply high price.&lt;br /&gt;2. There is a lot of regulations. Many personal webmaster feel uncomfortable&lt;br /&gt;to file personal information in police office. My friend was requested to&lt;br /&gt;enroll a class which cost RMB 610, just because he placed the server in&lt;br /&gt;Guang Zhou city. That's really too much for a non-profit personal website .&lt;br /&gt;3. For silly reason, the net speed between north China and south China is&lt;br /&gt;slow as snail. But the connection to other countries are good enough for&lt;br /&gt;simple Internet service. &lt;p&gt;Sure there are risks to choose a foreign host provider. As the rumor tells,&lt;br /&gt;there might be an "unknown" wall. Any IP might be blocked without any&lt;br /&gt;explanation. But the benefit worth the risk. &lt;p&gt;When choosing the host, price, hardware, security, service are most&lt;br /&gt;important factors to compare. &lt;p&gt;We selected 4 candidates and let the users poll on them:&lt;br /&gt;&lt;a href="http://www.bluehost.com/track/heroworl/blog"&gt;bluehost.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ipower.com/"&gt;ipower.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.dreamhost.com/"&gt;www.dreamhost.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.hostgator.com/"&gt;www.hostgator.com&lt;/a&gt; &lt;p&gt;Although it's a small community, the site has a lot of users from all over&lt;br /&gt;China. To test the hardware especially the network connection, we asked our&lt;br /&gt;users to launch the homepage of each host provider and report the time cost.&lt;br /&gt;So it's very smart to use a simple homepage!&lt;br /&gt;&lt;a href="http://www.bluehost.com"&gt;www.bluehost.com&lt;/a&gt; and &lt;a href="http://www.hostgator.com"&gt;www.hostgator.com&lt;/a&gt; are fast for most our users. I heard &lt;p&gt;&lt;a href="http://www.dreamhost.com"&gt;www.dreamhost.com&lt;/a&gt; is good but they give very poor result. &lt;p&gt;&lt;a href="http://www.hostgator.com"&gt;www.hostgator.com&lt;/a&gt; allow its customer to store adult material, which might&lt;br /&gt;attract some webmasters, but we don't want to get blocked just because our&lt;br /&gt;neighborhood is blocked! So we chose &lt;a href="http://www.bluehost.com"&gt;www.bluehost.com&lt;/a&gt; at last. &lt;p&gt;The website has been running on bluehost for about 20 days. The service is&lt;br /&gt;good. But I must warning you bluehost only allow you to use 20% of the cpu&lt;br /&gt;time. If you own a hot website, you have to buy better service from bluehost&lt;br /&gt;or just consider other companies. &lt;p&gt;Tags: vhosting, virtural hosting, bluehost, ipower, dreamhost, hostgator&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-6121333320348159543?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/11/virtual-hosting-provider-out-of-china.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-5554297573203582972</guid><pubDate>Wed, 08 Nov 2006 10:18:00 +0000</pubDate><atom:updated>2006-11-08T18:18:32.287+08:00</atom:updated><title>Election day</title><description>Very interesting, it's Election Day in US, and here in Beijing, I saw a call for vote on the bulletin board under my condo.&lt;br&gt;&lt;br&gt;Unfortuantely, blogspot is totally blocked here. Blogspot is blocked some time ago, but I could logon  &lt;a href="http://blogger.com"&gt;blogger.com&lt;/a&gt; and post in blind at that time.&lt;br&gt;&lt;br&gt;Today, every &lt;a href="http://blogger.com"&gt;blogger.com&lt;/a&gt; is blocked here. &lt;br&gt;&lt;br&gt;Well, At least I can still post by email.&lt;br&gt;&lt;br&gt;Tags: election &lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-5554297573203582972?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/11/election-day.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-3532986837386395975</guid><pubDate>Sat, 28 Oct 2006 15:44:00 +0000</pubDate><atom:updated>2006-10-28T23:46:09.581+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogspot</category><category domain="http://www.blogger.com/atom/ns#">google</category><title>Blogspot is blocked again (here)</title><description>Seems that Blogspot is blocked by GFW again. What a shame!&lt;br /&gt;There always are risks of HTTP error 500 ("Page Cannot be Displayed") when visiting server out of China main land.&lt;br /&gt;&lt;br /&gt;I reopened live space RSS, but I will still use Blogspot as my main blog host.&lt;br /&gt;I consider google GR (goverment relationship) as a failure. But I'm not sure what I'm expecting from this company.&lt;br /&gt;&lt;br /&gt;Tag: google blogspot&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-3532986837386395975?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/10/blogspot-is-blocked-again-here.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-8184434432603235215</guid><pubDate>Sat, 21 Oct 2006 14:45:00 +0000</pubDate><atom:updated>2006-10-21T22:49:04.237+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS</category><category domain="http://www.blogger.com/atom/ns#">table</category><title>Browser compatiblity</title><description>&lt;p&gt;I've worked on some web projects in last centry. One big headache is the browser compatiblity. Netscape and IE are very different in many ways. To implement a cool look and ensure it won't be broken on both browsers is very difficult at that time.&lt;/p&gt;&lt;p&gt;Now I'm working on a web project again. I find little has changed. Netscape has fade away, but I have to face IE, Firefox, Safari, and other browsers.&lt;/p&gt;&lt;p&gt;For instance, it's easy to put a table on page. but our artist wants a solid border around each row, and some space betwen each rows. It's far more difficult than I had thought.&lt;/p&gt;&lt;p&gt;And we want the table to have a fixed header and scrollable body. I found a good example on &lt;a href="http://www.imaputz.com/cssStuff/bigFourVersion.html"&gt;http://www.imaputz.com/cssStuff/bigFourVersion.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;But here is a trick, if we don't declare the html as xhtml in DOCTYPE, it doesn't work for IE.I never believed a comment like &amp;lg!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...&amp;gt; would affect the CSS behavior!&lt;/p&gt;&lt;p&gt;The good news is I learned a lot of CSS tricks last week.&lt;br/&gt;The bad news is I never left office before 9pm, in fact, it's 1am on last Friday.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-8184434432603235215?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/10/ive-worked-on-some-web-projects-in-last.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115889452756658080</guid><pubDate>Fri, 22 Sep 2006 03:04:00 +0000</pubDate><atom:updated>2008-05-06T23:24:02.076+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">live space tool</category><title>Live Space Backup Tool</title><description>I decided to release a draft version of Live Space Tool. It can backup all you MS Live Space blogs.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.loveforlife.net/downloads/livetool.zip"&gt;Please click here&lt;/a&gt; to the download page, and click download button. A Readme file is included.&lt;br /&gt;&lt;br /&gt;========&lt;br /&gt;License&lt;br /&gt;========&lt;br /&gt;Apache 2.0, included in the download.&lt;br /&gt;&lt;br /&gt;========&lt;br /&gt;How to run&lt;br /&gt;========&lt;br /&gt;Unzip and double click livebackup.bat.&lt;br /&gt;&lt;br /&gt;========&lt;br /&gt;Price&lt;br /&gt;========&lt;br /&gt;You don't need to pay for this, it's a draft, so it's free.&lt;br /&gt;&lt;br /&gt;But if you want me to do the backup for you, send me an email and pay me a little money.&lt;br /&gt;The price is the lower one between 2 dollar and the price of your breakfast yesterday.&lt;br /&gt;Yes, it's free for those who don't eat breakfast!&lt;br /&gt;&lt;br /&gt;In any case, your comments on this blog entry is appreciated.&lt;br /&gt;&lt;br /&gt;Tag: live space tool&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115889452756658080?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/live-space-backup-tool.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115881269808500198</guid><pubDate>Thu, 21 Sep 2006 04:21:00 +0000</pubDate><atom:updated>2006-10-21T21:10:47.357+08:00</atom:updated><title>[NOTICE]: My RSS feed will changed to FeedBurner</title><description>I'm always curious about who has subscribed to my blog, but Live Space only provides limited statistics. So I registered on FeedBurner.&lt;br /&gt;&lt;br /&gt;If you have subscribed to my blog by a RSS reader, please change my feed to: &lt;a href="http://feeds.feedburner.com/simon-space"&gt;http://feeds.feedburner.com/simon-space&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The MS feed will be closed in one week. Sorry for the inconvenience.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;For my Chinese friends, I have a post on &lt;a href="http://simon-space-c.blogspot.com/2006/09/blog_21.html"&gt;what's RSS feed and how to use it.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tag: RSS&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115881269808500198?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/notice-my-rss-feed-will-changed-to.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115872105129980096</guid><pubDate>Wed, 20 Sep 2006 02:53:00 +0000</pubDate><atom:updated>2006-10-21T21:10:47.298+08:00</atom:updated><title>Sorry, but I'm not a spam maker</title><description>Something wired happened while &lt;a href="http://simon-space.blogspot.com/2006/09/backup-live-space-blog-to-blogspot.html"&gt;I was backuping my posts to blogspot&lt;/a&gt;. I turned on email publishing on blogspot so when an email is received it will be automatically posted. But I found that after I had send a lot of email, the posts were not published directly, instead they were saved as draft. Even worse, I have to face the "robot challenging" (To input a string when publish, the string is randomly generated as a picture.).&lt;br /&gt;&lt;br /&gt;I feel blogspot set a threshold for spam blocking. If somebody post more than 100 (?) posts within 24 hours. The email publishing rule will be changed.&lt;br /&gt;&lt;br /&gt;So I won't share my tool now, because it can't set the correct post time, it may be rejected by blogspot, and it's not fully automated.&lt;br /&gt;&lt;br /&gt;If any coder interested in this tool, please check out the following reference.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MetaWeblog API for MSN Spaces&lt;br /&gt;http://msdn.microsoft.com/live/gettingstarted/spacesstart/&lt;br /&gt;&lt;br /&gt;Apache XML-RPC&lt;br /&gt;http://ws.apache.org/xmlrpc/&lt;br /&gt;&lt;br /&gt;Jakarta Commons Email&lt;br /&gt;http://jakarta.apache.org/commons/&lt;br /&gt;&lt;br /&gt;Using the Blogger Data API&lt;br /&gt;http://code.google.com/apis/gdata/blogger.html&lt;br /&gt;&lt;br /&gt;Using the Java Client Library&lt;br /&gt;http://code.google.com/apis/gdata/client-java.html&lt;br /&gt;&lt;br /&gt;Sorry, but I'm not a spam maker&lt;br /&gt;&lt;br /&gt;Tag: Google blogspot spam&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115872105129980096?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/sorry-but-im-not-spam-maker.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115864008171720984</guid><pubDate>Tue, 19 Sep 2006 04:27:00 +0000</pubDate><atom:updated>2006-10-21T21:10:47.237+08:00</atom:updated><title>Backup Live Space Blog to Blogspot</title><description>If you are a regular reader of my blog. You may have know I'm a coder that believe coding can both make a living and make my life easier. It happens again this month.&lt;br /&gt;&lt;br /&gt;I decided to publish my blog on blogspot from this month. I found I can simply post blog on blogspot and post a copy on Live Space via email publishing. But what about my old posts? Can I backup them to blogspot as well?&lt;br /&gt;&lt;br /&gt;That's also possible, Both Live Space and blogspot support MetaWeblog API and email publishing. So I need to write a tool to retrieve all my post from Live Space and post them to blogspot.&lt;br /&gt;&lt;br /&gt;The first question is program language, I want to use javascript so I can share this tool by a web page! But I didn't find an easy way to send email via javascript and I finally turned to java. C# is a good choice but I feel java runtime has a better availability than .Net runtime.&lt;br /&gt;&lt;br /&gt;The 2nd problem is get full entry list from Live Space. MS only provides the latest 20 blogs but fortunately, the blog id is very regular so I can try all possible ids.&lt;br /&gt;&lt;br /&gt;The 3rd problem is how to post on blogspot, I can use email publish or Google Data API. I tried both and chose email solution because the API solution need Google account info. I believe it's more friendly.&lt;br /&gt;&lt;br /&gt;The last problem is after the post is backup on blogspot, could it display the same create time as the original version on Live Space. I failed on this point. Seems that Google Blogger Data API has a bug here. So I append the timestamp on the beginning of each post. When Google fixed its bug, I can easily change them in batch.&lt;br /&gt;&lt;br /&gt;I don't bother to backup the comments. I will write another blog on this tool for more detail.&lt;br /&gt;&lt;br /&gt;BTW, Wish MS won't close the door to me for this blog.&lt;br /&gt;&lt;br /&gt;Tag: MS Live Space Google blogspot MetaWeblog&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115864008171720984?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/backup-live-space-blog-to-blogspot.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857737191482651</guid><pubDate>Mon, 18 Sep 2006 11:02:00 +0000</pubDate><atom:updated>2006-10-21T21:10:47.106+08:00</atom:updated><title>Java SE 5 annotation: finally I found it useful!</title><description>&lt;p&gt;Original on Live Space:Wed Aug 09 08:40:16 CST 2006&lt;/p&gt;&lt;br /&gt;Java introduced a lot of new features in Java SE 5. I like the generic, autoboxing/unboxing, and almost all of them. But I never figured out how annotation could be useful.&lt;br /&gt;&lt;br /&gt;Until very recently.&lt;br /&gt;&lt;br /&gt;I want to write a code generator. In short, I have some existing classes, and I want the code generator to write wrapper for some of them and expose some of their methods. After I evaluated the complexity, I found I need to write a Java compiler by myself. That's too expensive.&lt;br /&gt;&lt;br /&gt;Why should I reinvent the wheel? After some research, I found annotation was very useful for this case.&lt;br /&gt;&lt;br /&gt;I'm not writing a guide here, we can find one on &lt;a href="http://weblogs.java.net/blog/emcmanus/archive/2006/06/using_annotatio.html"&gt;http://weblogs.java.net/blog&lt;br/&gt;/emcmanus/archive/2006/06/using_annotatio.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically it includes several steps:&lt;br /&gt;1. Define my annotation.&lt;br /&gt;2. Annotate on desired class and method.&lt;br /&gt;3. Write my own annotation processor factory (extends AnnotationProcessorFactory from Sun).&lt;br /&gt;4. Run apt tool included in Java SE 5, passing in my annotation processor factory and scan my source folder.&lt;br /&gt;It's very convenient and powerful.&lt;br /&gt;&lt;br /&gt;Even I don't write my annotation factory. I found the standard @Override and @Deprecated annotation are very useful. They can help eliminate typos and name confliction.&lt;br /&gt;&lt;br /&gt;There is always something new and exciting, that's why I'm a happy coder.&lt;br /&gt;&lt;br /&gt;Tag: java annotation apt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857737191482651?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/java-se-5-annotation-finally-i-found.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857733160400105</guid><pubDate>Mon, 18 Sep 2006 11:02:00 +0000</pubDate><atom:updated>2006-10-21T21:10:47.026+08:00</atom:updated><title>First decision</title><description>&lt;P&gt;Original on Live Space:Tue Aug 01 08:49:16 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;My baby girl made her first big decision last night. She chose one first name for herself.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;It's not easy to name a baby. With help from my friends and classical Chinese literature, I finally came up with &lt;a href="http://thesimonspacec.spaces.live.com/blog/cns!BF1481C4CD7C9927!240.entry"&gt;several proposals&lt;/a&gt;. But it's really hard to make the final decision.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;I think it's important to let my baby involved. So I wrote a simple java application. It will display all candidates quickly and repeatedly. I put her left foot on keyboard. My baby &amp;quot;think&amp;quot; a while and kicked. Alas! The name scrolling stopped and she picked her name by herself!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;I hope she will be pride of this when she grows up.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: baby code&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857733160400105?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/first-decision.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857730258604339</guid><pubDate>Mon, 18 Sep 2006 11:01:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.961+08:00</atom:updated><title>To be a father</title><description>&lt;P&gt;Original on Live Space:Mon Jul 03 06:02:41 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;Dear God, my ancient parents, the unknown future,&lt;br&gt;Please, bring me a healthy angel, and keep my wife safe.&lt;br&gt;I promise I will present you a most beautiful soul.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: baby&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857730258604339?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/to-be-father.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857729993247110</guid><pubDate>Mon, 18 Sep 2006 11:01:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.896+08:00</atom:updated><title>Flex Builder Plugin</title><description>&lt;P&gt;Original on Live Space:Wed Jun 28 05:12:46 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;I'm working on a mushup mockup. (Isn't it cool?) And I am shocked with the power of Flash. &lt;br&gt;But the first steps are always difficult, below are some problems I encountered and my solution.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;1. Download&lt;br&gt;I want to use some new tech in ActionScript 3.0. So the first step is to download and install Flex Builder 2.0 beta 3.&lt;br&gt;You can found it on Adobe site. &lt;a href="http://labs.adobe.com/technologies/flashplayer9/"&gt;http://labs.adobe.com/technologies/flashplayer9/&lt;/a&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;2. Installation&lt;br&gt;I already have Eclipse 3.1.2 on my PC. So I want to install Flex Builder plug-in and Flex SDK. &lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tip 1: Flex installer conflicts with J2ME plugin eclipseME 1.2.1.&lt;br&gt;For some reason, the installer won't accept my Eclipse home directory and keep requesting &amp;quot;Eclipse 3.1 and up&amp;quot;. I found it was caused by my J2ME plugin. If you install into a clean Eclipse 3.1.2, you get no complain at all.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tip 2: Uninstall Flash Player before you install.&lt;br&gt;If you have Flash Player 8 installed, please uninstall it. Otherwise you might encounter &amp;quot;internal error&amp;quot; when debug Flex project. (not sure)&lt;br&gt;If you have Flash Player 9 installed, I suggest you uninstall it as well, you need a debug version which is included in the installer.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;3. GO&lt;br&gt;The 1st time you start Eclipse after installed Flex Builder, you will be asked for register code, just press &amp;quot;Try&amp;quot;.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;4. Run your application&lt;br&gt;In Navigator view, right click your project -&amp;gt; Run as -&amp;gt; Flex Application. You will start your application.&lt;br&gt;&lt;/div&gt; &lt;div&gt;If you encountered 'An internal error occurred during: &amp;quot;Launching&amp;quot;', and you might found the following info in your Eclipse log.&lt;/div&gt; &lt;div&gt;!ENTRY org.eclipse.core.runtime 4 2 2006-06-28 10:38:12.843&lt;br&gt;!MESSAGE An internal error occurred during: &amp;quot;Launching&amp;quot;.&lt;br&gt;!STACK 0&lt;br&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: 5&lt;br&gt; at java.lang.String.substring(Unknown Source)&lt;br&gt; at flash.tools.debugger.DefaultDebuggerCallbacks.determineExeForType(DefaultDebuggerCallbacks.java:70)&lt;br&gt; at flash.tools.debugger.DefaultDebuggerCallbacks.recomputeExeLocations(DefaultDebuggerCallbacks.java:50)&lt;br&gt; at flash.tools.debugger.DefaultDebuggerCallbacks.getHttpExe(DefaultDebuggerCallbacks.java:31)&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;You can solve it in 2 ways.&lt;br&gt;&lt;/div&gt; &lt;div&gt;Workaround: change your Run and Debug setting, the default Run setting for Flex application check &amp;quot;Use defaults&amp;quot; in &amp;quot;URL or path to launch&amp;quot;.&lt;br&gt;The default setting launch a html. Change it to launch the swf file with the same same.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Solution: change the Eclipse setting.&lt;br&gt;I found my workaround failed when I want to debug an application which has to communicate within the Javascript and Flash ActionScript 3.0. This forced me to find a real solution. &lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;And it was hidden in Eclipse Preference -&amp;gt; General -&amp;gt; Web Browser. By default, &amp;quot;Default system Web browser&amp;quot; is selected. Change it to &amp;quot;Internet Explorer&amp;quot;. But I want to use FireFox, so I add it manually and it work fine.&lt;br&gt;&lt;/div&gt; &lt;div&gt;Uhm, I'm feeling Lucky.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: Flex Builder Eclipse&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857729993247110?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/flex-builder-plugin.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857729385892498</guid><pubDate>Mon, 18 Sep 2006 11:01:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.836+08:00</atom:updated><title>Pay for MY camera</title><description>&lt;P&gt;Original on Live Space:Wed Jun 21 10:23:12 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;I'm working on a wireless application that will use camera. While I am coding in China, another guy is testing on the other side of the planet.&lt;br&gt; &lt;br&gt;In China, I can install ANY application on my phone. But the American guy is not so lucky. He can't install the application because: 1, it will access camera. 2, it's unsigned (created by unknown people). &lt;br&gt; &lt;br&gt;&amp;quot;So we pay $400 per year to get a Verisign cert for Sprint? Why?&amp;quot;&lt;br&gt;&amp;quot;To access camera is a restricted API for Sprint Nextel.&amp;quot;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;What a free country! I have to pay for MY camera, &lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;That's the funny part. And it's not the end of the story. My colleague couldn't install the application even after it was signed. He had to manually register his phone on Sprint's website to have it installed.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;To be frank, I actually think the limitation is kind of reasonable. Because it's not ME want to access MY camera, but a SOFTWARE want to access a CUSTOMER's camera, so it involves privacy and security. I guess we still have to register online because the signed application is not verified by Sprint. I asked my colleague to test if he can install unsigned version on his registered phone, but I was ignored.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;This limitation has its pro and con. The pro is the customer might be safer. The con is it's not good for the innovation.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;What's your opinion?&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag:  Sprint MIDP2.0&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857729385892498?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/pay-for-my-camera.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857728592042847</guid><pubDate>Mon, 18 Sep 2006 11:01:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.774+08:00</atom:updated><title>Bill Gates is retiring from MS</title><description>&lt;P&gt;Original on Live Space:Sun Jun 18 13:08:36 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;Microsoft announced &lt;a href="http://www.msnbc.msn.com/id/13348456/"&gt;Bill Gates will retire in 2 years&lt;/a&gt;.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Bill Gates is a hero in my heart. I admire him so much because his success in bussiness and his generous.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Here in China, there are still a lot of misunderstanding about him, but being a poor young man from south west of China, I feel &lt;a href="http://tech.sina.com.cn/it/m/2002-06-03/118542.shtml"&gt;I owe him a big favour&lt;/a&gt;.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;But many Chinese people remember he said &amp;quot;Chinese steal software&amp;quot;. For years I've doubted this was a rumor until one friend show me &lt;a href="http://news.com.com/2100-1023-212942.html?legacy=cnet"&gt;the source&lt;/a&gt;. To be frank, I feel hurt.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Anyway, no one is perfect, I wish his retirement is not an end of a legend, but the beginning of another one.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: Bill Gates&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857728592042847?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/bill-gates-is-retiring-from-ms.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857726787071774</guid><pubDate>Mon, 18 Sep 2006 11:01:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.718+08:00</atom:updated><title>College Entrance Exam 2006</title><description>&lt;P&gt;Original on Live Space:Thu Jun 08 05:15:39 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;Today and yesterday are big days for 9.5 million of students in China. They will take College Entrance Exam and their future will be greatly influenced by the outcome.&lt;/div&gt; &lt;div&gt;9.5 million, that means if you put one student per square kilometer, these young guys will occupy entire China.&lt;br&gt; &lt;br&gt;The exam itself has been changed a lot. This year, recommended candidates also need to take some exam to avoid corruption.&lt;br&gt; &lt;br&gt;I'm a lucky bird in this game, but I don't enjoy it, although it's the only close-to-fair game for most students.&lt;/div&gt; &lt;div&gt;&lt;br&gt; &lt;/div&gt; &lt;div&gt;Tag: education&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857726787071774?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/college-entrance-exam-2006.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857697979563507</guid><pubDate>Mon, 18 Sep 2006 10:56:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.657+08:00</atom:updated><title>Be nice to yourself</title><description>&lt;P&gt;Original on Live Space:Wed May 17 04:16:11 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;&amp;quot;&lt;a href="http://home.wangjianshuo.com/archives/20060511_keep_doing_and_its_meaning.htm"&gt;Many people started &lt;/a&gt;blog but quit after three weeks. Someone decided to recite all the words in an English directory, but quit when they encounter &amp;quot;B&amp;quot;. More people make up minds to start running, but stop after five morning exercise.&amp;quot;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Wang Jianshuo think people quit when they found the goal is meaningless. But I think it's because they were so strict to themselves.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;I saw people quit morning exercise, but they always know exercise is good to health.&lt;br&gt;And I saw people keep doing meaningless staff for years. &lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;People try to keep their words, but once they broke it, it's easy to find an excuse and broke it a second time. Actually I decided to recite all words for CET4 (College English Test level 4) years ago, and I quited when I encounter &amp;quot;Apple&amp;quot;. (Still a long way to &amp;quot;B&amp;quot;!) I got a high score in CET4, but I felt really bad to fail my goal even I never announced it. So I decided to figure out my own way to keep my goal.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Basically I decided to be nice to myself, when I make a plan, I setup 2 goals, I mark one goal as &amp;quot;must achieved&amp;quot; and another as &amp;quot;better have&amp;quot;. The &amp;quot;must achieved&amp;quot; goal is so easy that I can't fail. And the &amp;quot;better have&amp;quot; one is difficult for an ordinary man (like me!).&lt;/div&gt; &lt;div&gt;I seldom failed my goal since then although I didn't achieve &amp;quot;better have&amp;quot; goals every time.&lt;/div&gt; &lt;div&gt;For instance, when I started my baby diary half an years ago, my goal was to cover 70% of the days. And now, I never missed one single day no matter how busy my job was. Some nights I was very tired, but when I wrote &amp;quot;diary for yesterday&amp;quot;, I didn't feel guilty because I didn't break my words!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Positive hints is very important for people.&lt;/div&gt; &lt;div&gt;It reminds me one interesting question from a MS manager &amp;quot;how many projects are finished in time in MS?&amp;quot;&lt;br&gt;The answer is &amp;quot;All, because MS keep adjusting its schedule.&amp;quot;&lt;br&gt;Some people feel it is nonsense. But it's very important to avoid negative hints such as &amp;quot;My projects in MS always delay&amp;quot;.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;BTW, here is an interesting example that people keep doing meaningless staffs:&lt;br&gt;In my college life, I want to gain weight and began to eat big breakfast that usually for 2 men. I found it useless after several months, but still kept it for more than one year until one day I heard a whisper from my classmate. &amp;quot;Guess what, I ate a big breakfast that almost as much as Simon does!&amp;quot;&lt;/div&gt; &lt;div&gt;In this case, I quit when I find it's meaningful (to quit!).&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: lifehack&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857697979563507?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/be-nice-to-yourself.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857697134964825</guid><pubDate>Mon, 18 Sep 2006 10:56:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.593+08:00</atom:updated><title>Comfortable way</title><description>&lt;P&gt;Original on Live Space:Thu May 11 10:41:19 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;I work together with several other Chinese engineers under a US boss. My boss asked me one day if I noticed the recent low performance of the team.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;This was true, and the morale of the team was low.&lt;br&gt;But another fact is my team members are good coders, they are very productive in the previous projects.&lt;br&gt;And yet there was a third fact: we just transferred from another boss. This made things not so funny.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;The actual reason is the engineer are not working in their comfortable way.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Our boss prefers design in detail first.&lt;br&gt;My colleagues believe the design will come out during coding. In previous projects, they keep moving fast and do a lot of refactoring when possible.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;The boss thinks any change is possible in design phase, including a total different solution.&lt;br&gt;But you know how hard for a coder to discard code!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;So they are not in a team. A team should work in a same way but now everyone just sticked to his own methodology. I believe the is no best way in software development. But an unhappy person could never be productive.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;The good news was I had good relationship with both side. So I tried my best to influence &lt;/div&gt; &lt;div&gt;them and we eventually shifted to a new track in a painless way. At least the subtle atmosphere has gone in the office.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Life is too short to hate your job.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: methodology communication&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857697134964825?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/comfortable-way.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857696550738036</guid><pubDate>Mon, 18 Sep 2006 10:56:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.530+08:00</atom:updated><title>Test driven programming on GUI, in a hard way</title><description>&lt;P&gt;Original on Live Space:Fri Apr 21 01:56:08 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;I was fascinated with XP(eXtreme Programming) from day 0. But I often deal with GUI and it's hard to do XP in that domain.&lt;br&gt;Here is a real-life sample for your reference.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Problem: We need to display images on the screen, one images per line but their height may vary. User can scroll up and down, the image might be change (and with a new height) by external event. &lt;br&gt;Make sure the current selected image can be fully displayed unless it's taller than screen. In this case, just display the upper part.&lt;br&gt;Make sure leave no empty gap in the bottom unless the total size of all images are shorter than the screen.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Step 1: move all GUI related code out, and now our task becomes:&lt;br&gt;&lt;/div&gt; &lt;div&gt;We have a list of images in a model, we can get height of image by dataModel.getItemAt(i).getHeight().&lt;br&gt;We can get the image count by dataModel.size().&lt;br&gt;We have the following global vars:&lt;br&gt;int selectedItemIndex; // index of current selected image.&lt;br&gt;int firstDisplayedItemIndex; // index of the 1st visible image in the screen.&lt;br&gt;int offY;   // the offset of 2 points, one point is the top left of the 1st visible image, another is the top left of the screen.&lt;br&gt;We need to write a method to change firstDisplayedItemIndex, offY.&lt;br&gt;void calcPosition(int availableHeight)&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Comment: we can even exclude dataModel from the method and make it a math quiz, but it's good enough for me by now.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Step 2: Design test cases.&lt;br&gt;&lt;/div&gt; &lt;div&gt;Basically we will provide initial value for firstDisplayedItemIndex and selectedItemIndex, and provide some image height data, after we call the method, we will check firstDisplayedItemIndex and offY to make sure they are correct. &lt;br&gt;I try my best to setup 17 test cases:&lt;br&gt;// selectedItemIndex == firstDisplayedItemIndex, selectedItemIndex is taller than screen&lt;br&gt;// selectedItemIndex == firstDisplayedItemIndex, selectedItemIndex is same height as screen&lt;br&gt;// selectedItemIndex == firstDisplayedItemIndex, selectedItemIndex is shorter than screen, and we can fully display the next image&lt;br&gt;// selectedItemIndex == firstDisplayedItemIndex, selectedItemIndex is shorter than screen, and we can't fully display the next image&lt;br&gt;// no scroll needed, we can fully display the last image on screen&lt;br&gt;// no scroll needed, we can't fully display the last image on screen&lt;br&gt;// no scroll needed, but selectedItemIndex would be the last image on screen.&lt;br&gt;// selectedItemIndex would be the last image on screen, and firstDisplayedItemIndex will increased by 1. (push 1 image out of screen top).&lt;br&gt;// selectedItemIndex would be the last image on screen, and firstDisplayedItemIndex will increased by 2. (push 2 images out of screen top).&lt;br&gt;// before: selectedItemIndex is the last image on screen. After: it should be the 1st on screen. selectedItemIndex is taller than screen&lt;br&gt;// before: selectedItemIndex is the last image on screen. After: it should be the 1st on screen. selectedItemIndex is same height as screen&lt;br&gt;// before: selectedItemIndex is the last image on screen. After: it should be the 1st on screen. selectedItemIndex is shorter than screen.&lt;br&gt;// selectedItemIndex is the last one in model, no scroll needed&lt;br&gt;// selectedItemIndex is the last one in model. After method, firstDisplayedItemIndex will increased by 1.&lt;br&gt;// selectedItemIndex is the last one in model. After method, firstDisplayedItemIndex will increased by 2.&lt;br&gt;// selectedItemIndex is the last one in model. And we have to scroll back a little bit to fit the bottom gap.&lt;br&gt;// selectedItemIndex is the last one in model. And we can display all images and still have bottom gap.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Comment: some test cases are not necessary, but the great thing is algorithm might jump out when you prepare tests!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Step 3: Write the test code (and framework!).&lt;br&gt;&lt;/div&gt; &lt;div&gt;I don't have JUnit here for my J2ME project, so I write my own simpler version.&lt;/div&gt; &lt;div&gt;class Test&lt;br&gt;{&lt;br&gt;    int [][] testData={&lt;br&gt;        // firstDisplayedItemIndex, selectedItemIndex, window height,&lt;br&gt;        // new firstDisplayedItemIndex, offY       and height data for test!&lt;br&gt;        {0, 0, 10, 0, 0,    11, 2, 3, 4, 5, 6 },&lt;br&gt;        {0, 0, 10, 0, 0,     1, 2, 3, 4, 5, 6 }, &lt;br&gt;        {0, 0,  9, 0, 0,     1, 2, 3, 4, 5, 6 }, &lt;br&gt;        {2, 5,  8, 3, -1,    1, 1, 1, 2, 1, 6 }, &lt;br&gt;        ... // more test cases are removed.&lt;br&gt;    };&lt;br&gt;    final int OFFSET =5;&lt;/div&gt; &lt;div&gt;    public static void main(String[] arg)&lt;br&gt;    {&lt;br&gt;        Test inst = new Test();&lt;br&gt;        for (int i=0; i&amp;lt;inst.testData.length; i++)&lt;br&gt;        {&lt;br&gt;            inst.testWrapper(i);&lt;br&gt;        }&lt;br&gt;    }&lt;/div&gt; &lt;div&gt;    int availableHeight, selectedItemIndex, firstDisplayedItemIndex, offY;&lt;br&gt;    int currentCaseId;&lt;/div&gt; &lt;div&gt;    void testWrapper(int caseId)&lt;br&gt;    {&lt;br&gt;        // init&lt;br&gt;        currentCaseId = caseId;&lt;br&gt;        firstDisplayedItemIndex=testData[caseId][0];&lt;br&gt;        selectedItemIndex=testData[caseId][1];&lt;br&gt;        availableHeight=testData[caseId][2];&lt;/div&gt; &lt;div&gt;        // run the method to test!&lt;br&gt;        calcPosition(availableHeight);&lt;/div&gt; &lt;div&gt;        // verify result&lt;br&gt;        if (testData[caseId][3]!=firstDisplayedItemIndex ||&lt;br&gt;                testData[caseId][4]!=offY)&lt;/div&gt; &lt;div&gt;        {&lt;br&gt;            System.out.println(&amp;quot;error caseId:&amp;quot;+caseId);&lt;br&gt;        }&lt;br&gt;    }&lt;br&gt;}&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Comment: we don't have the most powerful tools, but it works for us!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Step 4: Code and debug.&lt;br&gt;&lt;/div&gt; &lt;div&gt;I copy method calcPosition(int availableHeight) into my test class and do a little modification:&lt;br&gt;Change all code from:&lt;br&gt;dataModel.getItemAt(i).getHeight();&lt;br&gt;to:&lt;br&gt;testData[currentCaseId][i+OFFSET];&lt;br&gt;and from:&lt;br&gt;dataModel.size()&lt;br&gt;to:&lt;br&gt;testData[currentCaseId].length-OFFSET&lt;/div&gt; &lt;div&gt;Not surprised, my test class keep reporting error but it's very fast for me to debug and correct.&lt;/div&gt; &lt;div&gt;Step 5: copy code back.&lt;br&gt;After the Test class stop complain, I copy the method back and change all testData stuffs back to dataModel stuffs.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Conclusion:&lt;br&gt;Even in GUI related code, even without powerful tool, we can still work in a test-driven way.&lt;br&gt;It's not that painful!&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Tag: XP agile GUI sample JUnit&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857696550738036?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/test-driven-programming-on-gui-in-hard.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27975173.post-115857695568826629</guid><pubDate>Mon, 18 Sep 2006 10:55:00 +0000</pubDate><atom:updated>2006-10-21T21:10:46.453+08:00</atom:updated><title>It's all about money</title><description>&lt;P&gt;Original on Live Space:Tue Apr 11 02:25:01 CST 2006&lt;/p&gt;&lt;br/&gt;&lt;div&gt;My friend Jim commented on my last blog entry: &amp;quot;i believe you have the ability to play with Linux well, why always stick to m$?&amp;quot;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;I don't.&lt;br&gt;In fact, I use Mandriva 2006 free edition at home. I tried to help other Linux users and share my knowledge. Believe it or not, I applied my first credit card so that I could &lt;a href="http://www.linuxsir.org/bbs/showthread.php?t=40932"&gt;send Mandrake $57 &lt;/a&gt;to show my respect when it was close to bankrupt.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;But it's true Microsoft is a hot tag on this blog, and on my home notebook, WinXP is the default boot choice.&lt;/div&gt; &lt;div&gt;&lt;br&gt;Because Windows is my job and Linux is my skill. I've solid evidence to prove myself an experienced Windows coder but no boss are brave enough to see me as a qualified Linux coder. I can live on Linux but can't make a living on it.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;I'm not kidding. It's all about money.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/27975173-115857695568826629?l=blog.loveforlife.net%2Fsimon%2Findex.html'/&gt;&lt;/div&gt;</description><link>http://blog.loveforlife.net/simon/2006/09/its-all-about-money.html</link><author>noreply@blogger.com (Simon Li)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>

