<?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/developer/blog &#187; ruby</title>
	<atom:link href="http://jameswilliams.me/developer/blog/tags/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameswilliams.me/developer/blog</link>
	<description>A development blog</description>
	<lastBuildDate>Mon, 08 Dec 2008 23:13:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First Steps With Ruby</title>
		<link>http://jameswilliams.me/developer/blog/2008/12/first-steps-with-ruby/</link>
		<comments>http://jameswilliams.me/developer/blog/2008/12/first-steps-with-ruby/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 21:32:32 +0000</pubDate>
		<dc:creator>James Williams</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jameswilliams.me/developer/blog/?p=73</guid>
		<description><![CDATA[After watching two fantastic PDC videos, Deep Dive: Dynamic Languages in Microsoft .NET and IronRuby: The Right Language for the Right Job, I started doing some serious thinking about dynamic languages and .NET. At work (where we use VB.Net), we tend to throw around several different data types that are essentially duck-typed: objects with key/value [...]]]></description>
			<content:encoded><![CDATA[<p>After watching two fantastic <a href="http://channel9.msdn.com/pdc2008/">PDC</a> videos, <a href="http://channel9.msdn.com/pdc2008/TL10/">Deep Dive: Dynamic Languages in Microsoft .NET</a> and <a href="http://channel9.msdn.com/pdc2008/TL44/">IronRuby: The Right Language for the Right Job</a>, I started doing some serious thinking about dynamic languages and .NET. At work (where we use VB.Net), we tend to throw around several different data types that are essentially duck-typed: objects with key/value collections that if it has a certain set of keys, it&#8217;s of type A and if it has another set of keys, it&#8217;s of type B.</p>

<p>What would happen if we combined these objects with the capabilities of a dynamic language?</p>

<p>I have no idea. With the exception of Objective-C, I don&#8217;t have much experience with dynamic languages. And Objective-C, sitting on top of C like it does, is hardly a candidate for running on the <a href="http://en.wikipedia.org/wiki/Dynamic_Language_Runtime">DLR</a>. And it&#8217;s hardly as expressive as something like Python or Ruby, which are conveniently the first languages available on the DLR.</p>

<p>So before I could start experimenting with our stuff and dynamic languages, I had to actually learn a dynamic language. I picked ruby, mostly by coin flip. I&#8217;m not starting with IronRuby right away. I find I&#8217;m always happier when I can manage complexity and it seemed that adding a not-quite-finished runtime to the mix could cause me trouble that I wouldn&#8217;t be prepared to fix. So I installed the &#8220;official&#8221; Ruby package for Windows and got to work.</p>

<p>I started out by implementing <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway&#8217;s Game of Life</a> in Ruby. Over the course of an afternoon, I was able to whittle it down to 91 lines by swapping out the procedural statements I&#8217;d written for more Ruby-ish idioms. The Game of Life has such a simple set of requirements (there are just four basic rules) that I didn&#8217;t have to think about what the program had to actually do and could instead concentrate on the language I was writing it in. I think this is going to be my go-to first project when learning a new language from now on.</p>

<p>After that, I started implementing the first few <a href="http://projecteuler.net/">Project Euler</a> problems (the first one is doable with just one line of ruby). It didn&#8217;t take long for the math to get hard enough that I was no longer concentrating on the language, though. So I stopped pretty soon into the problem set.</p>

<p>I&#8217;m not really sure what I&#8217;m going to do next. Possibly something like Tetris, but it&#8217;s all up in the air. But even with this limited exposure to the language, I&#8217;m starting to look at the code I&#8217;m writing day-to-day and saying &#8220;How would this be easier in Ruby?&#8221;. I think that&#8217;s pretty valuable and so far, I&#8217;m quite pleased with the language and want to get to know it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilliams.me/developer/blog/2008/12/first-steps-with-ruby/feed/</wfw:commentRss>
		<slash:comments>-1</slash:comments>
		</item>
	</channel>
</rss>
