<?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>James Lao &#187; Code</title>
	<atom:link href="http://jameslao.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameslao.com</link>
	<description>Dreaming...</description>
	<lastBuildDate>Fri, 16 Jul 2010 05:46:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Aside: Scala Tutorial</title>
		<link>http://jameslao.com/2010/07/16/scala-tutorial/</link>
		<comments>http://jameslao.com/2010/07/16/scala-tutorial/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 05:46:24 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=447</guid>
		<description><![CDATA[Just worked my way through the Scala Tutorial (PDF). It&#8217;s an interesting language so far. It mixes my favorite parts of functional and object oriented languages in an elegant way. I&#8217;ll have to write something in it to see if &#8230; <a href="http://jameslao.com/2010/07/16/scala-tutorial/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just worked my way through the <a href="http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaTutorial.pdf">Scala Tutorial</a> (PDF). It&#8217;s an interesting language so far. It mixes my favorite parts of functional and object oriented languages in an elegant way. I&#8217;ll have to write something in it to see if the imperative aspects of the language ruin the functional aspects for me though. Next up: <a href="http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaByExample.pdf">Scala by Example</a> (PDF).</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2010/07/16/scala-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Erlang</title>
		<link>http://jameslao.com/2010/01/26/learning-erlang/</link>
		<comments>http://jameslao.com/2010/01/26/learning-erlang/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 05:34:15 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sml]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=384</guid>
		<description><![CDATA[I&#8217;m learning Standard ML in Principles of Programming (15-212). I didn&#8217;t think I would like the functional programming paradigm but it&#8217;s starting to grow on me. Having functions as first class values allows you to do some pretty neat things &#8230; <a href="http://jameslao.com/2010/01/26/learning-erlang/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning Standard ML in Principles of Programming (15-212). I didn&#8217;t think I would like the functional programming paradigm but it&#8217;s starting to grow on me. Having functions as first class values allows you to do some pretty neat things that would be a pain in other languages and some of the programming idioms are quite elegant. The only thing I haven&#8217;t enjoyed is Standard ML and it&#8217;s strong type system. The syntax leaves much to be desired as well, but this seems to be common among functional programming languages. As you can probably tell by the title of this post, I decided to learn Erlang in my free time.</p>
<p>The main reason I chose Erlang over say Haskell, Clojure, or some other functional language is my interest in concurrency and scalability. From what I&#8217;ve read people have had a lot of success with Erlang in situations that require concurrency and scalability so it seemed like a good way to satisfy my concurrency itch and my curiosity for functional programming. For the curious, Wikipedia has <a href="http://en.wikipedia.org/wiki/Erlang_(programming_language)#Projects_using_Erlang">a short list</a> of some projects using Erlang including some big names like Facebook and Amazon.</p>
<p>I&#8217;ve been reading <a href="http://pragprog.com/titles/jaerlang/programming-erlang">Programming Erlang</a> by Joe Armstrong. It&#8217;s a pretty solid book so far. It&#8217;s well written and easy to follow. There&#8217;s a lot of code snippets for you to try which fits my learning style. I wish there were some exercises at the end each section or chapter to get the reader thinking and writing some code instead of passively reading. My strategy for getting around this so far is to redo my 15-212 homework in Erlang, which has worked out pretty well.</p>
<p>I find my 15-212 homework easier to do in Erlang. It&#8217;s dynamically typed so I can add an integer and float together (what a concept!). I know you can do that in SML if you call the <code>real</code> function but it&#8217;s a pain and makes the code hard to read. Also, guards are awesome. One of the things that really annoyed me about pattern matching in SML is that while it was a very elegant, you still had to resort to if/else to check for things like inequalities and greater than or less than relationships. Guards in Erlang let you do this in natural way that feels like an extension to pattern matching.</p>
<p>Erlang is great so far. I&#8217;m starting to get into the concurrency features of Erlang so hopefully I&#8217;ll have more interesting things to post later.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2010/01/26/learning-erlang/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Related Posts Widget 1.0</title>
		<link>http://jameslao.com/2010/01/01/related-posts-widget-1-0/</link>
		<comments>http://jameslao.com/2010/01/01/related-posts-widget-1-0/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 06:01:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=375</guid>
		<description><![CDATA[Related Posts Widget shows a list of posts with similar tags to the current post. The widget is only shown on single post pages. That is, it is only shown when is_single() returns true. Features: Support for displaying thumbnail images &#8230; <a href="http://jameslao.com/2010/01/01/related-posts-widget-1-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Related Posts Widget shows a list of posts with similar tags to the current post. The widget is only shown on single post pages. That is, it is only shown when <code>is_single()</code> returns <code>true</code>.</p>
<p>Features:</p>
<ul>
<li>Support for displaying thumbnail images via WP 2.9&#8242;s new post thumbnail feature.</li>
<li>Set how many posts to show.</li>
<li>Option to show the post excerpt and how long the excerpt should be.</li>
<li>Option to show the post date.</li>
<li>Option to show the comment count.</li>
<li>Option to make the widget title link to the category page.</li>
<li>Multiple widgets.</li>
</ul>
<p>You can <a href="http://wordpress.org/extend/plugins/related-posts-widget/">download the plugin from the WordPress repository</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2010/01/01/related-posts-widget-1-0/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Category Posts Widget 3.0</title>
		<link>http://jameslao.com/2009/12/30/category-posts-widget-3-0/</link>
		<comments>http://jameslao.com/2009/12/30/category-posts-widget-3-0/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 09:12:56 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cpw]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=366</guid>
		<description><![CDATA[This latest update introduces a few new features: Support for WordPress 2.9&#8242;s post thumbnails. Option to show the post date. Option to show the comment count. Option to set the word length of the excerpt. Note that support for Simple &#8230; <a href="http://jameslao.com/2009/12/30/category-posts-widget-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This latest update introduces a few new features:</p>
<ul>
<li>Support for WordPress 2.9&#8242;s post thumbnails.</li>
<li>Option to show the post date.</li>
<li>Option to show the comment count.</li>
<li>Option to set the word length of the excerpt.</li>
</ul>
<p>Note that support for Simple Post Thumbnails has been removed in favor of the built in functionality.</p>
<p>You can download the plugin at the WordPress plugin repository: <a href="http://wordpress.org/extend/plugins/category-posts/">Download here</a>.</p>
<p>Please donate if you find this plugin useful.</p>
<p><strong>Update:</strong> Several people have been reporting an error &#8220;Warning: Invalid argument supplied for foreach()&#8230;&#8221; I just pushed out version 3.1 which should fix this. This bug could have been fixed if I had done some more rigorous testing. I&#8217;ll do better next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2009/12/30/category-posts-widget-3-0/feed/</wfw:commentRss>
		<slash:comments>100</slash:comments>
		</item>
		<item>
		<title>Category Posts Widget 2.0</title>
		<link>http://jameslao.com/2009/07/29/category-posts-widget-2-0/</link>
		<comments>http://jameslao.com/2009/07/29/category-posts-widget-2-0/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 07:00:54 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cpw]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=317</guid>
		<description><![CDATA[Update: Category Posts Widget has been updated to version 3.0! I just released a long overdue update to Category Posts Widget. At the time of this writing, it has been downloaded over 23,500 times and has an average of 4.5 &#8230; <a href="http://jameslao.com/2009/07/29/category-posts-widget-2-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <a href="http://jameslao.com/2009/12/30/category-posts-widget-3-0/">Category Posts Widget has been updated to version 3.0!</a></p>
<p>I just released a long overdue update to <a href="http://wordpress.org/extend/plugins/category-posts/">Category Posts Widget</a>. At the time of this writing, it has been downloaded <a href="http://wordpress.org/extend/plugins/category-posts/stats/">over 23,500 times</a> and has an average of 4.5 stars from 22 people!</p>
<p><img title="CPW Stats" src="http://jameslao.com/wp-content/uploads/2009/07/Picture-1-460x502.png" alt="CPW Stats" width="460" height="502" /></p>
<p>CPW 2.0 has been included with <a href="http://www.press75.com/">Press75</a> themes for sometime now. I haven&#8217;t heard any problems with it yet so it should be pretty stable. I updated it to use the new widget API so it is only compatible with WordPress 2.8 and above. It also supports a little plugin I wrote called <a href="http://wordpress.org/extend/plugins/simple-post-thumbnails/">Simple Post Thumbnails</a>.</p>
<p><a href="http://wordpress.org/extend/plugins/category-posts/">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2009/07/29/category-posts-widget-2-0/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>
		</item>
		<item>
		<title>Simple Plugins for Press75.com</title>
		<link>http://jameslao.com/2009/04/04/simple-plugins-for-press75com/</link>
		<comments>http://jameslao.com/2009/04/04/simple-plugins-for-press75com/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 00:43:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=258</guid>
		<description><![CDATA[I wrote a couple WordPress plugins for Jason Schuller over at Press75.com. Jason designs premium themes for WordPress. Many of his themes have been video centric and he asked me to write a couple plugins to make it easier for &#8230; <a href="http://jameslao.com/2009/04/04/simple-plugins-for-press75com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wrote a couple WordPress plugins for Jason Schuller over at <a href="http://www.press75.com/">Press75.com</a>. Jason designs premium themes for WordPress. Many of his themes have been video centric and he asked me to write a couple plugins to make it easier for his customers to post videos.</p>
<p><a href="http://www.press75.com/the-simple-video-embedder-wordpress-plugin/">Simple Video Embedder</a> adds a widget to the posting screen with fields for inputting URLs to videos on popular video sharing sites such as YouTube and Vimeo. The plugin can automagically generate embed codes for many video sites, but also provides a manual embed code field for unsupported ones.</p>
<p><a href="http://www.press75.com/the-simple-post-thumbnails-wordpress-plugin/">Simple Post Thumbnails</a> adds a widget to the posting screen as well. It provides an upload form to upload an image to use as a thumbnail. The plugin will crop and resize the image to the correct size for you so you don&#8217;t have to open up Photoshop every time you want to post a thumbnail for your posts. The plugin also has another field to input a URL to a remote image which gets downloaded and cropped, making it even easier.</p>
<p>Hope you like the plugins and definitely check out some of Jason&#8217;s awesome themes.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2009/04/04/simple-plugins-for-press75com/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Category Posts Widget update</title>
		<link>http://jameslao.com/2008/11/17/category-posts-widget-update/</link>
		<comments>http://jameslao.com/2008/11/17/category-posts-widget-update/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 00:16:05 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=221</guid>
		<description><![CDATA[I made a small update to my Category Posts Widget plugin regarding the problems people were having with displaying excerpts. Thanks to &#8220;carnyfeet&#8221; who posted the fix in this thread on the WordPress forums. You can download the update at &#8230; <a href="http://jameslao.com/2008/11/17/category-posts-widget-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I made a small update to my Category Posts Widget plugin regarding the problems people were having with displaying excerpts. Thanks to &#8220;carnyfeet&#8221; who posted the fix in <a href="http://wordpress.org/support/topic/176604">this thread</a> on the WordPress forums.</p>
<p>You can <a href="http://wordpress.org/extend/plugins/category-posts/">download the update</a> at the official WordPress plugin repository or use the automatic update feature in newer versions of WordPress.</p>
<p>Thanks to everyone who is using the plugin! Over 10,000 downloads since I first released it in October 2007!</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2008/11/17/category-posts-widget-update/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Category Posts Widget 1.3</title>
		<link>http://jameslao.com/2008/04/18/category-posts-widget-13/</link>
		<comments>http://jameslao.com/2008/04/18/category-posts-widget-13/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 05:28:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[cpw]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=147</guid>
		<description><![CDATA[Update: Category Posts Widget has been updated to version 3.0! As promised, I&#8217;ve updated Category Posts Widget. Version 1.3 brings one new feature to the table: an option to show a post excerpt. I also converted the widget to the new &#8230; <a href="http://jameslao.com/2008/04/18/category-posts-widget-13/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <a href="http://jameslao.com/2009/12/30/category-posts-widget-3-0/">Category Posts Widget has been updated to version 3.0!</a></p>
<p>As promised, I&#8217;ve updated Category Posts Widget. Version 1.3 brings one new feature to the table: an option to show a post excerpt. I also converted the widget to the new WordPress 2.5 system of adding multiple widgets so 1.3 will only work on WordPress 2.5 or later. Please donate if you like this plugin! Full list of changes below.</p>
<h3>Changes:</h3>
<ul>
<li>New option to display post excerpt below permalink.</li>
<li>Display as many posts from a category as you want.</li>
<li>Add as many widgets as you want.</li>
<li>WordPress 2.5 or later compatible only.</li>
</ul>
<p><strong>Note:</strong> You may have to reconfigure your CPW widgets if you are upgrading from a previous version.</p>
<h3>Download</h3>
<p>You can <a href="http://wordpress.org/extend/plugins/category-posts/">download Category Posts Widget 1.3</a> at the official WordPress plugin repository.</p>
<h3>Donate</h3>
<p>This plugin was created by me and is made available free of charge. However, if you would like to show your appreciation, you can donate via PayPal by clicking the donate button in the sidebar. All funds go towards paying for my college expenses.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2008/04/18/category-posts-widget-13/feed/</wfw:commentRss>
		<slash:comments>92</slash:comments>
		</item>
		<item>
		<title>Two-Time State Web Design Monster</title>
		<link>http://jameslao.com/2008/04/13/two-time-state-web-design-monster/</link>
		<comments>http://jameslao.com/2008/04/13/two-time-state-web-design-monster/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 18:12:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[champion]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[skillsusa]]></category>

		<guid isPermaLink="false">http://jameslao.com/?p=141</guid>
		<description><![CDATA[I competed in the Oregon SkillsUSA web design competition again yesterday. The rules were the same as least year. We had four hours to build a website based on a fictitious website proposal. However, I went solo this time around &#8230; <a href="http://jameslao.com/2008/04/13/two-time-state-web-design-monster/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="noborder float_right" title="SkillsUSA" src="http://jameslao.com/wp-content/uploads/2007/04/skillsusa-logo.png" alt="SkillsUSA logo" /></p>
<p>I competed in the <a href="http://jameslao.com/2007/04/16/oregon-skillsusa-web-design-champions/">Oregon SkillsUSA web design competition</a> again yesterday. The rules were the same as least year. We had four hours to build a website based on a fictitious website proposal. However, I went solo this time around and competed against six other teams of two. It was interesting to say the least.</p>
<p>After the competition I went to Red Robin with Sadie, her dad, and Emerald for lunch. I had the most amazing burger I&#8217;ve ever had in my life there. It was heavenly, epic even. I think it was called the <a href="http://jameslao.com/wp-content/uploads/2008/04/burger.jpg">Whiskey River BBQ Burger</a>. The onion straws at the bottom are magical.</p>
<p>After lunch we went back to the competition for the awards ceremony. It was really long like last year&#8217;s. They awarded the winners in alphabetical order by competition name so web design was near the very end. Sadie and Emerald took third and I took first again. That makes me the two-time state web design <span style="text-decoration: line-through;">champion</span> monster. <img src='http://jameslao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s a link to <a title="The website I made" href="http://jameslao.com/skillsusa-web-2008/">the website</a> I made. That&#8217;s what four hours, a computer, a Kit Kat bar, a bottle of water, and an iPod full of good music can get you.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2008/04/13/two-time-state-web-design-monster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Category Posts Widget 1.2.1</title>
		<link>http://jameslao.com/2008/03/25/category-posts-widget-121/</link>
		<comments>http://jameslao.com/2008/03/25/category-posts-widget-121/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 09:30:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jameslao.com/2008/03/25/category-posts-widget-121/</guid>
		<description><![CDATA[By request, I added an option to make the widget title a link to the category page. You can turn this option on and off in the configuration dialog of the widget. It&#8217;s a simple checkbox. I&#8217;ll add an option &#8230; <a href="http://jameslao.com/2008/03/25/category-posts-widget-121/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>By request, I added an option to make the widget title a link to the category page. You can turn this option on and off in the configuration dialog of the widget. It&#8217;s a simple checkbox.</p>
<p>I&#8217;ll add an option for post excerpts in the near future when I get my main laptop up and running again. I coded this feature on my secondary laptop which doesn&#8217;t have my usual coding software.</p>
<p>You can download the new plugin <a title="Category Posts Widget 1.2.1" href="http://wordpress.org/extend/plugins/category-posts/">here</a> at the WordPress plugin repository.</p>
<p>Also note that I&#8217;m closing comments on the other posts about Category Posts Widget because it&#8217;s becoming hard to keep track of them all across several different posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameslao.com/2008/03/25/category-posts-widget-121/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
