<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kennith :: Blog &#187; Programming</title>
	<atom:link href="http://kennithleung.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://kennithleung.com</link>
	<description>Code hard, play hard.</description>
	<lastBuildDate>Mon, 10 Oct 2011 16:33:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Fix: Android Null Pointer Exception</title>
		<link>http://kennithleung.com/blog/2011/02/26/fix-android-null-pointer-exception/</link>
		<comments>http://kennithleung.com/blog/2011/02/26/fix-android-null-pointer-exception/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 10:45:49 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://kennithleung.com/?p=609</guid>
		<description><![CDATA[For a while, the error message while compiling the android app gave me the following error: java.lang.NullPointerException at com.android.ddmlib.Client.sendAndConsume(Client.java:572) at com.android.ddmlib.HandleHello.sendHELO(srcfile.java:142) at com.android.ddmlib.HandleHello.sendHelloCommands(srcfile.java:65) at com.android.ddmlib.Client.getJdwpPacket(Client.java:671) at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:317) at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263) The app runs fine, but it is annoying to see the DDMS error message. Finally, today find a fix. It is a simple fix too&#8230; In [...]]]></description>
			<content:encoded><![CDATA[<p>For a while, the error message while compiling the android app gave me the following error:</p>
<p><code>java.lang.NullPointerException<br />
	at com.android.ddmlib.Client.sendAndConsume(Client.java:572)<br />
	at com.android.ddmlib.HandleHello.sendHELO(srcfile.java:142)<br />
	at com.android.ddmlib.HandleHello.sendHelloCommands(srcfile.java:65)<br />
	at com.android.ddmlib.Client.getJdwpPacket(Client.java:671)<br />
	at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:317)<br />
	at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)</code></p>
