<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Acts_as_buffoon</title>
	<atom:link href="http://actsasbuffoon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://actsasbuffoon.wordpress.com</link>
	<description>Ruby, Rails, and whatever else crosses my mind.</description>
	<lastBuildDate>Fri, 26 Aug 2011 12:56:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='actsasbuffoon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Acts_as_buffoon</title>
		<link>http://actsasbuffoon.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://actsasbuffoon.wordpress.com/osd.xml" title="Acts_as_buffoon" />
	<atom:link rel='hub' href='http://actsasbuffoon.wordpress.com/?pushpress=hub'/>
		<item>
		<title>New Blog</title>
		<link>http://actsasbuffoon.wordpress.com/2010/08/18/new-blog/</link>
		<comments>http://actsasbuffoon.wordpress.com/2010/08/18/new-blog/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 08:23:00 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=56</guid>
		<description><![CDATA[I&#8217;ve had some issues with WordPress that have driven me to move my blog. Long story short, you can find me here from now on: http://actsasbuffoon.heroku.com I&#8217;m moving due to frustration with the constraints about the type of data I can post. WordPress won&#8217;t allow you to post iframes, embedded Flash, or Javascript, which I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=56&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some issues with WordPress that have driven me to move my blog. Long story short, you can find me here from now on: <a href="http://actsasbuffoon.heroku.com">http://actsasbuffoon.heroku.com</a></p>
<p>I&#8217;m moving due to frustration with the constraints about the type of data I can post. WordPress won&#8217;t allow you to post iframes, embedded Flash, or Javascript, which I can understand from a security standpoint. However, I&#8217;d really like to be able to post Youtube videos via the new iframe method that makes them directly viewable on an iPad (I love my iPad).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=56&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2010/08/18/new-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharding with MongoDB 1.6.0</title>
		<link>http://actsasbuffoon.wordpress.com/2010/08/18/sharding-with-mongodb-1-6-0/</link>
		<comments>http://actsasbuffoon.wordpress.com/2010/08/18/sharding-with-mongodb-1-6-0/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 03:23:31 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=45</guid>
		<description><![CDATA[I&#8217;ve created a 13 minute screencast demonstrating how to set up sharding in MongoDB 1.6.0. Let me know if you found it useful. http://www.youtube.com/watch?v=l3ib5eEEOqk The script I used to put data into the database can be found here: http://gist.github.com/532669<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=45&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a 13 minute screencast demonstrating how to set up sharding in MongoDB 1.6.0. Let me know if you found it useful.</p>
<p><a href="http://www.youtube.com/watch?v=l3ib5eEEOqk">http://www.youtube.com/watch?v=l3ib5eEEOqk</a></p>
<p>The script I used to put data into the database can be found here: <a href="http://gist.github.com/532669">http://gist.github.com/532669</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=45&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2010/08/18/sharding-with-mongodb-1-6-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>UrDoinItRite</title>
		<link>http://actsasbuffoon.wordpress.com/2010/02/21/urdoinitrite/</link>
		<comments>http://actsasbuffoon.wordpress.com/2010/02/21/urdoinitrite/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 17:41:29 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=41</guid>
		<description><![CDATA[In addition to AutoPong, I&#8217;ve also released another project today. This one is called UrDoinItRite, and you can find it here on GitHub. UrDoinItRite will eventually become a full fledged RPG engine based on Gosu. At the moment, it&#8217;s just a hacked together proof of concept that I slapped together in a few hours. Expect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=41&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In addition to AutoPong, I&#8217;ve also released another project today. This one is called UrDoinItRite, and you can find it <a title="UrDoinItRite" href="http://github.com/actsasbuffoon/UrDoinItRite">here on GitHub</a>.</p>
<p>UrDoinItRite will eventually become a full fledged RPG engine based on Gosu. At the moment, it&#8217;s just a hacked together proof of concept that I slapped together in a few hours. Expect updates soon.</p>
<p>Also, check out the <a title="UrDoinItRite" href="http://patient360.lighthouseapp.com/projects/47045-urdoinitrite/">Lighthouse page</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=41&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2010/02/21/urdoinitrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoPong</title>
		<link>http://actsasbuffoon.wordpress.com/2010/02/21/autopong/</link>
		<comments>http://actsasbuffoon.wordpress.com/2010/02/21/autopong/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 17:02:45 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby-Processing]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=39</guid>
		<description><![CDATA[I&#8217;ve just released some code I wrote yesterday over the course of an hour and a half. It&#8217;s a simple Ruby-Processing script that plays a game of Pong by itself. There&#8217;s not much to it, but if you&#8217;re curious about learning Processing/Ruby-Processing, then I suggest checking it out. http://github.com/actsasbuffoon/AutoPong<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=39&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released some code I wrote yesterday over the course of an hour and a half. It&#8217;s a simple Ruby-Processing script that plays a game of Pong by itself. There&#8217;s not much to it, but if you&#8217;re curious about learning Processing/Ruby-Processing, then I suggest checking it out.</p>
<p><a title="http://github.com/actsasbuffoon/AutoPong" href="http://github.com/actsasbuffoon/AutoPong">http://github.com/actsasbuffoon/AutoPong</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=39&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2010/02/21/autopong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>O Hai</title>
		<link>http://actsasbuffoon.wordpress.com/2010/02/21/o-hai/</link>
		<comments>http://actsasbuffoon.wordpress.com/2010/02/21/o-hai/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:57:20 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=37</guid>
		<description><![CDATA[Apparently I have a blog. Who knew? I&#8217;ve been away for a long while, and I&#8217;ve been quite busy. I&#8217;ve changed jobs (I&#8217;m the lead developer for a Ruby based startup now), and I&#8217;ve written a whole lot of code. I&#8217;ll spare you the boring details, but I&#8217;m going to try to post more often. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=37&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Apparently I have a blog. Who knew?</p>
<p>I&#8217;ve been away for a long while, and I&#8217;ve been quite busy. I&#8217;ve changed jobs (I&#8217;m the lead developer for a Ruby based startup now), and I&#8217;ve written a whole lot of code. I&#8217;ll spare you the boring details, but I&#8217;m going to try to post more often.</p>
<p>I had an entertaining afternoon yesterday, and I threw together a few projects which I&#8217;ll post here shortly. Stay tuned!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=37&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2010/02/21/o-hai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to AutoItX3</title>
		<link>http://actsasbuffoon.wordpress.com/2008/12/30/introduction-to-autoitx3/</link>
		<comments>http://actsasbuffoon.wordpress.com/2008/12/30/introduction-to-autoitx3/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:40:09 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=34</guid>
		<description><![CDATA[I don&#8217;t know about you, but I&#8217;m constantly using Ruby to automate my work around the office. If I need a series of documents converted to another format, some data sorted out in a complex way, or even entering data into a web form, I&#8217;m usually doing it with Ruby. Ruby can plug into other [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=34&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but I&#8217;m constantly using Ruby to automate my work around the office. If I need a series of documents converted to another format, some data sorted out in a complex way, or even entering data into a web form, I&#8217;m usually doing it with Ruby.<span id="more-34"></span></p>
<p>Ruby can plug into other programs on Windows using OLE (Object linking &amp; embedding), which allows it to send messages to other programs. For instance, here&#8217;s the Ruby code needed to open an instance of Microsoft Word, have it open every .doc file in a folder, and then close them:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">require 'win32ole'
word = WIN32OLE.new "word.application"
Dir.glob("my_documents/*.doc").each do |doc|
  word.Documents.Add doc
  word.ActiveDocument.Close
end
word.Quit</pre>
<p>And that&#8217;s all there is to it!</p>
<p>You may have noticed that I called all of the OLE methods with a capitalized first letter. In some cases, the name of an OLE method may conflict with the name of a regular Ruby method. For instance, if an OLE enabled program has a method named &#8220;send&#8221; then instead of calling the OLE method, you&#8217;d actually end up calling Ruby&#8217;s default send method that all objects have. You can avoid the problem by calling OLE methods with capitalized letters, which will never conflict with Ruby&#8217;s built in methods.</p>
<h2>Ruby as the Ultimate Glue Language</h2>
<p>There are lots of other things you can do with OLE, including controlling any MS Office application, most web browsers, and a whole slew of other programs. As you can imagine, it&#8217;s very powerful stuff to be able to script these programs from Ruby.</p>
<p>However, even the best OLE enabled programs tend to leave me wanting to be able to do something that the designers didn&#8217;t account for. That&#8217;s where AutoItX3 comes in.</p>
<p>AutoItX3 is a programming language that was made specifically to automate Windows. You can find it here: <a title="http://www.autoitscript.com/autoit3/index.shtml" href="http://www.autoitscript.com/autoit3/index.shtml">http://www.autoitscript.com/autoit3/index.shtml</a></p>
<p>If you need to automate something, it&#8217;s usually best to use the OLE interface when possible. AutoItX3 is a generalized tool, but a program&#8217;s OLE interface was created with that program in mind. However, when the OLE interface leaves you in need of more functionality, AutoItX3 can usually take care of whatever you need.</p>
<h2>Where AutoItX3 Went Wrong</h2>
<h3><em>(And why it doesn&#8217;t matter)</em></h3>
<p>Now, you may have noticed a problem with AutoItX3; it&#8217;s syntax looks like Visual Basic! I don&#8217;t know about you, but I stopped programming in Basic a long time ago, and I&#8217;d rather not start again. AutoItX3 has static variable typing, a lack of blocks, and all sorts of other things that make us love Ruby so.</p>
<p>Fortunately, the people who made AutoItX3 were not only bright enough to make this awesome tool, they also gave it a great OLE interface. In other words, we can use the methods from AutoItX3, but control the logic with Ruby. You get virtually all the power of AutoItX3, but only a tiny learning curve.</p>
<h2>Keyboard Control to Major Tom</h2>
<p>Have you ever wanted to make Ruby take control of your keyboard? Perhaps to log into some website that doesn&#8217;t support cookies or something? Here&#8217;s how it goes in AutoItX3 (Via Ruby):</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">require 'win32ole'
ai = WIN32OLE.new("AutoItX3.Control")
1.upto(10) do |i|
  ai.Send "#{i}{ENTER}"
end</pre>
<p>This script will print 1 through 10, pressing the Enter key after each number. AutoItX3 handles special keys through a set of escapes which are placed between {}. A full listing of escapes can be found here: <a title="http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm" href="http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm">http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm</a></p>
<p>There are also some shorthand escapes that don&#8217;t require curly brackets. For instance ^ is short for CTRL, so:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">ai.Send "^c"</pre>
<p>would type CTRL+C (AKA: the shortcut for the Copy command).</p>
<h2>Three Blind Mice</h2>
<p>Of course, it can also control your mouse:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">ai.MouseClick("left", 50, 75)</pre>
<p>The above code would perform a left-click at 50 pixels from the left of your screen by 75 pixels from the top. AutoItX3 can even automate your scrollwheel:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">ai.MouseWheel("down", 10)</pre>
<p>This will make your mouse scroll down 10 &#8220;clicks&#8221;. AutoItX3 can also drag, drop, and do just about anything else you can legally do with a mouse in most states.</p>
<h2>Where Art Thou, Notepad?</h2>
<p>AutoItX3 can also wait for a specific window to open before moving on. Consider the following code:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">require 'win32ole'

ai = WIN32OLE.new("AutoItX3.Control")

ai.WinWaitActive("Untitled - Notepad")
ai.Send("Chunky bacon!")</pre>
<p>This program would run, wait until the active window is named &#8220;Untitled &#8211; Notepad&#8221;, and then type out a message. This is great for handling popups.</p>
<h2>The More Things Change&#8230;</h2>
<p>Now let&#8217;s say you&#8217;re using AutoItX3, but you&#8217;ve run into a nasty problem. A program you&#8217;re automating has some step that takes a long time. It&#8217;s difficult to get AutoItX3 to know when the program has finished processing, because it doesn&#8217;t give any kind of programatic feedback.</p>
<p>You could compensate by building a set delay into your program, but you&#8217;re wasting time after the other program finishes processing. Even more severe, if the other program processes longer than expected, you&#8217;re program could resume processing before the other program is ready. When that happens, your program is probably going to eat flaming death.</p>
<p>Fortunately, AutoItX3 can deal with this. So long as something changes on the screen when the other program finishes processing, you can use AutoItX3&#8242;s PixelChecksum method to spot changes:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">old_screen_checksum = ai.PixelChecksum(100, 100, 200, 200)

until ai.PixelChecksum(100, 100, 200, 200) != old_screen_checksum do
  sleep 0.1
end</pre>
<p>The code above would take a 100 by 100 pixel checksum of the screen, and check 10 times per second to see if that area of the screen has changed.</p>
<p>There are many other things that AutoItX3 can do.  The documentation is quite decent, and the new abilities it gives Ruby are divine. Try it out and I&#8217;m sure you&#8217;ll be impressed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=34&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2008/12/30/introduction-to-autoitx3/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Useful Assignment Operators</title>
		<link>http://actsasbuffoon.wordpress.com/2008/12/26/useful-assignment-operators/</link>
		<comments>http://actsasbuffoon.wordpress.com/2008/12/26/useful-assignment-operators/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 14:42:43 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=29</guid>
		<description><![CDATA[Ruby has lots of idiosyncrasies that beautify our code and make our lives easier. Let&#8217;s take a quick look at two assignment operators that I consider to be a staple of clean, readable code. foo &#124;&#124;= &#8220;bar&#8221; First, we have the &#124;&#124;= operator. The &#124;&#124;= operator only assigns a value to the variable if the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=29&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruby has lots of idiosyncrasies that beautify our code and make our lives easier. Let&#8217;s take a quick look at two assignment operators that I consider to be a staple of clean, readable code.<span id="more-29"></span></p>
<h1>foo ||= &#8220;bar&#8221;</h1>
<p>First, we have the ||= operator. The ||= operator only assigns a value to the variable if the variable is nil. Let&#8217;s consider the following two programs.</p>
<p>This first program isn&#8217;t using ||=.</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">foo = nil
foo = "bar" if foo.nil?
puts foo                      #Returns "bar"
foo = "baz" if foo.nil?
puts foo                      #Returns "bar"</pre>
<p>Now let&#8217;s see how it would look using ||=</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">foo = nil
foo ||= "bar"
puts foo                      #Returns "bar"
foo ||= "baz"
puts foo                      #Returns "bar"</pre>
<p>In both programs line 2 causes &#8220;bar&#8221; to be assigned to foo, since foo is nil. On line 4 &#8220;baz&#8221; is not assigned, because foo is no longer nil. Both versions work the same way, but version two has the benefit of having one less conditional statement to read. In my opinion, it&#8217;s cleaner and easier to read.</p>
<h1>foo = bar || baz</h1>
<p>Next, we have this little beauty. It&#8217;s so simple, but so wonderfully useful, especially when using hashes as method arguments. Basically, a lot of programmers think || is only useful in conditional statements, but there are many other places where it can be useful. Consider the following program:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">foo = "Chunky"
bar = nil
puts foo || bar  #Returns "Chunky"
foo = nil
bar = "bacon!"
puts foo || bar  #Returns "bacon!"
foo = "Chunky"
bar = "bacon!"
puts foo || bar  #Returns "Chunky"</pre>
<p>A lot of programmers think it&#8217;s a little weird seeing || operators outside of a conditional statement, but they do exactly what you&#8217;d expect in this context. Line three essentially says &#8220;puts &#8216;Chunky&#8217; or nil&#8221;. The || operator returns whichever argument is not false, so it returns &#8220;Chunky&#8221; and discards nil.</p>
<p>Then line six does the opposite.  The &#8220;foo&#8221; variable is now nil, but &#8220;bar&#8221; has a value. The || operator returns &#8220;bacon!&#8221; and discards nil.</p>
<p>Line nine has two valid values, so || returns the first one and discards the second.</p>
<p>This can really make life easier when passing hashes as method arguments. Consider the following bit of code:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">def my_method(foo = {:bar =&gt; "Chunky"})
  @instance_var = foo[:bar]
end

puts my_method({:baz =&gt; "bacon!"})       #Returns nil</pre>
<p>What&#8217;s wrong with this code? Well, the programmer wanted the &#8220;foo&#8221; hash to have a default key/value pair of {:bar =&gt; &#8220;Chunky&#8221;}, but something went wrong. The method was provided with an arguement, and the default value was dropped. However, the argument hash didn&#8217;t define a &#8220;:bar&#8221; key, so there&#8217;s no value associated with it.</p>
<p>Fortunately this example is just trying to print the value to the console. Had it been trying to multiply it by something then we&#8217;d have ended up with an exception instead!</p>
<p>Of course, the program could use a cumbersome conditional statement to get around this:</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">def my_method(foo = {})
  foo[:bar] = "Chunky" if foo[:bar].nil?
  @instance_var = foo[:bar]
end

puts my_method({:baz =&gt; "bacon!"})</pre>
<p>But that&#8217;s more bothersome than it needs to be. Let&#8217;s see how it would look using ||.</p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">def my_method(foo = {})
  @instance_var = foo[:bar] || "Chunky"
end

puts my_method({:baz =&gt; "bacon!"})</pre>
<p>Once again, I think that&#8217;s a lot easier on the eyes. We&#8217;ve done away with another conditional statement and replaced with something more Ruby-like.</p>
<p>Plus, as <a href="http://www.jroller.com/dscataglini/entry/parameters_signature_matters_in_method" target="_blank">Diego Scataglini points out</a>, methods that take a single hash as an argument perform considerably faster than methods that take more than a few regular variables, especially if you&#8217;re using default assignments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=29&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2008/12/26/useful-assignment-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Commatose Released</title>
		<link>http://actsasbuffoon.wordpress.com/2008/12/04/commatose-released/</link>
		<comments>http://actsasbuffoon.wordpress.com/2008/12/04/commatose-released/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 14:59:07 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Gems]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[comma]]></category>
		<category><![CDATA[commatose]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=21</guid>
		<description><![CDATA[As you may have already noticed from my last post, I&#8217;ve created a new gem called Commatose. Commatose is an extremely simple gem (The whole thing is only 4Kb, and that&#8217;s only because I write 10 lines of documentation for every line of code). It allows you to quickly and easily separate your numbers with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=21&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you may have already noticed from my last post, I&#8217;ve created a new gem called Commatose.<span id="more-21"></span></p>
<p>Commatose is an extremely simple gem (The whole thing is only 4Kb, and that&#8217;s only because I write 10 lines of documentation for every line of code). It allows you to quickly and easily separate your numbers with commas (Or any other arbitrary separator).</p>
<p>Commatose has some useful internationalization options, such as the ability to use something other than commas as a separator, changing the number of digits between separators and separating the numbers after a decimal point.</p>
<p>You can see the RubyForge page here: <a title="http://rubyforge.org/projects/commatose/" href="http://rubyforge.org/projects/commatose/" target="_blank">http://rubyforge.org/projects/commatose/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=21&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2008/12/04/commatose-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Gem</title>
		<link>http://actsasbuffoon.wordpress.com/2008/12/04/creating-a-gem/</link>
		<comments>http://actsasbuffoon.wordpress.com/2008/12/04/creating-a-gem/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 14:53:18 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Gems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[gemspec]]></category>
		<category><![CDATA[RDoc]]></category>
		<category><![CDATA[rubyforge]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=16</guid>
		<description><![CDATA[Ever wanted to create your own gem? It&#8217;s a lot easier than you probably think it is. Let&#8217;s walk through the steps. Consider this extremely simple script: Extracted from commatose.rb class Fixnum def to_sc(delimiter = ",", numbers_per_section = 3) self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter) end end class Bignum def to_sc(delimiter = ",", numbers_per_section = 3) self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=16&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to create your own gem? It&#8217;s a lot easier than you probably think it is. Let&#8217;s walk through the steps.<span id="more-16"></span></p>
<p>Consider this extremely simple script:</p>
<p><em>Extracted from commatose.rb</em></p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">class Fixnum
  def to_sc(delimiter = ",", numbers_per_section = 3)
    self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter)
  end
end

class Bignum
  def to_sc(delimiter = ",", numbers_per_section = 3)
    self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter)
  end
end

class Float
  def to_sc(delimiter = ",", numbers_per_section = 3, after_decimal = false)
    if after_decimal then
      self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter)
    else
      self.to_s.split(".")[0].gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter) + "." + self.to_s.split(".")[1]
    end
  end
end</pre>
<p>This script extends the Fixnum, Bignum and Float classes with a new method called &#8220;to_sc&#8221;. The method converts the number to a string and inserts commas (or some other arbitrary separator).</p>
<p>The code itself isn&#8217;t important, so don&#8217;t worry if you can&#8217;t follow it. What we&#8217;re concerned about is turning this into a gem.</p>
<h2>Documenting your gem with RDoc</h2>
<p>So, first thing&#8217;s first. Every gem needs some decent documentation. If you&#8217;ve never worked with RDoc before, then you may be surprised by how easy this next step will be.</p>
<p>RDoc extracts comments from your code and creates really nice looking HTML documentation. You don&#8217;t even have to worry about writing the HTML. RDoc will create it for you using a very simple markup language.</p>
<p>Here&#8217;s my documented Fixnum class:</p>
<p><em>Extracted from commatose.rb</em></p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">#= Commatose
#Commatose makes it easy to insert commas into your Fixnums, Bignums and Floats. See below for more information.
class Fixnum
  #Converts the number to a string and splits it by commas.
  #
  #Example:
  #	1234567.to_sc
  #	&gt;1,234,567
  #
  #You can change the delimiter by giving a string as an argument.
  #
  #Example:
  #  1234567.to_sc("_")
  #  &gt;1_234_567
  #
  #Commatose can also change the number of digits between seperators.
  #
  #Example:
  #1234567.to_sc(",", 2)
  #  &gt;1,23,45,67
  def to_sc(delimiter = ",", numbers_per_section = 3)
    self.to_s.gsub(/(\d)(?=\d{#{numbers_per_section}}+(\.\d*)?$)/, '\1' + delimiter)
  end
end</pre>
<p>As you can see, I&#8217;ve put some useful comments into the class. RDoc will read those comments and create valid HTML from them. I&#8217;ve put a tab between the hash mark and the bits that I want to show up as code in the documentation. That&#8217;s because any comments that are directly next to the hash mark will be put inside paragraph tags, and anything with a tab before it will be placed inside &lt;code&gt; and &lt;pre&gt; tags.</p>
<p>At the very top of the code, I wrote &#8220;= Commatose&#8221;. The equal sign will puts the &#8220;Commatose&#8221; into H1 tags. Two equal signs would be an H2, and so on and so forth.</p>
<p>Take a look at the RDoc I ended up with to see how this looks:</p>
<p><a title="http://commatose.rubyforge.org/rdoc/classes/Fixnum.html" href="http://commatose.rubyforge.org/rdoc/classes/Fixnum.html" target="_blank">http://commatose.rubyforge.org/rdoc/classes/Fixnum.html</a></p>
<p>I also included a README to give a more general explanation of the entire gem. Here&#8217;s an excerpt from the README:</p>
<p><em>Extracted from README (No file extension)</em></p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">= Commatose Documentation

Commatose makes it easy to insert commas into your numbers. It extends the Fixnum, Bignum and Float classes with a new method called "to_sc". The method name is short for "To string with comma". Using Commatose couldn't be easier. Let's take a look at a few examples.

== Fixnums

Commatose can convert fixnums like so:

  require 'commatose'
  puts "Example 1"
  num = 1234567
  puts "The number in this example is a #{num.class}."
  puts "Before:\t#{num}"
  puts "After:\t#{num.to_sc}"

The code above returns:

  Example 1
  The number in this example is a Fixnum.
  Before:	1234567
  After:	1,234,567

  {Learn more}[link:/classes/Fixnum.html]

== Bignums

Commatose can also convert bignums:

  require 'commatose'
  puts "Example 2"
  num = 1234567890
  puts "The number in this example is a #{num.class}."
  puts "Before:\t#{num}"
  puts "After:\t#{num.to_sc}"

The code above returns:

  Example 2
  The number in this example is a Bignum.
  Before:	1234567890
  After:	1,234,567,890

  {Learn more}[link:/classes/Bignum.html]</pre>
<p>As you can see, the syntax is exactly the same, except this isn&#8217;t a Ruby script so there&#8217;s no need to put comment symbols in front of each line. I still used an equal sign for H1 tags, two equal signs for H2 tags, and a tab to denote code. You&#8217;ll also notice that I added links to the classes that the examples refer to.</p>
<p>Take a look at the finished README:</p>
<p><a title="http://commatose.rubyforge.org/rdoc/" href="http://commatose.rubyforge.org/rdoc/" target="_blank">http://commatose.rubyforge.org/rdoc/</a></p>
<h2>Writing a Gemspec</h2>
<p>Okay, now the only thing we have left is to write a gemspec. The gemspec is what tells Gems how to create and package your code. Let&#8217;s take a look at the gemspec I wrote:</p>
<p><em>Extracted from commatose.gemspec</em></p>
<pre style="border:1px solid black;overflow:scroll;background-color:#dddddd;padding:3px;">spec = Gem::Specification.new do |s|
  s.name = "Commatose"
  s.version = "0.0.1"
  s.author = "Acts as Buffoon (A.K.A. Michael Tomer)"
  s.email = ""
  s.homepage = "http://actsasbuffoon.wordpress.com"
  s.platform = Gem::Platform::RUBY
  s.summary = "Commatose makes it easy to split your numbers by commas."
  s.files = ["commatose.rb", "README"]
  s.has_rdoc = true
  s.extra_rdoc_files = ['README']
  s.require_path = '.'
  s.rdoc_options &lt;&lt; '--main' &lt;&lt; 'README'
  s.rubyforge_project = 'Commatose'
end</pre>
<p>The gemspec itself is pretty straightforward. I specify that I want the gem to be known as &#8220;Commatose&#8221;, the version is 0.0.1, etc.</p>
<p>Under files, you specify the files that you want to have packaged. Of course, this is Ruby, so you can use Dir.glob, or some other command to grab lots of files.</p>
<p>&#8220;extra_rdoc_files&#8221; tells Gems to parse the given files with RDoc. Normally it would only look at .rb and .rbw files.</p>
<p>Additionally, I specify that the require path should be whatever folder Commatose is installed in. If you don&#8217;t specify an include path with your scripts in it, then requiring the gem won&#8217;t do anything!</p>
<p>Last, I set the main RDoc file to be README.</p>
<p>Okay, now it&#8217;s time to build the gem. Open a terminal and go to the folder where your gemspec is. Now type: &#8220;gem build commatose.gemspec&#8221;, substituting commatose with whatever your gemspec is named.</p>
<p>To install the gem just type: &#8220;sudo gem install commatose &#8211;local&#8221;, once again, substituting commatose with whatever your gem is called.</p>
<h2>Uploading your gem to RubyForge</h2>
<p>If you&#8217;d like to submit your gem to Rubyforge then you&#8217;ll need an account, of course. On the Rubyforge website, select &#8220;My Page&#8221; from the navigation menu. Now click the &#8220;Register Project&#8221; link. Once you submit your request you&#8217;ll get an e-mail telling you that it could be up to 72 hours before you find out if your project has been approved. Fortunately, it only took an hour or two to get Commatose approved.</p>
<p>Once you&#8217;re approved, go to your new project page and click the &#8220;Files&#8221; tab. Click the &#8220;Create a new release&#8221; link, and fill out the information. It may take a few hours before your gem is fully propagated to all of the gem servers. Once it is, you should be able to find your gem by opening a terminal and typing &#8220;gem search Commatose &#8211;remote&#8221;, with the name of your gem instead of Commatose.</p>
<h2>Creating a project page on RubyForge</h2>
<p>Next, you&#8217;ll want to make sure that you have a project page set up. Projects without a project page have always been a pet peeve of mine.</p>
<p>First, you&#8217;ll want to write a basic web page. Nothing fancy, just enough so people understand what your gem does and whether or not it meets their needs. Here&#8217;s the one I set up for Commatose: <a title="http://commatose.rubyforge.org/" href="http://commatose.rubyforge.org/" target="_blank">http://commatose.rubyforge.org/</a></p>
<p>In order to upload the page, you&#8217;ll need access to some kind of SCP tool. If you&#8217;re on Linux, Unix, or OS X, then you should be all set. If you&#8217;re on Windows, then you&#8217;ll need to download <a title="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PSCP</a>.</p>
<p>Assuming your HTML file is named &#8220;index.html&#8221;, your project is named &#8220;my_spiffy_project&#8221;, and your Rubyforge login name is &#8220;johndoe&#8221;; you&#8217;ll need to open a terminal and type: &#8220;scp index.html johndoe@rubyforge.org:/var/www/gforge-projects/my_spiffy_project/&#8221;. If you&#8217;re on Windows, then replace &#8220;scp&#8221; with &#8220;pscp&#8221;.</p>
<p>You&#8217;ll be asked for a password, which is whatever password you use to login to Rubyforge.</p>
<p>Additionally, you may want to upload your RDoc files so people can browse them without downloading the gem. Assuming your RDoc files are in a folder named rdoc, type &#8220;scp -r rdoc johndoe@rubyforge.org:/var/www/gforge-projects/my_spiffy_project/rdoc/&#8221;. The -r argument makes scp recursively upload all of the files inside the folder, otherwise it will complain that it can only upload regular files.</p>
<p>And that&#8217;s it! You have a gem on Rubyforge which can be downloaded via RubyGems. You&#8217;ve got some awesome RDoc documentation and a project page with extra information.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=16&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2008/12/04/creating-a-gem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
		<item>
		<title>How easy is Ruby?</title>
		<link>http://actsasbuffoon.wordpress.com/2008/11/26/how-easy-is-ruby/</link>
		<comments>http://actsasbuffoon.wordpress.com/2008/11/26/how-easy-is-ruby/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 15:49:06 +0000</pubDate>
		<dc:creator>actsasbuffoon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[examples]]></category>

		<guid isPermaLink="false">http://actsasbuffoon.wordpress.com/?p=11</guid>
		<description><![CDATA[A lot of beginners or would-be beginners don&#8217;t learn to program because of the myth that it&#8217;s difficult and time consuming. Let&#8217;s examine a few (very) short Ruby scripts and prove that Ruby is both easy and powerful. Don&#8217;t worry if you don&#8217;t know how to program in Ruby. The whole point of this article [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=11&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A lot of beginners or would-be beginners don&#8217;t learn to program because of the myth that it&#8217;s difficult and time consuming. Let&#8217;s examine a few (very) short Ruby scripts and prove that Ruby is both easy and powerful.</p>
<p>Don&#8217;t worry if you don&#8217;t know how to program in Ruby. The whole point of this article is to prove that Ruby is easy, so you&#8217;re the person who needs to read this article the most!</p>
<p>Also, don&#8217;t worry if you don&#8217;t perfectly understand how the code works. These examples aren&#8217;t meant to teach you how to program in Ruby, they&#8217;re supposed to get you excited enough to go out and learn!<span id="more-11"></span></p>
<p>I&#8217;m going to present 3 Ruby scripts, and we&#8217;ll examine how they work and what they do. Despite the fact that these scripts are short and simple, scripts just like these have saved me many hours at the office.</p>
<h2>Example 1</h2>
<p>&#8220;Example1.rb&#8221; is the Ruby script itself.</p>
<h3>example1.rb</h3>
<pre style="background-color:#ddd;border:solid black 1px;padding:3px;">File.open("example1.txt", "r") do |file|
  puts file.read.gsub("Dave", "Phil")
end</pre>
<p>Even if you don&#8217;t know how to program in Ruby yet, take a look at the script and see if you can get some idea of what it does.</p>
<p>Take a look at: File.open(&#8220;example1.txt&#8221;, &#8220;r&#8221;)</p>
<p>You probably guessed that it&#8217;s trying to read a file called &#8220;example1.txt&#8221;. If so, you get a biscuit! Let&#8217;s take a look at example1.txt to see if that can help us understand what the script is doing.</p>
<h3>example1.txt</h3>
<pre style="background-color:#ddd;border:solid black 1px;overflow:scroll;padding:3px;">In the event of an emergency please contact Dave. Dave will log in and fix the problem.

You can contact Dave at: Dave@megacorp.net</pre>
<p>It&#8217;s a simple text document with some contact information.</p>
<p>Now let&#8217;s look at: puts file.read.gsub(&#8220;Dave&#8221;, &#8220;Phil&#8221;)</p>
<p>In Ruby, &#8220;puts&#8221; means &#8220;print this to the screen and hit enter at the end&#8221;. So Ruby is printing something.</p>
<p>&#8220;file.read&#8221; seems pretty self explanitory. Ruby is reading the file that we gave it.</p>
<p>&#8220;Gsub&#8221; stands for &#8220;global substitution&#8221;. So, Ruby is reading the document and substituting &#8220;Dave&#8221; with &#8220;Phil&#8221;. Then it&#8217;s printing the result of that to the screen. Let&#8217;s what happens when we run the script.</p>
<pre style="background-color:#ddf;border:solid black 1px;overflow:scroll;padding:3px;">In the event of an emergency please contact Phil. Phil will log in and fix the problem.

You can contact Phil at: Phil@megacorp.net</pre>
<p>As you can see, it&#8217;s pretty easy to open a file and manipulate the contents with Ruby. Let&#8217;s try another example.</p>
<h2>Example 2</h2>
<h3>example2.rb</h3>
<pre style="background-color:#ddd;border:solid black 1px;padding:3px;">data_to_sort = []
File.open("example2.txt", "r") do |file|
  file.each_line { |line| data_to_sort.push(line.strip) }
end

puts data_to_sort.sort.uniq</pre>
<h3>example2.txt</h3>
<pre style="background-color:#ddd;border:solid black 1px;padding:3px;">Tom     555-7816
Al      555-9382
Carol   555-4662
Jim     555-1164
Alice   555-4427
Steve   555-7418
Carl    555-1345
Angela  555-3466
Carol   555-4662
Michael 555-8852
Jim     555-1164
Carol   555-4662
Al      555-9382
Carol   555-4662</pre>
<p>So, we can immediately see that the Ruby script is reading a file named &#8220;example2.txt&#8221;.</p>
<p>&#8220;Example2.txt&#8221; is a list of phone numbers. If you look at the list carefully, you&#8217;ll notice that it&#8217;s very disorganized. Some people are even listed more than once! Remember kids, friends don&#8217;t let friends drink and create contact lists.</p>
<p>There&#8217;s also a line that says &#8220;data_to_sort = []&#8220;. That line lets Ruby know that I want it to remember some information. Specifically, I want to store some information in an array, which is an organized collection of data.</p>
<p>Now look at &#8220;file.each_line { |line| data_to_sort.push(line.strip) }&#8221;.</p>
<p>Clearly it&#8217;s doing something for each line in the file.  So &#8220;data_to_sort&#8221; is the array I made earlier. &#8220;Data_to_array.push(line.strip)&#8221; means &#8220;push this information into the array&#8221;. If you&#8217;re curious about line.strip, it&#8217;s not there because the line was young and it needed the money.</p>
<p>Each line has a newline character at the end. A newline character is the thing that makes the text drop down a line. There&#8217;s no point in storing those newline characters in the array, so strip chops them off (along with any unneccessary spaces at the beginning or end of the line). I like to think of the strip command as the Lizzie Borden of Ruby.</p>
<p>Then we have &#8220;puts data_to_sort.sort.uniq&#8221;. The purpose of this one might seem clear if you read it aloud to yourself. Seriously, just say it aloud.</p>
<p>Did you do it?</p>
<p>Well, did you?</p>
<p>Really? You did? Ha! You&#8217;re so gullible.</p>
<p>Anyway, as we discussed previously, &#8220;puts&#8221; makes Ruby print something to the screen. We&#8217;re telling it to print &#8220;data_to_sort.sort.uniq&#8221;. &#8220;Data_to_sort&#8221; contains each line from the file, so when we say &#8220;data_to_sort.sort&#8221;, we&#8217;re sorting the data. Pretty easy, right?</p>
<p>Then we have the &#8220;.uniq&#8221; hanging out at the end. As you probably guessed, it tells the array to get rid of any non-unique entries. So, here&#8217;s what our program outputs:</p>
<pre style="background-color:#ddf;border:solid black 1px;padding:3px;">Al      555-9382
Alice   555-4427
Angela  555-3466
Carl    555-1345
Carol   555-4662
Jim     555-1164
Michael 555-8852
Steve   555-7418
Tom     555-7816</pre>
<p>So our program sorted the data and removed the duplicate entries. Not bad for 5 lines of code!</p>
<h2>Example 3</h2>
<h3>example3.rb</h3>
<pre style="background-color:#ddd;border:solid black 1px;padding:3px;">File.open("example3.txt", "r") do |file|
  file.each_line {|line| puts line if line =~ /\ba/i}
end</pre>
<h3>example3.txt</h3>
<pre style="overflow:scroll;background-color:#ddd;border:solid black 1px;padding:3px;">5/13/1978  - Al Pachino had an omelet for breakfast.
9/28/1981  - Archeologists discovered that all Egyptian hieroglyphic writings are actually advertisements for Apple's iPod.
10/2/1983  - Buffoon was born.
1/4/1984   - The U.S. government successfully sent 3 astronauts to Venus, but then realized that they were supposed to go to Mars instead. The dejected astronauts returned home in awkward silence. A massive government conspiracy ensued.
7/3/1987   - The entry for 8/10/1991 was revealed to be false.
11/23/1988 - The greatest scientists and religious leaders of the world finally ended a centuries old dispute and agreed that indeed, Lucky Charms are magically delicious.
3/17/1989  - I invented YouTube and became a billionaire.
8/10/1991  - The entry for 7/3/1987 was revealed to be true.
2/24/1993  - Matz conceived of Ruby (According to Wikipedia).
9/13/1996  - It was discovered that heart disease is not caused by fatty foods and a sedentary lifestyle, but is in fact the result of one Wilber Arbuckle of Spokane, Washington. Mr. Arbuckle promptly apologized and promised not to do it again.</pre>
<p>This program is really short. Just 3 lines of code, and we already know what 2 of them do. The one line we aren&#8217;t familiar with is &#8220;file.each_line {|line| puts line if line =~ /\ba/i}&#8221;.</p>
<p>Once again, we&#8217;re clearly doing something with each line of the file. That leaves us with &#8220;puts line if line =~ /\ba/i&#8221;.</p>
<p>So, we&#8217;re telling Ruby to print the line to the screen if &#8220;line =~ /\ba/i&#8221;. Ruby is using what&#8217;s called a regular expression here. A regular expression is pretty much like any other expression, but it&#8217;s been infused with Metamucil.</p>
<p>No, actually a regular expression is a type of pattern. I&#8217;m sure you&#8217;ve searched for text in a document before, but what if you&#8217;re not sure what text you&#8217;re looking for? What if you&#8217;re looking for any year between 1921 and 1926? Normally you&#8217;d have to run 5 individual searches, but with regular expressions you can search for &#8220;/192[1-6]/&#8221;. Regular expressions are really powerful, and their uses go WAY beyond the simple examples I&#8217;ve given here.</p>
<p>However, the regular expression I used in the program is &#8220;/\ba/i&#8221;. In Regular Expression-ville, &#8220;\b&#8221; means the beginning or end of a word. So, &#8220;\ba&#8221; means find me the beginning or end of a word followed by the letter a. The &#8220;i&#8221; at the end of the regular expression tells it to ignore casing on letters, so it treats &#8220;a&#8221; and &#8220;A&#8221; as the same letter.</p>
<p>So, we&#8217;re telling Ruby to print a line from the file if the line has a word that starts with the letter &#8220;a&#8221;, regardless of case. Let&#8217;s see the output:</p>
<pre style="overflow:scroll;background-color:#ddf;border:solid black 1px;padding:3px;">5/13/1978  - Al Pachino has an omelet for breakfast.
9/28/1981  - Archeologists discover that all Egyptian hieroglyphic writings are actually advertisements for Apple's iPod.
1/4/1984   - The U.S. government successfully sends 3 astronauts to Venus, but then realizes that they were supposed to go to Mars instead. The dejected astronauts return home in awkward silence. A massive government conspiracy ensues.
11/23/1988 - The greatest scientists and religious leaders of the world finally end a centuries old dispute and agree that indeed, Lucky Charms are magically delicious.
3/17/1989  - I invent YouTube and become a billionaire.
2/24/1993  - Matz conceives of Ruby (According to Wikipedia).
9/13/1996  - It is discovered that heart disease is not caused by fatty foods and a sedentary lifestyle, but is in fact the result of one Wilber Arbuckle of Spokane, Washington. Mr. Arbuckle promptly apologized and promised not to do it again.</pre>
<p>After seeing these three examples, I think you&#8217;ll have to admit that it doesn&#8217;t take long to get useful results out of Ruby. You will literally, within minutes of starting to learn Ruby, be able to create useful scripts that can save you a lot of time. You will also become a multi-billionaire. Seriously.</p>
<p>Of course, these examples barely scratch the surface of what Ruby is capable of. In Ruby it&#8217;s ridiculously easy to create graphical applications, databases and websites. You can even use Ruby to make video games.</p>
<p>If you&#8217;re on the fence about learning to program, or learning Ruby, I strongly encourage you to go for it. If you don&#8217;t, I&#8217;ll hurt you. Seriously, I track the IP address of everyone who comes to my site. If I find out that you didn&#8217;t go and program a whole heap of Ruby scripts after reading this post, I will personally come to your house and ring the doorbell before running away while tittering like a schoolgirl the entire time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/actsasbuffoon.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/actsasbuffoon.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/actsasbuffoon.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=actsasbuffoon.wordpress.com&amp;blog=5642262&amp;post=11&amp;subd=actsasbuffoon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://actsasbuffoon.wordpress.com/2008/11/26/how-easy-is-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3237b00df62e8859236e9ad564738652?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">actsasbuffoon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
