<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
   <channel>
      <title>Ruby and/or Rails</title>
      <description>Pipes Output</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=nDr4vAkP3BGAwuIYlvXiAA</link>
      <pubDate>Thu, 12 Nov 2009 03:39:03 -0800</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/rubymentary" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
         <title>OS X: Built-In Apache Web Server Can Keep The Twitter Monkey Off Your Back</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/4J-juVG5p44/os-x-built-in-apache-web-server-can.html</link>
         <description>For a long time I've periodically mapped Twitter and &lt;a rel="nofollow" target="_blank" href="http://gilesbowkett.blogspot.com/2009/01/protect-your-productivity-block.html"&gt;other distracting sites&lt;/a&gt; to &lt;code&gt;localhost&lt;/code&gt; in my &lt;code&gt;/etc/hosts&lt;/code&gt; file.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/irish_111109/hosts.png"&gt;&lt;br /&gt;&lt;br /&gt;Tonight I decided to get a bit harsher with myself. &lt;a rel="nofollow" target="_blank" href="http://www.oreillynet.com/pub/a/mac/2001/12/07/apache.html"&gt;OS X ships with an Apache web server not only built-in but up and running by default&lt;/a&gt;. So I did this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cd /Library/WebServer/Documents/&lt;br /&gt;&lt;br /&gt;git init&lt;br /&gt;vi .gitignore # ignore WebObjects/ and Java/&lt;br /&gt;git add .gitignore *.gif *.html.*&lt;br /&gt;&lt;br /&gt;vi index.haml&lt;br /&gt;haml index.haml &amp;gt; index.html.en&lt;br /&gt;vi index.css&lt;br /&gt;&lt;br /&gt;git add index.css&lt;br /&gt;git add index.haml&lt;br /&gt;git ci .&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And I got this:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/irish_111109/no.jpg"&gt;&lt;br /&gt;&lt;br /&gt;It'd be cool to create some kind of nifty app and store it on &lt;code&gt;127.0.0.1&lt;/code&gt;, but I think this will get the job done for now. In practice I've found host-file bans really easy to circumvent - obviously, I always have &lt;code&gt;sudo&lt;/code&gt; on my own machines - but it's still a nice reminder, kind of the Web geek equivalent of a really big, bright pink Post-It note.&lt;br /&gt;&lt;br /&gt;What seems to actually &lt;i&gt;work&lt;/i&gt;, however, is setting daily targets, with associated rewards, for Twitter avoidance. It's too early to blog about that yet; it's earned me maybe one day of clarity and peace, maybe two max. It's also earned me a &lt;a rel="nofollow" target="_blank" href="http://www.museumofhoaxes.com/hoax/weblog/permalink/fake_puma_ad_mystery_solved/"&gt;Puma&lt;/a&gt; hat, which is a mixed blessing; that "associated rewards" part could turn expensive.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/irish_111109/puma.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The Irish bit might seem a bit harsh. A little backstory: I'm Irish on my mother's side. Not Irish the way every person born within 100 miles of either Chicago or Boston is part Irish. Full-blooded Irish. My grandfather, who was born in &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/County_Waterford"&gt;County Waterford&lt;/a&gt;, has &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Anti-Irish_racism"&gt;faked an English accent his whole life&lt;/a&gt;, but give him a few beers and some &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Irish_poetry#Yeats_and_modernism"&gt;Irish poetry&lt;/a&gt;, and you might get to hear his true voice.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/irish_111109/green-ireland-lg.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Speaking of a few beers, everybody knows the stereotype of the Irish drunk. &lt;a rel="nofollow" target="_blank" href="http://www.nature.com/mp/journal/v11/n6/abs/4001811a.html"&gt;The magazine &lt;i&gt;Molecular Psychiatry&lt;/i&gt; found evidence that suggests the Irish may be genetically predisposed to alcoholism&lt;/a&gt;. Although I have no proof, I think it goes further than that; I think there's something wrong with &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Dopamine#Dopamine.2C_learning.2C_and_reward-seeking_behavior"&gt;dopamine&lt;/a&gt; receptors among the Irish. &lt;b&gt;&lt;a rel="nofollow" target="_blank" href="http://www.whatmakesthemclick.net/2009/11/07/100-things-you-should-know-about-people-8-dopamine-makes-us-addicted-to-seeking-information/"&gt;Dopamine drives habit-forming behavior.&lt;/a&gt;&lt;/b&gt; This includes &lt;a rel="nofollow" target="_blank" href="http://theoatmeal.com/quiz/twitter_addict"&gt;Twitter&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A Twitter habit is nowhere near as damaging as alcoholism, drug addiction, or a gambling problem - all more destructive habits that dopamine can drive - but it's still an annoying habit and usually a waste of time. I say usually because I also get great information and conversations from Twitter now and then. I even got a pretty great job off Twitter once. I've read the fantastic book &lt;i&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1594481946?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1594481946"&gt;Everything Bad is Good for You&lt;/a&gt;&lt;/i&gt;, and I can't help but wonder if there's some hidden upside to Twitter.&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1594481946?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1594481946"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/irish_111109/EverythingBadIsGoodForYou.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-319113394535123499?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/4J-juVG5p44" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-319113394535123499</guid>
         <pubDate>Wed, 11 Nov 2009 15:30:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/os-x-built-in-apache-web-server-can.html</feedburner:origLink></item>
      <item>
         <title>Torquebox: An All-In-One Java/JBoss Powered Ruby Webapp Platform</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/GjNA9hK4fj0/torquebox-an-all-in-one-javajboss-powered-ruby-webapp-platform-2783.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/11/torquebox2-150x150.png" alt="torquebox2" title="torquebox2" width="120" height="120" class="alignleft size-thumbnail wp-image-2791" style="margin-right:12px;margin-bottom:12px;float:left;"/&gt;In the past two years we've seen a number of changes in the world of Ruby webapp deployment, but have you heard of &lt;a rel="nofollow" target="_blank" href="http://torquebox.org/"&gt;Torquebox&lt;/a&gt;? Built upon the Red Hat Inc. JBoss middleware, Torquebox is an enterprise-grade application server that provides scale-oriented services to your Ruby webapps, including turn-key clustering. With its latest release, Torquebox supports all Rack-based Ruby frameworks.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/?p=2783</guid>
         <pubDate>Wed, 11 Nov 2009 15:43:09 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/torquebox2-150x150.png" alt="torquebox2" title="torquebox2" width="120" height="120" class="alignleft size-thumbnail wp-image-2791" style="margin-right:12px;margin-bottom:12px;float:left;"/>In the past two years we've seen a number of changes in the world of Ruby webapp deployment, but have you heard of <a rel="nofollow" target="_blank" href="http://torquebox.org/">Torquebox</a>? Built upon the Red Hat Inc. JBoss middleware, Torquebox is an enterprise-grade application server that provides scale-oriented services to your Ruby webapps, including turn-key clustering. With its latest release, Torquebox supports all Rack-based Ruby frameworks.</p>
<p>Torquebox comes with job scheduling and asynchronous task scheduling <em>out of the box</em> (no extra installs necessary), and while I've grown fond of <a rel="nofollow" target="_blank" href="http://www.rabbitmq.com/">RabbitMQ,</a> the ease of using the built-in <a rel="nofollow" target="_blank" href="http://java.sun.com/products/jms/">JMS</a> (Java Message Service) messaging is appealing, particularly if you're likely to deploy within a Java dominant environment. <strong>If you are having trouble convincing management to let you use Ruby, Torquebox is the most enterprise-oriented platform I've seen to date.</strong> Not just that, it's open-source and licensed under the LGPLv3. Their community site boasts that <a rel="nofollow" target="_blank" href="http://www.jboss.org/">JBoss</a> (upon which Torquebox is built) is <em>"the world's number one Java application server, and it was created by the community."</em></p>
<p>Torquebox 1.0.0.Beta18 was released within a day's time from the latest JRuby 1.4 release and you can download Torquebox from its download page, or build it yourself from <a rel="nofollow" target="_blank" href="http://github.com/torquebox/torquebox/">source easily obtained from GitHub</a>. If you are using Mac OS X, the following code sample will get you up and running with a simple cut and paste:</p>
<pre>
wget http://repository.torquebox.org/maven2/releases/org/torquebox/torquebox-bin/1.0.0.Beta18/torquebox-bin-1.0.0.Beta18.zip
unzip torquebox-bin-1.0.0.Beta18.zip
mv torquebox-1.0.0.Beta18-bin torquebox
export TORQUEBOX_HOME=~/torquebox
export JBOSS_HOME=$TORQUEBOX_HOME/jboss
export JRUBY_HOME=$TORQUEBOX_HOME/jruby
PATH=$JRUBY_HOME/bin:$PATH
sudo gem install jruby-openssl
sudo gem install activerecord-jdbcsqlite3-adapter
cd ~/torquebox/share/rails
rails -m template.rb ~/torquebox_rails_app
cd ~/torquebox_rails_app
rake rails:freeze:gems
emacs config/database.yml # (now prefix sqlite3 with jdbc to become "jdbcsqlite3") jruby -S rake gems:install
jruby -S rake db:migrate
jruby -S rake torquebox:rails:deploy
jruby -S rake torquebox:server:run</pre>
<p>While waiting for JBoss to unfurl, you can close your eyes and do a mental walk-through of installing Erlang, a RabbitMQ daemon, cron, HAProxy, etc. – because you won't have to do that with Torquebox – and when you open your eyes approximately two minutes later, you should be able to see the default Rails page at <code>http://localhost:8080</code>. While everything appears the same as if you were running on it on a Mongrel, you're really experiencing Rails as it's presented from within a JBoss AS appserver, more about that in a minute.</p>
<p>Handily, Torquebox contains tried-and-true JDBC drivers for a number of databases, including Derby, H2, HSQLDB, MySQL, PostgreSQL, and of course, SQLite3. Additionally, Torquebox is Capistrano friendly – so you probably won't need to learn any new tricks to deploy – and it also has built-in support for cryptographic key-storage.</p>
<p>With an application appropriately bundled into a WAR file, you can utilize Torquebox's farming to "deploy your app to one node of the cluster, and to have that node farm it out to all of its peers." Torquebox uses <code>httpd+mod_cluster</code> out in front, so it's "intelligently aware" of your JBoss cluster, and thus, if you have a two-node cluster running, and you start two more JBoss instances on the same subdomain, they'll auto-join the cluster and then the existing nodes will auto-farm the app to them. You're app now has twice the resources and didn't need to be restarted, which in and of itself, is pretty huge.</p>
<p>So, where does Torquebox fit in? One can make the argument that it fits "everywhere." The JVM comes pre-installed on Macs, is easy enough to add to Linux or a Windows desktop, and of course deploys to a number of hosts. Scaling the JVM isn't new, and finding the people to do so is probably easier than finding dedicated Ruby programmers. I would be remiss not to point out that JBoss is hungry for RAM, and I realized quickly that Torquebox wanted more cowbell than my <em>Linode 720</em> could afford. Engine Yard Cloud greatly simplifies deployment to EC2 instances (via Chef), and the smallest instance provides a whopping 1.7GB RAM, so scaling JRuby through the company that houses the JRuby core commiters just makes sense to me. If, however, you feel better qualified to deploy Torquebox yourself, you might look at JBoss Cloud.</p>
<p>I recommend taking 10 minutes to watch the pair (<a rel="nofollow" target="_blank" href="http://torquebox.org/news/2009/05/screencast-getting-started-with-torquebox">1</a>, <a rel="nofollow" target="_blank" href="http://torquebox.org/news/2009/05/screencast-scheduled-jobs-with-torquebox">2</a>) of screencasts by Bob McWhirter, which demonstrate all of what I've highlighted here in well under a half an hour.</p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://devver.net/caliper"><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/caliper-logo.png" width="98" height="42" alt="caliper-logo.png" style="float:right;margin-bottom:8px;margin-left:12px;"/></a><em>[ad]</em> Find duplication, code smells, complex code and more in your Ruby code with <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Caliper!</a> The metrics are free and setup takes just one click. <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Get started!</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Gn_aeOR0EfM:FfGsexDXpeM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Gn_aeOR0EfM:FfGsexDXpeM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Gn_aeOR0EfM:FfGsexDXpeM:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Gn_aeOR0EfM:FfGsexDXpeM:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Gn_aeOR0EfM:FfGsexDXpeM:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Gn_aeOR0EfM:FfGsexDXpeM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Gn_aeOR0EfM:FfGsexDXpeM:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/Gn_aeOR0EfM" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/GjNA9hK4fj0" height="1" width="1"/>]]></content:encoded>
         <category>Tools</category>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/Gn_aeOR0EfM/torquebox-an-all-in-one-javajboss-powered-ruby-webapp-platform-2783.html</feedburner:origLink></item>
      <item>
         <title>Mail: An All New Ruby E-mail Library</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/6FuA-mewU74/ruby-email-library-2782.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/11/emailIcon.png" width="84" height="88" alt="emailIcon.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;To date, the main ways to send e-mails from Ruby have been &lt;a rel="nofollow" target="_blank" href="http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html"&gt;Net::SMTP&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://tmail.rubyforge.org/"&gt;TMail&lt;/a&gt;, and Rails' &lt;a rel="nofollow" target="_blank" href="http://api.rubyonrails.org/classes/ActionMailer/Base.html"&gt;ActionMailer&lt;/a&gt; (which uses TMail). Now, however, there's a fourth option, the simply named "&lt;a rel="nofollow" target="_blank" href="http://github.com/mikel/mail"&gt;mail&lt;/a&gt;" by Mikel Lindsaar.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/ruby-email-library-2782.html</guid>
         <pubDate>Wed, 11 Nov 2009 07:02:04 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/emailIcon.png" width="84" height="88" alt="emailIcon.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>To date, the main ways to send e-mails from Ruby have been <a rel="nofollow" target="_blank" href="http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html">Net::SMTP</a>, <a rel="nofollow" target="_blank" href="http://tmail.rubyforge.org/">TMail</a>, and Rails' <a rel="nofollow" target="_blank" href="http://api.rubyonrails.org/classes/ActionMailer/Base.html">ActionMailer</a> (which uses TMail). Now, however, there's a fourth option, the simply named "<a rel="nofollow" target="_blank" href="http://github.com/mikel/mail">mail</a>" by Mikel Lindsaar.</p>
<p><a rel="nofollow" target="_blank" href="http://github.com/mikel/mail">Mail</a> is a new pure Ruby library designed to handle the generation, parsing, and sending of e-mail in a "Rubyesque" manner. Both the sending and receiving e-mails can be handled through the library and, where necessary, Mail proxies methods from libraries like Net::SMTP and Net::POP3. Ruby 1.9 support has been built in from day one so dealing with different text encodings in your e-mails is easier than ever (Mikel claims this is less than straightforward with TMail). Mikel also points out that Mail has 100% spec coverage.</p>
<p>There are lots of code examples on the Mail page but to give you an idea of how it works, here's a code example that sends an e-mail with an attachment:</p>
<pre><span class="constant">Mail</span><span class="punct">.</span><span class="ident">defaults</span> <span class="keyword">do</span> <span class="ident">smtp</span> <span class="punct">'</span><span class="string">127.0.0.1</span><span class="punct">'</span> <span class="comment"># Port 25 defult</span>
<span class="keyword">end</span> <span class="ident">mail</span> <span class="punct">=</span> <span class="constant">Mail</span><span class="punct">.</span><span class="ident">new</span> <span class="keyword">do</span> <span class="ident">from</span> <span class="punct">'</span><span class="string">me@test.lindsaar.net</span><span class="punct">'</span> <span class="ident">to</span> <span class="punct">'</span><span class="string">you@test.lindsaar.net</span><span class="punct">'</span> <span class="ident">subject</span> <span class="punct">'</span><span class="string">Here is the image you wanted</span><span class="punct">'</span> <span class="ident">body</span> <span class="constant">File</span><span class="punct">.</span><span class="ident">read</span><span class="punct">('</span><span class="string">body.txt</span><span class="punct">')</span> <span class="ident">add_file</span> <span class="punct">{</span><span class="symbol">:filename</span> <span class="punct">=&gt;</span> <span class="punct">'</span><span class="string">somefile.png</span><span class="punct">',</span> <span class="symbol">:data</span> <span class="punct">=&gt;</span> <span class="constant">File</span><span class="punct">.</span><span class="ident">read</span><span class="punct">('</span><span class="string">/somefile.png</span><span class="punct">')}</span>
<span class="keyword">end</span> <span class="ident">mail</span><span class="punct">.</span><span class="ident">deliver!</span></pre>
<p>As well as the main GitHub page for the Mail project, there's also <a rel="nofollow" target="_blank" href="http://groups.google.com/group/mail-ruby">a mail-ruby Google Group</a> where questions can be asked, etc.</p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://devver.net/caliper"><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/caliper-logo.png" width="98" height="42" alt="caliper-logo.png" style="float:right;margin-bottom:8px;margin-left:12px;"/></a><em>[ad]</em> Find duplication, code smells, complex code and more in your Ruby code with <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Caliper!</a> The metrics are free and setup takes just one click. <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Get started!</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=sEoQMs5rIRY:Z-c-BZkDB34:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=sEoQMs5rIRY:Z-c-BZkDB34:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=sEoQMs5rIRY:Z-c-BZkDB34:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=sEoQMs5rIRY:Z-c-BZkDB34:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=sEoQMs5rIRY:Z-c-BZkDB34:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=sEoQMs5rIRY:Z-c-BZkDB34:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=sEoQMs5rIRY:Z-c-BZkDB34:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/sEoQMs5rIRY" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/6FuA-mewU74" height="1" width="1"/>]]></content:encoded>
         <category>Cool</category>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/sEoQMs5rIRY/ruby-email-library-2782.html</feedburner:origLink></item>
      <item>
         <title>Upcoming Webcast: Tokyo Cabinet in One Hour - Meet Experts Online</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/M30CNl474zY/1477</link>
         <author>O'Reilly Media</author>
         <guid isPermaLink="false">http://www.oreillynet.com/pub/e/1477</guid>
         <pubDate>Tue, 10 Nov 2009 05:57:43 -0800</pubDate>
      <description>&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/M30CNl474zY" height="1" width="1"/&gt;</description><feedburner:origLink>http://feeds.oreilly.com/~r/oreilly/ruby/~3/5luwMbYkQZ8/1477</feedburner:origLink></item>
      <item>
         <title>Config So Simple Your Mama Could Use It</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/I2exU2Sz7uc/app-configuration-so-simple-your-mama-could-use-it</link>
         <description>&lt;p&gt;In which I clog a bit of code for simple application configuration.&lt;/p&gt;
&lt;p&gt;Tonight, &lt;a rel="nofollow" target="_blank" href="http://metaatem.net/"&gt;Kastner&lt;/a&gt; asked me if I had anything to do some simple configuration for something he was working on. I’ve got a simple module and yaml file that I’ve been using so I &lt;a rel="nofollow" target="_blank" href="http://gist.github.com/230531"&gt;gist’d&lt;/a&gt; it. It then occurred to me that I might as well share it here too.&lt;/p&gt; &lt;h2&gt;The Yaml&lt;/h2&gt; &lt;p&gt;Below is an example of the yaml file. Basically, I setup some defaults and then customize each environment as needed.&lt;/p&gt; &lt;pre&gt;&lt;code class="yaml"&gt;DEFAULTS: &amp;DEFAULTS email: no-reply@harmonyapp.com email_signature: | Regards, The Harmony Team development: domain: harmonyapp.local &amp;lt;&amp;lt;: *DEFAULTS test: domain: harmonyapp.com &amp;lt;&amp;lt;: *DEFAULTS production: domain: harmonyapp.com &amp;lt;&amp;lt;: *DEFAULTS&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;The Module&lt;/h2&gt; &lt;p&gt;The module can read and write to the config and even loads the Yaml file the first time you try to read a configuration key.&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;module Harmony # Allows accessing config variables from harmony.yml like so: # Harmony[:domain] =&amp;gt; harmonyapp.com def self.[](key) unless @config raw_config = File.read(RAILS_ROOT + "/config/harmony.yml") @config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys end @config[key] end def self.[]=(key, value) @config[key.to_sym] = value end
end&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;If I wanted to get the domain, I would do the following:&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;Harmony[:domain]&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Nothing fancy, but it gets the job done. I just drop the yaml file in config/ and the module in lib/. Obviously, you would rename the module and yaml file to whatever constant you want, such as App or something related to your application’s name. I know there are gems and plugins to do configuration, but when something this simple gets the job done, I figure why bother.&lt;/p&gt; &lt;p&gt;What do you all use for app configuration? What do you like about what you use?&lt;/p&gt; &lt;div class="feedflare"&gt;
&lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=HP12Tj7WhVQ:ktAMXcoF144:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=yIl2AUoC8zA" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=HP12Tj7WhVQ:ktAMXcoF144:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=dnMXMwOfBR0" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=HP12Tj7WhVQ:ktAMXcoF144:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=7Q72WNTAKBA" border="0"&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railstips/~4/HP12Tj7WhVQ" height="1" width="1"/&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/I2exU2Sz7uc" height="1" width="1"/&gt;</description>
         <author>john</author>
         <guid isPermaLink="false">tag:railstips.org,2009-11-10:9278</guid>
         <pubDate>Tue, 10 Nov 2009 03:00:00 -0800</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/railstips/~3/HP12Tj7WhVQ/app-configuration-so-simple-your-mama-could-use-it</feedburner:origLink></item>
      <item>
         <title>iGhost iRide iThe iWhip</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/ZB0xOjYNFaU/ighost-iride-ithe-iwhip.html</link>
         <description>&lt;iframe class="embeddedvideo" src="http://www.youtube.com/v/_x5IziyOcAg&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-4617072033607230609?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/ZB0xOjYNFaU" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-4617072033607230609</guid>
         <pubDate>Tue, 10 Nov 2009 02:16:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/ighost-iride-ithe-iwhip.html</feedburner:origLink></item>
      <item>
         <title>Interesting Ruby Tidbits That Don’t Need Separate Posts #29</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/9SQj94oUMdg/ruby-tidbits-29-2780.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/11/rubies2-150x150.png" alt="rubies2" title="rubies2" width="120" height="120" class="alignleft size-thumbnail wp-image-2773" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;Welcome to the latest installment in the series of compilation posts summarizing some of my latest findings in the world of all things Ruby. Let's tackle those links..&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/ruby-tidbits-29-2780.html</guid>
         <pubDate>Mon, 09 Nov 2009 19:09:03 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/rubies2-150x150.png" alt="rubies2" title="rubies2" width="120" height="120" class="alignleft size-thumbnail wp-image-2773" style="float:left;margin-right:12px;margin-bottom:12px;"/>Welcome to the latest installment in the series of compilation posts summarizing some of my latest findings in the world of all things Ruby. Let's tackle those links..</p>
