<?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>amazing development &#187; Ruby</title>
	<atom:link href="http://amazing-development.com/archives/category/all/work/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://amazing-development.com</link>
	<description>ruby, java and the rest</description>
	<lastBuildDate>Thu, 20 May 2010 06:31:13 +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>JRuby on appengine with Ubuntu</title>
		<link>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/</link>
		<comments>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 11:09:20 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[appengine]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=426</guid>
		<description><![CDATA[Overall the instructions on code.google.com are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation&#8230; sudo apt-get install sun-java6-jdk sudo apt-get install ruby-full rubygems This installs only rubygems 1.3.1 but appengine needs 1.3.5. ERROR: Error installing google-appengine: bundler requires RubyGems version [...]]]></description>
			<content:encoded><![CDATA[<p>Overall the instructions on <a href="http://code.google.com/p/appengine-jruby/wiki/Introduction">code.google.com</a> are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation&#8230;</p>
<p><code><br />
sudo apt-get install sun-java6-jdk<br />
sudo apt-get install ruby-full rubygems<br />
</code></p>
<p>This installs only rubygems 1.3.1 but appengine needs 1.3.5.</p>
<blockquote><p>
ERROR:  Error installing google-appengine:<br />
	bundler requires RubyGems version >= 1.3.5
</p></blockquote>
<p><code><br />
sudo gem install rubygems-update<br />
sudo /var/lib/gems/1.8/bin/update_rubygems<br />
sudo gem install google-appengine<br />
</code></p>
<p>Et voilà! Ten minutes later I have a running hello world in the cloud <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android scripting environment supports JRuby</title>
		<link>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/</link>
		<comments>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 06:21:19 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=396</guid>
		<description><![CDATA[Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning. But last week I helped Damon to finally support JRuby on his Android Scripting Environment (ASE). Downloaded JRuby sources (jruby&#45;1.2.0RC1) from http&#58;//www.jruby.org/download. Patched the build.xml to not include doc/index.html from dynalang.jar [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://static.amazing-development.com/blog_images/09/ASE.jpg"/><a href="http://www.flickr.com/photos/dino_olivieri/391541320/"><img class="alignright" src="http://static.amazing-development.com/blog_images/09/robot_red_planet.jpg"/></a>Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning.</p>
<p />
But last week I helped <a href="http://damonkohler.com/">Damon</a> to finally support JRuby on his <a href="http://code.google.com/p/android-scripting/">Android Scripting Environment (ASE)</a>. </p>
<ul>
<li>Downloaded JRuby sources (jruby&#45;1.2.0RC1) from <a href="http://www.jruby.org/download">http&#58;//www.jruby.org/download</a>.</li>
<li>Patched the <tt>build.xml</tt> to not include <tt>doc/index.html</tt> from <tt>dynalang.jar</tt> otherwise dx will complain about an HTML page in the ruby&#45;complete.jar.<br />
<br clear="all"/></p>
<pre>$ diff &#45;r jruby&#45;1.2.0RC1 jruby&#45;1.2.0RC1.patched/
Only in jruby&#45;1.2.0RC1.patched/&#58; build
diff &#45;r jruby&#45;1.2.0RC1/build.xml jruby&#45;1.2.0RC1.patched/build.xml
42c42
&lt;
&#45;&#45;&#45;
&gt;
238c238,240
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;
268c270,272
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;
387c391,393
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;</pre>
</li>
<li>Downloaded the JSON sources from <a href="http://rubyforge.org/frs/?group_id=953 and put them in lib/ruby/1.8/json/">http&#58;//rubyforge.org/frs/?group_id=953 and put them in <tt>lib/ruby/1.8/json/</tt></a></li>
<li>Copied <a href="http://code.google.com/p/android-scripting/source/browse/trunk/jruby/ase/android.rb">android.rb</a> to <tt>lib/ruby/1.8/</tt>.</li>
<li>Built jar&#45;complete (<tt>ant jar-complete</tt>) and added <tt>jruby&#45;complete.jar</tt> to eclipse project.</li>
<li>Connected the bits and pieces in <a href="http://code.google.com/p/android-scripting/source/browse/#svn/trunk/android/AndroidScriptingEnvironment/src/com/google/ase/interpreter/jruby"><tt>com.google.ase.interpreter.jruby</tt></a></li>
</ul>
<ul>
<p>But beware! The new ASE apk is HUGE (4.6M) and JRuby is fairly slow. But it works <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </ul>
<p><img src="http://static.amazing-development.com/blog_images/09/ase1.jpg"/><br />
<img src="http://static.amazing-development.com/blog_images/09/ase2.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Ruby demotivator</title>
		<link>http://amazing-development.com/archives/2008/04/06/ruby-demotivator/</link>
		<comments>http://amazing-development.com/archives/2008/04/06/ruby-demotivator/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 10:02:49 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=316</guid>
		<description><![CDATA[I found the DIY page for demotivators and had to create one for Ruby. Enjoy!]]></description>
			<content:encoded><![CDATA[<p><a href="http://static.amazing-development.com/blog_images/demotivators-ruby.jpg"><img class="alignright" src="http://static.amazing-development.com/blog_images/demotivators-ruby.thumb.jpg"/></a>I found the DIY page for demotivators and had to create one for Ruby. Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/04/06/ruby-demotivator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EURUKO 2008 Day 2</title>
		<link>http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/</link>
		<comments>http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 08:42:14 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[EURUKO]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2008/03/30/euruko-2008-day2/</guid>
		<description><![CDATA[Second day has started. Today it starts with a few talks on testing&#8230; George Malamidis — „Synthesized Testing“ Already 15min behind schedule, but so far interesting. This has 4 lines of code. It is already a big ruby function. Vassilis Rizopoulos — „rutema: One test tool to rule them all“ I&#8217;m thinking on how to [...]]]></description>
			<content:encoded><![CDATA[<p>Second day has started. Today it starts with a few talks on testing&#8230;</p>
<h5>George Malamidis — „Synthesized Testing“</h5>
<p>Already 15min behind schedule, but so far interesting.</p>
<blockquote><p>
This has 4 lines of code. It is already a big ruby function.
</p></blockquote>
<h5>Vassilis Rizopoulos — „rutema: One test tool to rule them all“</h5>
<p>I&#8217;m thinking on how to write in a polite way &#8220;This talk was boring&#8221;. It was. And the tool uses XML <img src='http://amazing-development.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  Hey, this is a Ruby conference- you should use YAML or even better a cool Ruby DSL.</p>
<h5>Tomasz Stachewicz — „Sharing the load“</h5>
<p>Sounded interesting but there was a question after the talk which suggested that the guys reinvented the wheel and that BackgroundDrb is a better solution for what he has done.</p>
<h5>Petr Krontorád — „Building Rails Playground &#8211; using Ruby&#8217;s dynamic nature“</h5>
<p>Mumble, mumble, small text, cannot read the slides, mumble&#8230; Sorry I don&#8217;t have a clue what this talk is about.</p>
<h5>Tim Becker — „Lessons Learned Writing Native Extensions“</h5>
<p>Type-along tutorial on how to write C extension for Ruby. Very interesting, this could actually make me write C code again&#8230; He has started talking on cats and tigers and it seems like he wants to teach us how arrays work in C. Booooooooring. Finally he is done with this and is back on the interesting topics like conversion of data types. Overall a really interesting talk. By far the best one today so far. Tim&#8217;s <a href="http://blog.kuriositaet.de/?p=220">post with code samples and links</a>.</p>
<h5>Matt Ford — „Aspect Oriented Programming in Ruby“</h5>
<p>It&#8217;s his birthday. Happy birthday Matt! He talks about <a href="http://aquarium.rubyforge.org/">Aquarium</a> a neat aspect oriented programming solution for Ruby. Very nice. I have to play around with this when I&#8217;m back home.</p>
<h5>Dushan Wegner — „Philosophy &amp; Programming“</h5>
<p>This first lightning talk. &#8220;Imagine I&#8217;m holding a beer and put out this ideas&#8221;. &#8220;Programmers are better philosophers&#8221;. A very cool talk about the similarities of programming and practicing philosophy.</p>
<h5>Marcin Raczkowski — „Distributed programming with ruby“</h5>
<p>Hard to understand but interesting. Sadly it is impossible to read his code when he is showing examples in the editor.</p>
<h5><strike>sorry missed name and title</strike> Akira Tanaka &#8211; „IO.copy_stream“</h5>
<p>Interesting talk about IO in Ruby. Great final &#8220;status&#8221; slide:</p>
<blockquote><p>
Accepted by Matz yesterday @La fabrica<br />
Submitted today to Ruby 1.9
</p></blockquote>
<p>Wow!</p>
<h5>Gregor &#8230;  — „Context-oriented programming for Ruby“</h5>
<p>Took a long time to get to the point. Which part of lightning talk did you not understand.</p>
<h5>Florian Gilcher — „Patterns (yet another) pattern matching library“</h5>
<p>Interesting talk. Can be found at <a href="http://patterns.rubyforge.org/">patterns.rubyforge.org</a>.</p>
<h5>Raimonds Simanovskis — „Using Ruby with Oracle“</h5>
<p>Good quick talk. I never had to work with Oracle so I never had the problems he was talking about.</p>
<h5>Daniel Liszka — „One RubyStack to Rule them All“</h5>
<p>Strong accent, to much text on the slides. But sounds like a neat idea&#8230; <a href="http://www.bitnami.org/stack/rubystack/">www.bitnami.org/stack/rubystack</a></p>
<h5>Ry Dahl — „Ebb Web Server“</h5>
<p>Yet another Ruby web server, obviously it&#8217;s faster than all the others because what would be the point otherwise. <a href="http://ebb.rubyforge.org">ebb.rubyforge.org</a></p>
<h5>Wouter de Bie — „Capistrano, Webistrano“</h5>
<p>The final lightning talk. I&#8217;m hungry <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  off to find some food&#8230;</p>
<h5>Dr Nic — Demo</h5>
<p>So it wasn&#8217;t the last talk. They squeezed in a short demo on how to use his gem generator. Very cool! I have to use this to play around with native C extensions.</p>
<h5>Final announcement</h5>
<p><strike>It seems like next year&#8217;s EURUKO will be in Madrid. Great! Never been there. See you next year!</strike> It&#8217;s not decided yet. Krakow and Warsaw are possible sites, too. Hm, I&#8217;m still for Madrid <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h5>Sumary</h5>
<p>I think I should have slept in today like Todd and would not have missed a bit. Here are some <a href="http://www.flickr.com/photos/tags/euruko2008/">pictures from EURUKO 2008 on Flickr</a> and even <a href="http://www.flickr.com/photos/mattioikea/2370870486/sizes/o/">one with me</a>. EURUKO was great. A big &#8220;thank you!&#8221; to all the people who have organized it. I&#8217;m sure I will be back next year, no matter where.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>EURUKO 2008 Day 1</title>
		<link>http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/</link>
		<comments>http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 09:15:30 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[EURUKO]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2008/03/29/euruko-2008/</guid>
		<description><![CDATA[The first day of EURUKO 2008 is over. Yukihiro „Matz“ Matsumoto — „Keynote“ Matz talked about the future of Ruby. It was very interesting. He talked a little bit about the upcoming features (I will link to the slides when they become available) and about the design decisions behind Ruby. For me the most important [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://static.amazing-development.com/blog_images/chunky_bacon.scaled.jpg"/></p>
<p>The first day of <a href="http://www.euruko2008.org/">EURUKO 2008</a> is over.</p>
<h5>Yukihiro „Matz“ Matsumoto — „Keynote“</h5>
<p>Matz talked about the future of Ruby. It was very interesting. He talked a little bit about the upcoming features (I will link to the slides when they become available) and about the design decisions behind Ruby. For me the most important quote was:</p>
<blockquote><p>I designed Ruby not to work best but so that people can perform best</p></blockquote>
<h5>Koichi Sasada — „Ruby meets VM“</h5>
<p>Koichi explained some details of YARV but some points were lost because a few of his slides were in Japanese.</p>
<p>Favorite quote:</p>
<blockquote><p>(on his &#8220;No Ruby/No Life shirt&#8221;) for me it&#8217;s No Ruby / No Job</p></blockquote>
<h5>Charles Nutter and Thomas Enebo — „JRuby: Ready For Action!“</h5>
<p>Made me download JRuby during the talk <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<h5>David A. Black — „Per-Object Behavior in Ruby“</h5>
<p>I have to reread the slides, because I fell asleep (not due to the talk but to the fact that we are in Prague and had a few beer yesterday)</p>
<h5>Nic Williams — „Meta-Meta-Programming with Ruby“</h5>
<p>Memorable talk, very funny, <a href="http://www.agyampark.hu/euruko-2008">great final slide (see @16:35)</a></p>
<h5>Lightning talks session</h5>
<p>Two talks on an agile white board and on a Ruby to PHP compiler.</p>
<h5>VC with DHH</h5>
<p>a little boring, bad sound quality and even worse video</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EURUKO 2008 — European Ruby Conference</title>
		<link>http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/</link>
		<comments>http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 20:21:02 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[EURUKO]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/</guid>
		<description><![CDATA[I just found out about EURUKO 2008. It will take plaze in Prague, Czech Republic, on March 29th to 30th. From what I&#8217;ve heard are EURUKOs fun events and I would like to go this year if I can find the time especially because of this announcement: 19. 02. 2008 · Matz is coming to [...]]]></description>
			<content:encoded><![CDATA[<p>I just found out about <a href="http://www.euruko2008.org/">EURUKO 2008</a>. It will take plaze in Prague, Czech Republic, on March 29th to 30th. From what I&#8217;ve heard are EURUKOs fun events and I would like to go this year if I can find the time especially because of this announcement:</p>
<blockquote><p>
19. 02. 2008 · Matz is coming to EURUKO!<br />
We are very happy to announce that Matz (most probably accompanied by Koichi) is coming to EURUKO! There are currently more than 100 people registered to attend, so thank you all! We will update the website in next couple of days with more details on program, information about sponsors and other stuff.
</p></blockquote>
<p>It has been some time since I used Ruby but it is still my favorite language by far.</p>
<p><i>Update:</i></p>
<p>I just registered for EURUKO <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I will probably go by car so if someone from the Munich area needs a ride, just leave a comment&#8230; And a bonus feature: I found this <a href="http://www.youtube.com/watch?v=oEkJvvGEtB4">Tech Talk of Matz talking about Ruby 1.9</a> today&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby on Android</title>
		<link>http://amazing-development.com/archives/2007/12/14/jruby-on-android/</link>
		<comments>http://amazing-development.com/archives/2007/12/14/jruby-on-android/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 03:43:27 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2007/12/14/jruby-on-android/</guid>
		<description><![CDATA[Today I tried to run JRuby on Android. I failed. This article is more like a lab report so expect more boring details&#8230; At first I tried the easiest way and added the JRuby jar to my android project. This would have been way to easy and as I expected it did not work. Then [...]]]></description>
			<content:encoded><![CDATA[<p><img class="framedr" src="http://static.amazing-development.com/blog_images/red_robot_1.jpg" alt="a red robot"/>Today I tried to run <a href="http://jruby.codehaus.org/">JRuby</a> on <a href="http://code.google.com/android/">Android</a>. I failed. This article is more like a lab report so expect more boring details&#8230;<span id="more-303"></span></p>
<p>At first I tried the easiest way and added the JRuby jar to my android project. This would have been way to easy and as I expected it did not work. </p>
<p>Then I copied all the JRuby sources into my android project and eclipse gave me more than 100 errors. I had to remove org.jruby.javasupport.bsf.BSFExample and the whole org.jruby.demo package because of dependencies to awt and swing. Now only a single error message was left with a dependency on some class I can&#8217;t remember in java.beans. So I downloaded the Java sources and copied the class into my project which gave me a few new dependencies. So I copied the whole java.beans package into the project and removed all dependencies to awt and swing from the code. Now I needed to add only 2 more classed com.sun.beans.ObjectHandler and sun.awt.EventListenerAggregate for eclipse to stop complaining. </p>
<p><img class="framedl" src="http://static.amazing-development.com/blog_images/red_robot_2.jpg" alt="a red robot"/>At this point I encountered my first bug in Android: dx(the compiler for <a href="http://en.wikipedia.org/wiki/Dalvik_virtual_machine">Dalvik</a>) complained about the bsf.jar file which came with JRuby[1]. Fortunately I could work on with the 2.4.0 version of bsf. </p>
<p>At this point eclipse stopped complaining and dx was able to create Dalvik byte code for my test application and package the result.</p>
<p>But when I started the result on the emulator all I got was an exception&#8230; This is where I will stop for today and continue whenever I find some time. If someone out there has already successfully used JRuby on Android please leave me a comment on how you managed to do it.</p>
<p>[1] the bug was fixed less than 3h after I reported it. Kudos to the Dalvik team!</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2007/12/14/jruby-on-android/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tab-completion and syntax-highlighting for irb</title>
		<link>http://amazing-development.com/archives/2006/12/31/tab-completion-and-syntax-highlighting-for-irb/</link>
		<comments>http://amazing-development.com/archives/2006/12/31/tab-completion-and-syntax-highlighting-for-irb/#comments</comments>
		<pubDate>Sun, 31 Dec 2006 11:41:15 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/12/31/tab-completion-and-syntax-highlighting-for-irb/</guid>
		<description><![CDATA[Please forgive me if I state the obvious, but I just found out about this great gem called Wirble. Wirble adds tab-completion and syntax-highlighting to irb. Installation is really simple, just install the gem (gem install wirble) and add this to your .irbrc: require 'rubygems' require 'wirble' Wirble.init Wirble.colorize For a console with a dark [...]]]></description>
			<content:encoded><![CDATA[<div class="alignright">
<img src="http://static.amazing-development.com/blog_images/wirble2.png" alt="wirble shell example on dark background"/><br />
<img src="http://static.amazing-development.com/blog_images/wirble1.png" alt="wirble shell example on light background"/>
</div>
<p>Please forgive me if I state the obvious, but I just found out about this great gem called <a href="http://pablotron.org/software/wirble/">Wirble</a>. Wirble adds tab-completion and syntax-highlighting to irb. </p>
<p>Installation is really simple, just install the gem (<tt>gem install wirble</tt>) and add this to your <tt>.irbrc</tt>:</p>
<p><code class="ruby">require 'rubygems'<br />
require 'wirble'</p>
<p>Wirble.init<br />
Wirble.colorize</code></p>
<p>For a console with a dark background everything looks pretty good but I prefer a light background where yellow is not easy to read. Thanks to the really helpful <a href="http://pablotron.org/software/wirble/README">README</a> the solution was easy to find. I had to add a few more lines to my <tt>.irbrc</tt> to change some settings from yellow and white to something readable in my console.</p>
<p><code class="ruby">require &apos;rubygems&apos;<br />
require &apos;wirble&apos;</p>
<p>Wirble.init<br />
Wirble.colorize</p>
<p>colors = Wirble&#58;&#58;Colorize.colors.merge({<br />
&nbsp;&nbsp;&#58;object_class       =&gt; &#58;purple,<br />
&nbsp;&nbsp;&#58;symbol             =&gt; &#58;purple,<br />
&nbsp;&nbsp;&#58;symbol_prefix      =&gt; &#58;purple<br />
})<br />
Wirble&#58;&#58;Colorize.colors = colors</code></p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/12/31/tab-completion-and-syntax-highlighting-for-irb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Magic Ruby Hacker mug</title>
		<link>http://amazing-development.com/archives/2006/12/12/magic-ruby-hacker-mug/</link>
		<comments>http://amazing-development.com/archives/2006/12/12/magic-ruby-hacker-mug/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 21:19:08 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/12/12/magic-ruby-hacker-mug/</guid>
		<description><![CDATA[There is a CafePress shop for RubyHacker stuff with a few nice thingies. But I wanted something else A shop (fotokasten.de) sells all-black mugs which only reveal the image when something hot is inside. Therefore I needed my own RubyHacker image and couldn&#8217;t find one online. To save everybody else the work, here&#8217;s my result. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://static.amazing-development.com/blog_images/RubyHacker.jpg"><img class="alignright" src="http://static.amazing-development.com/blog_images/RubyHacker.scaled.gif" alt="ruby hacker logo in courier"/></a></p>
<p>There is a <a href="http://www.cafepress.com/rubyhacker">CafePress shop for RubyHacker stuff</a> with a few nice thingies. But I wanted something else <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><img class="alignleft" src="http://static.amazing-development.com/blog_images/mug.gif" alt="magic mug"/></p>
<p>A shop (<a href="http://fotokasten.de">fotokasten.de</a>) sells all-black mugs which only reveal the image when something hot is inside. Therefore I needed my own RubyHacker image and couldn&#8217;t find one online. To save everybody else the work, here&#8217;s my result.</p>
<p>I will post images of the mug when I have it <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><i>Update:</i><br />
I made a mistake and put the wrong image online. Fotokasten does not accept gif (which is pretty lame but I cannot change it). Changed the image to a jpg.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/12/12/magic-ruby-hacker-mug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby search engine</title>
		<link>http://amazing-development.com/archives/2006/10/24/my-own-ruby-search-engine/</link>
		<comments>http://amazing-development.com/archives/2006/10/24/my-own-ruby-search-engine/#comments</comments>
		<pubDate>Tue, 24 Oct 2006 12:31:10 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/10/24/my-own-ruby-search-engine/</guid>
		<description><![CDATA[When I read that Google offers customizable search engines, I spent a few minutes to create one for my usual ruby searches. It can be found here. Right now, it doesn&#8217;t look very nice and I added only about a dozen sites, but I will add more and fine-tune the searches in the next few [...]]]></description>
			<content:encoded><![CDATA[<p>When I read that Google offers customizable search engines, I spent a few minutes to create one for my usual ruby searches. It can be found <a href="http://amazing-development.com/search/ruby.html">here</a>. Right now, it doesn&#8217;t look very nice and I added only about a dozen sites, but I will add more and fine-tune the searches in the next few days. If anybody else wants to contribute, be my guest&#8230;</p>
<p><i>Update:</i><br />
Google provides a bookmarklet called Google Marker, which helps adding new sites. This morning I added about 20 new sites and tweaked the searches.</p>
<p><i>Update:</i><br />
This morning I added a few more pages and changed the default behavior from &#8220;Search the entire web but emphasize included sites.&#8221; to &#8220;Search only included sites.&#8221;.</p>
<p><i>Update:</i><br />
3 contributors have signed up and I added a lot of new sites. Go visit <font size="+1"><a href="http://amazing-development.com/search/ruby.html">Ruby &amp; Rails Search</a></font> and test it.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/10/24/my-own-ruby-search-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Profiling Rails Unittests</title>
		<link>http://amazing-development.com/archives/2006/10/02/profiling-rails-unittests/</link>
		<comments>http://amazing-development.com/archives/2006/10/02/profiling-rails-unittests/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 15:38:40 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/10/02/profiling-rails-unittests/</guid>
		<description><![CDATA[Thanks to a hint by Chris Mear on the Ruby on Rails Mailinglist I had an idea how to add profiling my unittests. It&#8217;s a simple 3 step process and adds just 5 lines of code to your unittests: Step 1: require 'profiler' Step 2: &#160;def setup &#160;&#160;# ... &#160;&#160;# your normal setup code &#160;&#160;# [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to a hint by <a href="http://www.feedmechocolate.com/">Chris Mear</a> on the <a href="http://lists.rubyonrails.org/mailman/listinfo/rails">Ruby on Rails Mailinglist</a> I had an idea how to add profiling my unittests. It&#8217;s a simple 3 step process and adds just 5 lines of code to your unittests:</p>
<p><b>Step 1:</b><br />
<code class="ruby"><br />
require 'profiler'<br />
</code></p>
<p><b>Step 2:</b><br />
<code class="ruby"><br />
&nbsp;def setup<br />
&nbsp;&nbsp;# ...<br />
&nbsp;&nbsp;# your normal setup code<br />
&nbsp;&nbsp;# ...<br />
&nbsp;&nbsp;Profiler__::start_profile<br />
&nbsp;end<br />
</code></p>
<p><b>Step 2:</b><br />
<code class="ruby"><br />
&nbsp;def teardown<br />
&nbsp;&nbsp;Profiler__::stop_profile<br />
&nbsp;&nbsp;f=File::new("#{RAILS_ROOT}/log/profiler.#{name() + ' ' +<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Time.now.strftime('%Y-%m-%d %H:%M')}.log", 'w')<br />
&nbsp;&nbsp;Profiler__::print_profile(f)<br />
&nbsp;&nbsp;# ...<br />
&nbsp;&nbsp;# your normal teardown code<br />
&nbsp;&nbsp;# ...<br />
&nbsp;end<br />
</code></p>
<p>As you probably guessed from the code, this will log the profiling results into a file for each test. But beware: this is <b>VERY SLOW!</b> The tests I was profiling took 9s without profiling and 1267s with profiling&#8230; But slow profiling still beats no profiling <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you are looking for memory profiling, there is a nice article by Scott Laird on <a href="http://scottstuff.net/blog/articles/2006/08/17/memory-leak-profiling-with-rails">Memory leak profiling with Rails</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/10/02/profiling-rails-unittests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing on the CodeGolf Range</title>
		<link>http://amazing-development.com/archives/2006/08/07/playing-on-the-codegolf-range/</link>
		<comments>http://amazing-development.com/archives/2006/08/07/playing-on-the-codegolf-range/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 19:51:14 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[articles]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/08/07/playing-on-the-codegolf-range/</guid>
		<description><![CDATA[I stumbled over this funny site called CodeGolf.com and tried my luck on the first problem (actually it&#8217;s the sixth, but it was the last and therefore appeared first on their page &#8211; confused?) Writing a Brainfuck Interpreter: The brainfuck language uses a simple model of a computer consisting of an array of memory cells, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/bigpru/159144054/"><img alt="picture by bigpru" class="framedr" src="http://static.amazing-development.com/blog_images/golf_1.jpg"/></a></p>
<p>I stumbled over this funny site called <a href="http://codegolf.com">CodeGolf.com</a> and tried my luck on the first problem (actually it&#8217;s the sixth, but it was the last and therefore appeared first on their page &#8211; confused?) <a href="http://www.codegolf.com/competition/index/8">Writing a Brainfuck Interpreter</a>:</p>
<blockquote><p>
The brainfuck language uses a simple model of a computer consisting of an array of memory cells, a movable pointer into the array, an output stream, an input stream and the program itself.  The program is formed from a sequence of the below commands :</p>
<ul>
<li><strong><code>&gt;</code></strong> &#8211; Increment the pointer to point to the next cell to the right.</li>
<li><strong><code>&lt;</code></strong> &#8211; Decrement the pointer to point to the next cell to the left.</li>
<li><strong><code>+</code></strong> &#8211; Increment the byte pointed to by the pointer.</li>
<li><strong><code>-</code></strong> &#8211; Decrement the byte pointed to by the pointer.</li>
<li><code><strong>[</strong></code> - Jump forward to the command after the corresponding <strong><code>]</code></strong> if the byte at the pointer is zero.</li>
<li><strong><code>]</code></strong> &#8211; Jump back to the command after the corresponding <strong><code>[</code></strong> if the byte at the pointer is non-zero.</li>
<li><strong><code>.</code></strong> - Output the value of the byte at the pointer.</li>
<li><strong><code>,</code></strong> - Accept one byte of input, storing its value in the byte at the pointer.</li>
</ul>
</blockquote>
<p>It didn't take me very long to write a running interpreter. My first version was more than a thousand characters. Even after renaming the variables and stripping all the whitespaces I still needed around 700 characters, which is huge compared to the best Ruby solution with only 142 characters.<span id="more-245"></span></p>
<p style="margin-top:10%"/>
<h2>Warning! Spoilers ahead - you might want to stop reading if you want to solve the problem, too</h2>
<p style="margin-top:50%"/>
<h2>Brainfuck Interpreter Version 1 - a real interpreter</h2>
<p>This was my very first idea. The algorithm is pretty obvious and nothing really fancy was done here. Two optimizations:</p>
<ul>
<li>aggregated the + and - operation and &lt; and &gt; into one <tt>when</tt> each to save space</li>
<li>iterate over the input program to get the target addresses for the jump operations</li>
</ul>
<p>But this code was still too slow. It passed the first 5 tests, but failed the rot13 performance test.</p>
<pre><code class="ruby"># Version 1 after a lot of rewrites

data = Array.new(30000,0)
datapointer = 0
codepointer = 0

(code,input) = STDIN.read.chomp.split '!'

# build a jump table to quickly access target address to jump to
stack = []
jmptbl = {}
(0..(code.size-1)).each {|i|
  case code[i]
    when 91: stack.push i
    when 93: m = stack.pop; jmptbl[i] = m; jmptbl[m] = i
  end
}

while codepointer &lt; code.size do
  x = code[codepointer]
  case x
# &lt; &gt;
    when 60, 62: datapointer = datapointer + x - 61
# + -
    when 43, 45: data[datapointer] = (data[datapointer] - x + 44) % 256
# [
    when 91: codepointer = (data[datapointer] == 0 ? jmptbl[codepointer] : codepointer)
# ]
    when 93: codepointer = (data[datapointer] != 0 ? jmptbl[codepointer] : codepointer)
# .
    when 46: print "#{data[datapointer].chr}"
# ,
    when 44: data[datapointer] = input.slice!(0)
             exit if data[datapointer].nil?
  end
  codepointer = codepointer + 1
end
</code></pre>
<pre><code class="ruby"># Version 1 obfuscated
# 389 characters without this comment
d=Array.new(30000,0)
a=0
b=0
(c,k)=STDIN.read.chomp.split'!'
s=[]
j={}
(0..(c.size-1)).each{|i|
case c[i]
when 91:s.push i
when 93:m=s.pop;j[i]=m;j[m]=i
end
}
while b&lt;c.size do
x=c[b]
case x
when 60,62:a=a+x-61
when 43,45:d[a]=(d[a]-x+44)%256
when 91:b=(d[a]==0?j[b]:b)
when 93:b=(d[a]!=0?j[b]:b)
when 46:print"#{d[a].chr}"
when 44:d[a]=k.slice!(0)
exit if d[a].nil?
end
b=b+1
end</code></pre>
<h2>Brainfuck Interpreter Version 2 - "optimize - don't do it"</h2>
<p>This code contains many useless optimizations <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<ul>
<li>store the target address inside the program as the address for ] or address plus codesize for [</li>
<li>store + and - as -255 and -257, so I can simply add the command to the data</li>
</ul>
<p>But these optimizations didn't provide any significant speedup, the code was only about 10 percent faster on my machine which was still too slow to pass the performance test. And the program was even larger than my original version with 533 characters. I could perhaps squeeze out a few characters with a complicated formula for the first 6 lines of the case statement, but I didn't try this because this version was too slow anyway.</p>
<pre><code class="ruby"># version 2 - forget it, it sucks
data = Array.new(30000,0)
codepointer = 0
datapointer = 0

(code,input) = STDIN.read.chomp.split '!'

codesize = code.size
stack = []
opt = []
(0..(codesize-1)).each {|i|
  case code[i]
    when 60: opt &lt;&lt; -3
    when 62: opt &lt;&lt; -1
    when 43: opt &lt;&lt; -255
    when 45: opt &lt;&lt; -257
    when 44: opt &lt;&lt; -5
    when 46: opt &lt;&lt; -6
    when 91: stack.push opt.size; opt &lt;&lt; 0 # just a placeholder
    when 93: m = stack.pop; opt[m] = opt.size + codesize; opt &lt;&lt; m
  end
}
while codepointer &lt; opt.size do
  x = opt[codepointer]
  if x &lt; -200
    data[datapointer] = (data[datapointer] + x) % 256
  elsif x &lt; -3
    if x == -5
      data[datapointer] = input.slice!(0)
      exit if data[datapointer].nil?
    else
      print "#{data[datapointer].chr}"
    end
  elsif x &lt; 0
    datapointer = datapointer + x + 2
  else
    if x &lt; codesize
      codepointer = (data[datapointer] != 0 ? x : codepointer)
    else
      codepointer = (data[datapointer] == 0 ? x % codesize : codepointer)
    end
  end
  codepointer = codepointer + 1
end
</code></pre>
<h2>Brainfuck Interpreter Version 3 - Brainfuck to Ruby</h2>
<p>As I realized I wasn't going to pass the performance test with my other ideas I knew I had to generate Ruby code. The tricky part was how to simulate the commands "[" and "]". I started with the "Hello World!" Brainfuck program and rewrote it step by step in Ruby until I had an idea on how to replace every character of the input language with a chunk of Ruby code. </p>
<p><a href="http://flickr.com/photos/digitalsextant/38310146/"><img alt="picture by digitalsextant" class="framedr" src="http://static.amazing-development.com/blog_images/golf_2.jpg"/></a></p>
<table border="1" cellpadding="3">
<tr>
<td colspan="2" align="center">My translation table:</td>
</tr>
<tr>
<td>[</td>
<td><tt>if currentCell != 0<br />
begin</tt></td>
</tr>
<tr>
<td>]</td>
<td><tt>end while currentCell != 0<br />
end</tt></td>
</tr>
<tr>
<td>&lt;</td>
<td><tt>plus -1</tt></td>
</tr>
<tr>
<td>&gt;</td>
<td><tt>plus 1</tt></td>
</tr>
<tr>
<td>+</td>
<td><tt>inc 1</tt></td>
</tr>
<tr>
<td>-</td>
<td><tt>inc -1</tt></td>
</tr>
<tr>
<td>.</td>
<td><tt>out</tt></td>
</tr>
<tr>
<td>,</td>
<td><tt>read</tt></td>
</tr>
</table>
<p>The definitions for the methods are shown below. The whole program was slightly larger than my version 1 but it is about 3 times faster, which was fast enough to pass the performance test.</p>
<pre><code class="ruby"># Version 3
def currentCell
  $data[$datapointer] || 0
end
def inc i
  $datapointer = $datapointer + i
end
def plus i
  $data[$datapointer] = currentCell + i) % 256
end
def out
  print "#{currentCell.chr}"
end
def read
  $data[$datapointer] = $input.slice!(0)
  exit if !$data[$datapointer]
end
def append s
  $program &lt;&lt; s &lt;&lt; "
"
end

$program = ''
$data = []
$datapointer = 0

($code,$input) = STDIN.read.chomp.split '!'

(0..($code.size-1)).each {|i|
  tmp = $code[i]
  case tmp
    when 60,62: append "inc #{tmp-61}"
    when 43,45: append "plus #{44-tmp}"
    when 91: append "if currentCell != 0
begin"
    when 93: append"end while currentCell != 0
end"
    when 46: append "out"
    when 44: append "read"
  end
}
eval $program </code></pre>
<pre><code class="ruby"># Version 3 obfuscated
# 401 characters without this comment
def x
$d[$a]||0
end
def y i
$a=$a+i
end
def v i
$d[$a]=(x+i)%256
end
def t
print"#{x.chr}"
end
def u
$d[$a]=$k.slice!(0)
exit if !$d[$a]
end
def r s
$p&lt;&lt;s&lt;&lt;"
"
end
$p=''
$d=[]
$a=0
($c,$k)=STDIN.read.chomp.split'!'
(0..($c.size-1)).each{|i|
q=$c[i]
case q
when 60,62:r"y #{q-61}"
when 43,45:r"v #{44-q}"
when 91:r"if x!=0
begin"
when 93:r"end while x!=0
end"
when 46:r"t"
when 44:r"u"
end
}
eval $p</code></pre>
<h2>What's next?</h2>
<p>I had a lot of fun writing these different versions. But now I'm stuck. I don't have the slightest clue on how to get to an even shorter piece of code. I already tried to add a method which generates the methods <tt>currentCell</tt>, <tt>inc</tt>, etc. but the overhead of one added method was more than what I gained by removing <tt>def</tt> and <tt>end</tt>.<br />
I'm still thinking about other possible techniques to move towards the 142 byte by <i>carldr</i>. I believe there is a trick that uses special knowledge of the Brainfuck language I just don't have. If anybody has some generic hints on how to write shorter Ruby code, please leave a note <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/08/07/playing-on-the-codegolf-range/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Planning a Ruby course &#8211; request for comments</title>
		<link>http://amazing-development.com/archives/2006/07/31/planning-a-ruby-course-request-for-comments/</link>
		<comments>http://amazing-development.com/archives/2006/07/31/planning-a-ruby-course-request-for-comments/#comments</comments>
		<pubDate>Mon, 31 Jul 2006 09:12:35 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/07/31/planning-a-ruby-course-request-for-comments/</guid>
		<description><![CDATA[Later this year I am going to hold a beginners course for Ruby at the VHS in Karlsruhe. Yesterday I started thinking about the topics I want to cover. The participants will have some programming experience which means I don&#8217;t have to explain the very basics. The course runs for two days with six hours [...]]]></description>
			<content:encoded><![CDATA[<p>Later this year I am going to hold a beginners course for Ruby at the <a href="http://vhs.karlsruhe.de">VHS in Karlsruhe</a>. Yesterday I started thinking about the topics I want to cover. The participants will have some programming experience which means I don&#8217;t have to explain the very basics. The course runs for two days with six hours each day, so I will have 12 hours to teach them Ruby. From the tutorials I read, I liked <a href="http://www.mrneighborly.com/book">Mr. Neighborly&#8217;s</a> tutorial best and I will use a similar structure.<span id="more-242"></span></p>
<p>Here is a very rough draft:</p>
<p>Day 1</p>
<ul>
<li>Hello &amp; Intro (30min)</li>
<li>playing with Variables, Strings and Numbers in irb (30min)</li>
<li>Array, Hash, Range in irb (30min)</li>
<li>1st script with puts, gets, if, then (60min)</li>
<li>Blocks, Methods (60min)</li>
<li>Classes and Instances (60min)</li>
</ul>
<p>Day 2</p>
<ul>
<li>Flow Controll (60min)</li>
<li>Exceptions (30min)</li>
<li>Closures (60min) at least <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>The Ruby Way (60min)</li>
</ul>
<p>Did I forget something essential? I hope not. I&#8217;m still looking for a few simple and short examples which show the differences and advantages of Ruby. At first I thought I would use something from the Rubyquiz but I think these excercises take too much time. At the end of the second day I would like to write one &#8220;larger&#8221; program, so far I like the idea from <a href="http://wiki.rubygarden.org/Ruby/page/show/PostHelloWorld">PostHelloWorld</a> to parse text and create a histogramm for the words found, like the one described in <a href="http://semantichumanities.wordpress.com/2006/02/21/word-frequencies-in-ruby-tutorial/">this tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/07/31/planning-a-ruby-course-request-for-comments/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Road to Ruby enlightenment &#8211; lambda, proc etc.</title>
		<link>http://amazing-development.com/archives/2006/07/02/road-to-ruby-enlightenment-lambda-proc-etc/</link>
		<comments>http://amazing-development.com/archives/2006/07/02/road-to-ruby-enlightenment-lambda-proc-etc/#comments</comments>
		<pubDate>Sun, 02 Jul 2006 12:39:37 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[articles]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/07/02/road-to-ruby-enlightenment-lambda-proc-etc/</guid>
		<description><![CDATA[This is the fourth part of my Road to Ruby enlightenment. It started a long time ago with tutorials and first steps. Road&#160;To&#160;Ruby&#160;Enlightenment 1. tutorials and first steps 2. talk, quiz and cookbook 3. red and gray 4. lambda, proc etc. Blocks and closures are one of the reasons why you can do magic in [...]]]></description>
			<content:encoded><![CDATA[<p>This is the fourth part of my Road to Ruby enlightenment. It started a long time ago with <a href="http://amazing-development.com/archives/2006/05/05/road-to-ruby-enlightenment-tutorials-and-first-steps/">tutorials and first steps</a>.<span id="more-234"></span></p>
<div style="float:right; padding:10pt; border:1px black solid; margin-left:10pt;margin-top:0pt; margin-bottom:10pt;background-color: #e8e8e8;">
<b>Road&nbsp;To&nbsp;Ruby&nbsp;Enlightenment</b><br />
1. <a href="http://amazing-development.com/archives/2006/05/05/road-to-ruby-enlightenment-tutorials-and-first-steps/">tutorials and first steps</a><br />
2. <a href="http://amazing-development.com/archives/2006/05/08/road-to-ruby-enlightenment-talk-quiz-and-cookbook">talk, quiz and cookbook</a><br />
3. <a href="http://amazing-development.com/archives/2006/05/16/road-to-ruby-enlightenment-red-and-gray/">red and gray</a><br />
4. <b>lambda, proc etc.</b></div>
<p>Blocks and closures are one of the reasons why you can do magic in Ruby. Some time ago I read <a href="http://eli.thegreenplace.net">Eli&#8217;s</a> <a href="http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods">Understanding Ruby blocks, Procs and methods</a> which does a great job of explainig the whole topic. As long as it doesn&#8217;t involve some high-level ruby magic (like Why&#8217;s <a href="http://redhanded.hobix.com/inspect/aBlockCostume.html">A Block Costume</a>) I felt like I understood most of the code using closure-like constructs.</p>
<p>When I used closures in my own code, every once in a while something would not work the way I expected it to. I always found a workaround and never spend much time worrying about these oddities. </p>
<p>This morning (via <a href="http://feeds.feedburner.com/RubyInside?m=119">Ruby Inside</a>) I found <a href="http://innig.net/software/ruby/closures-in-ruby.rb">closures-in-ruby.rb</a> by <a href="http://innig.net">Paul Cantrell</a>. Seems like he had the same problems but instead of ignoring them he played around and documented the things he found out. The article highlights some suprises and differences between the 7 ways of creating closure-like thingies in ruby. Highly recommended reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/07/02/road-to-ruby-enlightenment-lambda-proc-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 6 (aka Mustang) goes Ruby</title>
		<link>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/</link>
		<comments>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/#comments</comments>
		<pubDate>Sun, 18 Jun 2006 18:31:16 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/</guid>
		<description><![CDATA[Some time ago Martin Fowler wrote about Humane Interfaces which led to an lively debate. This is really old stuff, but yesterday I read about the upcoming Java 6 aka Mustang and one of the changes was adding the isEmpty() method to String. So it seems like Java is slowly getting more humane]]></description>
			<content:encoded><![CDATA[<p>Some time ago Martin Fowler wrote about <a href="http://martinfowler.com/bliki/HumaneInterface.html">Humane Interfaces</a> which led to an <a href="http://farm.tucows.com/blog/_archives/2005/12/9/1443435.html">lively debate</a>. This is really old stuff, but yesterday I read about the upcoming Java 6 aka Mustang and one of the changes was adding the <a href="http://download.java.net/jdk6/doc/api/java/lang/String.html#isEmpty%28%29"><tt>isEmpty()</tt></a> method to String. </p>
<p>So it seems like Java is slowly getting more humane <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Road to Ruby enlightenment &#8211; red and gray</title>
		<link>http://amazing-development.com/archives/2006/05/16/road-to-ruby-enlightenment-red-and-gray/</link>
		<comments>http://amazing-development.com/archives/2006/05/16/road-to-ruby-enlightenment-red-and-gray/#comments</comments>
		<pubDate>Tue, 16 May 2006 07:57:29 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[articles]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/05/16/road-to-ruby-enlightenment-red-and-gray/</guid>
		<description><![CDATA[This is the third part of my Road to Ruby enlightenment. It started with tutorials and first steps. Road&#160;To&#160;Ruby&#160;Enlightenment 1. tutorials and first steps 2. talk, quiz and cookbook 3. red and gray 4. lambda, proc etc. RedHanded RedHanded is Why&#8217;s (from Why’s (Poignant) Guide to Ruby) blog. I don&#8217;t really know why I didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>This is the third part of my Road to Ruby enlightenment. It started with <a href="http://amazing-development.com/archives/2006/05/05/road-to-ruby-enlightenment-tutorials-and-first-steps/">tutorials and first steps</a>.<span id="more-222"></span></p>
<div style="float:right; padding:10pt; border:1px black solid; margin-left:10pt;margin-top:0pt; margin-bottom:10pt;background-color: #e8e8e8;">
<b>Road&nbsp;To&nbsp;Ruby&nbsp;Enlightenment</b><br />
1. <a href="http://amazing-development.com/archives/2006/05/05/road-to-ruby-enlightenment-tutorials-and-first-steps/">tutorials and first steps</a><br />
2. <a href="http://amazing-development.com/archives/2006/05/08/road-to-ruby-enlightenment-talk-quiz-and-cookbook">talk, quiz and cookbook</a><br />
3. <b>red and gray</b><br />
4. <a href="http://amazing-development.com/archives/2006/07/02/road-to-ruby-enlightenment-lambda-proc-etc/">lambda, proc etc.</a></div>
<p><b>RedHanded</b></p>
<p><a href="http://redhanded.hobix.com/">RedHanded</a> is Why&#8217;s (from <a href="http://poignantguide.net/ruby/">Why’s (Poignant) Guide to Ruby</a>) blog. I don&#8217;t really know why I didn&#8217;t check out his blog earlier when I read WPGtR but I didn&#8217;t. </p>
<p><img class="alignleft" src="http://static.amazing-development.com/blog_images/camping.png"/>But I think this was a good thing, because I already knew a little bit about Ruby when I stumbled over his blog. This made reading his dazzling display of ruby magic more fun, like watching a stage magician with a slight chance of understanding and appreciating his tricks. </p>
<p>Go and check out <a href="http://redhanded.hobix.com/bits/">bits</a> and <a href="http://redhanded.hobix.com/inspect/">inspect</a>. My all time favorint post is <a href="http://redhanded.hobix.com/bits/campingAMicroframework.html">Camping Microframework</a>, the code is cryptic and I cannot say I understand it but the whole post is hilarious (<a href="http://camping.rubyforge.org/files/README.html">here</a> is the real docu for Camping, a &lt;4kb webframework).</p>
<p><b>Shades of Gray</b> </p>
<p><a href="http://www.amazon.com/exec/obidos/ASIN/1558607013/amazingdevelo-20?creative=327641&#038;camp=14573&#038;adid=0W6YKP7WDAWCPYNW86C0&#038;link_code=as1"><img class="alignright" src="http://rcm-images.amazon.com/images/P/1558607013.01._SL110_SCTZZZZZZZ_.jpg"/></a></p>
<p>In another post on this blog I asked for <a href="http://amazing-development.com/archives/2006/04/11/advanced-articles-on-ruby/">advanced articles on ruby</a> and <a href="http://on-ruby.blogspot.com/">Pat</a> pointed me to <a href="http://blog.grayproductions.net/">Shades of Gray</a>. I already knew the author James Edward Gray II as the organizer of the Ruby Quiz. Shades of Gray contains exactly the kind of articles I was looking for all the time. The only sad thing is that it contains only a handful of these articles. His <a href="http://blog.grayproductions.net/articles/category/higher-order-ruby">Higher Order Ruby</a> posts provide Ruby translations of the example code from the book <a href="http://www.amazon.com/exec/obidos/ASIN/1558607013/amazingdevelo-20?creative=327641&#038;camp=14573&#038;adid=0W6YKP7WDAWCPYNW86C0&#038;link_code=as1">Higher Order Perl</a>, his <a href="http://blog.grayproductions.net/articles/category/ruby-tutorials">Ruby tutorials</a> are among the best I&#8217;ve ever read and his other posts are worth reading, too.</p>
<p>If you read only a single sentence about good ruby style, it should be this one from <a href="http://blog.grayproductions.net/articles/2006/01/05/code-as-a-data-type">Code as a Data Type</a>:</p>
<blockquote><p>In my experience, you know you&#8217;re doing Ruby right when you are dropping code and gaining functionality</p></blockquote>
<p>This is true for almost any language, but in Ruby it is especially elegant to do. I guess this is the reason why I like programming in Ruby, it gives you the ability to write very compact but still readable code.</p>
<p>I&#8217;m getting pretty close to the present, but I hope I will find enough content for another post in this series so check again later&#8230;</p>
<p>BTW, if you have recommendations with other sites/articles/books on good ruby style, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/05/16/road-to-ruby-enlightenment-red-and-gray/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