<p>The app runs fine, but it is annoying to see the DDMS error message. Finally, today find a fix. It is a simple fix too&#8230; </p>
<p>In the AVD, enter some value to the SD Card size. Then the problem goes away&#8230;</p>
<p><img src="https://lh4.googleusercontent.com/_Q6CXh-oog8w/TWhbYFRH4tI/AAAAAAAAAzU/8NgaTrYwcIs/s800/avd-sdcard-fix.png" alt="" /></p>
<p>Now I am happy&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2011/02/26/fix-android-null-pointer-exception/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Successful Web App</title>
		<link>http://kennithleung.com/blog/2010/11/12/a-successful-web-app/</link>
		<comments>http://kennithleung.com/blog/2010/11/12/a-successful-web-app/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 21:48:54 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://kennithleung.com/blog/2010/11/12/a-successful-web-app/</guid>
		<description><![CDATA[Facebook is successful not only because it brings the social experience to the web, but it is a platform that people tends to stay in the website for a long time. First it provide live status update for friend feed, then it provides live chat. Farmville and Restaurant give people incentive to constantly refresh their [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook is successful not only because it brings the social experience to the web, but it is a platform that people tends to stay in the website for a long time. </p>
<p>First it provide live status update for friend feed, then it provides live chat. Farmville and Restaurant give people incentive to constantly refresh their farm and restaurant from within Facebook. The longer people stay on Facebook, the higher probability that an ad can be served. </p>
<p>Another example is gmail. I constantly leave the gmail page open on my web browser. It has so much of my attention that I do not bother to close it anymore. I can get email, I can chat, now I can call. </p>
<p>So what other type of service attracts people stay on the website?</p>
<p>What if Amazon could think of something that attracts their customer to stay their website? Will it get more customer to buy? What type of service can they provide?</p>
<p>It&#8217;s something good to think about it. </p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2010/11/12/a-successful-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter</title>
		<link>http://kennithleung.com/blog/2008/11/25/twitter-2/</link>
		<comments>http://kennithleung.com/blog/2008/11/25/twitter-2/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 20:53:58 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/?p=378</guid>
		<description><![CDATA[Twitter started off with a small project, now it becomes bigger and bigger. People now prefer to write 140 characters than to write a blog post. The &#8220;quick&#8221; approach from twitter definitely suits nowadays culture, fast information. Twitter is going to be big, but it is not going to be big in its current status. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3252/3048854993_24e0a1b9be.jpg" alt="Twitter Logo" border="0" /></p>
<p>Twitter started off with a small project, now it becomes bigger and bigger. People now prefer to write 140 characters than to write a blog post.</p>
<p>The &#8220;quick&#8221; approach from twitter definitely suits nowadays culture, fast information. </p>
<p>Twitter is going to be big, but it is not going to be big in its current status. (Frequent downtime.)</p>
<p>Let&#8217;s come back in a year and see how twitter has affect our lives. </p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/11/25/twitter-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Syntax</title>
		<link>http://kennithleung.com/blog/2008/09/09/code-syntax/</link>
		<comments>http://kennithleung.com/blog/2008/09/09/code-syntax/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 19:28:19 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/?p=330</guid>
		<description><![CDATA[I just added a code syntax for easier to read code on my blog. Just testing it out. 1 2 3 4 5 6 7 8 9 &#60; ?php function foo&#40;&#41; &#123; &#125; &#160; class fooish&#40;&#41; &#123; var $test; function fooish&#40;&#41; &#123;&#125; &#125; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>I just added a code syntax for easier to read code on my blog. Just testing it out.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #000000; font-weight: bold;">function</span> foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> fooish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$test</span><span style="color: #339933;">;</span>
 <span style="color: #000000; font-weight: bold;">function</span> fooish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/09/09/code-syntax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress for iPhone</title>
		<link>http://kennithleung.com/blog/2008/07/22/wordpress-for-iphone/</link>
		<comments>http://kennithleung.com/blog/2008/07/22/wordpress-for-iphone/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 17:20:26 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/archive/2008/07/22/wordpress-for-iphone/</guid>
		<description><![CDATA[I admit, I was sort of disappointed when the out of stock iPhone are unreachable. I was on my look to look for an alternative. However, this gives me a reason to get an iPhone. WordPress for iPhone. The iPhone 3G is not about the 3G, it is about the App store.]]></description>
			<content:encoded><![CDATA[<p><img src="http://wpiphone.files.wordpress.com/2008/07/main.png" alt="WordPress on iPhone" /></p>
<p>I admit, I was sort of disappointed when the out of stock iPhone are unreachable. I was on my look to look for an alternative.<br />
However, this gives me a reason to get an iPhone. </p>
<p><a href="http://iphone.wordpress.org/">WordPress for iPhone</a>.</p>
<p>The iPhone 3G is not about the 3G, it is about the App store.</p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/07/22/wordpress-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Press 2.6</title>
		<link>http://kennithleung.com/blog/2008/07/16/word-press-26/</link>
		<comments>http://kennithleung.com/blog/2008/07/16/word-press-26/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 20:21:50 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/archive/2008/07/16/word-press-26/</guid>
		<description><![CDATA[A new version has arrived for wordpress blog template. I did not wait for a second to upgrade it. I am very satisfied and pleased with the updated version. If you are using wordpress, there is no need to wait. Happy blogging with it. By the way, the Press This function is back. Yay!]]></description>
			<content:encoded><![CDATA[<p>A new version has arrived for wordpress blog template. I did not wait for a second to upgrade it. I am very satisfied and pleased with the updated version.</p>
<p>If you are using wordpress, there is no need to wait. Happy blogging with it. </p>
<p>By the way, the Press This function is back. Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/07/16/word-press-26/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3</title>
		<link>http://kennithleung.com/blog/2008/06/17/firefox-3/</link>
		<comments>http://kennithleung.com/blog/2008/06/17/firefox-3/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 07:00:07 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/?p=276</guid>
		<description><![CDATA[Today is Firefox 3 download day. Go get a copy and experience a better web browsing.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.spreadfirefox.com/node&#038;id=0&#038;t=264"><img border="0" alt="Download Day" title="Download Day" src="http://www.spreadfirefox.com/files/images/affiliates_banners/dday_badge_fox.png"/></a></p>
<p>Today is Firefox 3 download day. Go get a copy and experience a better web browsing. </p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/06/17/firefox-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cities and Ambition &#8211; Paul Graham</title>
		<link>http://kennithleung.com/blog/2008/05/27/cities-and-ambition-paul-graham/</link>
		<comments>http://kennithleung.com/blog/2008/05/27/cities-and-ambition-paul-graham/#comments</comments>
		<pubDate>Tue, 27 May 2008 22:50:10 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/?p=268</guid>
		<description><![CDATA[I just finished reading a piece from Mr. Graham on Cities and Ambition. I agreed with some of his points. He pointed out that a city could give an impression to others, such as New York is a financial city and Silicon Valley is a technology hub. In the end of the article, he said, [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading a piece from Mr. Graham on <a href="http://www.paulgraham.com/cities.html">Cities and Ambition</a>.</p>
<p>I agreed with some of his points. He pointed out that a city could give an impression to others, such as New York is a financial city and Silicon Valley is a technology hub.</p>
<p>In the end of the article, he said, </p>
<blockquote><p>No matter how determined you are, it&#8217;s hard not to be influenced by the people around you. It&#8217;s not so much that you do whatever a city expects of you, but that you get discouraged when no one around you cares about the same things you do.</p></blockquote>
<p>I found it is very true. The people around you can influence your life style or interest, though you might not feel the impact.</p>
<p>Take myself as an example. I am a programmer but I am not living in the Silicon Valley. As much as I like programming, I found that the people around me are mostly not programmer. </p>
<p>The conversation with the people around me mostly likely not about programming. It is a bit disappointed at first, but I actually liked it. It is because it will help me to feel what the world is talking about instead of just live inside the programming world. </p>
<p>I guess it all comes down to what you want. If I move to the Silicon Valley, I might meet more people with technological background and having more technological conversation, however, I might also miss some late night meaningless conversation or got me interested in playing Frisbee. </p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/05/27/cities-and-ambition-paul-graham/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissatisfy with Digg.com</title>
		<link>http://kennithleung.com/blog/2008/05/14/dissatisfy-with-diggcom/</link>
		<comments>http://kennithleung.com/blog/2008/05/14/dissatisfy-with-diggcom/#comments</comments>
		<pubDate>Wed, 14 May 2008 20:40:17 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Lab]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/?p=266</guid>
		<description><![CDATA[I used to like to read slashdot.org for technology news. Later I found digg.com/technology has cover new tech news faster, I switched to digg.com for tech news. However, I am pretty dissatisfy with what I got from digg.com. I did not get the same experience with digg.com for the tech news. I found less and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm2.static.flickr.com/1186/1205041802_30fb6021a5.jpg" alt="" border="0" /></p>
<p>I used to like to read slashdot.org for technology news. Later I found digg.com/technology has cover new tech news faster, I switched to digg.com for tech news.</p>
<p>However, I am pretty dissatisfy with what I got from digg.com. I did not get the same experience with digg.com for the tech news. I found less and less interesting with the tech news posted on digg.com/technology. I thought the more people use digg.com means the more relevant technology news I would get. I guess it was not the case, or I have different flavor than the technology crowd that use digg.com</p>
<p>Anyway, I found that <a href="http://news.ycombinator.com/">http://news.ycombinator.com/</a> is a rising choice for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2008/05/14/dissatisfy-with-diggcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Usability</title>
		<link>http://kennithleung.com/blog/2007/11/26/web-usability/</link>
		<comments>http://kennithleung.com/blog/2007/11/26/web-usability/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 19:14:40 +0000</pubDate>
		<dc:creator>Kennith</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.kennithleung.com/archive/2007/11/26/web-usability/</guid>
		<description><![CDATA[I often visit sites from China or targeting Chinese readers. It often returns different experience. While Google is taking the simplicity as their approach, sites from the Chinese just try to add as much as possible in their front page. There are often 20-plus links to click, flashing animation, and floating flash ads. They try [...]]]></description>
			<content:encoded><![CDATA[<p>I often visit <a href="http://news.baidu.com">sites</a> from China or targeting <a href="http://hk.news.yahoo.com">Chinese readers</a>. </p>
<p>It often returns different experience. </p>
<p>While Google is taking the simplicity as their approach, sites from the Chinese just try to add as much as possible in their front page. There are often 20-plus links to click, flashing animation, and floating flash ads. They try to catch as much attention as possible. It kind of irritates me, but apparently, the Chinese like <a href="http://www.techcrunch.com/2007/11/06/google-taking-design-lessons-from-yahoo-in-china/">it</a> very much. </p>
<p>I also found a big difference in Chinese website is its abuse use of opening links into new window. If I am not using tab opening, after reading five Chinese news, I will have to close five windows in the end. I found it was really annoying to typical user if they do not use any plug-in to control windows pop up.</p>
<p>The west has approach to the simplicity while the Chinese approach the opposite. I often wonder which direction is more user friendly in the global audience. </p>
<p>Until the trend becomes more clear, I still prefer to simplicity. </p>
]]></content:encoded>
			<wfw:commentRss>http://kennithleung.com/blog/2007/11/26/web-usability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