<h3>Alchemist: Easy Unit Conversion in Ruby</h3>
<p><a rel="nofollow" target="_blank" href="http://github.com/toastyapps/alchemist">Alchemist</a> is a new Ruby library that aims to take the pain out of performing translation with day to day units, such as miles, kilograms, kelvin, meters, and <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Becquerel">becquerels.</a> There are a few ways you can perform conversions such as explicitly with a method: <code>8.meters.to.miles</code> or inline: <code>10.kilometers + 1.mile</code>. The <a rel="nofollow" target="_blank" href="http://github.com/toastyapps/alchemist/blob/master/lib/alchemist.rb">library's source code</a> is quite something to look at - there are units I've never even heard of before.</p>
<h3>The Compleat Rubyist - An All-Star Ruby Training Event</h3>
<p>David A Black, of <a rel="nofollow" target="_blank" href="http://www.amazon.com/Well-Grounded-Rubyist-David-Black/dp/1933988657/?tag=rubyins-20">The Well Grounded Rubyist</a> fame, got in touch recently to promote his forthcoming <a rel="nofollow" target="_blank" href="http://thecompleatrubyist.com/">The Compleat Rubyist</a> training event. The instructors are David, Gregory Brown (of <a rel="nofollow" target="_blank" href="http://www.amazon.com/Ruby-Best-Practices-Gregory-Brown/dp/0596523009/?tag=rubyins-20">Ruby Best Practices</a> fame), and Jeremy McAnally (of, well, <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/rubys-top-hitter-in-2008-jeremy-mcanally-1404.html">lots of fame</a>) and the event takes place on January 22-23, 2010 in Tampa, Florida. I initially wanted to do a series of interviews with the guys to help them spread the word but they'll come later (one word: <em>newborn</em>). Anyway, this is a great chance to learn a thing or two from three Ruby superstars.</p>
<h3>You're An Idiot For Not Using Heroku?</h3>
<p>In the dramatically titled <a rel="nofollow" target="_blank" href="http://railstips.org/2009/11/8/you-re-an-idiot-for-not-using-heroku">You're An Idiot For Not Using Heroku</a>, John Nunemaker relays how much fun he's been having with Ruby cloud hosting service <a rel="nofollow" target="_blank" href="http://heroku.com/">Heroku</a> which, you may recall, we <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/heroku-gets-add-ons-serious-ruby-webapp-hosting-made-easy-2664.html">covered very recently</a> here on Ruby Inside.</p>
<h3>A First Look at Rails 3.0</h3>
<p>Dr Nic Williams has <a rel="nofollow" target="_blank" href="http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre">put together a walkthrough of Rails 3.0.pre</a>, the embryonic version of the forthcoming Rails 3.0.</p>
<h3>JRuby 1.4 Released</h3>
<p>The latest significant release of JRuby, 1.4.0, <a rel="nofollow" target="_blank" href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/1b630246f7f5c434">is now available!</a> <em>(linked to a newsgroup announcement as jruby.org is down at the time of writing)</em> The 1.4.0 release brings compatibility with Ruby 1.8.7p174, improved Java integration support, a Windows installer and native launcher, a new embedding framework, RubyGems 1.3.5, and a whole batch of bug fixes.</p>
<h3>Hacking Gems With GitHub and GemCutter</h3>
<p>Dr Nic Williams (who's proving rather popular in this post) asks: <em>"Ever used a rubygem, found a bug, and just wanted to quickly bust out the big guns and fix it quickly?</em> Surely, we all have.. so he's written <a rel="nofollow" target="_blank" href="http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/">Hacking someone's gem with github and gemcutter</a> to show us how to easily fork an existing gem, make our changes, and get it deployed on <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/gemcutter-is-the-new-official-default-rubygem-host-2659.html">Gemcutter</a> <em>tout de suite.</em></p>
<h3>Building a Twitter Filter with Sinatra, Redis, and TweetStream</h3>
<p>Mirko Froehlich (a.k.a. DigitalHobbit) has written an awesomely in-depth <a rel="nofollow" target="_blank" href="http://www.digitalhobbit.com/2009/11/08/building-a-twitter-filter-with-sinatra-redis-and-tweetstream/">tutorial on how to build a "Twitter filter"</a> using Sinatra, Haml, jQuery, and some other funky tools. If you want to see the result, check out <a rel="nofollow" target="_blank" href="http://twatcher.com/">http://twatcher.com/</a></p>
<h3>The Official GitHub Command Line Tool</h3>
<p>I hadn't heard of it before, but Dr Nic Williams announced the release of <a rel="nofollow" target="_blank" href="http://github.com/defunkt/github-gem">version 0.4.0 of "github-gem",</a> an official GitHub <em>"command line helper for simplifying your GitHub experience."</em> If you're a GitHub user, this looks extremely useful. You can quickly deal with patches made on any forks of your project, fetch downstream changes, and so forth.</p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WunoI3kx2B8:klUsjO3vPpc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WunoI3kx2B8:klUsjO3vPpc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WunoI3kx2B8:klUsjO3vPpc:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WunoI3kx2B8:klUsjO3vPpc:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WunoI3kx2B8:klUsjO3vPpc:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WunoI3kx2B8:klUsjO3vPpc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WunoI3kx2B8:klUsjO3vPpc:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/WunoI3kx2B8" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/9SQj94oUMdg" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/WunoI3kx2B8/ruby-tidbits-29-2780.html</feedburner:origLink></item>
      <item>
         <title>Peepcode On jQuery Features Snippet Of My Music</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/dkDF0YsNJGE/peepcode-on-jquery-features-snippet-of.html</link>
         <description>Plus it looks &lt;a rel="nofollow" target="_blank" href="http://peepcode.com/products/jquery"&gt;awesome&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-6355498388520006324?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/dkDF0YsNJGE" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-6355498388520006324</guid>
         <pubDate>Mon, 09 Nov 2009 10:20:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/peepcode-on-jquery-features-snippet-of.html</feedburner:origLink></item>
      <item>
         <title>Rails Envy Podcast – Episode #099</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/_A57Iu2L3xk/episode-099</link>
         <description>Episode #99 Like a Boss edition. Here&amp;#8217;s a YouTube link (NSFW) for those that haven&amp;#8217;t heard it and don&amp;#8217;t get the joke. The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you [...]</description>
         <guid isPermaLink="false">http://railsenvy.com/?p=3412</guid>
         <pubDate>Mon, 09 Nov 2009 11:37:15 -0800</pubDate>
         <content:encoded><![CDATA[<p><strong>Episode #99</strong> Like a Boss edition. Here&#8217;s a <a rel="nofollow" target="_blank" href="http://www.youtube.com/watch?v=NisCkxU544c">YouTube</a> link (NSFW) for those that haven&#8217;t heard it and don&#8217;t get the joke.</p>
<div class="podcast_sponsor"> <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite" style="border:none;"><img src="http://www.railsenvy.com/assets/2008/9/17/NewRelic-225x119.gif" alt="Sponsored by New Relic" style="border:none;float:right;"/></a><br /> The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly diagnose problems with your Rails application in real time. Check them out at <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite">NewRelic.com</a>. </div>
<p><br /> </p>
<h2>Show Notes</h2>
<ul>
<li>
<h4><a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010/public/cfp/84" title="RailsConf RFP Open">RailsConf RFP Open</a></h4>
<p>RailsConf 2010 will be held June 7-10, 2010 at the Baltimore Convention Center in Baltimore, MD – and Ruby Central and O’Reilly Media are now accepting proposals for conference sessions and tutorials. Proposals are due at 11:59pm EDT March 17, 2010.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/blog/542-introducing-resque" title="Introducing Resque">Introducing Resque</a></h4>
<p>Resque is GitHub&#8217;s Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.bigrecord.org" title="BigRecord">BigRecord</a></h4>
<p>BigRecord is an object-data mapping layer for distributed column-oriented data stores (inspired by Google’s BigTable) such as HBase and Cassandra. Adapted from ActiveRecord, BigRecord is designed to work as a drop-in for Rails applications.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.slideshare.net/ihower/rails-best-practices" title="Rails Best Practices">Rails Best Practices</a></h4>
<p>Wen-Tien Chang&#8217;s slideshare presentation Rails Best Practices from kungfurails.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/toastyapps/alchemist" title="Alchemist">Alchemist</a></h4>
<p>Alchemist is a fine Ruby unit conversion library designed for readability and convenience.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://limelight.8thlight.com/main/sparkle" title="Limelight GUI Framework">Limelight GUI Framework</a></h4>
<p>Limelight is a rich client GUI framework.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://rubymanor.org/harder/" title="Ruby Manor 2: Manor Harder">Ruby Manor 2: Manor Harder</a></h4>
<p>Ruby Manor 2: Manor Harder is taking place December 12th at Parry Hall, London and has the best tag line of any ruby or rails conference ever.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/ejschmitt/jsvars" title="Jsvars">Jsvars</a></h4>
<p>This rails plugin will hide the messiness of passing variables from rails into javascript. It will automatically add the js needed to create a variable you define in rails, or add variables to objects.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://documentcloud.github.com/underscore/" title="Underscore.js">Underscore.js</a></h4>
<p>Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It&#8217;s the tie to go along with jQuery&#8217;s tux.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://wynnnetherland.com/2009/10/new-in-the-twitter-gem-lists/" title="Twitter gem 0.7.0 out">Twitter gem 0.7.0 out</a></h4>
<p>Twitter gem version 0.7.0 has been released with list support.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://vinsol.com/blog/2009/10/29/integrating-yahoo-boss-with-your-rails-application/" title="Yahoo BOSS and Rails">Yahoo BOSS and Rails</a></h4>
<p>Vinsol has posted a small tutorial on using Yahoo BOSS with rails.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.vanheusden.com/httping/)." title="HTTPing">HTTPing</a></h4>
<p>HTTPing.rb is a utility to measure web service response time. This is a Ruby port of HTTPing (<a rel="nofollow" target="_blank" href="http://www.vanheusden.com/httping/">http://www.vanheusden.com/httping/).</a><br /><a rel="nofollow" target="_blank" href="http://github.com/jpignata/httping">http://github.com/jpignata/httping</a></p>
</li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.engineyard.com/blog/2009/win-a-motorola-droid-programming-contest-worst-app-server-technology-ever/" title="Win a Motorola DROID Programming Contest: &#x00201c;Worst App Server Technology Ever&#x00201d;">Win a Motorola DROID Programming Contest: “Worst App Server Technology Ever”</a></h4>
<p>Engine Yard is sponsoring another programming contest. The goal of this contest is to collaborate with your other contestants to build the “worst app server ever” (WASE) , and use it to complete one or more challenge computations.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://pivotallabs.com/users/jsusser/blog/articles/1038-announcing-refraction" title="Refraction">Refraction</a></h4>
<p>Refraction is a Rack middleware replacement for mod_rewrite.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.diegocarrion.com/2009/10/30/really-easy-continuous-integration-with-signal/" title="Continuous Integration with Signal">Continuous Integration with Signal</a></h4>
<p>Signal is a continuous integration server written in Rails.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://rubyforge.org/forum/forum.php?forum_id=35487" title="Nokogiri 1.4.0 Released">Nokogiri 1.4.0 Released</a></h4>
<p>"XML is like violence &#8211; if it doesn’t solve your problems, you are not using enough of it."</p>
<p>Version 1.4.0 has been released. A big change in this one: Hpricot compatibility layer removed</p>
<p></li>
</ul>
<img src="http://feeds.feedburner.com/~r/rails-envy/~4/1bglzR7eZOM" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/_A57Iu2L3xk" height="1" width="1"/>]]></content:encoded>
         <enclosure length="23509120" url="http://feedproxy.google.com/~r/rails-envy/~5/heBlxkGpOu0/podcast_99.mp3" type="audio/mpeg" />
      <feedburner:origLink>http://feedproxy.google.com/~r/rails-envy/~3/1bglzR7eZOM/episode-099</feedburner:origLink></item>
      <item>
         <title>JavaFX Coding Conventions</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/u8hLDpezISw/javafx_coding_conventions</link>
         <description>&lt;p&gt;&lt;p&gt;&lt;br/&gt;
I've been writing a lot of JavaFX code over the last year. After some tweaking I've arrived at a style that I like a lot. I notice that even on my team there are some variations in how people format their code, so I thought I would document what I like in case this helps others get started. (I did a quick google search and didn't find any JavaFX coding convention documents anywhere. The closest thing I found was a &lt;a rel="nofollow" target="_blank" href="http://nick-software.blogspot.com/2009/10/coding-conventions-for-javafx-script.html"&gt;blog entry&lt;/a&gt;, but while it contains a lot of good advice, the style it recommends does not match the practice of the JavaFX team (or the Sun Java style) either). Therefore, I thought I would document what I consider good JavaFX coding conventions.&lt;br/&gt;
&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;&lt;br/&gt;
Rather than post them here in a blog entry, I placed them in a Wiki page such that they can easily be improved and kept up to date as I get feedback and in case I change my mind :)&lt;br/&gt;
&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;&lt;br/&gt;
You can find the coding conventions document here:&lt;br/&gt;
&lt;br&gt;&lt;br/&gt;
&lt;a rel="nofollow" target="_blank" href="http://wikis.sun.com/display/JavaFxCodeConv/Home"&gt;http://wikis.sun.com/display/JavaFxCodeConv/Home&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;&lt;br/&gt;
P.S. I will be speaking at Devoxx in Antwerp, Belgium next week! Hope to meet some of you there!&lt;br/&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/u8hLDpezISw" height="1" width="1"/&gt;</description>
         <guid isPermaLink="false">http://blogs.sun.com/tor/entry/javafx_coding_conventions</guid>
         <pubDate>Sun, 08 Nov 2009 20:29:29 -0800</pubDate>
      <feedburner:origLink>http://blogs.sun.com/tor/entry/javafx_coding_conventions</feedburner:origLink></item>
      <item>
         <title>You're An Idiot For Not Using Heroku</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/_KFRm15gApg/you-re-an-idiot-for-not-using-heroku</link>
         <description>&lt;p&gt;In which I discuss my first experience with Heroku and my second. And how awesome it is.&lt;/p&gt;
&lt;p&gt;It is true. You are. Go try it now. That is an order. I can wait for you to come back and finish reading this post. I could end the post now, but I suppose I’ll go on and tell you a bit about my experience with &lt;a rel="nofollow" target="_blank" href="http://heroku.com"&gt;Heroku&lt;/a&gt; yesterday.&lt;/p&gt; &lt;h2&gt;Formerly a Toy in the Cloud&lt;/h2&gt; &lt;p&gt;&lt;a rel="nofollow" target="_blank" href="http://wynnnetherland.com"&gt;Wynn&lt;/a&gt; and I were talking yesterday about how, back in the day, Heroku seemed like a toy in the cloud. They had a rich code editor and you could magically create and deploy applications that sometimes worked. It was neat, but nothing you would use for anything serious.&lt;/p&gt; &lt;p&gt;A toy they are no more. So what is Heroku? According to their site, Heroku is “fast, frictionless, and maintenance free.” &lt;strong&gt;After giving it another look yesterday, I would have to agree&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;a rel="nofollow" target="_blank" href="http://heroku.com/"&gt;&lt;img class="full image" src="http://static.railstips.org/images/articles/heroku.jpg" alt="Heroku"/&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;The App&lt;/h2&gt; &lt;p&gt;I have a tiny note application that my wife and I use. I use it to mark things to read later and save plain text notes. She uses it to keep track of recipes, tagged with ingredients and whether or not she has made the recipe before. It is nothing fancy, but it serves a purpose for both of us.&lt;/p&gt; &lt;p&gt;&lt;img class="full image" src="http://static.railstips.org/images/articles/textual.jpg" alt="Textual"/&gt;&lt;/p&gt; &lt;p&gt;The app formerly ran on Dreamhost (&lt;a rel="nofollow" target="_blank" href="http://railstips.org/2008/12/14/deploying-rails-on-dreamhost-with-passenger"&gt;how to deploy rails on DH&lt;/a&gt;) and used MySQL. Since I decided not to attend the Notre Dame game yesterday, I had some free time, so I watched football on TV all day and worked on converting this project from MySQL to MongoDB (&lt;a rel="nofollow" target="_blank" href="http://railstips.org/2009/6/3/what-if-a-key-value-store-mated-with-a-relational-database-system"&gt;which is awesome&lt;/a&gt;).&lt;/p&gt; &lt;p&gt;Once I finished the conversion, which didn’t take long, I exported the MySQL database as &lt;span class="caps"&gt;XML&lt;/span&gt; using PHPMyAdmin (shutter) and then wrote an import rake task that reconnected the xml in MongoDB (which is awesome).&lt;/p&gt; &lt;h2&gt;MongoHQ&lt;/h2&gt; &lt;p&gt;I have had a &lt;a rel="nofollow" target="_blank" href="http://mongohq.com"&gt;MongoHQ&lt;/a&gt; invite for a while now, but hadn’t kicked the tired so I decided now was as good a time as any. Then it occurred to me. Why use Dreamhost when Heroku has a free account and I’m already hosting my database in the sky? &lt;strong&gt;Why not go cloud to the max&lt;/strong&gt; and see how things end up?&lt;/p&gt; &lt;h2&gt;Heroku&lt;/h2&gt; &lt;p&gt;I logged in with my old Heroku account and did some reading through their &lt;a rel="nofollow" target="_blank" href="http://docs.heroku.com/"&gt;amazing docs&lt;/a&gt;.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;I gem installed heroku. &lt;/li&gt; &lt;li&gt;heroku created my app using the command line tool. &lt;/li&gt; &lt;li&gt;git pushed to heroku remote.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Boom. &lt;strong&gt;In less than a minute my app was created and deployed&lt;/strong&gt; on Heroku. Impressive. Now that isn’t where the story ended. Hosting on Heroku is a bit different.&lt;/p&gt; &lt;h2&gt;Config Vars&lt;/h2&gt; &lt;p&gt;The first thing I ran into was some config file issues. I found Heroku’s article on &lt;a rel="nofollow" target="_blank" href="http://docs.heroku.com/config-vars"&gt;config vars&lt;/a&gt; and switched my app to work like that. git push and my app was deployed again.&lt;/p&gt; &lt;h2&gt;Gems&lt;/h2&gt; &lt;p&gt;Now I was missing gems. Back to the docs I went, this time to read about &lt;a rel="nofollow" target="_blank" href="http://docs.heroku.com/gems"&gt;managing gems&lt;/a&gt;. I created my .gems manifest and git pushed again. Just like that my app was up and running in the sky.&lt;/p&gt; &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;I made a few more changes to my app over the next few hours and deployed after each one with a simple git push heroku master. Each time, I almost giggled as the normal git messages happened and then out of nowhere, Heroku stepped in and informed me that it was deploying my app and…wait for it…wait for it…that the deploy was finished.&lt;/p&gt; &lt;p&gt;Now that I’ve used it for a tiny app, I’m curious to see what it can do with something larger. &lt;strong&gt;I’ll definitely be using Heroku a lot in the future&lt;/strong&gt;, that much I know for sure. &lt;strong&gt;Combined with a hosted MongoDB service, it is absolute glory&lt;/strong&gt;. MongoDB having their &lt;a rel="nofollow" target="_blank" href="http://www.mongodb.org/display/DOCS/GridFS"&gt;GridFS file store&lt;/a&gt;, means that not having write access to a file system on Heroku is no big deal. You don’t even have to setup S3.&lt;/p&gt; &lt;p&gt;I’ll leave you with &lt;a rel="nofollow" target="_blank" href="http://twitter.com/jnunemaker/status/5521286645"&gt;my tweet from yesterday&lt;/a&gt;, summing up my experience.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Created and deployed a MongoDB backed Rails app to Heroku and MongoHQ today. I have witnessed the future.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Anyone else out there using Heroku? What kind of apps have you deployed on it? What have your experiences been? Curious to hear from others.&lt;/p&gt; &lt;div class="feedflare"&gt;
&lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=BX4lKOlVzQ4:2HDNrBj4fwk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=yIl2AUoC8zA" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=BX4lKOlVzQ4:2HDNrBj4fwk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=dnMXMwOfBR0" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=BX4lKOlVzQ4:2HDNrBj4fwk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=7Q72WNTAKBA" border="0"&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railstips/~4/BX4lKOlVzQ4" height="1" width="1"/&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/_KFRm15gApg" height="1" width="1"/&gt;</description>
         <author>john</author>
         <guid isPermaLink="false">tag:railstips.org,2009-11-08:9257</guid>
         <pubDate>Sun, 08 Nov 2009 09:17:00 -0800</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/railstips/~3/BX4lKOlVzQ4/you-re-an-idiot-for-not-using-heroku</feedburner:origLink></item>
      <item>
         <title>Time Management: Two Pics, Two Books, One App</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/DCoqqSm6Fec/time-management-two-pics-two-books-one.html</link>
         <description>Lots of people are into David Allen's &lt;i&gt;Getting Things Done&lt;/i&gt;. I discovered it in 1998, about ten years before it became a programmer fad, when it was a mail-order tape course that cost $100 instead of a best-seller on Amazon that cost $10. I liked the ideas, but in practice it was too complicated; there was no way in hell I was going to get from as disorganized as I was, to following a system that complicated, without becoming an organized person &lt;i&gt;first&lt;/i&gt;. A system for becoming organized which requires you to already be organized in the first place was no use to me at all.&lt;br /&gt;&lt;br /&gt;I've read a few books on time management since then, but they all seem to suck. These two books are the only two I've really liked:&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1932156852?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1932156852"&gt;No B.S. Time Management for Entrepreneurs (NO BS)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=gilebowk-20&amp;l=as2&amp;o=1&amp;a=1932156852" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important;"/&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/time_110709/kennedy.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0596007833?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596007833"&gt;Time Management for System Administrators&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=gilebowk-20&amp;l=as2&amp;o=1&amp;a=0596007833" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important;"/&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/time_110709/limoncelli.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Everything I'm doing now revolves around pen and paper (or felt-tipped marker and calendar). I've tried a lot of different software, including Things and RescueTime, but I only ever found one piece of time management software which was useful for me at all: &lt;a rel="nofollow" target="_blank" href="http://www.freshapps.com/streaks/"&gt;Streaks&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/time_110709/streaks.jpg"&gt;&lt;br /&gt;&lt;br /&gt;However, even Streaks didn't really do it for me. I kept creating new calendars for all the new habits I wanted to cultivate - eat healthier food, work out every day, remember to wash the dishes, etc., etc. - and some of these things, I wanted weekly frequencies for, not daily. I couldn't solve the weekly problem with Streaks, and I solved the many habits problem with many calendars. Pretty soon I had more than 20 calendars, which was way more than Streaks was even designed to hold in memory, and performance nose-dived. So I bought a physical calendar and wrote on it.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/time_110709/photo.jpg"&gt;&lt;br /&gt;&lt;br /&gt;It worked but it looked like crap. I soon upgraded to color.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/time_110709/color.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Vertical lines represent weekly habits; horizontal lines represent daily habits. It's pretty great because you can see at a glance how you're doing. You can only track about ten daily habits with this, though.&lt;br /&gt;&lt;br /&gt;I wanted to buy ten or fifteen calendars and put them all up on a wall, one calendar per habit, to make it much easier to read, but you can really only buy 2009 calendars in 2009 if it's January. The calendar publishing industry is so insane about promoting new releases that they make the car industry, which will have people buying 2011 model cars by June 2010, look reasonable. I realize I'm raising this complaint in November, but I started looking in August.&lt;br /&gt;&lt;br /&gt;Anyway, come 2010, I might go for a wall of calendars. I've reserved wall space for at least ten calendars, just in case, but I might go for something simpler instead. I have some other ideas that might work better. I'd like to go into more detail, but I only have nine more minutes budgeted for this, and I have to take an unscheduled leak.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;&lt;b&gt;Full disclosure&lt;/b&gt;: The Amazon links in this post are affiliate links, which pay small sales commisions.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-3684111576189093135?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/DCoqqSm6Fec" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-3684111576189093135</guid>
         <pubDate>Sat, 07 Nov 2009 03:52:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/time-management-two-pics-two-books-one.html</feedburner:origLink></item>
      <item>
         <title>Coyotes, A Pulitzer, And DHH's Lamborghini</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/gw50a8L3eSI/coyotes-pulitzer-and-dhhs-lamborghini.html</link>
         <description>A few months ago, Yehuda Katz came to LA Ruby and gave a presentation on his plans for Rails 3 and Rails 4. The presentation consisted almost entirely of a history of DHH, based on what appeared to have been a detailed (almost obsessive) analysis of everything DHH had ever put on the web in any way shape or form. Yehuda was looking at e-mails from 2003, Subversion commit messages from Rails 0.13, and beyond that to commit messages from &lt;i&gt;Instiki&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Some people who have seen this presentation might have marvelled at Yehuda turning into some kind of web stalker or DHH historian. Personally, I thought it was awesome, because I had already spent a lot of my own time doing &lt;i&gt;the exact same thing&lt;/i&gt;. That's how I know what color DHH's Lamborghini is (white), what model it is (Gallardo), and where he races it (Autobahn Country Club).&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/symmetricalism/2860363997/"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/lamborghini_103009/dhh.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;&lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/symmetricalism/2860363997/"&gt;photo by symmetricalism&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If that's creepy, I apologize. But it's also how I found &lt;i&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1930110979?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1930110979"&gt;Code Generation in Action&lt;/a&gt;&lt;/i&gt; by Jack Herrington. &lt;a rel="nofollow" target="_blank" href="http://mtnwestrubyconf2008.confreaks.com/03bowkett.html"&gt;I did a whole presentation (at MountainWest RubyConf) about how every programmer needs to read this book&lt;/a&gt;, after I found it in &lt;a rel="nofollow" target="_blank" href="http://www.loudthinking.com/arc/2005_10.html"&gt;an offhand comment on DHH's old blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(The sad thing, of course, is that the number of people who told me they loved the presentation is much, much higher than the number of people who told me they went and bought the book.)&lt;br /&gt;&lt;br /&gt;I spent time studying DHH because when Rails came along, it was a Post-It Note - something so obvious you had to wonder why nobody had ever created it before. I started on the web before Perl even had database libraries, back when the way you used a database with a web app (which we called a CGI script) didn't involve opening a database handle, but creating a SQL string manually and putting it in backticks. All that SQL generation in ActiveRecord descends very directly from how this thing started, at least as far as I'm concerned. If &lt;b&gt;&lt;i&gt;I&lt;/b&gt;&lt;/i&gt; had taken that and just made it gradually cleaner day by day over the course of a few years, we could have had Rails in 1997 - and I could have done it. But I didn't. And neither did anybody else.&lt;br /&gt;&lt;br /&gt;Why not? What did this guy know that nobody else did? These questions fascinated me.&lt;br /&gt;&lt;br /&gt;Not just with technology, either. Only a few years before Rails emerged, I left San Francisco with the goal of never returning and never, ever having a thing to do with technology ever again. I was disillusioned, disappointed, disgusted, and bored out of my mind. I had a pimp 2-bedroom apartment in a pricey San Francisco neighborhood, and I traded it for a camper parked in the forest on my parents' land in the mountains of New Mexico. I stopped writing code and I put all my energy into studying electronic dance music production and writing screenplays instead.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/nm.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;this is an actual pic my dad took looking out his bedroom window&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;New Mexico is beautiful, but let me tell you something about RVs. If you decide that you're going to live in one, and you go looking to find out what your options are, you're going to find something out about RVs. You're going to find that &lt;i&gt;Lamborghini doesn't make one&lt;/i&gt;. It's a different demographic.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/backwoods.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;not made by Lamborghini&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My parents have a nice house on their land now, but they didn't at the time. It's there now because we built it. We got a small construction vehicle called a skidster. I cleared space for their house by driving that vehicle into sandstone boulders to smash them. Let me tell you something about skidsters - Lamborghini doesn't make those, either. Even if you ram it into a boulder at top speed, you won't be going very fast. I know because I've done it.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/dad_in_gonzo.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;also not made by Lamborghini&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Before the house existed, there were plumbing issues. On top of that, I was broke. But I was happy with this. I considered it a huge improvement. When I wasn't smashing boulders, I was writing and making music. Giving up success as a programmer to struggle as an artist seemed like a good deal, until &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Sarah_Ruhl"&gt;my high school classmate Sarah Ruhl got nominated for the Pulitzer Prize, and won a MacArthur genius grant&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sarah's a very successful playwright. I hadn't heard her name in a decade. But this was someone whose writing I knew, someone I worked on a high school arts magazine with and co-founded the first ever high school chapter of the ACLU with, someone who I remembered struggling with math when she was ten years old. There I was, living in a forest like an idiot hillbilly, while she was up for the Pulitzer. I realized it was probably a lot more fun succeeding as an artist than struggling as one. I realized what I was doing was ridiculous, and I wondered how in the hell I had gone so wrong, and what Sarah had gotten so right.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/Pulitzer.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;she lost to John Patrick Shanley, but still, holy shit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So when Rails came along, I was already obsessed with the general topic of what makes greatness.&lt;br /&gt;&lt;br /&gt;If this question interests you too, I have good news. This book contains the definitive answer.&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/055380684X?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=055380684X"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/lamborghini_103009/talent_code.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are a couple other books that came out recently addressing the same question, but in my opinion, they suck. Malcolm Gladwell's &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0316017922?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0316017922"&gt;&lt;i&gt;Outliers&lt;/i&gt;&lt;/a&gt; is, in my opinion, self-indulgent, incoherent, uninspired, and flat-out unworthy of Gladwell - easily his worst book - and &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1591842247?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1591842247"&gt;&lt;i&gt;Talent Is Overrated&lt;/i&gt;&lt;/a&gt; looked too shallow to even investigate. Also, it matters to me that a book be well-written. If you're looking at a book wondering if it's well-written, and the book is called &lt;i&gt;Talent Is Overrated&lt;/i&gt;, well, honestly, that ought to be a clue. If the clue isn't enough for you, let me give you another one: I read some sample pages, and it ain't Hemingway.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/hwsg.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;not the author of Talent Is Overrated&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are a couple other books I &lt;i&gt;can&lt;/i&gt; recommend - &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0385231261?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0385231261"&gt;&lt;i&gt;The Inner Game Of Music&lt;/i&gt;&lt;/a&gt; and &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0743235274?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0743235274"&gt;&lt;i&gt;The Creative Habit&lt;/i&gt;&lt;/a&gt; - but they're really just &lt;i&gt;related&lt;/i&gt; books. They don't come anywhere near hitting the same target, or even aiming at it. When it comes to the question of what makes greatness, and how to achieve it, &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/055380684X?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=055380684X"&gt;&lt;i&gt;The Talent Code&lt;/i&gt;&lt;/a&gt; is, in my opinion, the best book on this topic, and for many people, the only book about this topic that you need to read at all.&lt;br /&gt;&lt;br /&gt;The book builds on some new research in neuroscience, around a substance called &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Myelin"&gt;myelin&lt;/a&gt;, to a general theory of skill before launching what is (to me) infinitely more interesting: a tour of talent hotbeds all over the world. These are schools which produce disproportionate numbers of superstars in various fields - for instance, a Russian tennis school which trained a staggering number of top ten female tennis stars, a Dallas voice coach who trained Jessica Simpson, Beyoncé, and a ton of &lt;i&gt;American Idol&lt;/i&gt; contenders, and a tiny island nation which produces an absurd number of baseball stars, despite having only one or two baseball fields on the entire island. (I think it was the Dominican Republic.)&lt;br /&gt;&lt;br /&gt;In fact, my own high school might qualify as a talent hotbed. &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/List_of_notable_alumni_from_New_Trier_High_School"&gt;Alumni include Donald Rumsfeld, Rahm Emanuel, Rainn Wilson, Adam Baldwin (star of &lt;i&gt;Firefly&lt;/i&gt; and &lt;i&gt;Chuck&lt;/i&gt;), Pete Wentz from the band Fall Out Boy, Al Jourgensen from the band Ministry, Rock Hudson, Charlton Heston, notorious Internet fameball Julia Allison, and many others&lt;/a&gt;. Others such as Sarah Ruhl. The Pulitzer nomination didn't actually &lt;i&gt;surprise&lt;/i&gt; me all that much, to tell you the truth.&lt;br /&gt;&lt;br /&gt;Anyway, the author flew all over the world visiting these places and met with a staggering number of coaches and teachers who send their students straight to the top on a regular basis, and &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/055380684X?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=055380684X"&gt;&lt;i&gt;The Talent Code&lt;/i&gt;&lt;/a&gt; combines detailed theory from neuroscience with a long and impressive survey of the people and places consistently producing greatness, and pulls examples from that survey to illustrate that theory.&lt;br /&gt;&lt;br /&gt;It's awesome.&lt;br /&gt;&lt;br /&gt;The ultimate message is just &lt;i&gt;practice makes perfect&lt;/i&gt;, but it matters a great deal what &lt;i&gt;kind&lt;/i&gt; of practice, because practice doesn't &lt;i&gt;always&lt;/i&gt; make perfect. Some practice does, some doesn't. You can't get good at something by doing it wrong over and over again. The brief, shallow answer is you require slow, deliberate, focused, challenging practice, but if your goal is greatness, you want more than the brief, shallow answer. If you want to find out what kind of practice makes perfect, and what kind of practice is just useless time-wasting bullshit, believe me, you &lt;b&gt;&lt;i&gt;need&lt;/b&gt;&lt;/i&gt; to read this book. If you want to find out how to be great at something, or how to teach your kids to be great at something, again, get this fucking book. Seriously. Get it.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/sarah.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;Sarah Ruhl with Mary-Louise Parker, star of Weeds, who also starred in one of Sarah's plays. at roughly the same time this picture was taken, I was defending my parents' chickens from a hungry pack of coyotes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/lamborghini_103009/coyote.jpg"&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;yes, goddammit, coyotes. they tried to eat the chickens. and my dog.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;&lt;b&gt;Full disclosure&lt;/b&gt;: The Amazon links in this post are affiliate links, which pay small sales commissions. This includes the links to books that I told you not to buy, because fuck it, why not. But seriously, forget those books. &lt;a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/055380684X?ie=UTF8&amp;tag=gilebowk-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=055380684X"&gt;Read The Talent Code&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-7668375739522826486?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/gw50a8L3eSI" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-7668375739522826486</guid>
         <pubDate>Thu, 05 Nov 2009 08:00:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/coyotes-pulitzer-and-dhhs-lamborghini.html</feedburner:origLink></item>
      <item>
         <title>New Ads By Ruby Row</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/pYYywgMiGjk/new-ads-by-ruby-row.html</link>
         <description>My blog's now sporting ads from &lt;a rel="nofollow" target="_blank" href="http://rubyrow.net/blog"&gt;Ruby Row&lt;/a&gt;, an ad network which also sponsors &lt;a rel="nofollow" target="_blank" href="http://rubyrow.net/rooms/RUBY"&gt;blogs by Thoughtbot, Jamis Buck, Geoffrey Grosenbach, Obie Fernandez, and loads of other great programmers&lt;/a&gt;. Cool beans.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-5803052520181630425?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/pYYywgMiGjk" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-5803052520181630425</guid>
         <pubDate>Thu, 05 Nov 2009 07:26:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/new-ads-by-ruby-row.html</feedburner:origLink></item>
      <item>
         <title>Jekyll: A Ruby-Powered Static Site Generator</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/Y5kOtoyqM5k/jekyll-a-ruby-powered-static-site-generator-2716.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/11/jekyll.jpg" alt="jekyll" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://github.com/mojombo/jekyll"&gt;Jekyll&lt;/a&gt; is a simple Ruby-powered static site generator, originally by &lt;a rel="nofollow" target="_blank" href="http://tom.preston-werner.com/"&gt;Tom Preston-Werner&lt;/a&gt; (aka &lt;em&gt;&lt;a rel="nofollow" target="_blank" href="http://wiki.github.com/mojombo/"&gt;mojombo&lt;/a&gt;&lt;/em&gt;) of Github fame. It's focused around blogging, but it can be configured to generate any kind of static site. &lt;em&gt;(Note: Jekyll has been around for about a year - &lt;a rel="nofollow" target="_blank" href="http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html"&gt;Tom originally blogged about&lt;/a&gt; it in November last year, so apologies if this is old news to some readers, but I've only recently discovered it!)&lt;/em&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/?p=2716</guid>
         <pubDate>Thu, 05 Nov 2009 13:34:22 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/jekyll.jpg" alt="jekyll" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://github.com/mojombo/jekyll">Jekyll</a> is a simple Ruby-powered static site generator, originally by <a rel="nofollow" target="_blank" href="http://tom.preston-werner.com/">Tom Preston-Werner</a> (aka <em><a rel="nofollow" target="_blank" href="http://wiki.github.com/mojombo/">mojombo</a></em>) of Github fame. It's focused around blogging, but it can be configured to generate any kind of static site. <em>(Note: Jekyll has been around for about a year - <a rel="nofollow" target="_blank" href="http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html">Tom originally blogged about</a> it in November last year, so apologies if this is old news to some readers, but I've only recently discovered it!)</em></p>
<p>Because Jekyll outputs a static site structure, it means you can host your blog (or site) from anywhere that you can serve static HTML, simply by using your favourite web server (e.g. Apache). As Tom describes in his blog post, the idea came from wanting to be able to "Blog like a Hacker". Jekyll lets you write from the comfort of your favourite text editor, and publish from the command line. Using familiar tools reduces the cognitive load involved with publishing a blog, and lets you focus on what you're writing. It doesn't hurt that even a pretty weak Web server could stand a pounding if it's just serving static files!</p>
<p>By default, Jekyll uses its own (slightly modified) flavour of <a rel="nofollow" target="_blank" href="http://github.com/tobi/liquid/">Liquid</a> templates, with help from <a rel="nofollow" target="_blank" href="http://pygments.org/">pygments</a> for syntax highlighting, and you can use textile or markdown for the content. Each Jekyll blog article template needs a <a rel="nofollow" target="_blank" href="http://wiki.github.com/mojombo/jekyll/yaml-front-matter">header</a> containing some metadata about that article, such as what layout to use, the article's title, and any custom information you want to provide (such as tags for that article).</p>
<p>Generating your site is easy: just running the <code>jekyll</code> command turns your directory of templates into a complete website, ready to serve. There's a Jekyll server that you can use for testing (passing <code>--auto</code> as an argument means it will automatically regenerate the site when things are changed).</p>
<pre>
jekyll --server --auto
</pre>
<p><em><a rel="nofollow" target="_blank" href="http://pages.github.com/">Github Pages</a></em> provides a neat way to publish your Jekyll-generated site. Every Github page is actually run through Jekyll when you push content to your pages repo (this works because a normal static site is also a valid Jekyll site).</p>
<p>The easiest way to get started with Jekyll is by installing the gem (which is <a rel="nofollow" target="_blank" href="http://gemcutter.org/gems/jekyll">available on Gemcutter</a>), and checking out the <a rel="nofollow" target="_blank" href="http://wiki.github.com/mojombo/jekyll">wiki</a> on Github, where there's some great documentation.</p>
<pre>
sudo gem install jekyll
</pre>
<p>As you might expect, <a rel="nofollow" target="_blank" href="http://tom.preston-werner.com/">Tom Preson-Werner's personal blog</a> runs on Jekyll. Its source is <a rel="nofollow" target="_blank" href="http://github.com/mojombo/tpw">publicly available on Github</a>.</p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=u5ftlrkDeEg:ZeXmuOgi24w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=u5ftlrkDeEg:ZeXmuOgi24w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=u5ftlrkDeEg:ZeXmuOgi24w:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=u5ftlrkDeEg:ZeXmuOgi24w:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=u5ftlrkDeEg:ZeXmuOgi24w:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=u5ftlrkDeEg:ZeXmuOgi24w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=u5ftlrkDeEg:ZeXmuOgi24w:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/u5ftlrkDeEg" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/Y5kOtoyqM5k" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/u5ftlrkDeEg/jekyll-a-ruby-powered-static-site-generator-2716.html</feedburner:origLink></item>
      <item>
         <title>Announcing O'Reilly Answers - Clever Hacks. Creative Ideas. Innovative Solutions.</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/ZiQnwngPmzM/announcing-oreilly-answers.html</link>
         <author>Allen Noren</author>
         <guid isPermaLink="false">http://broadcast.oreilly.com/2009/11/announcing-oreilly-answers.html</guid>
         <pubDate>Wed, 04 Nov 2009 13:27:33 -0800</pubDate>
      <description>&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/ZiQnwngPmzM" height="1" width="1"/&gt;</description><feedburner:origLink>http://feeds.oreilly.com/~r/oreilly/ruby/~3/puiBWffkI30/announcing-oreilly-answers.html</feedburner:origLink></item>
      <item>
         <title>Devise: Flexible Authentication for Pragmatic Rails Developers</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/3aLa5lxgNjI/351-devise-rails-authentication.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/11/devizes.png" width="120" height="112" alt="devizes.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://blog.plataformatec.com.br/2009/10/devise-flexible-authentication-solution-for-rails/"&gt;Devise&lt;/a&gt; (&lt;a rel="nofollow" target="_blank" href="http://github.com/plataformatec/devise"&gt;GitHub repo&lt;/a&gt;) is a new Rails authentication library/engine developed by Brazilian development company &lt;a rel="nofollow" target="_blank" href="http://plataformatec.com.br/"&gt;Plataforma&lt;/a&gt;. It's pitched as a "flexible authentication solution for Rails." Devise builds upon &lt;a rel="nofollow" target="_blank" href="http://github.com/hassox/warden"&gt;Warden&lt;/a&gt;, a general Rack authentication middleware, while offering Rails developers a flexible but easy&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/plugins/351-devise-rails-authentication.html</guid>
         <pubDate>Wed, 04 Nov 2009 15:57:25 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/11/devizes.png" width="120" height="112" alt="devizes.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://blog.plataformatec.com.br/2009/10/devise-flexible-authentication-solution-for-rails/">Devise</a> (<a rel="nofollow" target="_blank" href="http://github.com/plataformatec/devise">GitHub repo</a>) is a new Rails authentication library/engine developed by Brazilian development company <a rel="nofollow" target="_blank" href="http://plataformatec.com.br/">Plataforma</a>. It's pitched as a "flexible authentication solution for Rails." Devise builds upon <a rel="nofollow" target="_blank" href="http://github.com/hassox/warden">Warden</a>, a general Rack authentication middleware, while offering Rails developers a flexible but easy to use front end.</p>
<p>Plataforma's <a rel="nofollow" target="_blank" href="http://blog.plataformatec.com.br/2009/10/devise-flexible-authentication-solution-for-rails/">blog post about Devise</a> says that it's different to the incumbent libraries, <a rel="nofollow" target="_blank" href="http://github.com/thoughtbot/clearance">Clearance</a> and <a rel="nofollow" target="_blank" href="http://github.com/binarylogic/authlogic">Authlogic</a>, in that it provides a full stack solution like Clearance (unlike Authlogic) but allows you to use a custom model (not just "User") and gives you customized role support. It also has full i18n (internatiionalization) support out of the box and Plataforma has made available <a rel="nofollow" target="_blank" href="http://github.com/plataformatec/devise_example">a complete demo app showing off how Devise can work</a> within a small Rails app.</p>
<p>Devise is a full stack authentication system that provides 5 "strategies" out of the box. A strategy for authentication, one for "confirmations" (e-mails, etc), one for "recovering" accounts, one for "remembering" logins over time, and one to "validate" signups. You can, however, add your own strategies depending on what you need to do (they suggest a "invitations" strategy).</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Devise%3A+Flexible+Authentication+for+Pragmatic+Rails+Developers+http://bit.ly/256o5t" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Devise%3A+Flexible+Authentication+for+Pragmatic+Rails+Developers+http://bit.ly/256o5t" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=KabK2Nr2DW0:tajY6S4nJUo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=KabK2Nr2DW0:tajY6S4nJUo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=KabK2Nr2DW0:tajY6S4nJUo:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=KabK2Nr2DW0:tajY6S4nJUo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=KabK2Nr2DW0:tajY6S4nJUo:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=KabK2Nr2DW0:tajY6S4nJUo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=KabK2Nr2DW0:tajY6S4nJUo:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=KabK2Nr2DW0:tajY6S4nJUo:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=KabK2Nr2DW0:tajY6S4nJUo:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/KabK2Nr2DW0" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/3aLa5lxgNjI" height="1" width="1"/>]]></content:encoded>
         <category>Plugins</category>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/KabK2Nr2DW0/351-devise-rails-authentication.html</feedburner:origLink></item>
      <item>
         <title>Training Your Inner Monkey</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/L2dQXyzrwlY/training-monkeys-on-two-choice-visual.html</link>
         <description>&lt;a rel="nofollow" target="_blank" href="http://www.scientificamerican.com/article.cfm?id=why-success-breeds-success"&gt;&lt;i&gt;Training monkeys on a two-choice visual task, researchers found that the animals’ brains kept track of recent successes and failures. A correct answer had impressive effects: it improved neural processing and sent the monkeys’ performance soaring in the next trial. But if a monkey made a mistake in one trial, even after mastering the task, it performed around chance level in the next trial — in other words, it was thrown off by mistakes instead of learning from them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;background-color:yellow;color:black;"&gt;“Success has a much greater influence on the brain than failure&lt;/span&gt;,” says Massachusetts Institute of Technology neuroscientist Earl Miller, who led the research. He believes the findings apply to many aspects of daily life in which failures are left unpunished but achieve­ments are rewarded in one way or another—such as when your teammates cheer your strikes at the bowling lane. The pleasurable feeling that comes with the successes is brought about by a surge in the neurotransmitter dopamine. By telling brain cells when they have struck gold, the chemical apparently signals them to keep doing whatever they did that led to success. &lt;span style="font-weight:bold;background-color:yellow;color:black;"&gt;As for failures, Miller says, we might do well to pay more attention to them, consciously encouraging our brain to learn a little more from failure than it would by default.&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A &lt;a rel="nofollow" target="_blank" href="http://www.scientificamerican.com/article.cfm?id=why-success-breeds-success"&gt;nice little article&lt;/a&gt;, but guess what? The article's conclusion is &lt;b&gt;ridiculous&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Success has a much greater influence on the brain than failure...we might do well to pay more attention to [failures], consciously encouraging our brain to learn a little more from failure than it would by default.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;That's some of the worst logic I've ever seen. To find worse logic than that, you have to get a teenager to read Plato. "You learn more from success than failure; therefore, pay more attention to failure." Or to rephrase again, "Your brain is bad at a particular type of activity; invest more of your energy and time in that activity."&lt;br /&gt;&lt;br /&gt;Obviously, if you want to learn something, and the brain responds to failure &lt;i&gt;without learning anything&lt;/i&gt;, but it responds to success by learning, then &lt;b&gt;&lt;i&gt;focusing on failure is not a good learning strategy&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;But what should you do? Does this mean that, if you don't score a home run the first time at bat, then the people who &lt;i&gt;do&lt;/i&gt; will learn more than you, and be at a huge advantage the next time you compete with them?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Yes, it does&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;So if you don't score a home run your first time at bat, you're doomed?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;No.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The reason why not: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;background-color:yellow;"&gt;To learn, all you have to do is succeed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice what that &lt;i&gt;doesn't&lt;/i&gt; say. It doesn't say what you have to succeed &lt;i&gt;at&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Let's say you're a tennis player. Somebody beats you at tennis. You revamp your tennis practice to focus on the tiny details of how you play. Why? Because you might not be able to win the games you want, but if you set yourself a tiny goal to win at serving, or to win at backhand form, or to win at aiming the ball, you can win there, and every time you win, you &lt;i&gt;learn&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;There's some powerful neuroscience supporting this and a great book which goes into exquisite detail. I have a blog post coming about that book. I'm aiming for tomorrow. It's a hell of a book, though, and it deserves more writing than I have time to finish at the moment, so for now I'm just going to leave you in suspense about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-8482898434963064306?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/L2dQXyzrwlY" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-8482898434963064306</guid>
         <pubDate>Wed, 04 Nov 2009 03:29:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/training-monkeys-on-two-choice-visual.html</feedburner:origLink></item>
      <item>
         <title>Watch Out For The Torpedoes</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/_h6FugWJhYo/watch-out-for-torpedoes.html</link>
         <description>Cory Doctorow damns every torpedo. If there's a law he disagrees with, its proponents are insane, or morons, or evil, and usually all three. If there's a book he likes, it's an amazing work of genius, untarnished by a single flaw. It makes buying books off recommendations on &lt;i&gt;BoingBoing&lt;/i&gt; an insane crapshoot: every book is a work of staggering genius, yet only one out of three turns out to be any good. I often wish his praise was more specific.&lt;br /&gt;&lt;br /&gt;Here's &lt;a rel="nofollow" target="_blank" href="http://tinhousebooks.com/blog/?p=410"&gt;Doctorow damning the torpedoes&lt;/a&gt; in another way:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Every writer has a FAQ—Frequently Awkward Question—or two, and for me, it’s this one: “How is it possible to work as a science fiction writer, predicting the future, when everything is changing so quickly? Aren’t you afraid that actual events will overtake the events you’ve described?”&lt;br /&gt;&lt;br /&gt;It’s a fresh-scrubbed, earnest kind of question, and the asker pays the compliment of casting you as Wise Prognosticator in the bargain, but I think it’s junk. &lt;b&gt;Science fiction writers don’t predict the future (except accidentally), but if they’re very good, they may manage to predict the present.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Like many science fiction authors working today, Doctorow isn't telling us anything that William Gibson hasn't said before, and better - and if you don't believe me, &lt;a rel="nofollow" target="_blank" href="http://www.boingboing.net/2007/07/08/william-gibson-expla.html"&gt;check out Doctorow's post on Gibson saying this back in 2007&lt;/a&gt;. One of the superiorities in Gibson's way of putting it: he doesn't deny that science fiction is &lt;i&gt;also&lt;/i&gt; good at predicting the future. Doctorow damned that torpedo, saying it only ever happens by accident.&lt;br /&gt;&lt;br /&gt;Doctorow says:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Orwell didn’t worry about a future dominated by the view-screens from 1984, he worried about a present in which technology was changing the balance of power, creating opportunities for the state to enforce its power over individuals at ever-more-granular levels.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Gibson said, two years before:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;1984 is a powerful book precisely because Orwell didn't have to make a lot of shit up. He had Nazi Germany and the Soviet Union under Stalin as models for what he was doing. He only had to dress it up a little bit, sort of pile it up in a certain way to say, "this is the future."&lt;br /&gt;&lt;br /&gt;But the reason it's powerful is that it resonates of history. It doesn't resonate back from the future, it resonates out of modern history. And the power with which it resonates is directly contingent on the sort of point-for-point mimesis, like sort of point-for-point realism, in terms of what we know happened.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Note the absence of any sweeping generality equating the ability to predict the future with some kind of random luck. To quote &lt;a rel="nofollow" target="_blank" href="http://www.collegecrier.com/interviews/int-0040.asp"&gt;the article Doctorow linked to in 2007&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Gibson's elaborate vision of the internet - before it existed - and Reality TV - before it existed - has led many to call his work prophetic.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Since Gibson owes a lot of his success to his prescience, you're not going to see him writing off that vision as luck. It could have been just luck, but when you check out the sheer literary density of Gibson's interview, you'll understand why I opt for a different explanation. I think Gibson thought hard about the future, and came to conclusions which were correct.&lt;br /&gt;&lt;br /&gt;Doctorow's assertion that predicting the future is only a matter of luck would come off as a lot more plausible, and a lot more respectful of his peers in science fiction, if he (like Gibson) had an actual track record of successful and accurate predictions. I also find it hard to believe that he ever even hears this alleged Frequently Awkward Question in the first place. His last book, &lt;i&gt;Little Brother&lt;/i&gt;, was set only a few years in the future, and his current book, &lt;i&gt;Makers&lt;/i&gt;, appears to either follow the same model or to be set in the present.&lt;br /&gt;&lt;br /&gt;On top of that, I don't think anybody even thinks of Doctorow as a science fiction author at all. I think of him as a blogger, and most other people I know (who have heard of him) think of him the same way. Long story short, I'm calling shenangians on this nonsense. Doctorow's posted a Cliff's Notes rewrite of &lt;a rel="nofollow" target="_blank" href="http://www.collegecrier.com/interviews/int-0040.asp"&gt;a great William Gibson interview&lt;/a&gt;. Rewriting Gibson is like rewriting Hemingway or Shakespeare. Don't waste your time. Just read the interview.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-6140720117735147560?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/_h6FugWJhYo" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-6140720117735147560</guid>
         <pubDate>Wed, 04 Nov 2009 01:03:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/watch-out-for-torpedoes.html</feedburner:origLink></item>
      <item>
         <title>Know When to Fold 'Em</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/L_59whh0tIM/know-when-to-fold-em</link>
         <description>&lt;p&gt;In which I relinquish the day to day maintenance of a few of my projects.&lt;/p&gt;
&lt;p&gt;I have a lot of projects. Each time I feel pain or inspiration, I’ll whip together a new library and release it as a gem. &lt;strong&gt;It is fun and I love it&lt;/strong&gt;. It is even more fun when people come along and use those projects to do cool stuff. This in turn, inspires me to write more code and release more projects. It is a vicious cycle.&lt;/p&gt; &lt;p&gt;A while back, I caught myself making jokes about how I don’t even use my projects. I can barely remember the last time I actually used HTTParty, HappyMapper, or the Twitter gem. Not too long ago, I came across Dr. Nic’s Future Ruby talk on &lt;a rel="nofollow" target="_blank" href="http://www.slideshare.net/drnic/living-with-1000-open-source-projects"&gt;Living with 1000 open source projects&lt;/a&gt;.&lt;/p&gt; &lt;div&gt;&amp;lt;object height="355" width="425"&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=livingwith1000opensourceprojects-novideos-090712054221-phpapp01&amp;amp;#38;stripped_title=living-with-1000-open-source-projects" height="355" width="425"&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;&lt;/div&gt; &lt;p&gt;In the presentation, he says that you should &lt;strong&gt;maintain the projects you use everyday and abandon the rest&lt;/strong&gt;. Good advice. Over the past few months, I have been seeding maintenance and new features to other talented developers for several of my projects.&lt;/p&gt; &lt;h2&gt;HTTParty&lt;/h2&gt; &lt;p&gt;The first to go was &lt;a rel="nofollow" target="_blank" href="http://railstips.org/2008/7/29/it-s-an-httparty-and-everyone-is-invited"&gt;HTTParty&lt;/a&gt;. I believe it was the Ruby Hoedown where I ran into &lt;a rel="nofollow" target="_blank" href="http://github.com/sandro"&gt;Sandro&lt;/a&gt;. He mentioned some HTTParty bugs and asked him if he was interested in taking over. He accepted and the last release (0.4.5) was all him.&lt;/p&gt; &lt;h2&gt;HappyMapper&lt;/h2&gt; &lt;p&gt;&lt;a rel="nofollow" target="_blank" href="http://opensoul.org/"&gt;Brandon Keepers&lt;/a&gt;, a good friend of mine, has a client project that uses &lt;a rel="nofollow" target="_blank" href="http://railstips.org/2008/11/17/happymapper-making-xml-fun-again"&gt;HappyMapper&lt;/a&gt;, so the fact that he actually uses it made him a logical choice to help with the maintenance of it. He did a bunch of namespace work for the 0.3 release and now has commit rights.&lt;/p&gt; &lt;h2&gt;The Twitter Gem&lt;/h2&gt; &lt;p&gt;The last gem that was beginning to feel like a burden was the &lt;a rel="nofollow" target="_blank" href="http://railstips.org/tags/twitter"&gt;Twitter gem&lt;/a&gt;. &lt;a rel="nofollow" target="_blank" href="http://wynnnetherland.com/"&gt;Wynn Netherland&lt;/a&gt; has built several apps that rely on the Twitter gem, so I gave him commit rights and he &lt;a rel="nofollow" target="_blank" href="http://wynnnetherland.com/2009/10/new-in-the-twitter-gem-lists/"&gt;recently added lists&lt;/a&gt; to it.&lt;/p&gt; &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;I can’t say that I am abandoning these projects, as I am sure from time to time I’ll feel inspired and spend some time on them. I just know that I am no good for them if I am not using them. I can’t feel the pain or know what is needed if I am not using the code.&lt;/p&gt; &lt;p&gt;I’m posting about this for two reasons. First and foremost to give some credit to the people who are doing the work now. Second, just setting some expectations that I probably won’t be snappy in responses for these projects as I’m not actively working on them anymore.&lt;/p&gt; &lt;div class="feedflare"&gt;
&lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=4ZoJFD0sBng:tDusVdhaex8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=yIl2AUoC8zA" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=4ZoJFD0sBng:tDusVdhaex8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=dnMXMwOfBR0" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=4ZoJFD0sBng:tDusVdhaex8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=7Q72WNTAKBA" border="0"&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railstips/~4/4ZoJFD0sBng" height="1" width="1"/&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/L_59whh0tIM" height="1" width="1"/&gt;</description>
         <author>john</author>
         <guid isPermaLink="false">tag:railstips.org,2009-11-04:9249</guid>
         <pubDate>Tue, 03 Nov 2009 16:22:00 -0800</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/railstips/~3/4ZoJFD0sBng/know-when-to-fold-em</feedburner:origLink></item>
      <item>
         <title>Thinking Functionally In Ruby – A Great Presentation by Tom Stuart</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/CeY5t2gspi8/functional-programming-in-ruby-2713.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/11/thinkfunc.png" width="110" height="107" alt="thinkfunc.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://skillsmatter.com/podcast/ajax-ria/enumerators"&gt;Thinking Functionally in Ruby&lt;/a&gt; is a talk that British Ruby developer Tom Stuart gave at a recent &lt;a rel="nofollow" target="_blank" href="http://lrug.org/"&gt;London Ruby Users Group&lt;/a&gt; meeting. In it he covers what functional programming is, why it's a "pretty neat idea," and how to adopt &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Functional_programming"&gt;functional programming&lt;/a&gt; principles in Ruby. Skills Matter took &lt;a rel="nofollow" target="_blank" href="http://skillsmatter.com/podcast/ajax-ria/enumerators"&gt;a video of the entire 47 minute presentation&lt;/a&gt; &lt;i&gt;(it's embedded on the right hand side of that page - Flash required.. just been told it might be limited to UK visitors only, if so &lt;a rel="nofollow" target="_blank" href="http://experthuman.com/files/thinking-functionally-in-ruby.mp4"&gt;get the original MP4 file&lt;/a&gt;)&lt;/i&gt; but there's also &lt;a rel="nofollow" target="_blank" href="http://experthuman.com/files/thinking-functionally-in-ruby.pdf"&gt;a 110 page PDF&lt;/a&gt; &lt;i&gt;(1.5MB download)&lt;/i&gt; you should have to hand too (with Tom's slides).&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/functional-programming-in-ruby-2713.html</guid>
         <pubDate>Tue, 03 Nov 2009 06:04:51 -0800</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/thinkfunc.png" width="110" height="107" alt="thinkfunc.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://skillsmatter.com/podcast/ajax-ria/enumerators">Thinking Functionally in Ruby</a> is a talk that British Ruby developer Tom Stuart gave at a recent <a rel="nofollow" target="_blank" href="http://lrug.org/">London Ruby Users Group</a> meeting. In it he covers what functional programming is, why it's a "pretty neat idea," and how to adopt <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a> principles in Ruby. Skills Matter took <a rel="nofollow" target="_blank" href="http://skillsmatter.com/podcast/ajax-ria/enumerators">a video of the entire 47 minute presentation</a> <i>(it's embedded on the right hand side of that page - Flash required.. just been told it might be limited to UK visitors only, if so <a rel="nofollow" target="_blank" href="http://experthuman.com/files/thinking-functionally-in-ruby.mp4">get the original MP4 file</a>)</i> but there's also <a rel="nofollow" target="_blank" href="http://experthuman.com/files/thinking-functionally-in-ruby.pdf">a 110 page PDF</a> <i>(1.5MB download)</i> you should have to hand too (with Tom's slides).</p>
<p><a rel="nofollow" target="_blank" href="http://skillsmatter.com/podcast/ajax-ria/enumerators"><img src="http://www.rubyinside.com/wp-content/uploads/2009/11/minecode.png" width="640" height="485" alt="minecode.png"/></a></p>
<p>I don't like to link to individual presentations on Ruby Inside too often, but in spite of poor audio quality on the video, Tom's presentation is top notch (the slides are particularly good) and Tom covers some interesting topics that I think Ruby developers could do with revising. If you've wanted to stay on the functional bandwagon but have found yourself slipping into <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Imperative_programming">imperative</a> ways where you shouldn't, this presentation is well worth a watch.</p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://devver.net/caliper"><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/caliper-logo.png" width="98" height="42" alt="caliper-logo.png" style="float:right;margin-bottom:8px;margin-left:12px;"/></a><em>[ad]</em> Find duplication, code smells, complex code and more in your Ruby code with <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Caliper!</a> The metrics are free and setup takes just one click. <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Get started!</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Z7Jr7EnuAWs:mK9FXSO2HAw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Z7Jr7EnuAWs:mK9FXSO2HAw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Z7Jr7EnuAWs:mK9FXSO2HAw:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Z7Jr7EnuAWs:mK9FXSO2HAw:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Z7Jr7EnuAWs:mK9FXSO2HAw:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=Z7Jr7EnuAWs:mK9FXSO2HAw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=Z7Jr7EnuAWs:mK9FXSO2HAw:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/Z7Jr7EnuAWs" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/CeY5t2gspi8" height="1" width="1"/>]]></content:encoded>
         <enclosure length="97618311" url="http://experthuman.com/files/thinking-functionally-in-ruby.mp4" type="video/mp4" />
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/Z7Jr7EnuAWs/functional-programming-in-ruby-2713.html</feedburner:origLink></item>
      <item>
         <title>Pivotal Tracker Screencasts</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/mjlLjyNanMI/pivotal-tracker-screencasts.html</link>
         <description>&lt;iframe class="embeddedvideo" src="http://www.youtube.com/v/mTYcHg51sWY&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" width="640" height="505"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://www.youtube.com/v/cLP4NpYfLd8&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" width="640" height="505"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://www.youtube.com/v/ogC4WTllOCI&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" width="640" height="385"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://vimeo.com/moogaloop.swf?clip_id=2828138&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=00ADEF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" width="700" height="544"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://vimeo.com/moogaloop.swf?clip_id=5121347&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=00ADEF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" width="700" height="403"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://vimeo.com/moogaloop.swf?clip_id=3087412&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=00ADEF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" width="700" height="439"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-3685663347447469021?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/mjlLjyNanMI" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-3685663347447469021</guid>
         <pubDate>Mon, 02 Nov 2009 15:04:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/pivotal-tracker-screencasts.html</feedburner:origLink></item>
      <item>
         <title>Matt Taibbi: Research, Writing, And Wrath</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/haVU417jkYs/matt-taibbi-research-writing-and-wrath.html</link>
         <description>&lt;a rel="nofollow" target="_blank" href="http://www.rollingstone.com/politics/story/29127316/the_great_american_bubble_machine"&gt;&lt;span style="font-style:italic;font-size:2em;line-height:1.7em;"&gt;The world's most powerful investment bank is a great vampire squid wrapped around the face of humanity, relentlessly jamming its blood funnel into anything that smells like money.&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-4522927987067114961?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/haVU417jkYs" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-4522927987067114961</guid>
         <pubDate>Mon, 02 Nov 2009 05:41:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/matt-taibbi-research-writing-and-wrath.html</feedburner:origLink></item>
      <item>
         <title>Blog Ads: Experiment On GitHub</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/3ZkqjI3xHh4/blog-ads-experiment-on-github.html</link>
         <description>&lt;a rel="nofollow" target="_blank" href="http://github.com/gilesbowkett/blog_ads"&gt;http://github.com/gilesbowkett/blog_ads&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the Readme:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;I wrote this to generate ads on my blog. It's a lazy Sunday morning hack, finished before 10am, and that includes all the time I spent tweaking the ad text and choosing the sites to link to.&lt;br /&gt;&lt;br /&gt;The way to use it is simple: choose affiliate programs to promote, write an ad, and hard-code all the data in the generator script. (Obviously there are more elegant ways to do that part, but this is still less than 50 lines of code.) Run the generator script, and then copy/paste the output into a widget in the sidebar on your blog. Boom, you have ads.&lt;br /&gt;&lt;br /&gt;Now instead of Google paying you three cents every time somebody clicks a link, you have some independent business paying you $20 or $50 every time somebody buys something. The win here isn't just the money, it's also the ethics. You were supporting a corporation; now you're supporting independent business. You were selling meaningless clicks; now you're bringing someone actual customers. It doesn't hurt that the earnings potential is orders of magnitude better, but the win is pure ethics win.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-2500779124903820629?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/3ZkqjI3xHh4" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-2500779124903820629</guid>
         <pubDate>Sun, 01 Nov 2009 02:00:00 -0800</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/blog-ads-experiment-on-github.html</feedburner:origLink></item>
      <item>
         <title>Epic Graffiti Artist DAIM On Skinizi</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/D5jFc3FQJHY/epic-graffiti-artist-daim-on-skinizi.html</link>
         <description>I can't tell you how thrilled I am about this.&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.skinizi.com/en/manufacturers/daim-38/"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/DAIM_110109/122.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.skinizi.com/en/manufacturers/daim-38/"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/DAIM_110109/121.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The German graffiti artist DAIM is known for pieces with three-dimensional styles so realistic, people driving by in their cars have thought the shapes coming out of the walls were real.&lt;br /&gt;&lt;br /&gt;He's one of a growing number of graffiti artists receiving recognition in the formal art world.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/DAIM_110109/04.07_daim.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" target="_blank" href="http://www.skinizi.com/en/manufacturers/daim-38/"&gt;His new skins on Skinizi fit on iPods, iPhones, MacBooks, MacBook Pros, non-Apple hardware, netbooks, PSPs, and all kinds of nifty gadgets&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/DAIM_110109/daim.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-5508741633732063544?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/D5jFc3FQJHY" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-5508741633732063544</guid>
         <pubDate>Sun, 01 Nov 2009 01:37:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/11/epic-graffiti-artist-daim-on-skinizi.html</feedburner:origLink></item>
      <item>
         <title>Riot: for fast, expressive and focused unit tests</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/ADtt24vU_tA/riot-for-fast-expressive-and-focused-unit-tests-2669.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/10/justin.jpg" alt="Justin" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://github.com/thumblemonks/riot"&gt;Riot&lt;/a&gt; is a new Ruby test framework by &lt;a rel="nofollow" target="_blank" href="http://twitter.com/jaknowlden"&gt;Justin Knowlden&lt;/a&gt; that focuses on &lt;em&gt;faster&lt;/em&gt; testing. Justin was frustrated with his slow running test suites, despite employing techniques such as using factories, mocks and avoiding database access. He realized that a slow-running suite makes one reluctant to run it or expand it - not good.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/?p=2669</guid>
         <pubDate>Sat, 31 Oct 2009 09:57:28 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/justin.jpg" alt="Justin" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://github.com/thumblemonks/riot">Riot</a> is a new Ruby test framework by <a rel="nofollow" target="_blank" href="http://twitter.com/jaknowlden">Justin Knowlden</a> that focuses on <em>faster</em> testing. Justin was frustrated with his slow running test suites, despite employing techniques such as using factories, mocks and avoiding database access. He realized that a slow-running suite makes one reluctant to run it or expand it - not good.</p>
<p>With Riot, each test consists of a block which forms a single assertion on the <code>topic</code> of the test, keeping the tests focused. Tests run in a specific <code>context</code>, and the <code>setup</code> code is only run once per context, further contributing to the speed of your test suite, and unlike some Ruby test frameworks, such as <a rel="nofollow" target="_blank" href="http://www.thoughtbot.com/projects/shoulda/">Shoulda</a>, that rely on or are based on Test::Unit, Riot has taken a new approach for speed purposes. In Justin's own comparisons, Riot comes out about twice as fast as Test::Unit. </p>
<p>Here's an example Riot test (from the README):</p>
<pre>
context "a new user" do setup { User.new(:email =&gt; 'foo@bar.com') } asserts("email address") { topic.email }.equals('foo@bar.com')
end
</pre>
<p>Riot's comprehensive <a rel="nofollow" target="_blank" href="http://github.com/thumblemonks/riot/blob/master/README.markdown">README</a> also includes lots of examples and details on how to modify your Rakefile to run your Riot test suite in different frameworks. The full documentation is available online <a rel="nofollow" target="_blank" href="http://rdoc.info/projects/thumblemonks/riot">here</a>.</p>
<p>You can install Riot as a gem from <a rel="nofollow" target="_blank" href="http://gemcutter.org/">Gemcutter</a>:</p>
<pre>
sudo gem sources -a http://gemcutter.org
sudo gem install riot
</pre>
<p>Justin also has a spin-off project called <a rel="nofollow" target="_blank" href="http://github.com/thumblemonks/riot_rails">Riot Rails</a>, which includes some Rails-related macros for testing your Ruby On Rails code, and <a rel="nofollow" target="_blank" href="http://alexyoung.org/">Alex Young</a> has written a <a rel="nofollow" target="_blank" href="http://github.com/alexyoung/riotjs">Javascript port of Riot</a> which is worth checking out too. He also <a rel="nofollow" target="_blank" href="http://alexyoung.org/2009/10/26/riot-testing/">has his own look at Riot</a> and demonstrates how Riot can reduce redundancy in tests.</p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09"><img src="http://www.rubyinside.com/wp-content/uploads/2009/09/CodebaseLogo-RI.png" width="118" height="37" style="float:right;margin-left:12px;margin-bottom:12px;" alt="CodebaseLogo-RI.png"/></a><em>[ad]</em> <a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09"><b>Codebase</b></a> is a fast &amp; reliable <b>git, mercurial &amp; subversion hosting</b> service with complete project management built-in - ticketing, milestones, wikis &amp; time tracking - all under one roof. <a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09">Click here to try it - free.</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=tfL7w9XuFZ0:sMu09AKRh08:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=tfL7w9XuFZ0:sMu09AKRh08:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=tfL7w9XuFZ0:sMu09AKRh08:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=tfL7w9XuFZ0:sMu09AKRh08:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=tfL7w9XuFZ0:sMu09AKRh08:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=tfL7w9XuFZ0:sMu09AKRh08:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=tfL7w9XuFZ0:sMu09AKRh08:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/tfL7w9XuFZ0" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/ADtt24vU_tA" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/tfL7w9XuFZ0/riot-for-fast-expressive-and-focused-unit-tests-2669.html</feedburner:origLink></item>
      <item>
         <title>Draft of O'Reilly's "Rails In A Nutshell" Free To Read Online</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/Fgh9Z_WGJ-o/349-rails-in-a-nutshell.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/railsnutshell.png" width="100" height="137" alt="railsnutshell.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://www.railsinanutshell.com/"&gt;Rails In A Nutshell&lt;/a&gt; is a forthcoming book, to be published by O'Reilly, by Cody Fauser, James MacAulay, Edward Ocampo-Gooding and John Guenin. Like other titles in O'Reilly's "Nutshell" series, the book is designed to be a concise introduction to the&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/news/349-rails-in-a-nutshell.html</guid>
         <pubDate>Thu, 29 Oct 2009 12:36:02 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/railsnutshell.png" width="100" height="137" alt="railsnutshell.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://www.railsinanutshell.com/">Rails In A Nutshell</a> is a forthcoming book, to be published by O'Reilly, by Cody Fauser, James MacAulay, Edward Ocampo-Gooding and John Guenin. Like other titles in O'Reilly's "Nutshell" series, the book is designed to be a concise introduction to the topic with an overview of commands and configurations, and a look at parts of Rails you'd use every day as a Rails developer.</p>
<p>The print version of Rails In A Nutshell isn't due out till early 2010 but a focus on targeting Rails 3.0 is almost certainly to blame here. On the plus side, the book should be one of the most up to date Rails tomes once 3.0 eventually hits the streets in the next few months. Luckily, O'Reilly are doing "the right thing" and have wisely licensed the text with the Creative Commons Attribution-Noncommercial license and released the work as it is so far through their O'Reilly Open Feedback Publishing System. What this means for you is that <a rel="nofollow" target="_blank" href="http://rails-nutshell.labs.oreilly.com/">you can read it now - here!</a></p>
<p>As an intriguing aside, it looks like O'Reilly have had the book on the burner for some time now <a rel="nofollow" target="_blank" href="http://weblog.rubyonrails.org/2006/4/26/in-the-works-rails-in-a-nutshell">as three years ago they signed up Jeremy Voorhis</a> to write it.</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Draft+of+O%27Reilly%27s+%22Rails+In+A+Nutshell%22+Free+To+Read+Online+http://bit.ly/1ev2ai" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Draft+of+O%27Reilly%27s+%22Rails+In+A+Nutshell%22+Free+To+Read+Online+http://bit.ly/1ev2ai" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=rDoy9_kJRIw:HIr_Gl3R8Jk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=rDoy9_kJRIw:HIr_Gl3R8Jk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=rDoy9_kJRIw:HIr_Gl3R8Jk:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=rDoy9_kJRIw:HIr_Gl3R8Jk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=rDoy9_kJRIw:HIr_Gl3R8Jk:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=rDoy9_kJRIw:HIr_Gl3R8Jk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=rDoy9_kJRIw:HIr_Gl3R8Jk:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=rDoy9_kJRIw:HIr_Gl3R8Jk:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=rDoy9_kJRIw:HIr_Gl3R8Jk:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/rDoy9_kJRIw" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/Fgh9Z_WGJ-o" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/rDoy9_kJRIw/349-rails-in-a-nutshell.html</feedburner:origLink></item>
      <item>
         <title>Want To Speak At RailsConf 2010? Submit Your Proposals Now</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/kOrN6SV5dZA/347-want-to-speak-at-railsconf-2010-submit-your-proposals-now.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/railsconf-logo.png" width="138" height="62" alt="railsconf-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;Want to impress your fellow Rails developers? Want to get a free pass to the world's definitive Rails conference to see great keynote speakers of the caliber of &lt;a rel="nofollow" target="_blank" href="http://www.railsinside.com/events/285-tim-ferriss-railsconf-2009-keynote.html"&gt;Tim Ferriss&lt;/a&gt;? &lt;a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010/public/cfp/84"&gt;Submit a proposal to speak&lt;/a&gt; at &lt;a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010"&gt;RailsConf 2010&lt;/a&gt; - taking place June&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/events/347-want-to-speak-at-railsconf-2010-submit-your-proposals-now.html</guid>
         <pubDate>Wed, 28 Oct 2009 12:41:25 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/railsconf-logo.png" width="138" height="62" alt="railsconf-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>Want to impress your fellow Rails developers? Want to get a free pass to the world's definitive Rails conference to see great keynote speakers of the caliber of <a rel="nofollow" target="_blank" href="http://www.railsinside.com/events/285-tim-ferriss-railsconf-2009-keynote.html">Tim Ferriss</a>? <a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010/public/cfp/84">Submit a proposal to speak</a> at <a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010">RailsConf 2010</a> - taking place June 7-10, 2010 in Baltimore, Maryland, USA. Yep, the call for participation opened today!</p>
<p>Speaking at RailsConf is a great addition to your CV and a lot of RailsConf's speakers have been first timers. From what I've seen over the years, there doesn't seem to be a pattern to who gets in and who doesn't (though bigger names do, certainly, seem to pop up more - but perhaps they submit the most proposals..) and as long as you can come up with a solid Rails-related talk proposal, you're in with a good chance.</p>
<p>The <a rel="nofollow" target="_blank" href="http://en.oreilly.com/rails2010/public/cfp/84">official call for proposals</a> outlines some areas that would be preferred:</p>
<ul>
<li>Time-saving developer productivity tips, tricks, and tools</li>
<li>Patterns and best practices for developing maintainable Rails applications</li>
<li>Rails Internals</li>
<li>Complex domain modeling</li>
<li>Rails development case studies, including application rewrites and organizational bootstrapping</li>
<li>Making Rails</li>
<li>Heterogeneous systems integration</li>
<li>Real-world deployment and scaling</li>
<li>Making the most out of new Rails features</li>
<li>Gem and Plugin highlights</li>
<li>Extending Rails</li>
</ul>
<p>Proposals are due by 11:59pm Eastern on March 17, 2010 and successful speakers will be notified in April. Good luck!</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Want+To+Speak+At+RailsConf+2010%3F+Submit+Your+Proposals+Now+http://bit.ly/2ixMYc" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Want+To+Speak+At+RailsConf+2010%3F+Submit+Your+Proposals+Now+http://bit.ly/2ixMYc" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=86uJb-IsmcI:iqiobSmDE8U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=86uJb-IsmcI:iqiobSmDE8U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=86uJb-IsmcI:iqiobSmDE8U:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=86uJb-IsmcI:iqiobSmDE8U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=86uJb-IsmcI:iqiobSmDE8U:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=86uJb-IsmcI:iqiobSmDE8U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=86uJb-IsmcI:iqiobSmDE8U:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=86uJb-IsmcI:iqiobSmDE8U:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=86uJb-IsmcI:iqiobSmDE8U:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/86uJb-IsmcI" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/kOrN6SV5dZA" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/86uJb-IsmcI/347-want-to-speak-at-railsconf-2010-submit-your-proposals-now.html</feedburner:origLink></item>
      <item>
         <title>Rails Envy Podcast – Episode #098</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/AnOWb2X4rUI/episode-098</link>
         <description>Episode #98- &amp;#8220;I leave my syntax out when company comes over.&amp;#8221;
Important inaccuracy in this week&amp;#8217;s show: We have misrepresented Bryan Liles as having written the dm-is-schemaless plugin when, in fact, it&amp;#8217;s actually Bryan Smith. Sorry guys! The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a [...]</description>
         <guid isPermaLink="false">http://railsenvy.com/?p=3403</guid>
         <pubDate>Wed, 28 Oct 2009 12:10:53 -0700</pubDate>
         <content:encoded><![CDATA[<p><strong>Episode #98</strong>- &#8220;I leave my syntax out when company comes over.&#8221;</p>
<p><strong>Important inaccuracy in this week&#8217;s show:</strong> We have misrepresented Bryan Liles as having written the dm-is-schemaless plugin when, in fact, it&#8217;s actually <a rel="nofollow" target="_blank" href="http://brianthecoder.com/">Bryan Smith</a>. Sorry guys!</p>
<div class="podcast_sponsor"><a rel="nofollow" target="_blank" href="http://brianthecoder.com/"> </a><a rel="nofollow" style="border:none;" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&amp;utm_medium=banner&amp;utm_campaign=RPMLite"><img style="border:none;float:right;" src="http://www.railsenvy.com/assets/2008/9/17/NewRelic-225x119.gif" alt="Sponsored by New Relic"/></a>
<p>The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly diagnose problems with your Rails application in real time. Check them out at <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&amp;utm_medium=banner&amp;utm_campaign=RPMLite">NewRelic.com</a>.</div> <h2>Show Notes</h2>
<ul>
<li>
<h4><a rel="nofollow" title="Gemcutter will become default host for gems" target="_blank" href="http://update.gemcutter.org/2009/10/26/transition.html">Gemcutter will become default host for gems</a></h4>
<p>Gemcutter will become the default for Ruby gems. They hope to complete the transition by Rubyconf. The new address will be <a rel="nofollow" target="_blank" href="http://rubygems.org">http://rubygems.org</a> and migration paths are being worked out.</li>
<li>
<h4><a rel="nofollow" title="Rails in a nutshell" target="_blank" href="http://rails-nutshell.labs.oreilly.com/index.html">Rails in a nutshell</a></h4>
<p>Rails in a Nutshell is a concise introduction to Rails, an overview of commands and configurations, and a guide to the parts of Rails you’ll be using every day. It&#8217;s written by Cody Fauser, James MacAulay, Edward Ocampo-Gooding, and John Guenin. It&#8217;s a beta book and you can comment on every paragraph.</li>
<li>
<h4><a rel="nofollow" title="Devise is a new authentication gem for Rails" target="_blank" href="http://github.com/plataformatec/devise/">Devise is a new authentication gem for Rails</a></h4>
<p>Devise is a flexible authentication solution for Rails based on Warden. It&#8217;s Rack based, is a complete MVC solution based on Rails engines, allows you to have multiple roles (or models/scopes) signed in at the same time, and is based on a modularity concept: use just what you really need. There&#8217;s also an example app available.</p>
<p><a rel="nofollow" target="_blank" href="http://github.com/plataformatec/devise/">http://github.com/plataformatec/devise/</a><br />
<a rel="nofollow" target="_blank" href="http://github.com/plataformatec/devise_example/">http://github.com/plataformatec/devise_example/</a></li>
<li>
<h4><a rel="nofollow" title="Ancestry 1.1.0 Released" target="_blank" href="http://github.com/stefankroes/ancestry/">Ancestry 1.1.0 Released</a></h4>
<p>Ancestry allows the records of a ActiveRecord model to be organised as a tree structure, using a single, intuitively formatted database column, using a variation on the materialised path pattern. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query. Additional features are named_scopes, integrity checking, integrity restoration, arrangement of (sub)tree into hashes and different strategies for dealing with orphaned records.</p>
<p>Version 1.1.0 Notable new features:<br />
* Depth caching and selecting records on depth<br />
* Easy migration from parent_id based plugins like nested_set and acts_as_tree</li>
<li>
<h4><a rel="nofollow" title="Dm-is-schemaless" target="_blank" href="http://github.com/BrianTheCoder/dm-is-schemaless">Dm-is-schemaless</a></h4>
<p>Brian Lyles of TATFT fame has written dm-is-schemaless which is a DataMapper plugin to accomplish schemaless storage in a relational database by storing it in JSON with a primary key.</p>
<p><a rel="nofollow" target="_blank" href="http://github.com/BrianTheCoder/dm-is-schemaless">http://github.com/BrianTheCoder/dm-is-schemaless</a><br />
<a rel="nofollow" target="_blank" href="http://bret.appspot.com/entry/how-friendfeed-uses-mysql">http://bret.appspot.com/entry/how-friendfeed-uses-mysql</a></li>
<li>
<h4><a rel="nofollow" title="Trusted Params" target="_blank" href="http://github.com/ryanb/trusted-params">Trusted Params</a></h4>
<p>Rails plugin which adds a convenient way to override attr_accessible protection.</li>
<li>
<h4><a rel="nofollow" title="Riot" target="_blank" href="http://github.com/thumblemonks/riot">Riot</a></h4>
<p>Riot is a new, concise, and fast testing mini-framework.</li>
<li>
<h4><a rel="nofollow" title="GeoMereLaal" target="_blank" href="http://github.com/parolkar/geo_mere_laal">GeoMereLaal</a></h4>
<p>GeoMereLaal is a plugin that includes all you need to create Location-Aware rails application based on W3C Geolocaton API.</li>
<li>
<h4><a rel="nofollow" title="The Complete Class" target="_blank" href="http://blog.rubybestpractices.com/posts/rklemme/018-Complete_Class.html">The Complete Class</a></h4>
<p>Robert Klemme posts a thorough walk through of writing a Ruby class on the Ruby Best Practices blog.</li>
<li>
<h4><a rel="nofollow" title="acts_as_pingable" target="_blank" href="http://github.com/pgte/acts_as_pingable">acts_as_pingable</a></h4>
<p>Acts as pingable is a Rails plug-in for simply opening your Rails app to HTTP pings. It can produce pingdom.com XML.</li>
<li>
<h4><a rel="nofollow" title="Sinatra_more" target="_blank" href="http://github.com/nesquena/sinatra_more">Sinatra_more</a></h4>
<p>Sinatra_more strives to be a central-hub for useful sinatra extensions such as tag helpers, form_builders, partials, and a whole lot more.</li>
<li>
<h4><a rel="nofollow" title="Installing Varnish with nginx, Passenger, and Monit on Ubuntu 8.10 intrepid" target="_blank" href="http://almosteffortless.com/2009/10/22/installing-varnish-with-nginx-passenger-and-monit-on-ubuntu-8-10-intrepid/">Installing Varnish with nginx, Passenger, and Monit on Ubuntu 8.10 intrepid</a></h4>
<p>Trever posted a tutorial about getting nginx, passenger, varnish, and monit installed on the Almost Effortless blog.</li>
<li>
<h4><a rel="nofollow" title="Loofah" target="_blank" href="http://github.com/flavorjones/loofah">Loofah</a></h4>
<p>Loofah is an HTML sanitizer. It will always fix broken markup, but can also sanitize unsafe tags in a few different ways, and transform the markup for storage or display. It’s built on top of Nokogiri and libxml2, so it’s fast.</li>
<li>
<h4><a rel="nofollow" title="Rails 2.3.4 and SWFUpload" target="_blank" href="http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/">Rails 2.3.4 and SWFUpload</a></h4>
<p>Brian Racer posted a walk through of how to get SWFUpload working with Rails 2.3.4 for gracefully degrading flash and javascript uploads.</li>
<li>
<h4><a rel="nofollow" title="Curbit" target="_blank" href="http://github.com/ssayles/curbit">Curbit</a></h4>
<p>CurbIt makes it easy to add application level rate limiting to your Rails app by using a controller macro.</li>
<li>
<h4><a rel="nofollow" title="Amazon RDS" target="_blank" href="http://aws.amazon.com/rds/">Amazon RDS</a></h4>
<p>Amazon Web Services (AWS) delivers a set of services that together form a reliable, scalable, and inexpensive computing platform &#8216;in the cloud&#8217;.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/rails-envy/~4/zcZRube3MnI" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/AnOWb2X4rUI" height="1" width="1"/>]]></content:encoded>
         <enclosure length="17855189" url="http://feedproxy.google.com/~r/rails-envy/~5/AEPgS8Rcq8w/podcast_98.mp3" type="audio/mpeg" />
      <feedburner:origLink>http://feedproxy.google.com/~r/rails-envy/~3/zcZRube3MnI/episode-098</feedburner:origLink></item>
      <item>
         <title>Heroku Gets Add-Ons: Serious Ruby Webapp Hosting Made Easy</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/GL1pmG5OLKk/heroku-gets-add-ons-serious-ruby-webapp-hosting-made-easy-2664.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/10/heroku.png" width="123" height="59" alt="heroku.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://heroku.com/"&gt;Heroku&lt;/a&gt; is a Ruby webapp hosting service that &lt;a rel="nofollow" target="_blank" href="http://www.rubyinside.com/heroku-an-online-rails-development-and-app-hosting-environment-647.html"&gt;we first mentioned&lt;/a&gt; about two years ago. It started off as an online IDE of sorts, but is now a complete cloud platform for running Ruby webapps. You can develop locally and then, with a single command, deploy your app to their metered service. Well, Heroku got in touch with me last week to talk about &lt;a rel="nofollow" target="_blank" href="http://addons.heroku.com/"&gt;their new "Add-Ons" feature&lt;/a&gt; and they've really kicked things up a notch for people wanting to quickly roll out webapps online.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/heroku-gets-add-ons-serious-ruby-webapp-hosting-made-easy-2664.html</guid>
         <pubDate>Wed, 28 Oct 2009 08:33:10 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/heroku.png" width="123" height="59" alt="heroku.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://heroku.com/">Heroku</a> is a Ruby webapp hosting service that <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/heroku-an-online-rails-development-and-app-hosting-environment-647.html">we first mentioned</a> about two years ago. It started off as an online IDE of sorts, but is now a complete cloud platform for running Ruby webapps. You can develop locally and then, with a single command, deploy your app to their metered service. Well, Heroku got in touch with me last week to talk about <a rel="nofollow" target="_blank" href="http://addons.heroku.com/">their new "Add-Ons" feature</a> and they've really kicked things up a notch for people wanting to quickly roll out webapps online.</p>
<p>Till now, Heroku has provided basic functionality on a semi-metered basis. You pay a monthly fee for a basic rate of service and then pay an hourly rate for more concurrency. Now, you can also add on a bunch of other features which Heroku are calling "Add-ons." Here are just a few of the more interesting ones:</p>
<ul>
<li><a rel="nofollow" target="_blank" href="http://aws.amazon.com/rds/"><b>Amazon RDS</b></a> <b>(Relational Database Service)</b> - This add-on is free from Heroku's point of view but you'll be paying Amazon.</li>
<li><b>Bundles</b> - A "snapshot" type backup system. You get a single bundle for free or can pay $20 for unlimited bundles.</li>
<li><b>Cron</b> - Daily and hourly crons can be set up with a couple of clicks.</li>
<li><b>Memcached</b> - You can boost your app's performance with in-memory caching provided by Memcached. The key here is that Heroku totally manages the Memcached instance - no server setup needed, etc. Currently this feature is only in private beta though..</li>
<li><b>New Relic</b> - Most readers should be familiar with <a rel="nofollow" target="_blank" href="http://www.newrelic.com/">New Relic</a>'s application performance tools by now and Heroku makes it easy to get them running directly on your Heroku-hosted apps. (As an aside, New Relic rolled out <a rel="nofollow" target="_blank" href="http://blog.newrelic.com/2009/10/19/announcing-new-relic-rpm-version-2-with-enhanced-ui-support-for-java-hourly-billing-option-and-more/">a significant update</a> last week - version 2 of their flagship RPM system.)</li>
<li><b>SSL</b> - Get https:// URLs on your Heroku app with a choice between piggyback SSL (free), SNI SSL ($5 per month) or full-blown custom SSL ($100 per month).</li>
<li><b>Websolr</b> - A no-setup-needed Solr instance so you can get quick and easy full text indexing and search functionality in your apps.</li>
</ul>
<p><i>Note: You can learn more about all the different Add-ons at Heroku's dedicated</i> <a rel="nofollow" target="_blank" href="http://addons.heroku.com/"><i>Add-ons page</i></a><i>.</i></p>
<h3>Impressive but Expensive?</h3>
<p>As impressive as Heroku's one-command-deploy and add-ons features are, though, I can't quite put my finger on Heroku's market - they're kinda pricey. Perhaps it'd be good for professional developers who want to do a test deployment of an app on a live server without getting mired in server configuration?</p>
<p>For full time use, Heroku doesn't strike me as very competitive. For example, for the "Crane" 500MB storage option (billed as <i>"perfect for a small biz app"</i>) with the recommended 4 "Dynos" the fee comes to an estimated $158 per month, and that's without any add-ons. For the entry level "dedicated" option with the recommended 8 dynos, the cost goes to $452.</p>
<p>Despite the cost, though, what Heroku offers is a very simple "no hassles" hosting service that, crucially, can handle significant workloads. You could rig up something similar with VPSes, dedicated boxes elsewhere, or even Amazon EC2, but you're going to be spending time doing server configuration. If playing sysadmin isn't tricky for you (I enjoy it, personally), Heroku might not be for you and you should be looking at companies like <a rel="nofollow" target="_blank" href="http://www.webbynode.com/">Webbynode</a> or <a rel="nofollow" target="_blank" href="http://www.linode.com/">Linode.</a> But if you're just a 100% developer who wants to get something up and running and doesn't want to worry about scalability too much, Heroku could be worth the extra expense.</p>
<p><strong>Update: Oren Teich of Heroku got in touch with some notes regarding Heroku's value proposition versus the comparisons I made above. I quote verbatim:</strong></p>
<p>
<blockquote> I wanted to point out that we have many users running huge sites on the free version, serving up hundreds of thousands of hits per month, and that they pricing is deceptive - for that $150 you get an AMAZINGLY high powered service, capable of serving &gt;10 millions requests per day.</p>
<p>We don't do a great job right now of making it clear just how powerful a single dyno is, or what you get with the platform. We're working on improving the pricing to be clearer. In the meantime, getting the right message out on this is really important to us.</p>
<p>Also keep in mind, that the DB pricing is for DB usage only - it doesn't include your code, files on disk, etc. That said, we know we need to right size the DB pricing, but it's amazing how far 500, or even 50 MB of pure DB usage will take you.</p>
<p>Heroku has many users running huge sites on the free version, serving up hundreds of thousands of hits per month. The pricing can be deceptive, for that $150 you get an AMAZINGLY high powered service, capable of serving &gt;10 millions requests per day.</p></blockquote>
<p>He also noted that there's no charge for bandwidth, although there are some soft limits that haven't been hit by any users yet.</p>
<p><em>Disclaimer: Webbynode and Linode are currently Ruby Inside sponsors. Heroku, however, has no financial connection with Ruby Inside and vice versa.</em></p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://devver.net/caliper"><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/caliper-logo.png" width="98" height="42" alt="caliper-logo.png" style="float:right;margin-bottom:8px;margin-left:12px;"/></a><em>[ad]</em> Find duplication, code smells, complex code and more in your Ruby code with <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Caliper!</a> The metrics are free and setup takes just one click. <a rel="nofollow" target="_blank" href="http://devver.net/caliper">Get started!</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=1-3-gJPb35c:q1C9Q9xW9uA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=1-3-gJPb35c:q1C9Q9xW9uA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=1-3-gJPb35c:q1C9Q9xW9uA:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=1-3-gJPb35c:q1C9Q9xW9uA:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=1-3-gJPb35c:q1C9Q9xW9uA:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=1-3-gJPb35c:q1C9Q9xW9uA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=1-3-gJPb35c:q1C9Q9xW9uA:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/1-3-gJPb35c" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/GL1pmG5OLKk" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/1-3-gJPb35c/heroku-gets-add-ons-serious-ruby-webapp-hosting-made-easy-2664.html</feedburner:origLink></item>
      <item>
         <title>TinyMCE: Nothing In Textarea</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/6cTKZ2pn47Q/tinymce-nothing-in-textarea.html</link>
         <description>If you want to get the value of the &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; through some method other than just hitting "Submit", you're dealing with some kind of &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; jiggery-pokery. A good old-fashioned Prototype &lt;code&gt;$(editor_id).value&lt;/code&gt; won't get the job done; in this instance, you need &lt;code&gt;tinyMCE.get(editor_id).getContent()&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-702132944071713605?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/6cTKZ2pn47Q" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-702132944071713605</guid>
         <pubDate>Tue, 27 Oct 2009 11:37:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/tinymce-nothing-in-textarea.html</feedburner:origLink></item>
      <item>
         <title>How To Use Bundler With Rails</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/4-MoRrBTbE0/how-to-use-bundler-with-rails.html</link>
         <description>&lt;code&gt;gem rails, :only =&amp;gt; :bundler&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;via @carllerche and @patmaddox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-5551793066225833544?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/4-MoRrBTbE0" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-5551793066225833544</guid>
         <pubDate>Mon, 26 Oct 2009 14:07:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/how-to-use-bundler-with-rails.html</feedburner:origLink></item>
      <item>
         <title>Gemcutter Is The New Official Default RubyGem Host</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/o7jVYnUGgKI/gemcutter-is-the-new-official-default-rubygem-host-2659.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/10/rubygems.png" width="113" height="113" alt="rubygems.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;Just two months ago &lt;a rel="nofollow" target="_blank" href="http://www.rubyinside.com/gemcutter-a-fast-and-easy-approach-to-ruby-gem-hosting-2281.html"&gt;we posted about Gemcutter&lt;/a&gt;, a new RubyGem hosting repository that, we said, was &lt;i&gt;"taking aim at &lt;a rel="nofollow" target="_blank" href="http://rubyforge.org/"&gt;RubyForge&lt;/a&gt; and &lt;a rel="nofollow" target="_blank" href="https://github.com/"&gt;GitHub&lt;/a&gt;."&lt;/i&gt; It only took six weeks &lt;a rel="nofollow" target="_blank" href="http://github.com/blog/515-gem-building-is-defunct"&gt;for GitHub to give up on building gems&lt;/a&gt; and to start recommending Gemcutter instead. Today, RubyForge is toppled also. Gemcutter developer Nick Quaranto has &lt;a rel="nofollow" target="_blank" href="http://update.gemcutter.org/2009/10/26/transition.html"&gt;announced that Ruby Central has given the thumbs up&lt;/a&gt; to replacing &lt;code&gt;http://gems.rubyforge.org/&lt;/code&gt; with &lt;code&gt;http://rubygems.org/&lt;/code&gt; (the new Gemcutter URL) as the default gem host in RubyGems.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/gemcutter-is-the-new-official-default-rubygem-host-2659.html</guid>
         <pubDate>Mon, 26 Oct 2009 16:48:01 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/rubygems.png" width="113" height="113" alt="rubygems.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>Just two months ago <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/gemcutter-a-fast-and-easy-approach-to-ruby-gem-hosting-2281.html">we posted about Gemcutter</a>, a new RubyGem hosting repository that, we said, was <i>"taking aim at <a rel="nofollow" target="_blank" href="http://rubyforge.org/">RubyForge</a> and <a rel="nofollow" target="_blank" href="https://github.com/">GitHub</a>."</i> It only took six weeks <a rel="nofollow" target="_blank" href="http://github.com/blog/515-gem-building-is-defunct">for GitHub to give up on building gems</a> and to start recommending Gemcutter instead. Today, RubyForge is toppled also. Gemcutter developer Nick Quaranto has <a rel="nofollow" target="_blank" href="http://update.gemcutter.org/2009/10/26/transition.html">announced that Ruby Central has given the thumbs up</a> to replacing <code>http://gems.rubyforge.org/</code> with <code>http://rubygems.org/</code> (the new Gemcutter URL) as the default gem host in RubyGems.</p>
<p>The transition from RubyForge to Gemcutter/RubyGems.org isn't an overnight deal and gem publishing from RubyForge will continue to work for the time being, but within the next couple of months, RubyForge accounts will be merged with Gemcutter and an update will be made to change the canonical gem source (though, of course, you can use Gemcutter already if you like by following <a rel="nofollow" target="_blank" href="http://gemcutter.org/">their instructions</a>).</p>
<p>What all of this means for you as a Ruby developer is that if you want to release your own RubyGems (or "gems") in future, things will become a lot easier. Gemcutter, if you haven't checked it out, is definitely a refined evolution in terms of gem hosting - you can "push" a built gem to their server with a single command. If you want to learn how, check out <a rel="nofollow" target="_blank" href="http://railscasts.com/episodes/183-gemcutter-jeweler">Ryan Bates' awesome Gemcutter &amp; Jeweler screencast</a> that demonstrates how to create a gem and deploy it with Gemcutter.</p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09"><img src="http://www.rubyinside.com/wp-content/uploads/2009/09/CodebaseLogo-RI.png" width="118" height="37" style="float:right;margin-left:12px;margin-bottom:12px;" alt="CodebaseLogo-RI.png"/></a><em>[ad]</em> <a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09"><b>Codebase</b></a> is a fast &amp; reliable <b>git, mercurial &amp; subversion hosting</b> service with complete project management built-in - ticketing, milestones, wikis &amp; time tracking - all under one roof. <a rel="nofollow" target="_blank" href="http://www.codebasehq.com/?utm_source=rubyinside&amp;utm_medium=footer&amp;utm_campaign=sep09">Click here to try it - free.</a></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WXttnvaFy84:xAoa18UTnDg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WXttnvaFy84:xAoa18UTnDg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WXttnvaFy84:xAoa18UTnDg:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WXttnvaFy84:xAoa18UTnDg:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WXttnvaFy84:xAoa18UTnDg:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=WXttnvaFy84:xAoa18UTnDg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=WXttnvaFy84:xAoa18UTnDg:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/WXttnvaFy84" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/o7jVYnUGgKI" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/WXttnvaFy84/gemcutter-is-the-new-official-default-rubygem-host-2659.html</feedburner:origLink></item>
      <item>
         <title>Rails 2.3.4 + SWFUpload: Gracefully Degrading Rails File Uploads</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/obyxxKgd6_w/345-rails-2-3-4-swfupload-gracefully-degrading-rails-file-uploads.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/uploader.png" width="144" height="99" alt="uploader.png" style="float:left;margin-right:12px;margin-bottom:12px;border:1px #000000 solid;"/&gt;Over on the Jetpack Flight Log, Brian Racer &lt;a rel="nofollow" target="_blank" href="http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/"&gt;demonstrates how to use SWFUpload with Rails 2.3.4&lt;/a&gt; to implement slick, yet gracefully degrading, Rails file uploads powered by Flash. It's an impressive walkthrough post.&lt;/p&gt;
&lt;p&gt;If you've uploaded photos or videos to Flickr or&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/tutorials/345-rails-2-3-4-swfupload-gracefully-degrading-rails-file-uploads.html</guid>
         <pubDate>Sun, 25 Oct 2009 18:23:44 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/uploader.png" width="144" height="99" alt="uploader.png" style="float:left;margin-right:12px;margin-bottom:12px;border:1px #000000 solid;"/>Over on the Jetpack Flight Log, Brian Racer <a rel="nofollow" target="_blank" href="http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/">demonstrates how to use SWFUpload with Rails 2.3.4</a> to implement slick, yet gracefully degrading, Rails file uploads powered by Flash. It's an impressive walkthrough post.</p>
<p>If you've uploaded photos or videos to Flickr or YouTube, you should be familiar with Flash-powered uploading. Instead of selecting a file and then waiting on a precarious HTTP request to send all of the data, Flash based uploading results in a Flash widget doing all of the hard work on screen - you even get upload progress "out of the box."</p>
<p>While you can use Brian's techniques in your own app, he's also put together <a rel="nofollow" target="_blank" href="http://github.com/anveo/swfupload_demo">swfupload_demo</a>, a complete demo app that shows SWFUpload in action to power a MP3 repository of sorts. It not only processes the upload of MP3s but it also uses an embedded MP3 player to let you play the tracks you upload into the app <i>right on the page</i>.</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Rails+2.3.4+%2B+SWFUpload%3A+Gracefully+Degrading+Rails+File+Uploads+http://bit.ly/1vQ2C7" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Rails+2.3.4+%2B+SWFUpload%3A+Gracefully+Degrading+Rails+File+Uploads+http://bit.ly/1vQ2C7" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=qrxE-Jea4cs:MOIowAo27CU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=qrxE-Jea4cs:MOIowAo27CU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=qrxE-Jea4cs:MOIowAo27CU:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=qrxE-Jea4cs:MOIowAo27CU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=qrxE-Jea4cs:MOIowAo27CU:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=qrxE-Jea4cs:MOIowAo27CU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=qrxE-Jea4cs:MOIowAo27CU:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=qrxE-Jea4cs:MOIowAo27CU:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=qrxE-Jea4cs:MOIowAo27CU:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/qrxE-Jea4cs" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/obyxxKgd6_w" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/qrxE-Jea4cs/345-rails-2-3-4-swfupload-gracefully-degrading-rails-file-uploads.html</feedburner:origLink></item>
      <item>
         <title>Alternate Programming Business Model: Driving Affiliate Traffic With Shareware</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/4BYosWQ-RFs/alternate-programming-business-model.html</link>
         <description>I've written recently about how I think consulting is a terrible business model. Given that it's basically the business I've always been in, I started to look into other business models and find out what my alternatives might be. Out of curiousity, I bought &lt;a rel="nofollow" target="_blank" href="http://gilesgoat.lazymrketr.hop.clickbank.net"&gt;an ebook on affiliate marketing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Since Ruby programmers love meta crap, I'll introduce affiliate marketing the meta way: if you &lt;a rel="nofollow" target="_blank" href="http://gilesgoat.lazymrketr.hop.clickbank.net"&gt;click this link&lt;/a&gt; and buy the PDF, I'll get a commission. That's affiliate marketing - basically, driving traffic, selling stuff, and getting a commission. (I'm not actually expecting to see a lot of people buy this thing, but a) if I'm going to link, I might as well use an affiliate link, and b) the FTC set up some new rules about that, so I'm mentioning it out of legal paranoia.)&lt;br /&gt;&lt;br /&gt;Anyway, most of these things are pretty cheesy. This one was written by some kind of surfer guy, so I thought what the hell. I know a woman who does Internet marketing full-time - she gets paid to blog about yoga - and another who offers an affiliate program for her business, where she teaches actors how to be financially self-sufficient. So I've seen a little bit of this affiliate marketing world, and by its standards, this surfer guy seems unusually chill. He also gives away a lot of detailed information, which I took to be a "good karma" type thing. Anyway if I get into explaining it I'll want to do a whole review, and I'm too tired for that right now. Maybe later.&lt;br /&gt;&lt;br /&gt;What surprised me, and why I'm blogging this: a chapter on the guy's "secret weapon" for generating lots of traffic (traffic is a big deal to affiliate marketers). Basically, the secret weapon is &lt;i&gt;downloadable applications&lt;/i&gt;. This includes shareware, freeware, and Web apps repurposed to run within dedicated browsers and thereby become equivalent, as far as a nontechnical user is concerned, to downloadable desktop apps.&lt;br /&gt;&lt;br /&gt;On the one hand, this struck me as a weird potentially-revolutionary business model for programmers: building stuff for people to give away to drive traffic to their affiliate marketing programs. On the other hand, there's nothing &lt;i&gt;that&lt;/i&gt; revolutionary about it. It's essentially what many of us already do for a living. We build stuff for entrepreneurs to give away to drive traffic to their "hey Mr. VC, buy me out" programs. But it's scaled down much, much smaller than is usually the case.&lt;br /&gt;&lt;br /&gt;It matches the thing I said in my Archaeopteryx presentations: that Internet startups can be not only too cheap to fund - from the traditional VC perspective, where any business launch requires millions upfront - but also &lt;i&gt;too small to see&lt;/i&gt;. If I make some shareware, license it to somebody in exchange for a portion of their affiliate marketing earnings, I have in a sense successfully launched an Internet startup, even though it's not at all what people mean when they use the term. This is an "Internet startup" that you could in theory launch with one programmer in his or her spare time, although I have no idea if there's any real money there.&lt;br /&gt;&lt;br /&gt;When you look at the fiction people have generated about robots, a lot of it revolves around the idea of &lt;i&gt;giant&lt;/i&gt; robots. What's the reality? The reality is that tiny robots can do a lot, and robot price gets out of control quickly &lt;i&gt;if&lt;/i&gt; you make the robot big. A robot the size of a computer mouse costs about as much; a Lego Mindstorms NXT kit costs around $300; a Lynxmotion hexapod costs around $700, not counting brains or sensors; and anything bigger than a hexapod gets you into crazy money really fast. &lt;b&gt;&lt;i&gt;Technology tends toward miniaturization.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe class="embeddedvideo" src="http://www.youtube.com/v/C_NoxhOf4ko&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;span style="font-size:0.7em;font-style:italic;"&gt;Lynxmotion hexapod&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A corporation is kind of like a robot, although that's a huge separate topic. Point is, a lot of people think the Internet is here to make our corporate overlords more powerful than ever before, and give them even more gigantic empires. (And by "a lot of people" I mean those corporate overlords themselves, and their minions.) But I think long-term, it's going to have the opposite effect, and that (among other things) the Internet may make software businesses much, much smaller than they are (and they're already smaller than they've been in the past).&lt;br /&gt;&lt;br /&gt;This is the other reason I find affiliate marketing interesting. Every indication is that these businesses are extremely small. But that's another rant, and I'm tired. Anyway, if you're curious, &lt;a rel="nofollow" target="_blank" href="http://gilesgoat.lazymrketr.hop.clickbank.net/"&gt;here's the ebook link again&lt;/a&gt;. It's an interesting read, even if it isn't free (assuming you find these sort of micro-entrepreneurial phenomena interesting).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-7958629848742129630?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/4BYosWQ-RFs" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-7958629848742129630</guid>
         <pubDate>Sat, 24 Oct 2009 12:43:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/alternate-programming-business-model.html</feedburner:origLink></item>
      <item>
         <title>The Complete Class</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/90A7q-9YkPM/018-Complete_Class.html</link>
         <description>&lt;p&gt;&lt;i&gt;A remark: we enabled comment moderation because the blog was recently target of spam. You probably have not seen much of it because we were pretty quick in removing it manually. So if your comment does not show up please be patient.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;There are some basic concepts (often called &amp;#8220;aspects&amp;#8221;) that need to be implemented for many classes although not all classes need all (or even any) of them:&lt;/p&gt;
&lt;ul&gt; &lt;li&gt;initialization&lt;/li&gt; &lt;li&gt;conversion to a printable string&lt;/li&gt; &lt;li&gt;equivalence&lt;/li&gt; &lt;li&gt;hash code calculation&lt;/li&gt; &lt;li&gt;comparability&lt;/li&gt; &lt;li&gt;cloning (&lt;code&gt;clone&lt;/code&gt; and &lt;code&gt;dup&lt;/code&gt;)&lt;/li&gt; &lt;li&gt;freezing&lt;/li&gt; &lt;li&gt;customized persistence (&lt;code&gt;Marshal&lt;/code&gt; and &lt;code&gt;Yaml&lt;/code&gt;)&lt;/li&gt; &lt;li&gt;matching&lt;/li&gt; &lt;li&gt;math and operator overloading&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which of these is needed for a particular class depends of course completely on the circumstances. Classes which are never written to disk or used in a DRb context will not need customized persistence handling. For other classes there might not be a reasoable ordering.&lt;/p&gt;
&lt;p&gt;We will look at these concepts individually in subsequent sections. For the sake of this presentation I will create a slightly artificial class which will have particular properties in order to be able to show all the concepts:&lt;/p&gt;
&lt;ul&gt; &lt;li&gt;mutable fields&lt;/li&gt; &lt;li&gt;redundant fields, i.e. fields which carry cached values that can be derived from other fields&lt;/li&gt; &lt;li&gt;at least two fields for ordering priorities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Class &lt;code&gt;Album&lt;/code&gt; implements a music album with a title, interpret, sequence of tracks and a fixed pause duration between tracks. I picked a slightly different approach than Eric in &lt;a rel="nofollow" target="_blank" href="http://blog.segment7.net/articles/2008/12/17/friendly-ruby-objects"&gt;his article&lt;/a&gt; in two ways:&lt;/p&gt;
&lt;ul&gt; &lt;li&gt;Eric has a stronger focus on collaboration with standard library classes while my guiding question was &amp;#8220;what does a class need to be complete and consistent?&amp;#8221;,&lt;/li&gt; &lt;li&gt;I present all the features in a single class to show how aspects play together.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You will likely never implement all these aspects in a single class. Even for those aspects you do use, you might not use the same implementations I will present. That&amp;#8217;s OK. The implementations presented in this article are intended to cover aspects thoroughly even though you will not always have to do that in practice. For example, certain code is there in order to make the class work properly as part of an inheritance hierarchy. If you write a one off class for a script which is never intended for inheritance you can simplify many of the presented methods.&lt;/p&gt;
&lt;p&gt;I left out the topic of math and operator overloading since that does not mix well with the concept of music album. Instead I will cover that in the next article in the blog which will present a class that shows how to override operators in Ruby and that plays well with Ruby&amp;#8217;s built in numeric classes.&lt;/p&gt;
&lt;h3&gt;Initialization&lt;/h3&gt;
&lt;p&gt;Implementing method &lt;code&gt;initialize&lt;/code&gt; is typically one of the first things I do when implementing a new class unless I can use the default implementation of &lt;code&gt;Struct&lt;/code&gt;. There are a few things though that are worth considering.&lt;/p&gt;
&lt;p&gt;First of all, who owns arguments to &lt;code&gt;initialize&lt;/code&gt;? It is important to make clear what happens to arguments that are provided to the call to &lt;code&gt;new&lt;/code&gt;. There are three cases&lt;/p&gt;
&lt;ol&gt; &lt;li&gt;the value is immutable (like &lt;code&gt;Fixnum&lt;/code&gt;) or&lt;/li&gt; &lt;li&gt;the caller retains ownership or&lt;/li&gt; &lt;li&gt;ownership is transferred to the new instance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Case 1 is the simple one: basically you do not need care thinking about who owns the object as there are no bad effects which can be caused by &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Aliasing_(computing)"&gt;aliasing&lt;/a&gt;. If the instance is mutable these effects can show up. If you want to make your code as robuts as possible you must ensure you got your own copy of the instance (typically via copying it, for example by using &lt;code&gt;dup&lt;/code&gt;). The downside of this is of course that this costs performance as you&amp;#8217;ll likely copy too many objects. In practice you will probably most of the time do nothing special and keep the code as simple as an assignment.&lt;/p&gt;
&lt;pre class="ruby"&gt;
class Album def initialize(title, interpret, pause = 0) super() # main properties self.title = title self.interpret = interpret @tracks = [] # additional properties self.pause = pause # redundant properties # left out end def title=(t) @title = t.dup.freeze end def interpret=(i) @interpret = i.dup.freeze end def pause=(time) @pause = time @duration = nil end end
&lt;/pre&gt;
&lt;p&gt;The other important aspect is inheritance. Most classes that are written probably do not have a &lt;code&gt;super&lt;/code&gt; in their &lt;code&gt;initialize&lt;/code&gt; method. If there are chances that you reopen the class and add mixin modules you should include &lt;code&gt;super()&lt;/code&gt; right from the start because even if you only implicitly inherit &lt;code&gt;Object&lt;/code&gt; and &lt;code&gt;initialize&lt;/code&gt; in Object does nothing you may later reopen the class and add a mixin module which has an &lt;code&gt;initialize&lt;/code&gt; method itself. If you inherit another class than &lt;code&gt;Object&lt;/code&gt; you should explicitly mention arguments with &lt;code&gt;super&lt;/code&gt; and not rely on having the same argument list as the super class initializer. That way you are making the call more explicit and are robust against changes in your &lt;code&gt;initialize&lt;/code&gt; method.&lt;/p&gt;
&lt;pre class="ruby"&gt;
class CdAlbum &amp;lt; Album attr_accessor :bar_code def initialize(t, i, code) super(t, i, 2) self.bar_code = code end
end
&lt;/pre&gt;
&lt;p&gt;While we&amp;#8217;re at it: if you write a module which is intended as mixin and needs initialization itself the initializer should simply pass on all arguments in order to be compatible with arbitrary inheritance chains:&lt;/p&gt;
&lt;pre class="ruby"&gt;
module AnotherMixin # Prepare internal state and pass on all # arguments to the super class def initialize(*a, &amp;amp;b) super @list = [] end
end
&lt;/pre&gt;
&lt;h3&gt;Conversion to a printable String&lt;/h3&gt;
&lt;p&gt;Often it is desirable to be able to convert an instance to a human readable string. Which representation is most appropriate depends on the uses of the class. One policy is to create a string representation so the instance can be later reconstructed given this string as is the case for all the numeric types from the standard library. In the case of our sample class we will provide all interesting information:&lt;/p&gt;
&lt;pre class="ruby"&gt; def to_s "Album '#{title}' by '#{interpret}' (#{tracks.size} tracks)" end
&lt;/pre&gt;
&lt;p&gt;If you want to reuse a string field as external representation you could copy it in order to avoid bad effects from aliasing. However, since typically &lt;code&gt;to_s&lt;/code&gt; is invoked for printing and no references are held I would say most of the time it is safe to not explicitly copy the field in these cases.&lt;/p&gt;
&lt;h3&gt;Equivalence&lt;/h3&gt;
&lt;p&gt;There are two methods that deal with object equivalence &lt;code&gt;eql?&lt;/code&gt; and &lt;code&gt;==&lt;/code&gt;. (Method &lt;code&gt;equal?&lt;/code&gt; tests for object &lt;em&gt;identity&lt;/em&gt; and should &lt;strong&gt;not&lt;/strong&gt; be overridden.) Some core classes do have different equivalence relations implemented:&lt;/p&gt;
&lt;pre class="ruby"&gt;
irb(main):003:0&amp;gt; 2 == 2.0
=&amp;gt; true
irb(main):004:0&amp;gt; 2.eql? 2.0
=&amp;gt; false
&lt;/pre&gt;
&lt;p&gt;But most of the time both methods will implement the same equivalence relation. This also helps avoid confusion. Note that &lt;code&gt;eql?&lt;/code&gt; is special because it is used by &lt;code&gt;Hash&lt;/code&gt; and &lt;code&gt;Set&lt;/code&gt; to test for instance equivalence. We will come to that in a minute when we look at hash code calculation.&lt;/p&gt;
&lt;p&gt;Equivalence of instances must be tested against significant fields and should ignore redundant fields. Looking at derived field values does not add anything to equivalence and makes the process slower at best.&lt;/p&gt;
&lt;pre class="ruby"&gt; def eql?(album) self.class.equal?(album.class) &amp;amp;&amp;amp; title == album.title &amp;amp;&amp;amp; interpret == album.interpret &amp;amp;&amp;amp; tracks == album.tracks end alias == eql?
&lt;/pre&gt;
&lt;p&gt;Now here you see a test for class identity which you likely have not seen in other classes. Why is it there? &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Equivalence_relation"&gt;Mathematical equivalence&lt;/a&gt; is a symmetric relation which means that if &lt;code&gt;a.eql? b&lt;/code&gt; returns &lt;code&gt;true&lt;/code&gt; so should &lt;code&gt;b.eql? a&lt;/code&gt;. Implementing &lt;code&gt;eql?&lt;/code&gt; and &lt;code&gt;==&lt;/code&gt; that way also helps prevent strange effects when working with &lt;code&gt;Hash&lt;/code&gt; instances. So if you are going to compare two instances of a class and a subclass then you might get &lt;code&gt;true&lt;/code&gt; when called on the super class instance and false on the subclass instance. The same happens for two completely unrelated classes where the set of fields of one instance is a subset of those of the other instance. You may actually be tricked into thinking they are equivalent because the common fields are equivalent while the two instances represent completely different concepts. The only way to remedy this is to check for identity of the class.&lt;/p&gt;
&lt;p&gt;The reason that omitting the class identity check does not cause issues most of the time is simple: usually you stuff uniform instances into a &lt;code&gt;Hash&lt;/code&gt; or &lt;code&gt;Set&lt;/code&gt; and even if you mix different classes most of the time they will have different fields and different field values. Still it is good to remember the point in case you experience unexpected effects with &lt;code&gt;Hash&lt;/code&gt; keys.&lt;/p&gt;
&lt;p&gt;Note that I omitted the test for self identity which you might be used to from Java classes. I believe this is a premature optimization because most of the time you are going to test different instances for equivalence so most of the time you pay the penalty of the failing identity check and win only in rare circumstances.&lt;/p&gt;
&lt;h3&gt;Hash Code Calculation&lt;/h3&gt;
&lt;p&gt;This topic is closely related to instance equivalence: classes &lt;code&gt;Hash&lt;/code&gt;, &lt;code&gt;Array&lt;/code&gt;, &lt;code&gt;Set&lt;/code&gt; and other core classes rely on the fact that equivalent instances also return the same hash code. Note that this is not symmetric: instances wich have the same hash code may actually not be equivalent. But if the hash code differs they must not be equivalent.&lt;/p&gt;
&lt;p&gt;An instance&amp;#8217;s hash code should be based on the same fields that are used for determining equivalence. Our class &lt;code&gt;Album&lt;/code&gt; has more fields and it is advisable to do some bit operations (often involving &lt;span class="caps"&gt;XOR&lt;/span&gt;) to combine all member hash codes into a single value in order to ensure better diversity of these values. If you base the hash code only on a single field you increase the likelyhood that non equivalent instances fall into the same bucket of the &lt;code&gt;Hash&lt;/code&gt; which makes additional equivalence checks via &lt;code&gt;eql?&lt;/code&gt; necessary. You can find more about how hash tables work on &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Hash_table"&gt;Wikipedia&lt;/a&gt;.&lt;/p&gt;
&lt;pre class="ruby"&gt; def hash title.hash ^ interpret.hash ^ tracks.hash end
&lt;/pre&gt;
&lt;h3&gt;Comparability&lt;/h3&gt;
&lt;p&gt;Many classes have a natural ordering such as integers which are ordered by their numeric value. If your class does also have a natural order you can implement operator &lt;code&gt;&amp;lt;=&amp;gt;&lt;/code&gt; and include module &lt;code&gt;Comparable&lt;/code&gt; to get implementations of &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt; etc. for free.&lt;/p&gt;
&lt;pre class="ruby"&gt; include Comparable def &amp;lt;=&amp;gt;(o) self.class == o.class ? (interpret &amp;lt;=&amp;gt; o.interpret).nonzero? || (title &amp;lt;=&amp;gt; o.title).nonzero? || (tracks &amp;lt;=&amp;gt; o.tracks).nonzero? || (pause &amp;lt;=&amp;gt; o.pause) || 0 : nil end
&lt;/pre&gt;
&lt;h3&gt;Cloning&lt;/h3&gt;
&lt;p&gt;When cloning or duping an instance the default mechanism sets all fields of the new instance to refer to the same objects as the cloned instance. While this is not an issue with immutable instances (e.g. &lt;code&gt;Fixnum&lt;/code&gt; or instances which are frozen) bad things can happen if you have a mutable instance (for example &lt;code&gt;Array&lt;/code&gt; or &lt;code&gt;String&lt;/code&gt;) which is suddenly referenced by two instances which both believe they are the sole owner of it. All bad effects can happen including violation of class invariants and the instance state likely becomes inconsistent. Do deal with such cases even for shallow copies such as &lt;code&gt;#clone&lt;/code&gt; and &lt;code&gt;#dup&lt;/code&gt; you need to copy a bit more. Fortunately Ruby provides a hook (&lt;code&gt;#initialize_copy&lt;/code&gt;) which is invoked after the instance has been copied and which can make appropriate adjustments. In our case we only need top copy the &lt;code&gt;Array&lt;/code&gt; of &lt;code&gt;Track&lt;/code&gt; instances because all other fields are immutable:&lt;/p&gt;
&lt;pre class="ruby"&gt; def initialize_copy(source) super @tracks = @tracks.dup end
&lt;/pre&gt;
&lt;p&gt;There is a &lt;a rel="nofollow" target="_blank" href="http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/8a24226a54e79d24/9667453664f2633d#9667453664f2633d"&gt;recent discussion on comp.lang.ruby&lt;/a&gt; that started out with the subject of deep cloning but uncovered some general aspects of cloning.&lt;/p&gt;
&lt;h3&gt;Freezing&lt;/h3&gt;
&lt;p&gt;For freezing similar reasoning applies as for cloning: immutable fields need no additional attention as you cannot change those objects anyway. For others you need to decide how deep you want the freeze to go. In case of class &lt;code&gt;Album&lt;/code&gt; we certainly want to prevent addition of more tracks after an album has been frozen. We also explicitly trigger calculation of &lt;code&gt;duration&lt;/code&gt; so to avoid errors when accessing the duration on the frozen instance; the value cannot change any more anyway. This also makes it important to invoke &lt;code&gt;super&lt;/code&gt; as last method.&lt;/p&gt;
&lt;pre class="ruby"&gt; def freeze # unless frozen? @tracks.freeze duration # end super end
&lt;/pre&gt;
&lt;p&gt;Note that the code is robust against multiple invocations of &lt;code&gt;#freeze&lt;/code&gt; because duration is calculated only once (on first transition from unfrozen to frozen). If you have more complex calculations going on that involve state changes of the instance you should place &lt;code&gt;unless frozen?&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt; around the custom freeze code.&lt;/p&gt;
&lt;h3&gt;Custom Persistence&lt;/h3&gt;
&lt;p&gt;If you want to serialize the complete state of your instance there is nothing more to do: you can simply use &lt;code&gt;Marshal&lt;/code&gt; and &lt;code&gt;YAML&lt;/code&gt; from scratch. However, if you have redundant data (such as field &lt;code&gt;duration&lt;/code&gt; in our case) which you want to omit from the serialization you have to adjust the process yourself.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;Marshal&lt;/code&gt; the proper approach is to use the newer approach which invoves writing methods &lt;code&gt;marshal_dump&lt;/code&gt; and &lt;code&gt;marshal_load&lt;/code&gt;. The former is supposed to return something which is serialized instead of the current instance and the latter is invoked on a new empty object and handed the deserialized object so fields can be initialized properly.&lt;/p&gt;
&lt;pre class="ruby"&gt; def marshal_dump a = (super rescue []) a.push(@title, @interpret, @pause, @tracks) end def marshal_load(dumped) super rescue nil @title, @interpret, @pause, @tracks = *dumped.shift(4) end
&lt;/pre&gt;
&lt;p&gt;For &lt;span class="caps"&gt;YAML&lt;/span&gt; it is even simpler: you basically just need to ensure &lt;code&gt;to_yaml_properties&lt;/code&gt; returns a list of symbols containing only those members that you want serialized.&lt;/p&gt;
&lt;pre class="ruby"&gt; def to_yaml_properties a = super a.delete :@duration a end
&lt;/pre&gt;
&lt;p&gt;Both approaches do have their own strengths: with &lt;code&gt;Marshal&lt;/code&gt; it is easier to completely replace an object with something else. While that can be done with &lt;code&gt;YAML&lt;/code&gt; as well it is not as simple and elegant as in the case of &lt;code&gt;Marshal&lt;/code&gt;. &lt;code&gt;YAML&lt;/code&gt; on the other hand shines because you need to override only a single method.&lt;/p&gt;
&lt;p&gt;One word about the implementations: while these methods could look simpler I picked an approach which also works when inheritance comes into play. You can repeat the pattern of &lt;code&gt;marshal_dump&lt;/code&gt;, &lt;code&gt;marshal_load&lt;/code&gt; and &lt;code&gt;to_yaml_properties&lt;/code&gt; throughout a class hierarchy and still have each method only deal with fields of the class in which it is defined. That makes it easier to deal with later additions or removals of fields in some class in the hierarchy. This is even more so important when dealing with mixin modules, which can happen on a per instance basis (via &lt;code&gt;#extend&lt;/code&gt;).&lt;/p&gt;
&lt;h3&gt;Matching&lt;/h3&gt;
&lt;p&gt;I use the term &amp;#8220;matching&amp;#8221; for the functionality of the three equals operator (&lt;code&gt;===&lt;/code&gt;) and for the matching operator (&lt;code&gt;=~&lt;/code&gt;). The first is used in &lt;code&gt;case&lt;/code&gt; statements and with &lt;code&gt;Array#grep&lt;/code&gt; while the latter is usually used only explicitly.&lt;/p&gt;
&lt;p&gt;The semantic is completely up to the class at hand and there are no general guidelines that could be given. Implement it when it is reasonable for your class. If you want to elegantly use instances of your class in &lt;code&gt;case&lt;/code&gt; expressions you have to implement &lt;code&gt;===&lt;/code&gt; doing something meaningful.&lt;/p&gt;
&lt;pre class="ruby"&gt; # Check whether we have that track or track title by title. def ===(track_or_title) t = (track_or_title.title rescue track_or_title) tracks.find {|tr| t == tr.title} end # Match title against regular expression. def =~(rx) rx =~ title end
&lt;/pre&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;Today we looked at a class which implements various common aspects that you will meet over and over again when coding Ruby. Many of these are in fact present in other programming languages as well: Java has serialization, &lt;code&gt;equals&lt;/code&gt; and hash code calculation. C++ also has an equivalence operator and other operators that can be overloaded to implement ordering etc. You can find the &lt;a rel="nofollow" target="_blank" href="http://gist.github.com/217641"&gt;full code of the class&lt;/a&gt; at github.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyBestPractices/~4/sjcKxZTUrS0" height="1" width="1"/&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/90A7q-9YkPM" height="1" width="1"/&gt;</description>
         <author>shortcutter@googlemail.com (Robert Klemme)</author>
         <guid isPermaLink="false">http://blog.rubybestpractices.com/posts/rklemme/018-Complete_Class.html</guid>
         <pubDate>Sat, 24 Oct 2009 11:05:00 -0700</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyBestPractices/~3/sjcKxZTUrS0/018-Complete_Class.html</feedburner:origLink></item>
      <item>
         <title>Doctor McNinja</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/czOjrSSkPis/doctor-mcninja.html</link>
         <description>&lt;a rel="nofollow" target="_blank" href="http://drmcninja.com/page.php?pageNum=23&amp;issue=15"&gt;&lt;img border="0" src="http://s3.amazonaws.com/giles/mcninja_102309/15p23.png" width="700" height="1018"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the glorious tradition of &lt;a rel="nofollow" target="_blank" href="http://www.scud.com/"&gt;&lt;i&gt;Scud The Disposable Assassin&lt;/i&gt;&lt;/a&gt; and &lt;a rel="nofollow" target="_blank" href="http://goodcomics.comicbookresources.com/2007/04/08/365-reasons-to-love-comics-98/"&gt;&lt;i&gt;Rex Mantooth, Kung-Fu Gorilla&lt;/i&gt;&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-3728750188265700316?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/czOjrSSkPis" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-3728750188265700316</guid>
         <pubDate>Thu, 22 Oct 2009 18:15:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/doctor-mcninja.html</feedburner:origLink></item>
      <item>
         <title>Community Highlights</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/ujCn92-77kE/community-highlights</link>
         <description>&lt;p&gt;I’m always impressed by the continuous flow of innovation from the Rails community. Below are just a few of the highlights from the past month. These stories all came from the &lt;a rel="nofollow" target="_blank" href="http://ruby5.envylabs.com"&gt;Ruby5 Podcast&lt;/a&gt;, which covers all the news from the Ruby and Rails community twice weekly.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img/&gt;&lt;/p&gt; &lt;p&gt;The talented Brazilian guys over at Plataformatec released the &lt;a rel="nofollow" target="_blank" href="http://blog.plataformatec.com.br/2009/10/devise-flexible-authentication-solution-for-rails/"&gt;Devise&lt;/a&gt; gem this week, a new authentication option for your Rails app. Devise is a Rails Engine which sits on top of &lt;a rel="nofollow" target="_blank" href="http://github.com/hassox/warden"&gt;Warden&lt;/a&gt;, a Rack authentication framework. This makes Devise a little more flexible then other Rails authentication libraries, and is definitely worth a look.&lt;/p&gt; &lt;p&gt;On the otherhand if your application needs something more simple, check out Terry Heath’s &lt;a rel="nofollow" target="_blank" href="http://terrbear.org/?p=187"&gt;OpenID Rails Engine&lt;/a&gt;. It should take you about 10 minutes to have an authentication system up and running, and you won’t have to worry about storing your users’ passwords.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Helpful Libraries&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img/&gt;&lt;/p&gt; &lt;p&gt;Thanks to Twitter’s new &lt;a rel="nofollow" target="_blank" href="http://apiwiki.twitter.com/Streaming-API-Documentation"&gt;Streaming &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; we no longer have to poll every 5 seconds to discover new tweets. To start using it today check out the &lt;a rel="nofollow" target="_blank" href="http://www.intridea.com/2009/9/22/tweetstream-ruby-access-to-the-twitter-streaming-api?blog=development"&gt;TweetStream Gem&lt;/a&gt; by Intridea.&lt;/p&gt; &lt;p&gt;With Rails 2.3 we gained the ability to utilize Rack Middleware in our Rails apps. If you don’t know what Rack middleware is yet go &lt;a rel="nofollow" target="_blank" href="http://railslab.newrelic.com/2009/06/05/episode-14-rack-metal"&gt;watch this screencast&lt;/a&gt;. Also, if you’d like some idea on how to use it, check out the &lt;a rel="nofollow" target="_blank" href="http://coderack.org/"&gt;CodeRack Middleware Contest&lt;/a&gt;, a competition to develop more useful and top quality Rack middleware.&lt;/p&gt; &lt;p&gt;A few weeks ago I heard about a javascript library called &lt;a rel="nofollow" target="_blank" href="http://validatious.org/"&gt;Validatious&lt;/a&gt;, which provides unobtrusive javascript for doing client side form validations. I know what you’re thinking though, “if I do both client side and server side validations I’ll have code which duplicates validation logic, and that makes me want to hurl.” Don’t hurl quite yet, first check out Jonas Grimfelt’s &lt;a rel="nofollow" target="_blank" href="http://github.com/grimen/validatious-on-rails/"&gt;Validatious on Rails plugin&lt;/a&gt; which will auto-generate client-side validations using your existing model validations.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Optimization &amp; Performance&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img/&gt;&lt;/p&gt; &lt;p&gt;If your Rails app needs to be able to handle many users uploading files at the same time (think Flickr), then you may want to look at &lt;a rel="nofollow" target="_blank" href="http://modporter.com/"&gt;ModPorter&lt;/a&gt;, an Apache module and Rails plugin created by Pratik Naik and Michael Koziarski. ModPorter parses incoming multipart requests storing the file to disk before it reaches your Rails app, so your Rails processes don’t get held up. We hear there is also support for nginx through a 3rd party module.&lt;/p&gt; &lt;p&gt;When you’re dealing with a database abstraction like ActiveRecord, it’s very important to ensure you’re writing optimal database queries. If you’re worried that your app may be doing more queries then it should or isn’t using eager loading properly, you may want to checkout the &lt;a rel="nofollow" target="_blank" href="http://github.com/flyerhzm/bullet/tree/master"&gt;Bullet plugin&lt;/a&gt; by Richard Huang. Bullet can actually give you growl notifications when you’re missing an :include or should be using a counter cache.&lt;/p&gt; &lt;p&gt;Do you have mongrels that are consuming more then 150 Megs of &lt;span class="caps"&gt;RAM&lt;/span&gt; and you don’t know why? Do you suspect that it might be Ruby leaking all over the place? Then you’d probably be wrong, and Sudara Williams will tell you &lt;a rel="nofollow" target="_blank" href="http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/"&gt;That’s not a Memory Leak, It’s Bloat&lt;/a&gt;. It’s more likely that you’re instantiating thousands of ActiveRecord objects, and Sudara gives you a few suggestions on how to find them.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Cleaning up code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img/&gt;&lt;/p&gt; &lt;p&gt;The presenter pattern is very useful for encapsulating code that may be making your controller look fat, code that may not belong in your model. Dmyto Shteflyuk wrote up a &lt;a rel="nofollow" target="_blank" href="http://kpumuk.info/ruby-on-rails/simplifying-your-ruby-on-rails-code/"&gt;great introduction&lt;/a&gt; to using presenters that’s worth a read if you’re not using them already.&lt;/p&gt; &lt;p&gt;Sending complex data-sets between Ruby and Javascript isn’t always easy. Don’t you wish there was a way to take that Ruby hash and just have it automatically transform into a javascript Map? If yes, then you may want to look at &lt;a rel="nofollow" target="_blank" href="http://github.com/ejschmitt/jsvars"&gt;jsvars&lt;/a&gt; by Erick Schmitt, that’s what it does.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You may already know about &lt;a rel="nofollow" target="_blank" href="http://wiki.opscode.com/display/chef/Home"&gt;Chef&lt;/a&gt; (the system integration framework) but did you know that you can also deploy your Ruby app from chef using &lt;a rel="nofollow" target="_blank" href="http://github.com/ezmobius/chef-deploy"&gt;chef-deploy&lt;/a&gt;? Ezra Zygmuntovich created this gem which allows you to run your chef recipes and then if they pass (and only if they pass) deploy your code in a capistrano like fashion.&lt;/p&gt; &lt;p&gt;If you’re deploying a Rails cluster to Amazon &lt;span class="caps"&gt;EC2&lt;/span&gt;, then another solution aside from using Chef is a gem called &lt;a rel="nofollow" target="_blank" href="http://wiki.github.com/wr0ngway/rubber"&gt;rubber&lt;/a&gt; by Matthew Conway. Rubber keeps deployment a first class citizen, storing all your server configuration files inside your Rails app where they can quickly be tweaked under version control. It comes with many deployment best practices out of the box and can scale up or down at a moments notice.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Media&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img/&gt;&lt;/p&gt; &lt;p&gt;Have you ever wanted to run a Rails tutorial in your city, but you’re discouraged by the thought of writing all the course material? Then you need to checkout the &lt;a rel="nofollow" target="_blank" href="http://wiki.railsbridge.org/projects/railsbridge/wiki/Workshops"&gt;Rails Bridge Open Workshop project&lt;/a&gt; where they have all the course material you’re going to need, for free! You have no excuse not to spread the word of Rails anymore.&lt;/p&gt; &lt;p&gt;Lastly, if you’re looking for additional Rails screencasts, you may want to checkout &lt;a rel="nofollow" target="_blank" href="http://www.teachmetocode.com/"&gt;Teach Me To Code&lt;/a&gt;, and if you’re looking for additional Rails reading, then check out the past few issues of the &lt;a rel="nofollow" target="_blank" href="http://railsmagazine.com/"&gt;Rails Magazine&lt;/a&gt; by Olimpiu Metiu.&lt;/p&gt; &lt;p&gt;Thanks for reading, and if you have any Ruby or Rails news you’d like to spread the word about, please send it into the &lt;a rel="nofollow" target="_blank" href="http://ruby5.envylabs.com/"&gt;Ruby5 podcast&lt;/a&gt; by emailing &lt;a rel="nofollow" target="_blank" href="mailto:ruby5@envylabs.com"&gt;ruby5@envylabs.com&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;small&gt;Image Credit: &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/ecstaticist/2589723846/"&gt;Blue Sky on Rails&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/ecstaticist/2589723846/"&gt;ecstaticist&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/formication/2759753856/"&gt;Analog Solutions 606 Mod&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/formication/2759753856/"&gt;Formication&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/onegoodbumblebee/839927986/"&gt;Rainbow&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/onegoodbumblebee/839927986/"&gt;One Good Bumblebee&lt;/a&gt;. &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/muehlinghaus/241755891/"&gt;Orange County Security&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/muehlinghaus/"&gt;henning&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/smartfat/905145716/"&gt;Broom&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/smartfat/"&gt; fatman&lt;/a&gt; , &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/tochis/1302364866/"&gt;remember&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/tochis/1302364866/"&gt;tochis&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/neeku_sh/2298055066/"&gt;Darwin Was Right About Media Players!&lt;/a&gt; by &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/neeku_sh/"&gt;Neeku&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/ujCn92-77kE" height="1" width="1"/&gt;</description>
         <author>Gregg Pollack</author>
         <guid isPermaLink="false">tag:weblog.rubyonrails.org,2009-10-22:26066</guid>
         <pubDate>Thu, 22 Oct 2009 07:43:00 -0700</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/RidingRails/~3/GNNcbwMab08/community-highlights</feedburner:origLink></item>
      <item>
         <title>Rails Envy Podcast – Episode #097</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/egkGMbcrYMI/episode-097</link>
         <description>Episode #97 Lieutenant Commander Boson reporting for duty. Get the ring tone. The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly diagnose problems with your Rails application [...]</description>
         <guid isPermaLink="false">http://railsenvy.com/?p=3392</guid>
         <pubDate>Thu, 22 Oct 2009 14:32:46 -0700</pubDate>
         <content:encoded><![CDATA[<p><strong>Episode #97</strong> Lieutenant Commander Boson reporting for duty. <a rel="nofollow" target="_blank" href="http://railsenvy.com/assets/2009/10/Reporting-for-duty.m4r">Get the ring tone</a>. </p>
<div class="podcast_sponsor"> <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite" style="border:none;"><img src="http://www.railsenvy.com/assets/2008/9/17/NewRelic-225x119.gif" alt="Sponsored by New Relic" style="border:none;float:right;"/></a><br /> The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly diagnose problems with your Rails application in real time. Check them out at <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite">NewRelic.com</a>. </div>
<p></p> <h2>Show Notes</h2>
<ul>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.infoq.com/news/2009/10/newrelic-java-support" title="RPM For Java">RPM For Java</a></h4>
<p>RPM 2 Now supports Java and Ruby 1.9.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/slact/nginx_http_push_module" title="nginx push module">nginx push module</a></h4>
<p>Nginx HTTP push module &#8211; Turn nginx into a long-polling message queuing<br />
HTTP push server.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://railscasts.com/episodes/184-formtastic-part-1" title="Railscast episode on Formtastic">Railscast episode on Formtastic</a></h4>
<p>Ryan Bates shows how to use Formtastic in your views.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.engineyard.com/blog/2009/the-art-of-library/" title="The Art of the Library">The Art of the Library</a></h4>
<p>Wesley Beary posts on the Engine Yard blog about what makes a good library.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.macruby.org/recipes/tdd-in-objective-c-with-macruby.html" title="TDD in Objective-C with MacRuby">TDD in Objective-C with MacRuby</a></h4>
<p>Joshua Ballanco walks through creating a pig latin translator in objective c using MacRuby to TDD.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://outoftime.github.com/sunspot/" title="Sunspot">Sunspot</a></h4>
<p>Sunspot exposes all of Solr&#8217;s most powerful search features using an API of elegant DSLs. That means robust, flexible fulltext search with no boolean queries and no string programming.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.diegocarrion.com/2009/10/19/rails-deployment-made-easy-with-inploy/" title="Inploy">Inploy</a></h4>
<p>Inploy is another way of doing deployments with different opinions than Capistrano.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://tenderlovemaking.com/2009/10/17/full-text-search-on-heroku/" title="Full Text Search on Heroku using Texticle">Full Text Search on Heroku using Texticle</a></h4>
<p>Aaron Patterson posts on the Tender Lovemaking blog about using Texticle to do full text searching using Postgres</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://tagaholic.me/2009/10/15/boson-and-hirb-interactions.html#github_boson_library" title="Boson">Boson</a></h4>
<p>Gabriel Horner put up a tutorial on using Boson to create commands for watching GitHub repos on your shell.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://banisterfiend.wordpress.com/2009/10/14/the-devil-image-library-for-ruby/" title="DeVIL">DeVIL</a></h4>
<p>DevIL is a fast and lightweight image library that supports the loading and saving of images in almost any graphics format. It also provides some basic image manipulation functionality.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://devver.net/blog/2009/10/ruby-subprocesses-part_3/" title="How to Start Sub-processes part 3">How to Start Sub-processes part 3</a></h4>
<p>Avdi posts on the Devver blog part 3 of starting sub-processes in Ruby.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/alex3t/rails_on_pg" title="rails_on_pg">rails_on_pg</a></h4>
<p>This is timesaver for middle/large Rails application which used PostgreSQL as database. Create/drop Views, Functions, Triggers, Foreign keys in your migrations using ruby syntax.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/jmhodges/mappoint" title="Mappoint/VE">Mappoint/VE</a></h4>
<p>Using the new handsoap gem, Jeff wraps all the nastiness of the VE and Mappoint web SDK SOAP into two very easy to use gems.</p>
<p>
<p><a rel="nofollow" target="_blank" href="http://github.com/jmhodges/mappoint">http://github.com/jmhodges/mappoint</a><br /><a rel="nofollow" target="_blank" href="http://github.com/jmhodges/virtualearth">http://github.com/jmhodges/virtualearth</a></p>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/rails-envy/~4/sNzqmIC66YM" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/egkGMbcrYMI" height="1" width="1"/>]]></content:encoded>
         <enclosure length="16081024" url="http://feedproxy.google.com/~r/rails-envy/~5/tWASp56tn2Y/podcast_97.mp3" type="audio/mpeg" />
      <feedburner:origLink>http://feedproxy.google.com/~r/rails-envy/~3/sNzqmIC66YM/episode-097</feedburner:origLink></item>
      <item>
         <title>Boson: A Next Generation Task Framework for Ruby</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/RxcBAhdCgEs/boson-a-next-generation-task-framework-for-ruby-2657.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/10/boson.png" width="103" height="104" alt="boson.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://tagaholic.me/2009/10/14/boson-command-your-ruby-universe.html"&gt;Boson&lt;/a&gt; is a new command/task framework for Ruby by Gabriel Horner (of &lt;a rel="nofollow" target="_blank" href="http://www.rubyinside.com/hirb-an-easy-to-use-view-framework-for-irb-1853.html"&gt;Hirb&lt;/a&gt; fame). Gabriel seems to be trying to supersede &lt;a rel="nofollow" target="_blank" href="http://rake.rubyforge.org/"&gt;Rake&lt;/a&gt;, the Ruby "make" equivalent, and from first glance Boson seems to provide many benefits from the "reinvent the wheel" philosophy.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/boson-a-next-generation-task-framework-for-ruby-2657.html</guid>
         <pubDate>Thu, 22 Oct 2009 14:02:17 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/boson.png" width="103" height="104" alt="boson.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://tagaholic.me/2009/10/14/boson-command-your-ruby-universe.html">Boson</a> is a new command/task framework for Ruby by Gabriel Horner (of <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/hirb-an-easy-to-use-view-framework-for-irb-1853.html">Hirb</a> fame). Gabriel seems to be trying to supersede <a rel="nofollow" target="_blank" href="http://rake.rubyforge.org/">Rake</a>, the Ruby "make" equivalent, and from first glance Boson seems to provide many benefits from the "reinvent the wheel" philosophy.</p>
<p>Anyone who's built a Rakefile knows it's not the most straightforward syntax, so Boson's approach of using regular Ruby code in the shape of methods added to a module is refreshing. Tasks are methods, methods are tasks - simple. Within these methods, you can use the <code>options</code> helper method and passed arguments to access command line options and other data. Another feature is that while, like with Rake (or Thor), Boson can execute commands from the command line, you can <i>also</i> do so from IRB (the Ruby "console").</p>
<p>It's always a bit of a crapshoot when new tools come out in the Ruby world. Some catch on, some don't. Gabriel has clearly put a lot of thought into Boson, though, so if enough people are fed up with using Rake for command launching, I think it could catch on. <a rel="nofollow" target="_blank" href="http://tagaholic.me/2009/10/14/boson-command-your-ruby-universe.html">Gabriel's blog post</a> outlines what Boson does perfectly. For those ready to shoot down Rake, though, don't forget to read <a rel="nofollow" target="_blank" href="http://www.jbarnette.com/2009/08/27/on-rake.html">John Barnette's awesome, recent <i>On Rake</i> post.</a> Rake's not just about launching tasks - it's a killer dependency resolution engine at heart, and that can result in less code if you approach your problems the right way.</p>
<p><em>(Aside: Sorry for the slow week at Ruby Inside. Six days ago my wife gave birth to our daughter and since she had a C-section, I'm playing housewife. I have quickly discovered if you're a housewife - or husband! - you have about zero hours left at the end of the day to do any other work.. I shall try my best!)</em></p>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://mobileorchard.com/training?inside"><img src="http://www.rubyinside.com/wp-content/uploads/2009/06/rupho.png" width="74" height="40" alt="rupho.png" style="float:left;margin-right:12px;"/></a><em>[ad]</em> <strong>Mobile Orchard's <a rel="nofollow" target="_blank" href="http://mobileorchard.com/training?inside">from Rubyist to iPhone programmer in 2 days class</a></strong> is coming to Portland/OR Nov 12-13 and Los Angeles/CA Nov 19-20. <del>$1200</del> $799 with early reg and "inside" discount code. <em>Note that the early registration price ends tomorrow - 10/23!</em></p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=XIxknT4pR3k:J4rJdwzPf_s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=XIxknT4pR3k:J4rJdwzPf_s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=XIxknT4pR3k:J4rJdwzPf_s:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=XIxknT4pR3k:J4rJdwzPf_s:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=XIxknT4pR3k:J4rJdwzPf_s:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=XIxknT4pR3k:J4rJdwzPf_s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=XIxknT4pR3k:J4rJdwzPf_s:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/XIxknT4pR3k" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/RxcBAhdCgEs" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/XIxknT4pR3k/boson-a-next-generation-task-framework-for-ruby-2657.html</feedburner:origLink></item>
      <item>
         <title>ignoring attempt to close foo with bar</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/qm5K48xEMyM/ignoring-attempt-to-close-foo-with-bar.html</link>
         <description>Given:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/parse_fail_101609/before.jpg"&gt;&lt;br /&gt;&lt;br /&gt;When:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/parse_fail_101609/verbosity.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Then:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://s3.amazonaws.com/giles/parse_fail_101609/after.jpg"&gt;&lt;br /&gt;&lt;br /&gt;It's pretty easy, when running a ton of specs or tests, to see giant strings of dots interrupted by bizarre, enigmatic shit like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;.........................................................................&lt;br /&gt;...............................................................................&lt;br /&gt;.........................................................................ignori&lt;br /&gt;ng attempt to close form with br&lt;br /&gt; opened at byte 12093, line 245&lt;br /&gt; closed at byte 13454, line 282&lt;br /&gt; attributes at open: {"class"=&amp;gt;"new_piece", "action"=&amp;gt;"/p", "method"=&amp;gt;"post", "id"=&amp;gt;"new_piece"}&lt;br /&gt; text around open: "loader'&amp;gt;&amp;lt;/iframe&amp;gt;&amp;#92;n &amp;lt;form action=&amp;#92;"/p&amp;#92;" cl"&lt;br /&gt; text around close: "x&amp;#92;" value=&amp;#92;"1&amp;#92;" /&amp;gt;&amp;#92;n &amp;lt;/br&amp;gt;&amp;#92;n &amp;lt;input nam"&lt;br /&gt;...&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It never tells you where it came from and never interferes with a spec completing. For years I thought it came from Hpricot. Nope. It comes from here:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/vendor/html-scanner/html/document.rb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In this arcane back alley there lurks a parser from the dark days before &lt;a rel="nofollow" target="_blank" href="http://rubyconf2007.confreaks.com/d1t1p5_treetop.html"&gt;Treetop&lt;/a&gt;, just waiting for the day when a lazy blogger will quit talking shit and write some fucking code. (Or, alternatively, waiting for the day when an &lt;i&gt;inspiring&lt;/i&gt; blogger will motivate one of his heroic readers to learn Treetop (which is awesome) and replace the old Rails HTML parser with a better one.) Until that day, you have to deal with its idiosyncrasies, one of which is overzealous warnings about HTML (indeed I think even XHTML) correctness.&lt;br /&gt;&lt;br /&gt;It's easy to kill those warnings. Either use the verbosity special variable &lt;code&gt;$-v&lt;/code&gt; as in this example, or run your test like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ruby -W0 test/whatever_test.rb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Obviously however this breaks with &lt;code&gt;rake test:whatevers&lt;/code&gt;, and I have no idea if it works in any sense at all with RSpec. So the short-term hack: &lt;code&gt;$-v&lt;/code&gt; reassignment FTW.&lt;br /&gt;&lt;br /&gt;(&lt;b&gt;&lt;i&gt;Update:&lt;/b&gt;&lt;/i&gt; of course, the smart thing is to couch these hacks in &lt;code&gt;before(:each)&lt;/code&gt; blocks, for RSpec, or &lt;code&gt;setup&lt;/code&gt; and &lt;code&gt;shutdown&lt;/code&gt; methods, for &lt;code&gt;test/unit&lt;/code&gt;.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-5233914070098541808?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/qm5K48xEMyM" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-5233914070098541808</guid>
         <pubDate>Fri, 16 Oct 2009 10:54:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/ignoring-attempt-to-close-foo-with-bar.html</feedburner:origLink></item>
      <item>
         <title>Rails Envy Podcast – Episode #096</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/Op9mIUgcBhY/episode-096</link>
         <description>Episode #096. Dan Benjamin (Playgrounder, Hivelogic) is back this week. We each had some background noise and an awkward moment. But it&amp;#8217;s funny. The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly [...]</description>
         <guid isPermaLink="false">http://railsenvy.com/?p=3385</guid>
         <pubDate>Fri, 16 Oct 2009 13:39:07 -0700</pubDate>
         <content:encoded><![CDATA[<p><strong>Episode #096.</strong> <a rel="nofollow" target="_blank" href="http://hivelogic.com">Dan Benjamin</a> (<a rel="nofollow" target="_blank" href="http://playgrounder.com">Playgrounder</a>, <a rel="nofollow" target="_blank" href="http://hivelogic.com">Hivelogic</a>) is back this week. We each had some background noise and an awkward moment. But it&#8217;s funny.</p>
<div class="podcast_sponsor"> <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite" style="border:none;"><img src="http://www.railsenvy.com/assets/2008/9/17/NewRelic-225x119.gif" alt="Sponsored by New Relic" style="border:none;float:right;"/></a><br /> The Rails Envy podcast is brought to you this week by NewRelic. NewRelic provides RPM which is a plugin for rails that allows you to monitor and quickly diagnose problems with your Rails application in real time. Check them out at <a rel="nofollow" target="_blank" href="http://www.newrelic.com/RPMlite-rails.html?utm_source=RailsEnvy&#038;utm_medium=banner&#038;utm_campaign=RPMLite">NewRelic.com</a>.
</div>
<p></p>
<p><a rel="nofollow" target="_blank" href="http://media.railsenvy.com/assets/podcasts/podcast_96.mp3"><img src="http://www.railsenvy.com/assets/2007/10/2/icon-speaker.gif" align="left" border="0"/></a></p>
<p> <strong><a rel="nofollow" target="_blank" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=265693109">Subscribe via iTunes</a></strong> &#8211; iTunes only link.<br /> <strong><a rel="nofollow" target="_blank" href="http://media.railsenvy.com/assets/podcasts/podcast_96.mp3">Download the podcast</a> ~14:30 mins MP3</strong>. <br /> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/railsenvy-podcast">Subscribe to feed via RSS</a> by copying the link to your RSS Reader
</p>
<p></p>
<h2>Show Notes</h2>
<ul>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/blog/515-gem-building-is-defunct" title="GitHub Discontinues Publishing Gems">GitHub Discontinues Publishing Gems</a></h4>
<p>Following the move to Rackspace, Github has decided to stop building gems and instead recommends people move to Jeweler or Gemcutter. Old gems will be served for a year.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future/" title="Gem Bundler is the Future">Gem Bundler is the Future</a></h4>
<p>Nick Quaranto walks through how Gem Bundler is going to work on the Litany Against Fear blog. Gem Bundler is going to be the default gem dependency resolver in Rails 3.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.elctech.com/core/ruby-daemons-and-angels" title="Ruby Daemons and Angels">Ruby Daemons and Angels</a></h4>
<p>David Palm has posted a tutorial for working with daemon-kit by Kenneth Kalmer. He walks through created a simple daemon with three worker processes and explains what daemon kit is doing each step of the way.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://highscalability.com/blog/2009/9/22/how-ravelry-scales-to-10-million-requests-using-rails.html" title="Completely False: Rails site serving 10 million page views per day">Completely False: Rails site serving 10 million page views per day</a></h4>
<p>The High Scalability blog has an article up covering Ravelry, a Rails site serving 10 million requests per day from Rails.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/" title="Advanced Messaging and Routing With AMQP">Advanced Messaging and Routing With AMQP</a></h4>
<p>Ilya Grigorik posts a walk through of using AMQP for messaging and its benefits.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://coderack.org/" title="CodeRack Competition">CodeRack Competition</a></h4>
<p>The CodeRack competition is a competition to develop the most useful and top quality Rack middlewares.</p>
<p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/">http://coderack.org/</a><br /><a rel="nofollow" target="_blank" href="http://www.rubyinside.com/21-rack-middlewares-2649.html">http://www.rubyinside.com/21-rack-middlewares-2649.html</a></p>
</li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.avc.com/a_vc/2009/10/hosted-mongo.html" title="Hosted Mongo">Hosted Mongo</a></h4>
<p>Fred Wilson (AVC) posts about a new hosted Mongo DB service.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.metabates.com/2009/10/07/introducing-warp-drive-for-rails/" title="Warp Drive">Warp Drive</a></h4>
<p>Mark Bates, over on the Meta Bates blog, introduces Warp Drive which he describes as &#8220;what Rails Engines wish they could be, and more!&#8221; A Warp Drive is a standard, full featured, Rails application that you can easily bundle up into a Ruby Gem, and include into another Rails app.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://github.com/nesquena/cap-recipes/" title="Cap-recipes">Cap-recipes</a></h4>
<p>Nathan Esquenazi has posted some common cap recipes on his GitHub account. There are recipes for Ruby, Passenger, Memcache, DelayedJob and more.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://justinleitgeb.com/2009/09/iphone-app-development-with-ruby-web-services/" title="iPhone app development with Ruby web services">iPhone app development with Ruby web services</a></h4>
<p>Justin Leitgeib walks through the architecture for his iPhone app SubwayDelay and outlines how he uses Sinatra and Tokyo Cabinet.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://www.travisdunn.com/web-hooks-in-ruby-on-rails" title="Web Hooks in Ruby on Rails">Web Hooks in Ruby on Rails</a></h4>
<p>Travis Dunn takes a look at one way of doing Web Hooks in your Rails app.</p>
<p></li>
<li>
<h4><a rel="nofollow" target="_blank" href="http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails" title="What's New in Edge Rails - 10/12/2009">What&#8217;s New in Edge Rails &#8211; 10/12/2009</a></h4>
<p>Nathan Bibler&#8217;s post about what&#8217;s new in edge rails.</p>
<p></li>
</ul>
<img src="http://feeds.feedburner.com/~r/rails-envy/~4/l2jjYNAmKQE" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/Op9mIUgcBhY" height="1" width="1"/>]]></content:encoded>
         <enclosure length="14188672" url="http://feedproxy.google.com/~r/rails-envy/~5/--HycOdC8ag/podcast_96.mp3" type="audio/mpeg" />
      <feedburner:origLink>http://feedproxy.google.com/~r/rails-envy/~3/l2jjYNAmKQE/episode-096</feedburner:origLink></item>
      <item>
         <title>Marketing Music: Wired Video on Topspin Media</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/lK6czKCdkSM/marketing-music-wired-video-on-topspin.html</link>
         <description>&lt;iframe class="embeddedvideo" src="http://c.brightcove.com/services/viewer/federated_f9/1813626064?isVid=1&amp;publisherID=1564549380" name="flashObj" width="404" height="436" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7602886877359920483-4590731474127678385?l=gilesbowkett.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/lK6czKCdkSM" height="1" width="1"/&gt;</description>
         <author>Giles Bowkett</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7602886877359920483.post-4590731474127678385</guid>
         <pubDate>Wed, 14 Oct 2009 14:27:00 -0700</pubDate>
      <feedburner:origLink>http://gilesbowkett.blogspot.com/2009/10/marketing-music-wired-video-on-topspin.html</feedburner:origLink></item>
      <item>
         <title>21 Rack Middlewares To Turbocharge Your Ruby Webapps</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/7zPnWir5Ua4/21-rack-middlewares-2649.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.rubyinside.com/wp-content/uploads/2009/10/rack-logo.png" width="132" height="68" alt="rack-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;If you've worked with Web apps using Ruby, you might know of &lt;a rel="nofollow" target="_blank" href="http://rack.rubyforge.org/"&gt;Rack&lt;/a&gt;, an interface that sits between Ruby applications and HTTP-speaking Web servers. All of the major Ruby frameworks and server setups use it now, including Rails. Middleware (in Rack) is code that manipulates data going back and forth between your Ruby apps and the HTTP server. You can use middleware to intercept requests, change data in mid-flow, etc. Ryan Bates has a great &lt;a rel="nofollow" target="_blank" href="http://railscasts.com/episodes/151-rack-middleware"&gt;screencast tutorial&lt;/a&gt; if you're new to the concept and want to build your own.&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.rubyinside.com/21-rack-middlewares-2649.html</guid>
         <pubDate>Wed, 14 Oct 2009 10:28:43 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.rubyinside.com/wp-content/uploads/2009/10/rack-logo.png" width="132" height="68" alt="rack-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>If you've worked with Web apps using Ruby, you might know of <a rel="nofollow" target="_blank" href="http://rack.rubyforge.org/">Rack</a>, an interface that sits between Ruby applications and HTTP-speaking Web servers. All of the major Ruby frameworks and server setups use it now, including Rails. Middleware (in Rack) is code that manipulates data going back and forth between your Ruby apps and the HTTP server. You can use middleware to intercept requests, change data in mid-flow, etc. Ryan Bates has a great <a rel="nofollow" target="_blank" href="http://railscasts.com/episodes/151-rack-middleware">screencast tutorial</a> if you're new to the concept and want to build your own.</p>
<p><em>P.S. I know the term "middlewares" sounds borderline insane, but.. it works, you know what it means - yada, yada ;-)</em></p>
<p>In this post, we're going to highlight various Rack middlewares from CodeRack, an on-going Rack middleware competition:</p>
<div style="margin-left:1.2em;">
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/qoobaa/entries/34-karma-chameleon">Karma Chameleon</a> - Focused at Rails developers, Karma Chameleon makes it easy to automatically have file extensions added to all of your app's links and URLs. The humorous motivation for this is so that you can have all your pages use ".aspx" or ".php" extensions to look better in corporate environments. Joking aside, though, this is a cute, well written middleware that's worth looking at.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/jtrupiano/entries/37-rackrewrite">Rack::Rewrite</a> - This middleware is a clever attempt at implementing some of Apache's mod_rewrite functionality in Rack. So far it has support for doing basic rewrites (where URLs are changed mid-request before they hit the backend) and HTTP 301 and 302 redirects.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/tylerhunt/entries/6-canonical-host">Canonical Host</a> - This middleware lets you specify a "canonical hostname" for your application so that any requests to other hostnames are redirected to the same URL on the canonical hostname.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/webficient/entries/38-racktidy">Rack::Tidy</a> - Rack::Tidy cleans up HTML markup by automatically indenting and reformatting content. If you want the output from your Web apps to look clean (especially if you used ERb!), this is worth a try, although it expects valid markup in order to perform its cleaning..</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/MetaSkills/entries/15-zombie-shotgun">Zombie Shotgun</a> - The Zombie Shotgun provides protection against Microsoft Windows zombie attacks! It rejects requests from known "evil" user agents and to known nefarious URL paths. I dare say this is a useful middleware to throw in front of almost anything.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Rasputnik/entries/32-imagesizer">ImageSizer</a> - This middleware adds an HTTP header to the HTTP response when serving images that provides the image's dimensions. It works with both static and dynamically generated images as it get used after your code has provided the image.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Simon/entries/39-firebug-logger">Firebug Logger</a> - Adds logging to your Rack-powered app for use in the <a rel="nofollow" target="_blank" href="http://getfirebug.com/">Firebug</a> Firefox extension or Webkit/Safari's Inspector.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Postmodern/entries/27-enforcessl">EnforceSSL</a> - EnforceSSL lets you ensure that certain paths are only reached securely over HTTP/SSL. If a path denoted as sensitive is requested over regular HTTP, an HTTP 307 redirect will be issued (as an aside, I didn't know about <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection">HTTP 307</a> till now - it's worth reading about).</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/freels/entries/24-inlineuploader">InlineUploader</a> - This middleware sells itself! <i>"Need inline uploads for files like the way GMail handles email attachements? InlineUploader makes it easy! InlineUploader provides a generic file upload endpoint and a way to attach uploaded files to subsequently submitted form data."</i></p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Postmodern/entries/25-referercontrol">RefererControl</a> - A middleware that restricts access to certain paths based on the <code>Referer</code> header. Rather than blocking people who have no referrer, however, this middleware is intended to <i>enforce</i> certain referrers so that users follow the intended flow of a site.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/sam/entries/21-rackgoogleanalytics">Rack::GoogleAnalytics</a> - Rack::GoogleAnalytics automatically adds the Google Analytics tracking code into the HTML pages of your applications. A very simple middleware with code to match (so it's worth looking at if you want to try writing a basic middleware of your own), though I'm not sure whether this sort of thing should be in middleware to start with..</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/julioody/entries/20-racknoie">Rack::NoIE</a> - This middleware is self described as "the coolest Rack middleware ever created." I'm not so sure about that but it <i>does</i> redirect Internet Explorer 6 users away from your Web site. Supposedly the CodeRack site itself uses this middleware!</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Postmodern/entries/26-banhammer">BanHammer</a> - A very simple middleware app that restricts access to specified IPv4/v6 addresses and ranges.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/wbzyl/entries/19-rackcodehighlighter">Rack::Codehighlighter</a> - This middleware automatically applies a code highlighter (of your choice out of CodeRay, Syntax, and Ultraviolet) to any source code embedded within <code>PRE</code> tags in your HTML pages. This could be particularly handy if you're using a Ruby blogging tool that doesn't provide this feature.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/jbr/entries/14-response-time-injector">Response Time Injector</a> - Want the full app response time in the body of your served HTML someplace? This middleware substitutes any reference to "$responsetime" in your response body with the amount of time the response took. Could be handy for debugging. It even lets you specify a format to show the time in.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/drnic/entries/17-probably-versioned">Probably Versioned</a> - A middleware by <a rel="nofollow" target="_blank" href="http://drnicwilliams.com/">Dr Nic Williams</a>! Probably Versioned provides the ability to add a version reference into the URLs/routes for your application without affecting your app.. e.g. <code>www.example.com/v1/some/path.json</code> - As Nic explains, however, this is a precautionary tactic to ensure your users use future-proof URLs rather than a permanent fix as you're on your own when version 2 comes along ;-)</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/cwninja/entries/18-rackproxy">Rack::Proxy</a> - Provides proxying abilities. For example, you could pass remote API calls through your own app/URL scheme. This is one of the middlewares that could probably go on to be a bigger deal with some serious extensions.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/laktek/entries/11-server-proxy">Server Proxy</a> - From the name, Server Proxy sounds similar to Rack::Proxy, but Server Proxy is specifically for bypassing cross-domain access restrictions (from AJAX, say). It provides a simple way to proxy requests to remote APIs through your existing site, e.g. <code>http://localhost:3000/server_proxy?service_url=twitter.com&amp;service_path=statuses/public_timeline.xml</code> - you'd need to beware of the security issues with this though!</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/Gaius/entries/7-casrack-the-authenticator">Casrack the Authentication</a> - A middleware that provides <a rel="nofollow" target="_blank" href="http://www.jasig.org/cas">CAS</a> (Central Authentication Service) support. CAS is a centralized authentication system initially developed by Yale. I'm not aware of CAS but it looks like a well put together middleware to solve a specific problem. Note: You'll need to be up to speed with <a rel="nofollow" target="_blank" href="http://gemcutter.org/">Gemcutter</a> to install it as a gem but <a rel="nofollow" target="_blank" href="http://github.com/gcnovus/casrack_the_authenticator">the code is on GitHub too</a>.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/luigi/entries/4-rackchromeframe">Rack::ChromeFrame</a> - Recently Google <a rel="nofollow" target="_blank" href="http://code.google.com/chrome/chromeframe/">released a plugin</a> for Internet Explorer that provides its own Chrome browser's functionality within existing IE windows. This middleware makes the pages served demand the use of Google Chrome Frame on supported browsers.</p>
<p><a rel="nofollow" target="_blank" href="http://coderack.org/users/maciej/entries/2-rakismet-akismet-client">Rakismet</a> - Rakismet can pipe the comments your site received through the Akismet comment spam checker. There's no documentation here yet, but the code provides a nice example of interacting with Akismet that could be useful even if you don't use the middleware.</p>
</div>
<p style="background-color:#ffd;padding:8px;font-family:verdana;font-size:12px;"><a rel="nofollow" target="_blank" href="http://mobileorchard.com/training?inside"><img src="http://www.rubyinside.com/wp-content/uploads/2009/06/rupho.png" width="74" height="40" alt="rupho.png" style="float:left;margin-right:12px;"/></a><em>[ad]</em> <strong>Mobile Orchard's <a rel="nofollow" target="_blank" href="http://mobileorchard.com/training?inside">from Rubyist to iPhone programmer in 2 days class</a></strong> is coming to Portland/OR Nov 12-13 and Los Angeles/CA Nov 19-20. <del>$1200</del> $799 with early reg and "inside" discount code.</p>
<div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=nBom6daZqy4:JmmoWXic_9c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RubyInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=nBom6daZqy4:JmmoWXic_9c:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=nBom6daZqy4:JmmoWXic_9c:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=nBom6daZqy4:JmmoWXic_9c:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=nBom6daZqy4:JmmoWXic_9c:3H-1DwQop_U" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RubyInside?a=nBom6daZqy4:JmmoWXic_9c:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RubyInside?i=nBom6daZqy4:JmmoWXic_9c:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RubyInside/~4/nBom6daZqy4" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/7zPnWir5Ua4" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RubyInside/~3/nBom6daZqy4/21-rack-middlewares-2649.html</feedburner:origLink></item>
      <item>
         <title>What's New in Edge Rails</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/FnxlRAuuIBo/what-s-new-in-edge-rails</link>
         <description>&lt;p&gt;&lt;img height="100" alt="" width="450"/&gt;&lt;/p&gt;&lt;p&gt;So, Edge Rails is still chugging right along. There are new and interesting fixes, changes, and refactors going on all of the time. So, lets take a look at just a few that've gone in since the last post &lt;small&gt;(it's been a while, I know, I'm sorry!)&lt;/small&gt;.&lt;/p&gt; &lt;h2&gt;ActionView and Helpers&lt;/h2&gt; &lt;p&gt;XSS escaping is now &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/9415935902f120a9bac0bfce7129725a0db38ed3"&gt;enabled by default&lt;/a&gt;. This means that if you want to explicitly output HTML to your views, you'll probably have to mark it as &lt;code&gt;html_safe!&lt;/code&gt; before sending it through.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;&amp;lt;%= 'my &amp;lt;a href="http://www.rubyonrails.org"&amp;gt;safe&amp;lt;/a&amp;gt; string'.html_safe! %&amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Many of the built-in helpers have been updated for this change and if you see an issues with the Rails helpers being incorrectly sanitized, you should create a new ticket.&lt;/p&gt; &lt;p&gt;&lt;code&gt;distance_of_time_in_words&lt;/code&gt; has gained '&lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/8ef1cd9733cd12fc4e5ea25c149956a33fdffa70"&gt;over&lt;/a&gt;', 'about', and '&lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/c9318e9010712aeae33b1dd0e8bed4795ae37caf"&gt;almost&lt;/a&gt;' keywords, thanks to Jay Pignata and John Trupiano. This provides you with an improved level of granularity when approximating the amount time passed. So, instead of just "2 years ago", it can now also report "almost 2 years ago," "about 2 years ago," and "over 2 years ago," depending on the proximity to being exactly 2 years old.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;assert_equal "almost 2 years", distance_of_time_in_words(from, to + 2.years - 3.months + 1.day)
assert_equal "about 2 years", distance_of_time_in_words(from, to + 2.years + 3.months - 1.day)
assert_equal "over 2 years", distance_of_time_in_words(from, to + 2.years + 3.months + 1.day)
assert_equal "over 2 years", distance_of_time_in_words(from, to + 2.years + 9.months - 1.day)
assert_equal "almost 3 years", distance_of_time_in_words(from, to + 2.years + 9.months + 1.day)
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The HTML form helper, &lt;code&gt;fields_for&lt;/code&gt; - generally used for nesting additional model forms - now allows for &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/1b78e9bba3bd39c4669ff6c640b7df069185c22c"&gt;explicit collections&lt;/a&gt; to be used, thanks to Andrew France. So, instead of just including all of your blog.posts, you should have it only display your published blog.posts, for example. Or:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;&amp;lt;% form_for @person, :url =&amp;gt; { :action =&amp;gt; "update" } do |person_form| %&amp;gt; ... &amp;lt;% person_form.fields_for :projects, @active_projects do |project_fields| %&amp;gt; Name: &amp;lt;%= project_fields.text_field :name %&amp;gt; &amp;lt;% end %&amp;gt;
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;&lt;strong&gt;API Change&lt;/strong&gt; for &lt;code&gt;content_tag_for&lt;/code&gt;: The third argument - being the optional CSS prefix - will now also &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/3b6bdfc1050a83c6339421257d60a6163bf3c687"&gt;affect the generated CSS class&lt;/a&gt;. This prefix will now be appended to the generated element's &lt;code&gt;CLASS&lt;/code&gt; attribute.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;&amp;lt;%= content_tag_for(:li, @post, :published) %&amp;gt;
# =&amp;gt; &amp;lt;li id="published_post_123" class="published_post"&amp;gt;...&amp;lt;/li&amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;ActiveResource and ActiveRecord&lt;/h2&gt; &lt;p&gt;Taryn East has &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/f4f68885efd0e1135217433cafd368902b1fd58a"&gt;added update_attribute(s)&lt;/a&gt; methods to ActiveResource. These methods act very similarly to the ActiveRecord methods we already know and love.&lt;/p&gt; &lt;p&gt;Building or creating an object through a &lt;code&gt;has_one&lt;/code&gt; association that contains conditionals will now &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/4168f876238982d0d584006f50188071928a8b7f"&gt;automatically append those conditions&lt;/a&gt; to the newly created object, thanks to Luciano Panaro.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;class Blog has_author :commit_author, :class_name =&amp;gt; 'Author', :conditions =&amp;gt; {:name =&amp;gt; "Luciano Panaro"}
end @blog.build_commit_author
# =&amp;gt; #&amp;lt;Author name: "Luciano Panaro" ... &amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Pratik Naik added a new option to ActiveRecord's &lt;code&gt;accepts_nested_attributes_for&lt;/code&gt; to &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/68d416a58fb5a47df2365c4f3a6da9f8db5c7cb7"&gt;:limit&lt;/a&gt; the number of records that are allowed to be processed. Also, while we're covering &lt;code&gt;accepts_nested_attributes_for&lt;/code&gt;, José Valim as &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/3091252abaafd15bc085f0be2b17829bebb6522c"&gt;renamed the &lt;code&gt;_delete&lt;/code&gt; option&lt;/a&gt; to &lt;code&gt;_destroy&lt;/code&gt; to better follow what is actually occurring. A deprecation warning has been added to &lt;code&gt;_delete&lt;/code&gt;, for the time being.&lt;/p&gt; &lt;p&gt;Jacob Burkhart updated the new &lt;code&gt;autosave&lt;/code&gt; option in Rails 2.3 to allow for an &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/6cc0b9638fbb6ede3c46b51d7dab17881416014c"&gt;:autosave =&amp;gt; false&lt;/a&gt;, which will disallow saving of associated objects, even when they are &lt;code&gt;new_record?&lt;/code&gt;s.&lt;/p&gt; &lt;h2&gt;Some Internals&lt;/h2&gt; &lt;p&gt;Previously, &lt;code&gt;CDATA&lt;/code&gt; elements could be ignored when converting from XML to a Hash, so now, thanks to John Pignata, &lt;code&gt;Hash#from_xml&lt;/code&gt; will now &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/0d762646c4285437c12ddec9d0938c4ff1c3ef42"&gt;properly parse and include CDATA elements&lt;/a&gt; values.&lt;/p&gt; &lt;p&gt;Josh Peek has &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/52aeb8d2e72223f9b40b0193c151c252a3f4fb09"&gt;relocated global exception handling&lt;/a&gt; into ActionDispatch::Rescue. So, this is now being handled at the Rack middleware level.&lt;/p&gt; &lt;p&gt;And finally, Yehuda Katz and Carl Lerche began work on a &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/4129449594ad3d8ff2f8fb4836104f25406a104f"&gt;Rails::Application&lt;/a&gt; object to better encapsulate some of the application start up and configuration details. Also, a good bit of &lt;a rel="nofollow" target="_blank" href="http://github.com/rails/rails/commit/992c2db76cd6cd6aa9a6ba3711a6ea1ad8910062"&gt;initialization&lt;/a&gt; has now gone on to move into this new object.&lt;/p&gt; &lt;p&gt;Remember, if you prefer to have a shorter audio summary of some of this content and more, you should check out the &lt;a rel="nofollow" target="_blank" href="http://ruby5.envylabs.com/"&gt;Ruby5 podcast&lt;/a&gt; over at Envy Labs; it's released every Tuesday and Friday with the latest news in the Ruby and Rails community.&lt;/p&gt; &lt;p&gt;&lt;small&gt;Photo: &lt;a rel="nofollow" target="_blank" href="http://www.flickr.com/photos/briantaylor/357204888"&gt;Clock Tower&lt;/a&gt; by Brian Taylor&lt;/small&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/FnxlRAuuIBo" height="1" width="1"/&gt;</description>
         <author>Nathaniel Bibler</author>
         <guid isPermaLink="false">tag:weblog.rubyonrails.org,2009-10-12:26044</guid>
         <pubDate>Mon, 12 Oct 2009 14:40:00 -0700</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/RidingRails/~3/E2EUYHFeS1g/what-s-new-in-edge-rails</feedburner:origLink></item>
      <item>
         <title>Spree: Open Source E-commerce for Rails Apps Gets Even Better</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/HZJHM4D0Jfs/342-spree-open-source-e-commerce-for-rails-apps-is-even-better.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/spree-new-logo.png" width="135" height="72" alt="spree-new-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;Back in September 2008, &lt;a rel="nofollow" target="_blank" href="http://www.railsinside.com/tools/104-spree-an-open-source-rails-e-commerce-platform.html"&gt;we posted about Spree&lt;/a&gt;, an open source Rails e-commerce platform that was then in its infancy. Now, however, &lt;a rel="nofollow" target="_blank" href="http://spreecommerce.com/"&gt;Spree&lt;/a&gt; is truly flying. New versions are coming out frequently and there are &lt;a rel="nofollow" target="_blank" href="http://spreecommerce.com/overview/showcase"&gt;more and more established sites using&amp;#8230;&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/plugins/342-spree-open-source-e-commerce-for-rails-apps-is-even-better.html</guid>
         <pubDate>Mon, 12 Oct 2009 09:50:00 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/spree-new-logo.png" width="135" height="72" alt="spree-new-logo.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>Back in September 2008, <a rel="nofollow" target="_blank" href="http://www.railsinside.com/tools/104-spree-an-open-source-rails-e-commerce-platform.html">we posted about Spree</a>, an open source Rails e-commerce platform that was then in its infancy. Now, however, <a rel="nofollow" target="_blank" href="http://spreecommerce.com/">Spree</a> is truly flying. New versions are coming out frequently and there are <a rel="nofollow" target="_blank" href="http://spreecommerce.com/overview/showcase">more and more established sites using it</a> to provide e-commerce functionality. Spree also just <a rel="nofollow" target="_blank" href="http://spreecommerce.com/blog/2009/10/12/spree-makes-it-into-githubs-top-ten/">made it into GitHub's top 10 forked projects</a> this week.</p>
<p>So why post about it again here? Well, our readership has grown a lot in the last year and Spree is a strong open source project that's both incredibly useful and worth knowing about in case you have a need for it in the future.</p>
<p>For those who are totally new to Spree, there's <a rel="nofollow" target="_blank" href="http://demo.spreecommerce.com/">a live demo</a> at <a rel="nofollow" target="_blank" href="http://demo.spreecommerce.com/"><i>http://demo.spreecommerce.com/</i></a> and an extensive <a rel="nofollow" target="_blank" href="http://spreecommerce.com/features">list of features here</a>. Spree has come a long way in the last year - give it a look!</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Spree%3A+Open+Source+E-commerce+for+Rails+Apps+Gets+Even+Better+http://bit.ly/Ez81R" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Spree%3A+Open+Source+E-commerce+for+Rails+Apps+Gets+Even+Better+http://bit.ly/Ez81R" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uXa575XjvwQ:2VvySNCdP9Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uXa575XjvwQ:2VvySNCdP9Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uXa575XjvwQ:2VvySNCdP9Y:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uXa575XjvwQ:2VvySNCdP9Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uXa575XjvwQ:2VvySNCdP9Y:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uXa575XjvwQ:2VvySNCdP9Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uXa575XjvwQ:2VvySNCdP9Y:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uXa575XjvwQ:2VvySNCdP9Y:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uXa575XjvwQ:2VvySNCdP9Y:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/uXa575XjvwQ" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/HZJHM4D0Jfs" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/uXa575XjvwQ/342-spree-open-source-e-commerce-for-rails-apps-is-even-better.html</feedburner:origLink></item>
      <item>
         <title>There is no magic, there is only awesome (Part 3)</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/j4KUl0KZscc/there-is-no-magic-there-is-only-awesome-part-3</link>
         <description>&lt;p&gt;&lt;em&gt;This is the third article in a series titled “There is no magic, there is only awesome.” The &lt;a rel="nofollow" target="_blank" href="http://weblog.jamisbuck.org/2009/9/17/there-is-no-magic-there-is-only-awesome-part-1"&gt;first article&lt;/a&gt; introduced the “four cardinal rules of awesomeness”. The &lt;a rel="nofollow" target="_blank" href="http://weblog.jamisbuck.org/2009/9/25/there-is-no-magic-there-is-only-awesome-part-2"&gt;second article&lt;/a&gt; discussed knowing your tools.&lt;/em&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Opening A.—Pass index finger of right hand distal to the little-finger loop, and passing round the ulnar side of that loop, bring it up from the proximal side into the thumb loop, and with the index finger pointing downard, take up with the back of the index finger the radial thumb string and return.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Even to string figure adepts, it can be challenging to parse those instructions. That paragraph is an extract from the instructions for an Eskimo Caribou string figure, written in 1903 by Dr. &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Alfred_Cort_Haddon"&gt;A. C. Haddon&lt;/a&gt; and published in &lt;em&gt;American Anthropologist&lt;/em&gt; (you can read the whole thing on &lt;a rel="nofollow" target="_blank" href="http://books.google.com/books?id=vlkWAAAAMAAJ&amp;amp;#38;pg=PA216"&gt;Google Books&lt;/a&gt; if you’re really feeling sleepless).&lt;/p&gt; &lt;p&gt;The &lt;a rel="nofollow" target="_blank" href="http://books.google.com/books?id=yRP0I0s8QdEC&amp;amp;#38;pg=PA146"&gt;original string figure notation&lt;/a&gt; described by Drs. &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/W._H._R._Rivers"&gt;Rivers&lt;/a&gt; and Haddon in 1902 used very technical anatomical terms to identify each finger, and the location of the string on each finger. As in that paragraph, you’ll see terms such as &lt;em&gt;proximal&lt;/em&gt; (closer to the base of the finger), &lt;em&gt;distal&lt;/em&gt; (closer to the finger tip), &lt;em&gt;radial&lt;/em&gt; (closer to the thumb), and &lt;em&gt;ulnar&lt;/em&gt; (closer to the little finger). These and other terms are used to describe locations relative to the fingers, as well as to name specific strings (“radial thumb string”) on the hand.&lt;/p&gt; &lt;p&gt;The strength of this notation is that it is very precise, and can be used with little need of external illustration. However, it is also fairly verbose, making it hard to parse without very focused attention and (potentially) multiple read-throughs. Also, the use of the technical anatomical terms makes the descriptions hard for novices to pick up.&lt;/p&gt;
&lt;p&gt;To make &lt;a rel="nofollow" target="_blank" href="http://www.stringfigures.info/cfj/"&gt;her book&lt;/a&gt; more accessible to a larger audience, &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Caroline_Furness_Jayne"&gt;Caroline Furness Jayne&lt;/a&gt; (or “CFJ”) modified this notation so that “proximal” and “distal” were replaced with “lower” and “upper”, and “radial” and “ulnar” were replaced with “near” and “far”. (She left dorsal/palmar alone, for the most part, although in some figures she referred to the “front” or “back” of a hand or finger.) Her modifications introduced ambiguity, though, and required even more verbosity and copious illustrations to counter.&lt;/p&gt; &lt;p&gt;For example, she described the same movements (from the Eskimo Caribou figure) as follows:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;First: Opening A. (The left palmar string &lt;em&gt;must&lt;/em&gt; be taken up first). Second: Bend the right index away from you over the right far index string and over both strings of the right little finger loop and down on the far side of the right far little finger string; then draw toward you on the near side of the right index both right little finger strings and the right far index string, allowing the right near index string to slip over the knuckle of the index and to the far side of the finger. Now put the right index (still bent and holding the strings on its near side) from below into the thumb loop, by pressing the near side of the bent index toward you against the right far thumb string, and putting the tip down toward you over and on the near side of the right near thumb string. Pick up, on the far side of the bent right index, this right near thumb string, and lift it and the former near index string up by turning the index away from you and up to its usual position.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;(I ommitted the illustrations for brevity’s sake, but if you want to see them, you can view the complete instructions &lt;a rel="nofollow" target="_blank" href="http://www.stringfigures.info/cfj/cariboo.html"&gt;here&lt;/a&gt;.)&lt;/p&gt; &lt;p&gt;The lack of technical terms is definitely an improvement, but the (significantly!) greater quantity of text means that the instructions require even &lt;em&gt;more&lt;/em&gt; effort to parse. To combat this, the &lt;a rel="nofollow" target="_blank" href="http://www.isfa.org"&gt;&lt;span class="caps"&gt;ISFA&lt;/span&gt;&lt;/a&gt; (International String Figure Association), in its &lt;a rel="nofollow" target="_blank" href="http://www.isfa.org/isfa3.htm"&gt;publications&lt;/a&gt;, uses an abbreviated notation, numbering the fingers 1 (thumb) through 5 (little finger), and using other one-letter abbreviations for right (R), left (L), near (n), and far (f). They retain the use of proximal/distal in some cases, but also use “below”/”above” and “lower”/”upper” where it isn’t too ambiguous. The &lt;span class="caps"&gt;ISFA&lt;/span&gt; notation reduces the above text to this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Opening A. R2 rotates away from you, over all strings, around 5f, then back under the strings, and proximally enters R1 loop. R2 hooks up R1n and retraces its path. (from &lt;a rel="nofollow" target="_blank" href="http://www.isfa.org/arctic/30.htm"&gt;http://www.isfa.org/arctic/30.htm&lt;/a&gt;)&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;This is much more concise, and is easier to scan. It settles on &lt;a rel="nofollow" target="_blank" href="http://www.isfa.org/arctic/n.htm"&gt;standard meanings&lt;/a&gt; of terms like “rotate away”, “hook up”, and “release”, which reduces verbosity, but also requires the reader to know how those words are defined in this context. Also, it is concise at the cost of specificity; there is often ambiguity that must either be resolved at “runtime”, or be countered with more verbose descriptions.&lt;/p&gt; &lt;p&gt;Two other notable attempts at describing string figures are &lt;a rel="nofollow" target="_blank" href="http://www.alysion.org/figures/notation.htm"&gt;&lt;span class="caps"&gt;SFN&lt;/span&gt;&lt;/a&gt; (String Figure Notation) by Eric Lee, and &lt;a rel="nofollow" target="_blank" href="http://home.p07.itscom.net/nenemei/v2/index.html"&gt;Mizz Code&lt;/a&gt; by Kyoichi Miyazaki (“Mizz”). The former is a variation on &lt;span class="caps"&gt;ISFA&lt;/span&gt; notation, employing various abbreviations to reduce verbosity, while the latter is an entirely new take on describing string figures that simply denotes how the string needs to move, without specifying finger movements at all. Both of these are much more concise than any of the others described above, but are also quite specialized and require some study before you can really make heads or tails of them.&lt;/p&gt; &lt;p&gt;So, that gives &lt;em&gt;five&lt;/em&gt; different ways of describing string figure construction! How do you choose which one to use? Ultimately, the &lt;span class="caps"&gt;ISFA&lt;/span&gt; notation is the most widly used, as well as the verbose prose of &lt;span class="caps"&gt;CFJ&lt;/span&gt; (thanks to the popularity of her book). But a string figurist will benefit from knowing as many ways to describe a figure as possible, because each notation’s strategies reveal different insights into the techniques, and has different strengths in different situations. &lt;span class="caps"&gt;CFJ&lt;/span&gt;’s prose (if accompanied by a modicum of illustration) is good for beginners, because it does not require any specialized knowledge. The &lt;span class="caps"&gt;ISFA&lt;/span&gt; notation is a good general tool that allows people to quickly learn figures, with only a little training. And notations like &lt;span class="caps"&gt;SFN&lt;/span&gt; are great for quickly jotting down a figure as you learn it from someone else, or as you invent it yourself.&lt;/p&gt; &lt;p&gt;Really, as a string figurist, the more string figure languages you know, the more power you have.&lt;/p&gt; &lt;h2&gt;Computer Languages&lt;/h2&gt; &lt;p&gt;Thus, the second rule of awesomeness: &lt;em&gt;know thy languages&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;As a computer programmer, you’re faced with an &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/List_of_programming_languages"&gt;even greater flood of languages&lt;/a&gt; than string figurists are. Even if you use primarily a single language, you might be surprised at how many incidental languages you use on a regular basis. Are you a web developer? Odds are that you dabble in both &lt;span class="caps"&gt;HTML&lt;/span&gt; and &lt;span class="caps"&gt;CSS&lt;/span&gt;, and probably Javascript, too. &lt;span class="caps"&gt;SQL&lt;/span&gt; is almost mandatory for most interactive systems. Furthermore, if you do anything at all in a text console, you probably know a little bit of shell script. Building your application and deploying it to production probably require a specialized &lt;span class="caps"&gt;DSL&lt;/span&gt; or two as well. And regular expressions are practically everywhere these days.&lt;/p&gt; &lt;p&gt;Despite there being more computer languages than string figure languages, the advice is the same: &lt;em&gt;the more you know, the more power you have&lt;/em&gt;. And “knowing” is not merely “knowing about”. Look back at the four “knowledge gauge” questions from &lt;a rel="nofollow" target="_blank" href="http://weblog.jamisbuck.org/2009/9/25/there-is-no-magic-there-is-only-awesome-part-2#article_body"&gt;Part 2&lt;/a&gt;:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;What does this do best?&lt;/li&gt; &lt;li&gt;What does this do worst?&lt;/li&gt; &lt;li&gt;Why should I use this in particular?&lt;/li&gt; &lt;li&gt;When was the last time I learned something new about this?&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;Take a minute and try to list all the languages you use on a regular basis. This includes even languages you use only tangentially, like &lt;span class="caps"&gt;SQL&lt;/span&gt;, regular expressions, Javascript, &lt;span class="caps"&gt;HTML&lt;/span&gt;, XML, &lt;span class="caps"&gt;CSS&lt;/span&gt;, and so forth. Try to answer each of the four gauge questions for every language in your list. If you struggle to answer any of them, consider that a jumping off point for further investigation.&lt;/p&gt; &lt;p&gt;If you aren’t really sure what a particular language is best or worst at, it may be because you aren’t familiar with enough programming languages to compare it with. You’ve probably heard the old saying, “to a man with a hammer, everything looks like a nail,” and that surely applies here. You may be at the pinnacle of guruship in your chosen programming language, but if that’s all you know, then you can’t give worthwhile advice on when that language should be used. You’re living in a house with no windows, and no matter how well you know that house, and no matter how big it is, you can never tell callers what’s just outside.&lt;/p&gt; &lt;p&gt;It’s been suggested by &lt;a rel="nofollow" target="_blank" href="http://pragprog.com/titles/tpp/the-pragmatic-programmer"&gt;people much smarter than me&lt;/a&gt; that you should learn a new programming language every year. I can’t recommend this enough. I won’t deny that there have been years where I haven’t followed this advice, but every time I’ve spent a few months tinkering with a new programming language I’ve come away with my eyes open that much wider. It’s like having a lever, and finally discovering a fulcrum to use it with.&lt;/p&gt; &lt;h2&gt;Learning a new language&lt;/h2&gt; &lt;p&gt;Now, it’s all well and good to say “learn a new programming language”. It’s also remarkably easy to download the development kit for &lt;a rel="nofollow" target="_blank" href="http://www.ruby-lang.org/en/downloads/"&gt;Ruby&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://python.org/download/"&gt;Python&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://java.com/en/download/"&gt;Java&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://ftp.sunet.se/pub//lang/erlang/download.html"&gt;Erlang&lt;/a&gt;, &lt;a rel="nofollow" target="_blank" href="http://hackage.haskell.org/platform/"&gt;Haskell&lt;/a&gt;, or just about any other language you want to learn. And once you’ve started learning a language, the learning effect tends to snowball, so that’s not really a challenge either.&lt;/p&gt; &lt;p&gt;What’s hardest (for me, at least) is discovering a good “entry vector” into the language.&lt;/p&gt; &lt;p&gt;Here’s what works for me:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Find the documentation for the language. Look for a page or two that give you a glimpse into the syntax. Not every language provides an introduction like this, but when you can find one, it’s a great way to get a “feel” for how the language expresses things.&lt;/li&gt; &lt;li&gt;Next, look for a “hello world” example, or tutorial. Generally, these things are useless, but as an introduction to the language, it’s a good way to see what’s involved in a fully functional program. How much boilerplate does a program need? How is a program compiled or interpreted, and run? The “hello world” example is also a good place to start experimenting. As trivial as it sounds, try changing the string that gets printed. Try displaying an additional string. Hold on to this file; you can use it to play with as you progress through the next steps.&lt;/li&gt; &lt;li&gt;Now, look deeper. Try and find a more advanced tutorial. Look for examples that demonstrate writing procedures, objects, conditional branching, and so forth. They will almost certainly include concepts unique to the language, which will be new to you, but that’s the point! Work through those tutorials. Find additional documentation to clarify concepts that are unfamiliar to you. Go beyond the tutorials and experiment with these concepts, to solidify their meaning in your mind.&lt;/li&gt; &lt;li&gt;Once you’ve finished some tutorials, look for actual production code written in that language. &lt;a rel="nofollow" target="_blank" href="http://www.github.com"&gt;GitHub&lt;/a&gt; is a fantastic resource for this kind of exploration, as are similar sites like &lt;a rel="nofollow" target="_blank" href="http://sourceforge.net/"&gt;SourceForge&lt;/a&gt;. Individual languages may have their own project “forges”, like &lt;a rel="nofollow" target="_blank" href="http://rubyforge.org"&gt;RubyForge&lt;/a&gt;. Just find a project that looks interesting and &lt;em&gt;read the code&lt;/em&gt;. This kind of “code spelunking” in a new language will give you valuable experience with the practical, day-to-day idioms used by experienced programmers, and will also give you solid examples of the concepts you read about and played with in the tutorials. (I intend to talk a lot more about “code spelunking” in the fourth article in this series.)&lt;/li&gt; &lt;li&gt;Lastly, think of a program or library you’d like to write, and &lt;em&gt;write it&lt;/em&gt; in this new language. Nothing else you do will teach you the language as well as this step. You’re going to run into road blocks, but don’t get discouraged. If you need to do something that wasn’t covered in any of the tutorials, consider it an opportunity to read more documentation! Look at other projects and see how they accomplished similar tasks. Your first couple of programs in the new language will be very “unidiomatic”, but that’s how you start. Find someone experienced in the language and ask them to review your program, and point out better ways to do it.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;By the end of the process, you won’t necessarily be an expert in the language, but you’ll know enough to compare it to other languages you know. You’ll also know whether you enjoyed the language enough to keep playing with it. Who knows? Maybe you’ll discover your new favorite language this way! I certainly wasn’t expecting to fall in love with &lt;a rel="nofollow" target="_blank" href="http://ruby-lang.org"&gt;Ruby&lt;/a&gt; when I started tinkering with it, but here I am, eight years later, and still tinkering.&lt;/p&gt; &lt;h2&gt;Learning more&lt;/h2&gt; &lt;p&gt;If you are already familiar with a language, the steps described above are not going to be as effective for increasing your knowledge. You’re probably in a rut, comfortable with what you know and able to accomplish almost everything you need to with it. That’s no excuse to stop learning, though; if you push yourself and learn even just a little more, you’ll almost certainly be surprised how useful that extra knowledge can be, even on a daily basis.&lt;/p&gt; &lt;p&gt;But how do you push yourself out of your comfort zone? This is probably harder than learning a new language, in many ways, because when you’re in the rut, it’s hard to see what the benefit of more knowledge would be.&lt;/p&gt; &lt;p&gt;One way is to find a good reference for the language, electronic or otherwise. Spend a little time each day (even just 15 minutes!) skimming that reference, looking for something you didn’t know before, or weren’t as familiar with as you would like to be. Once you find something, spend a little time playing with it. Find a way to add it to a project you’re working on. Blog about it. Tweet it. Just &lt;em&gt;do something&lt;/em&gt; with it! Then, try to do something with it on a regular basis, so it stays in your memory.&lt;/p&gt; &lt;p&gt;Another technique is to find a library or program that uses concepts that are new to you. Unfamiliar with socket programming? Look for a networking library to read through. Want to be more familiar with threading techniques? Look for something that does a lot of parallel processing. Even if you have no specific learning goal, a good starting point is to select a programmer you admire, and find projects that they’ve worked on. You’re sure to find idioms, tips, tricks, and language features you’ve not seen before.&lt;/p&gt; &lt;p&gt;Ultimately, though, the game is not about “who can learn the most programming languages”. No one is keeping score. There is no tally scratched into the bedpost of your career, here. The goal is to educate your opinions. &lt;em&gt;Awesome people have opinions born by experience.&lt;/em&gt; You want to be awesome? Then you need to be willing to keep pushing the envelope of your knowledge. Never settle for what you already have, even if you’re otherwise content. Keep looking. Lift the curtain on the unknown. If you want to be awesome, you need to explore.&lt;/p&gt; &lt;p&gt;&lt;em&gt;Know thy languages.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/j4KUl0KZscc" height="1" width="1"/&gt;</description>
         <author>Jamis</author>
         <guid isPermaLink="false">tag:weblog.jamisbuck.org,2009-10-09:7794</guid>
         <pubDate>Fri, 09 Oct 2009 09:48:00 -0700</pubDate>
      <feedburner:origLink>http://weblog.jamisbuck.org/2009/10/9/there-is-no-magic-there-is-only-awesome-part-3</feedburner:origLink></item>
      <item>
         <title>More MongoMapper Awesomeness</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/Vr21w4fDFSM/more-mongomapper-awesomeness</link>
         <description>&lt;p&gt;In which I dish on the latest MongoMapper features like dirty attributes, time zone support, custom data types and dynamic finders.&lt;/p&gt;
&lt;p&gt;September was a month of craziness and for the first month in quite a while I did not post here. I promise it hurt me as much as it hurt you. In an effort to get back in the rhythm, I am going to start with an easy article. MongoMapper has been getting a lot of love lately and I thought I would mention some of the awesomeness.&lt;/p&gt; &lt;h2&gt;Dynamic Finders&lt;/h2&gt; &lt;p&gt;Dynamic finders are so darn handy in ActiveRecord. How many times have you used User.find_by_email and the like? Thankfully &lt;a rel="nofollow" target="_blank" href="http://github.com/dcu/"&gt;David Cuadrado&lt;/a&gt; took a stab at it. I took what he started, tested it a bit harder and added it onto document associations as well. This means when you have a document with a many documents association, you can now use dynamic finders that are scoped to that association.&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;class User include MongoMapper::Document many :posts
end class Post include MongoMapper::Document key :user_id, String key :title, String
end user = User.create
user.posts.create(:title =&amp;gt; 'Foo') # would return post we just created
user.posts.find_by_title('Foo')&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Document associations now also have all the normal Rails association methods such as build, create, find, etc.&lt;/p&gt; &lt;h2&gt;Logging&lt;/h2&gt; &lt;p&gt;The mongo ruby driver added logging support so a few days ago, I added some basic support for accessing and using that logger from within MongoMapper. When you pass a logger instance to the ruby driver, you can access that connections logger instance from MongoMapper.logger like so:&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;logger = Logger.new('test.log')
MongoMapper.connection = Mongo::Connection.new('127.0.0.1', 27017, :logger =&amp;gt; logger)
MongoMapper.logger # would be equal to logger&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Tailing the log would give you output like the following:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;MONGODB db.$cmd.find({"count"=&amp;gt;"statuses", "query"=&amp;gt;{"project_id"=&amp;gt;"4aceaabed072c4745f0003ca"}, "fields"=&amp;gt;nil})
MONGODB db.$cmd.find({"count"=&amp;gt;"statuses", "query"=&amp;gt;{"project_id"=&amp;gt;"4aceaabed072c4745f0003ce"}, "fields"=&amp;gt;nil})&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The nifty part about this is you can setup your Mongo::Connection to use Rails.logger and then all your mongo queries show up in your Rails logs if you have your log level set low enough. This has been very handy for me working on MongoMapper because I can see exactly what MM is sending to Mongo behind the scenes.&lt;/p&gt; &lt;p&gt;Because of this addition, I noticed that every find(:first) was using :order =&amp;gt; ’$natural’ which doesn’t allow using indexes and leads to slow queries. I removed the default order so instead it is just a find with a limit of 1, which should help make a few parts perform better.&lt;/p&gt; &lt;h2&gt;Dirty Attributes&lt;/h2&gt; &lt;p&gt;&lt;a rel="nofollow" target="_blank" href="http://ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-objects"&gt;ActiveRecord’s dirty attributes&lt;/a&gt; is such a cool feature that yesterday, I spent a few hours porting it to MongoMapper::Document. Now you can do things like:&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;class Foo include MongoMapper::Document key :phrase, String
end foo = Foo.new
foo.changed? # false
foo.phrase_changed? # false foo.phrase = 'Dirty!' foo.changed? # true
foo.phrase_changed? # true
foo.phrase_change # [nil, 'Dirty!']&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;I’m sure there will be edge cases, but as we find them we can fortify the tests and go from there.&lt;/p&gt; &lt;h2&gt;Custom Data Types&lt;/h2&gt; &lt;p&gt;With the 0.4 release came the transition from typecasting to custom data types. Now, instead of natively defining typecasting for “allowed” data types, you can have any data type that you like. You just have to do the conversion to and from mongo yourself. Making your own data types is as simple as:&lt;/p&gt; &lt;pre&gt;&lt;code class="ruby"&gt;class Foo def self.to_mongo(value) # convert value to a mongo safe data type end def self.from_mongo(value) # convert value from a mongo safe data type to your custom data type end
end class Thing include MongoMapper::Document key :name, Foo
end&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This means each time the name of Thing is saved to mongo or pulled out of mongo it will be ran through the Foo#to_mongo and Foo#from_mongo to make sure it is exactly what you want it to be.&lt;/p&gt; &lt;p&gt;Out of the box, MongoMapper supports Array, Binary, Boolean, Date, Float, Hash, Integer, String, and Time. You can check out the &lt;a rel="nofollow" target="_blank" href="http://github.com/jnunemaker/mongomapper/blob/master/lib/mongo_mapper/support.rb"&gt;support file&lt;/a&gt; and &lt;a rel="nofollow" target="_blank" href="http://github.com/jnunemaker/mongomapper/blob/master/test/unit/test_support.rb"&gt;tests&lt;/a&gt; to see how this works.&lt;/p&gt; &lt;h2&gt;Time Zones&lt;/h2&gt; &lt;p&gt;One not on times, since I mentioned it above is that all times are stored in the datbase as utc now. Also, if you have Time.zone set, all times are converted to the current time zone going to and from the database. This actually turned out to be really easy. We’ll see if I did it all correctly once people start pounding on it I guess. :)&lt;/p&gt; &lt;h2&gt;Lazy Loading&lt;/h2&gt; &lt;p&gt;One thing that I’ve been working on in between other features is making MongoMapper more lazy. I have already made connection, database and collection lazy so MM doesn’t actually create the connection or connection to the database until needed which makes MM work a lot better with Rails.&lt;/p&gt; &lt;p&gt;I still need to make indexes lazy, so that is the next thing to tackle. I’m thinking once that is in, I’ll have something like MongoMapper.ensure_indexes!, similar to DataMapper.auto_migrate!, which actually ensures the indexes exist rather than doing that the second a class loads.&lt;/p&gt; &lt;h2&gt;Internal Improvements&lt;/h2&gt; &lt;p&gt;Along with all the public features, I have been working on the internals of MM whenever I get a chance. They still need cleaning up, but things are getting better. Along with some refactoring, I did some work to speed the tests up.&lt;/p&gt; &lt;p&gt;The tests were starting to creep up to around 40 seconds which was driving me nuts. I did a bit of work and realized that clearing every collection before every test was causing most of the slowdown so I pruned the functional tests to only clear the collections that were actually used in that test. This cut the time from around 40 seconds to 10. Yep, huge!&lt;/p&gt; &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;There are still rough parts and I would recommend MongoMapper for beginners, but if you can troubleshoot not only your own code but others, MM is in a good place for you. Up until now, I’ve been working on adding features that I needed similar to ActiveRecord, but I am almost to a place where I am going to start adding features to MM that can literally only exist because of MongoDB.&lt;/p&gt; &lt;p&gt;The next month is going to see some really cool things like upserts, modifiers ($set, $inc, $dec, $push, $pull, etc.) and the like make their way into MM. I also have some plans for an &lt;a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Identity_map"&gt;identity map&lt;/a&gt; implementation. Oooohs and aaaaaahs abound!&lt;/p&gt; &lt;div class="feedflare"&gt;
&lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=6W8tdoyYqDs:XXYXYThQxxg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=yIl2AUoC8zA" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=6W8tdoyYqDs:XXYXYThQxxg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=dnMXMwOfBR0" border="0"&gt;&lt;/a&gt; &lt;a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/railstips?a=6W8tdoyYqDs:XXYXYThQxxg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/railstips?d=7Q72WNTAKBA" border="0"&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railstips/~4/6W8tdoyYqDs" height="1" width="1"/&gt;&lt;img src="http://feeds.feedburner.com/~r/rubymentary/~4/Vr21w4fDFSM" height="1" width="1"/&gt;</description>
         <author>john</author>
         <guid isPermaLink="false">tag:railstips.org,2009-10-09:9239</guid>
         <pubDate>Fri, 09 Oct 2009 06:46:00 -0700</pubDate>
      <feedburner:origLink>http://feedproxy.google.com/~r/railstips/~3/6W8tdoyYqDs/more-mongomapper-awesomeness</feedburner:origLink></item>
      <item>
         <title>Scout Improves App Monitoring for Rails Developers</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/A18MNZHhCUE/340-scout-improves-app-monitoring-for-rails-developers.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/scoutparts.png" width="125" height="128" alt="scoutparts.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;Back in early 2008 I wrote about &lt;a rel="nofollow" target="_blank" href="http://scoutapp.com/"&gt;Scout&lt;/a&gt; on Ruby Inside, &lt;a rel="nofollow" target="_blank" href="http://www.rubyinside.com/scout-a-ruby-powered-web-monitoring-and-reporting-service-825.html"&gt;announcing it as a new "Ruby powered Web monitoring and reporting service."&lt;/a&gt; This is still true, except for the "new" bit! I've stayed in touch with the Scout team and they've&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/deployment/340-scout-improves-app-monitoring-for-rails-developers.html</guid>
         <pubDate>Fri, 09 Oct 2009 13:19:49 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/scoutparts.png" width="125" height="128" alt="scoutparts.png" style="float:left;margin-right:12px;margin-bottom:12px;"/>Back in early 2008 I wrote about <a rel="nofollow" target="_blank" href="http://scoutapp.com/">Scout</a> on Ruby Inside, <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/scout-a-ruby-powered-web-monitoring-and-reporting-service-825.html">announcing it as a new "Ruby powered Web monitoring and reporting service."</a> This is still true, except for the "new" bit! I've stayed in touch with the Scout team and they've not slowed down in their work on the system. They've improved the service and added some cool new features for Rails app developers in particular - even going as far as <a rel="nofollow" target="_blank" href="http://blog.scoutapp.com/articles/2009/10/06/we-just-undid-three-months-of-dev-work-heres-what-we-learned">ripping out three months of development work</a> to make the system <i>better</i>!</p>
<p>Scout has matured a lot since last year and now pitches itself as a general server and application monitoring service, though there's a sidefocus on <a rel="nofollow" target="_blank" href="http://scoutapp.com/plugin_urls/131-ruby-on-rails-monitoring-deprecated">Rails app monitoring</a>. It's a commercial service but the entry plan is only $19 a month and there's a thirty day trial available.</p>
<p>Compared to other services, Scout is interesting because no Rails plugin installation is required and all analysis is separate from the request cycle. Redeployment isn't even necessary. Scout takes a more passive background role while still collecting all of the data it needs.</p>
<p>One of Scout's new features is the incorporation of the <a rel="nofollow" target="_blank" href="http://github.com/wvanbergen/request-log-analyzer">Request Log Analyzer</a> by Willem van Bergen and Bart ten Brinke. This tool analyzes Rails log files and produces performance reports based around several metrics: request times, mean request time, process blockers, database and rendering times, HTTP methods used, HTTP statuses, Rails action cache stats, and similar. You can couple this with Scout's regular graphs and e-mail alert systems to get notified about "interesting" occurrences with your applications right as they happen.</p>
<p>Lastly, Scout has a strong plugin ethos, so it's not like it's just a Rails service - though that's what I'm focusing on here. You can write your own plugins to monitor whatever you like.. so even if you do monitor a Rails app, if you want to monitor another service "on the side" and you're willing to write a plugin, you'll be good to go, all on the same account.</p>
<p><i>Disclaimer: Scout has no relationship with Ruby/Rails Inside, other than having run a job ad on our jobs board a little while back. I promised to write about them while talking with them at</i> <a rel="nofollow" target="_blank" href="http://www.rubyinside.com/the-mega-railsconf-2009-round-up-1757.html"><i>RailsConf 2009</i></a><i>, however, and genuinely think it's a service worth checking out :-)</i></p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Scout+Improves+App+Monitoring+for+Rails+Developers+http://bit.ly/4qYJDj" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=Scout+Improves+App+Monitoring+for+Rails+Developers+http://bit.ly/4qYJDj" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=0Hpmc0Lz7j0:fesov2gSBa4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=0Hpmc0Lz7j0:fesov2gSBa4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=0Hpmc0Lz7j0:fesov2gSBa4:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=0Hpmc0Lz7j0:fesov2gSBa4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=0Hpmc0Lz7j0:fesov2gSBa4:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=0Hpmc0Lz7j0:fesov2gSBa4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=0Hpmc0Lz7j0:fesov2gSBa4:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=0Hpmc0Lz7j0:fesov2gSBa4:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=0Hpmc0Lz7j0:fesov2gSBa4:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/0Hpmc0Lz7j0" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/A18MNZHhCUE" height="1" width="1"/>]]></content:encoded>
         <category>Deployment</category>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/0Hpmc0Lz7j0/340-scout-improves-app-monitoring-for-rails-developers.html</feedburner:origLink></item>
      <item>
         <title>How a 1-Engineer Rails Site Scaled to 10 Million Requests Per Day</title>
         <link>http://feedproxy.google.com/~r/rubymentary/~3/iyVeRTEBJ-A/338-how-a-1-engineer-rails-site-scaled-to-10-million-requests-per-day.html</link>
         <description>&lt;p&gt;&lt;img src="http://www.railsinside.com/wp-content/uploads/2009/10/ravelry.png" width="136" height="53" alt="ravelry.png" style="float:left;margin-right:12px;margin-bottom:12px;"/&gt;&lt;a rel="nofollow" target="_blank" href="http://www.ravelry.com"&gt;Ravelry&lt;/a&gt; is an online knitting and crochet community run by husband and wife team Casey and Jessica Forbes. A few weeks ago they did &lt;a rel="nofollow" target="_blank" href="http://www.tbray.org/ongoing/When/200x/2009/09/02/Ravelry"&gt;an interview with Tim Bray&lt;/a&gt; where they revealed that their site has over 400,000 registered users and does&amp;#8230;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://www.railsinside.com/deployment/338-how-a-1-engineer-rails-site-scaled-to-10-million-requests-per-day.html</guid>
         <pubDate>Fri, 09 Oct 2009 10:31:21 -0700</pubDate>
         <content:encoded><![CDATA[<p><img src="http://www.railsinside.com/wp-content/uploads/2009/10/ravelry.png" width="136" height="53" alt="ravelry.png" style="float:left;margin-right:12px;margin-bottom:12px;"/><a rel="nofollow" target="_blank" href="http://www.ravelry.com">Ravelry</a> is an online knitting and crochet community run by husband and wife team Casey and Jessica Forbes. A few weeks ago they did <a rel="nofollow" target="_blank" href="http://www.tbray.org/ongoing/When/200x/2009/09/02/Ravelry">an interview with Tim Bray</a> where they revealed that their site has over 400,000 registered users and does 3.6 million pageviews per day - though ultimately 10 million requests a day hit Rails (they have significant API, RSS and AJAX usage).</p>
<p>Todd Hoff of HighScalability.com then collected together all of the details he could find about Ravelry and put it together into "<a rel="nofollow" target="_blank" href="http://highscalability.com/blog/2009/9/22/how-ravelry-scales-to-10-million-requests-using-rails.html">How Ravelry Scales to 10 Million Requests Using Rails.</a>" It's well worth reading through Ravelry's stack info, but if you want the Cliff Notes version they're using:</p>
<ul>
<li><a rel="nofollow" target="_blank" href="http://www.xen.org/">Xen</a> virtualization</li>
<li><a rel="nofollow" target="_blank" href="http://haproxy.1wt.eu/">HAProxy</a></li>
<li><a rel="nofollow" target="_blank" href="http://nginx.net/">Nginx</a></li>
<li><a rel="nofollow" target="_blank" href="http://tokyocabinet.sourceforge.net/">Tokyo Cabinet</a> (for large object storage)</li>
<li><a rel="nofollow" target="_blank" href="http://www.nagios.org/">Nagios</a></li>
<li><a rel="nofollow" target="_blank" href="http://www.newrelic.com/">New Relic</a></li>
<li>Amazon <a rel="nofollow" target="_blank" href="https://s3.amazonaws.com/">S3</a></li>
<li>Amazon <a rel="nofollow" target="_blank" href="http://aws.amazon.com/cloudfront/">Cloudfront</a> (for CDN)</li>
<li><a rel="nofollow" target="_blank" href="http://www.sphinxsearch.com/">Sphinx</a></li>
<li><a rel="nofollow" target="_blank" href="http://www.danga.com/memcached/">Memcached</a></li>
</ul>
<p>Also worth a visit, if you care to know about Ravelry's history, is <a rel="nofollow" target="_blank" href="http://yknit.com/index.php?post_id=319675">this 30 minute interview with Y KNIT</a> - a popular knitting podcast.</p>
<p align="left"><a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=How+a+1-Engineer+Rails+Site+Scaled+to+10+Million+Requests+Per+Day+http://bit.ly/c3zGJ" title="Post to Twitter"><img class="nothumb" src="http://www.railsinside.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter"/></a> <a rel="nofollow" class="tt" target="_blank" href="http://twitter.com/home/?status=How+a+1-Engineer+Rails+Site+Scaled+to+10+Million+Requests+Per+Day+http://bit.ly/c3zGJ" title="Post to Twitter">Tweet This Post</a></p><div class="feedflare">
<a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uMcIio5SJes:PJHI-yP3WVQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/RailsInside?d=yIl2AUoC8zA" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uMcIio5SJes:PJHI-yP3WVQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uMcIio5SJes:PJHI-yP3WVQ:D7DqB2pKExk" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uMcIio5SJes:PJHI-yP3WVQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uMcIio5SJes:PJHI-yP3WVQ:F7zBnMyn0Lo" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uMcIio5SJes:PJHI-yP3WVQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uMcIio5SJes:PJHI-yP3WVQ:gIN9vFwOqvQ" border="0"></a> <a rel="nofollow" target="_blank" href="http://feeds.feedburner.com/~ff/RailsInside?a=uMcIio5SJes:PJHI-yP3WVQ:3H-1DwQop_U"><img src="http://feeds.feedburner.com/~ff/RailsInside?i=uMcIio5SJes:PJHI-yP3WVQ:3H-1DwQop_U" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/RailsInside/~4/uMcIio5SJes" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/rubymentary/~4/iyVeRTEBJ-A" height="1" width="1"/>]]></content:encoded>
      <feedburner:origLink>http://feedproxy.google.com/~r/RailsInside/~3/uMcIio5SJes/338-how-a-1-engineer-rails-site-scaled-to-10-million-requests-per-day.html</feedburner:origLink></item>
   </channel>
</rss><!-- fe2.pipes.re3.yahoo.com uncompressed/chunked Thu Nov 12 03:38:54 PST 2009 -->
