<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>Litany Against Fear</title>
 
 <link href="http://litanyagainstfear.com/" />
 <updated>2009-10-14T12:32:18-04:00</updated>
 <id>http://litanyagainstfear.com/</id>
 <author>
   <name>Nick Quaranto</name>
   <email>nick@quaran.to</email>
 </author>

 
 <link rel="self" href="http://feeds.feedburner.com/LitanyAgainstFear" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
   <title>Gem Bundler is the Future</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/iVVnYNeXVDw/gem-bundler-is-the-future" />
   <updated>2009-10-14T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future</id>
   <content type="html">&lt;p style="text-align:center;"&gt;&lt;a href="http://www.flickr.com/photos/mrcam/206628748/"&gt;&lt;img src="http://farm1.static.flickr.com/59/206628748_8f2594a16b_m.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you haven&amp;#8217;t checked out &lt;a href="http://twitter.com/wycats"&gt;Yehuda Katz&amp;#8217;s&lt;/a&gt; and &lt;a href="http://twitter.com/carllerche"&gt;Carl Lerche&amp;#8217;s&lt;/a&gt; gem bundler yet, &lt;a href="http://github.com/wycats/bundler"&gt;now is the time&lt;/a&gt;. This project replaces the horribly broken dependency resolution in Rails and what we all know and use as &lt;code&gt;config.gem&lt;/code&gt;&amp;#8216;s. Ever seen &lt;code&gt;can&amp;#8217;t activate $gemname ($gemversion = runtime)&lt;/code&gt;? Or maybe my favorite, when it can&amp;#8217;t even figure out what gem can&amp;#8217;t be activated. If so, read on, bundler&amp;#8217;s about to make your life a lot easier.&lt;/p&gt;
&lt;p&gt;Yehuda has a great roundup of what can be done (and has been done with the bundler) &lt;a href="http://yehudakatz.com/2009/07/08/rails-bundling-revisited/"&gt;on his blog&lt;/a&gt;. This is going to be a part of Rails 3, so you&amp;#8217;re going to have to run into this sooner or later. I was getting frustrated with managing gem dependencies in &lt;a href="http://github.com/qrush/gemcutter"&gt;Gemcutter&lt;/a&gt;, so now it&amp;#8217;s bundled up and ready as a decent example of the bundler in action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enter the bundler&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m using the edge gem built from their repo, and I suggest you do as well. Hopefully soon they&amp;#8217;ll push it to that &lt;a href="http://gemcutter.org"&gt;new gem hosting site&lt;/a&gt; I&amp;#8217;ve heard so much about.&lt;/p&gt;
&lt;pre&gt;
git clone git://github.com/wycats/bundler
cd bundler
sudo rake install
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;The Gemfile&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we&amp;#8217;re ready to make a &lt;code&gt;Gemfile&lt;/code&gt;. This is basically a specification of what gems should be included in your app. Here&amp;#8217;s Gemcutter&amp;#8217;s:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;clear_sources&lt;/span&gt;
&lt;span class="n"&gt;bundle_path&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;vendor/bundler_gems&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://gemcutter.org&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://gems.github.com&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rails&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;2.3.4&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;clearance&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;will_paginate&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;sinatra&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;xml-simple&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;gchartrb&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;google_chart&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ddollar-pacecar&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;1.1.6&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;pacecar&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;net-scp&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="ss"&gt;:test&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;shoulda&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;factory_girl&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;webrat&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;cucumber&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;0.3.101&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rr&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;redgreen&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;fakeweb&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rack-test&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rack/test&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="ss"&gt;:production&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rack-cache&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rack/cache&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;aws-s3&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;aws/s3&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ambethia-smtp-tls&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;smtp-tls&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;memcache-client&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="ss"&gt;:require_as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;memcache&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Some notes here:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;By default the gem host is &lt;code&gt;gems.rubyforge.org&lt;/code&gt;, so I&amp;#8217;ve cleared the sources to use gemcutter.org instead.&lt;/li&gt;
	&lt;li&gt;You can easily specify gems for a given environment and multiple gems with &lt;code&gt;only&lt;/code&gt; and pass it a symbol for the environment name. Thank goodness.&lt;/li&gt;
	&lt;li&gt;The default bundle path is &lt;code&gt;vendor/gems&lt;/code&gt;. This won&amp;#8217;t work for Rails since it assumes way too much about this directory, so we switch it to &lt;code&gt;vendor/bundler_gems&lt;/code&gt;. &lt;strong&gt;Note:&lt;/strong&gt; Yehuda has told me that this will work as normal once Rails 3 is closer/done.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bundle up!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we&amp;#8217;re ready to run &lt;code&gt;gem bundle&lt;/code&gt;. This pulls down the gems from the given sources along with any dependencies. This basically creates a virtual RubyGems environment right inside of your &lt;code&gt;vendor&lt;/code&gt; directory. (I&amp;#8217;m cutting some out since the log is so long)&lt;/p&gt;
&lt;pre&gt;
$ gem bundle
Calculating dependencies...
Updating source: http://gems.github.com
Updating source: http://gemcutter.org
Downloading actionmailer-2.3.4.gem
Downloading actionpack-2.3.4.gem
...
Downloading xml-simple-1.0.12.gem
Installing rr (0.10.4)
Installing fakeweb (1.2.6)
...
Installing nokogiri (1.3.3)
Building native extensions.  This could take a while...
Done.
&lt;/pre&gt;
&lt;p&gt;So now in your &lt;code&gt;vendor/bundler_gems&lt;/code&gt; directory, we&amp;#8217;ve got the &lt;code&gt;.gem&lt;/code&gt; files pulled down in &lt;code&gt;cache&lt;/code&gt;, unpacked in the &lt;code&gt;gems&lt;/code&gt; directory, and the gem specifications are unloaded into &lt;code&gt;specifications&lt;/code&gt;. Bundler also makes its own &lt;code&gt;environment.rb&lt;/code&gt; for loading the dependencies.&lt;/p&gt;
&lt;pre&gt;
vendor
|-- bundler_gems
|   |-- cache
|   |   |-- actionmailer-2.3.4.gem
|   |   |-- actionpack-2.3.4.gem
|   |   |-- ...
|   |   `-- xml-simple-1.0.12.gem
|   |-- doc
|   |-- environment.rb
|   |-- gems
|   |   |-- actionmailer-2.3.4
|   |   |-- actionpack-2.3.4
|   |   |-- ...
|   |   `-- xml-simple-1.0.12
|   `-- specifications
|       |-- actionmailer-2.3.4.gemspec
|       |-- actionpack-2.3.4.gemspec
|       |-- ...
|       `-- xml-simple-1.0.12.gemspec
`-- plugins
&lt;/pre&gt;
&lt;p&gt;Bundler will also dump gem executables in your &lt;code&gt;Rails.root/bin&lt;/code&gt; directory. This means you can then use &lt;code&gt;bin/rake&lt;/code&gt;, for example. Running &lt;code&gt;rake&lt;/code&gt; as normal should still work though. As for your version control, it&amp;#8217;s recommended to check in the &lt;code&gt;.gem&lt;/code&gt;&amp;#8217;s only, then run &lt;code&gt;gem bundle&lt;/code&gt; to unpack/install them. This goes both for new developers and getting code deployed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loading the Environment&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now the issue is to load up the bundled environment instead of the system installed one. Start by creating a &lt;code&gt;config/preinitializer.rb&lt;/code&gt;, which is loaded first before &lt;code&gt;config/environment.rb&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/../vendor/bundler_gems/environment&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Then, in each &lt;code&gt;config/environments/*.rb&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="no"&gt;Bundler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;require_env&lt;/span&gt; &lt;span class="no"&gt;RAILS_ENV&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This basically does a &lt;code&gt;require&lt;/code&gt; for every gem listed in your Gemfile and their associated dependencies. That should be it! Your app should (hopefully) boot and now you should run your tests to ensure your application is still working right.&lt;/p&gt;
&lt;p&gt;If you want to see this all in action &lt;a href="http://github.com/qrush/gemcutter"&gt;clone Gemcutter&lt;/a&gt; and follow the &lt;a href="http://wiki.github.com/qrush/gemcutter/contribution-guidelines"&gt;contribution guidelines for getting up and running&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, I had a few roadblocks with the bundler, and I don&amp;#8217;t think it would be fair to not mention them.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The documentation sucks. I&amp;#8217;m hoping this will improve before Rails 3 is ready (whenever that is). Maybe a Rails guide would be appropriate, and I&amp;#8217;ll definitely help start it.&lt;/li&gt;
	&lt;li&gt;Gemcutter&amp;#8217;s on Heroku, so it&amp;#8217;s necessary to check in a lot of the vendored code (in fact, all of the development/production dependencies). New contributors just have to run &lt;code&gt;gem bundle -u&lt;/code&gt; to get the test dependencies.&lt;/li&gt;
	&lt;li&gt;In my staging environment I had to use &lt;code&gt;Bundler.require_env "production"&lt;/code&gt;. Pretty self-explanatory but I missed it at first.&lt;/li&gt;
	&lt;li&gt;Shoulda macros just stopped working, since it assumes the location of gems in &lt;code&gt;vendor/gems&lt;/code&gt; or &lt;code&gt;vendor/plugins&lt;/code&gt;. I had to include this in &lt;code&gt;test/test_helper.rb&lt;/code&gt; to make it happy:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="no"&gt;Shoulda&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;autoload_macros&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;vendor/bundler_gems/gems/*&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Wrapup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This guide went over how to use Bundler today, with a Rails 2.3.4 app. According to Yehuda, this eventually will be packaged in Rails 3, so the commands will be baked into Rails&amp;#8230;so something like &lt;code&gt;script/bundle&lt;/code&gt;. The nice thing is that you can use the bundler with any Ruby project, so this is good to know in general.&lt;/p&gt;
&lt;p&gt;The bundler is really the future of gem dependency management. If you&amp;#8217;re sick of fighting with &lt;code&gt;config.gem&lt;/code&gt;&amp;#8216;s or are starting a new app it would be well worth your time to start looking at it. If you&amp;#8217;re having trouble with the bundler (or success stories!) feel free to comment here or hop in &lt;code&gt;#carlhuda&lt;/code&gt; on &lt;code&gt;irc.freenode.net&lt;/code&gt;. Check it out on &lt;a href="http://github.com/wycats/bundler"&gt;GitHub&lt;/a&gt; if you haven&amp;#8217;t yet.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/iVVnYNeXVDw" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future</feedburner:origLink></entry>
 
 <entry>
   <title>On Gem Forking</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/kXI4KJGDEwU/on-gem-forking" />
   <updated>2009-10-09T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/10/09/on-gem-forking</id>
   <content type="html">&lt;p style="text-align:center;"&gt;&lt;img src="http://cloud.github.com/downloads/qrush/litanyagainstfear/fork2.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;So, &lt;a href="http://github.com/blog/515-gem-building-is-defunct"&gt;GitHub has recommended Gemcutter&lt;/a&gt; as an alternative to hosting gems on GitHub. Of course, there seems to be an outcry, for three main reasons that I can see:&lt;/p&gt;
&lt;p&gt;1) Effort must be made to move documentation and install instructions&lt;br /&gt;
2) Gem forking is not possible with the new site&lt;br /&gt;
3) GitHub gave no warning on this&lt;/p&gt;
&lt;p&gt;As for #1, you&amp;#8217;ve got a year to update your user base and get gems off GitHub. I&amp;#8217;d assume that any actively maintained project has figured Gemcutter out by then. And for #3, at least we&amp;#8217;ve got a new service that works and can meet the same needs.&lt;/p&gt;
&lt;p&gt;Regarding RubyGem forking, I&amp;#8217;d like to state that this statement is &lt;strong&gt;false&lt;/strong&gt;. Gemcutter accepts built gems, so you simply need to mimic the actions that GitHub&amp;#8217;s gem builder did: Open your .gemspec up, append your username to the gem name, and save. &lt;code&gt;gem build&lt;/code&gt;, &lt;code&gt;gem push&lt;/code&gt;, and done.&lt;/p&gt;
&lt;p&gt;I think an important distinction must be made here: &lt;strong&gt;gem forking != scm forking&lt;/strong&gt;. GitHub made it easy for anyone to automatically push modifications to gems, but there&amp;#8217;s a bigger picture to think of here. Hopefully at some point, the changes you made will be brought back into the mainline gem. As &lt;a href="http://daviddollar.org/"&gt;David Dollar&lt;/a&gt; so eloquently puts it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I think the general idea is that gem forks should be a huge special case. I&amp;#8217;m somewhat of the mind personally that making gem forks too &amp;#8216;easy&amp;#8217; causes a great deal of unnecessary fragmentation in the community. It seems reasonable to me, that if your project is going to depend on a gem fork, that the dependency resolution not be automatic, and your installation instructions can tell the user how to get the forked dependency.&lt;/p&gt;
&lt;p&gt;If a fork is going to be long-term, or a true alternative, it should probably be reregistered under a new name as a different project.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Like I stated above, &amp;#8216;gem forking&amp;#8217; is still supported just because of the nature of how Gemcutter works. I felt there needed to be a longer term solution for this in general, since now the community has grown used to it. This &lt;a href="http://wiki.github.com/qrush/gemcutter/fork-support"&gt;lively discussion&lt;/a&gt; ensued, and after some deliberation we&amp;#8217;re going to use subdomains in order to solve the problem.&lt;/p&gt;
&lt;p&gt;The idea is this: you&amp;#8217;ll be able to register your own subdomain on gemcutter.org, such as &lt;code&gt;qrush.gemcutter.org&lt;/code&gt;, and we&amp;#8217;ll give you a completely blank index to push to. Hopefully you&amp;#8217;ll be able to add others like the &lt;a href="http://gemcutter.org/pages/gem_docs#owner"&gt;gem owner&lt;/a&gt; system works now. I feel this feature needs to be used in the following ways:&lt;/p&gt;
&lt;p&gt;1) Subdomain use should be infrequent. It&amp;#8217;s for trial/forked gems that shouldn&amp;#8217;t be relied on for production.&lt;br /&gt;
2) Use prerelease versions for development snapshots (version numbers like 1.0.0pre, &lt;code&gt;gem install yourgem --prerelease&lt;/code&gt;)&lt;br /&gt;
3) Don&amp;#8217;t add someone&amp;#8217;s subdomain as a source, unless you can completely trust anything they toss there. (like, your own for example)&lt;br /&gt;
4) Consider gemcutter.org/rubygems.org as the main, canonical repo that you can trust.&lt;br /&gt;
5) Start looking into &lt;a href="http://blog.segment7.net/articles/2009/02/04/a-rubygems-github-proposal"&gt;gem signing/cert&lt;/a&gt; since it&amp;#8217;s &lt;strong&gt;the&lt;/strong&gt; way we can really trust gems&lt;/p&gt;
&lt;p&gt;Of course, none of this subdomains stuff works yet, but it seems like the best way forward. It&amp;#8217;s also spawning new, awesome ideas like &lt;a href="http://github.com/qrush/gemcutter/issues#issue/91"&gt;password protected, private subdomains&lt;/a&gt;. If you&amp;#8217;re interested in contributing to the project, please &lt;a href="http://github.com/qrush/gemcutter"&gt;fork away&lt;/a&gt; or hop in #gemcutter on Freenode to see what&amp;#8217;s happening.&lt;/p&gt;
&lt;p&gt;This is &lt;strong&gt;our&lt;/strong&gt; gem host now, let&amp;#8217;s make it awesome.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/kXI4KJGDEwU" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/10/09/on-gem-forking</feedburner:origLink></entry>
 
 <entry>
   <title>RailsCamp NE Adventures</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/9d25pwjAmKM/railscamp-ne-adventures" />
   <updated>2009-07-20T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/07/20/railscamp-ne-adventures</id>
   <content type="html">&lt;p&gt;The concept is simple: Get a bunch of developers together for a weekend away from the internet and most of civilization to have fun and relax. To be honest, I didn&amp;#8217;t get to relax much, but it was made up in spades just by how awesome the event was.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://railscamps.com"&gt;&lt;p style="text-align:center;"&gt;&lt;img style="padding:5px; background: #fff" src="http://railscamps.com/images/yield.png" /&gt;&lt;/p&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The venue was the &lt;a href="http://www.themainehouses.com/mountain_house/mountain_house.php"&gt;Maine MountainView House&lt;/a&gt; in &lt;a href="http://maps.google.com/maps?q=bryant+pond,+me&amp;amp;oe=utf-8&amp;amp;rls=com.ubuntu:en-US:unofficial&amp;amp;client=firefox-a&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;split=0&amp;amp;gl=us&amp;amp;ei=42BkSrOdNYXeNbClrPcB&amp;amp;sa=X&amp;amp;oi=geocode_result&amp;amp;ct=title&amp;amp;resnum=1"&gt;Bryant Pond, ME&lt;/a&gt; I&amp;#8217;m sure others will post better pictures soon, but the pond itself was beautiful. A dock, fire pit, and plenty of chairs made for some fun smore-making and &lt;a href="http://en.wikipedia.org/wiki/Mafia_(party_game)"&gt;werewolf&lt;/a&gt; games. The house was huge and definitely stood up to nearly 30 developers&amp;#8217; antics throughout the weekend.&lt;/p&gt;
&lt;p&gt;The event itself was slightly organized, which was just perfect: catered lunch and dinner, and plenty of social hacking. Each day had a few talks showing off fun projects and interesting problems. Topics included covered &lt;a href="http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html"&gt;internationalization with gettext&lt;/a&gt;, &lt;a href="http://couchdb.apache.org"&gt;CouchDB&lt;/a&gt;, the &lt;a href="http://railsrumble.com"&gt;Rails Rumble&lt;/a&gt;, &lt;a href="http://rdoc.info"&gt;rdoc.info&lt;/a&gt;, &lt;a href="http://radiantcms.org"&gt;RadiantCMS&lt;/a&gt;, and plenty more I&amp;#8217;m probably missing. &lt;a href="http://img39.yfrog.com/i/kaed.jpg/"&gt;I showed off&lt;/a&gt; &lt;a href="http://gemcutter.org"&gt;Gemcutter&lt;/a&gt; and got plenty of awesome feedback and ideas for the site.&lt;/p&gt;
&lt;p&gt;As for hacking, it was an interesting mix of people and skill levels. Quite a few developers were there mostly to observe what others were using for tools and to understand how they work. I loved showing off Cucumber and I definitely heard the good word of &lt;a href="http://rubyhoedown2008.confreaks.com/05-bryan-liles-lightning-talk-tatft-test-all-the-f-in-time.html"&gt;&lt;span class="caps"&gt;TATFT&lt;/span&gt;&lt;/a&gt; being preached. I wish I could have watched a little more, but I was having too much fun coding away.&lt;/p&gt;
&lt;p&gt;My adventure went something like this: The start of Saturday got a few people talking about ideas to hack on, and perhaps a project the group could work on together. &lt;a href="http://zerosum.org"&gt;Nick Plante&lt;/a&gt; mentioned games via Twitter, and that eventually lead to implementing &lt;a href="http://en.wikipedia.org/wiki/Dope_Wars"&gt;DopeWars&lt;/a&gt;. From there, some went outside on the porch to sketch out how the app would work, and we then wrote some basic user stories. It ended up that &lt;a href="http://jayunit.net"&gt;Jason&lt;/a&gt; and I banged out a quick prototype in Sinatra and got something decently working. On Sunday, amongst recovering from some late night &lt;a href="http://www.urbanterror.net/news.php"&gt;Urban Terror&lt;/a&gt;, I hacked with some others on searching gems via Gemcutter&amp;#8217;s web interface.&lt;/p&gt;
&lt;p&gt;If there&amp;#8217;s a &lt;a href="http://railscamps.com"&gt;RailsCamp&lt;/a&gt; going on even remotely close to you, do everything you can to get there. It was more hands on than RailsConf, and the amount of networking and fun being had was multiplied. I&amp;#8217;d just like to say thanks to the organizers, &lt;a href="http://freelancing-god.com"&gt;Pat Allan&lt;/a&gt; and &lt;a href="http://cardarella.blogspot.com/"&gt;Brian Cardarella&lt;/a&gt;, for working hard to put on a great time for all. I&amp;#8217;d love to help organize a RailsCamp in the future, perhaps since I&amp;#8217;m returning to Rochester soon it could include the Great Lakes region and bring in hackers from NY, PA, OH, MI, and more. (If you&amp;#8217;re interested too, leave a comment!)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/9d25pwjAmKM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/07/20/railscamp-ne-adventures</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Webrat Rails Testing Evolved</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/j8vAc6wnZMw/railsconf-2009-webrat-rails-testing-evolved" />
   <updated>2009-05-07T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-webrat-rails-testing-evolved</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Bryan Helmkamp.&lt;/p&gt;
&lt;p&gt;Webrat = Ruby Acceptance Testing for Web Applications. Let&amp;#8217;s say you&amp;#8217;re creating a form: you want to know the code works as expected, and you want to ensure it still works when you make changes. The solution: writing tests.&lt;/p&gt;
&lt;p&gt;Integration testing is built into Rails, and it does plenty of stuff already: creating requests, checking responses, determining what is on the page, and submitting the form on the page as well. It definitely works, but it&amp;#8217;s verbose and requires way too much work. This is why Webrat was started: to make this process easier so people actually use it and want to write it.&lt;/p&gt;
&lt;p&gt;Webrat has a very conversational tone, it&amp;#8217;s like walking someone through the website. The basics:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;visit [path]&lt;/code&gt;: Pretty much the same as the traditional Rails way of loading the page.&lt;br /&gt;
&lt;code&gt;click_link "name"&lt;/code&gt;: Uses Nokogiri to search through all of anchor tags and finds the link with that text. It then finds the href and it will follow whatever path is given. It&amp;#8217;s a &amp;#8220;browser simulator&amp;#8221;.&lt;br /&gt;
&lt;code&gt;fill_in&lt;/code&gt;: Finds the input you&amp;#8217;re referring to and simulates actually entering information in, but without a browser.&lt;br /&gt;
&lt;code&gt;click_button&lt;/code&gt;: Submitting form, which infers what &lt;span class="caps"&gt;URL&lt;/span&gt; to post to by looking up the form element it&amp;#8217;s scoped to.&lt;/p&gt;
&lt;p&gt;Getting started: Hook up the gem, some inital setup for your environment and you&amp;#8217;re set. The core &lt;span class="caps"&gt;API&lt;/span&gt; is pretty small, and it&amp;#8217;s all you really need to work with most web forms on a daily basis. It&amp;#8217;s also test framework agnostic, and can even be used in &lt;span class="caps"&gt;IRB&lt;/span&gt;. It&amp;#8217;s mostly used with Cucumber now, but what&amp;#8217;s important is that the two are separate. There&amp;#8217;s adapters for the big web frameworks: Rails, Merb, and Sinatra.&lt;/p&gt;
&lt;p&gt;Some of the magic with Webrat happens due to the locator strategies. Usually it&amp;#8217;ll just work, and especially with forms it can work off of a &lt;code&gt;label&lt;/code&gt; tag with a &lt;code&gt;for&lt;/code&gt; attribute. There&amp;#8217;s also other ways to get elements if you need a less&amp;#8230;magical way.&lt;/p&gt;
&lt;p&gt;Webrat is meant for testing web apps, and checks all of the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Verify &lt;span class="caps"&gt;HTTP&lt;/span&gt; status codes&lt;/li&gt;
	&lt;li&gt;Verify form fields exist&lt;/li&gt;
	&lt;li&gt;Verify &lt;span class="caps"&gt;HTML&lt;/span&gt; content&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Plenty of awesome matchers/assertions baked in:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;contain&lt;/code&gt;: Checking text in the response body.&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;have_selector&lt;/code&gt;: Ensuring elements are on the page with the given &lt;span class="caps"&gt;CSS&lt;/span&gt; selector and some attributes/content if specified&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;have_xpath&lt;/code&gt;: Pretty obvious, a bit more powerful. Neat fact: Nokogiri actually converts &lt;span class="caps"&gt;CSS&lt;/span&gt; selectors to XPath.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Debug with &lt;code&gt;save_and_open_page&lt;/code&gt;, which opens a temporary file of what Webrat is looking at.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s also adapters for Selenium and Mechanize adapters. It can be used outside of the verification context. The Mechanize session object can be used for screen scraping for example. This is being used by some to test existing web apps in other languages that want to convert to Ruby slowly, and the tests still work just the same during the process.&lt;/p&gt;
&lt;p&gt;Selenium is now fully supported with Webrat. The library handles booting up both a Selenium and Rails server for you. It&amp;#8217;s pretty easy to use the standard Webrat &lt;span class="caps"&gt;API&lt;/span&gt; and drop into Selenium when you need to. The main problem here: it&amp;#8217;s &lt;span class="caps"&gt;SLOW&lt;/span&gt;. Get around this by writing only what&amp;#8217;s necessary in Selenium, since Webrat itself is way faster.&lt;/p&gt;
&lt;p&gt;Rack is going to help a lot with cleaning up Webrat, since they don&amp;#8217;t want to maintain adapters for every Ruby web framework out there. This is what Rack::Test was created for, and it will hopefully be integrated in for Rails 3.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/j8vAc6wnZMw" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-webrat-rails-testing-evolved</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Automated Code Quality Checking in Ruby and Rails</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/uTxja-8tIGY/railsconf-2009-automated-code-quality-checking-in-ruby-and-rails" />
   <updated>2009-05-07T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-automated-code-quality-checking-in-ruby-and-rails</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Marty Andrews.&lt;/p&gt;
&lt;p&gt;Plenty of ways to lower your WTFs/minute when looking at code. Static analysis = just looking at the code without running it. Why do this though? There&amp;#8217;s plenty of practices that already enforce quality: testing, pair programming, etc&amp;#8230;but there&amp;#8217;s much more that you can do on your own.&lt;/p&gt;
&lt;p&gt;Code smells are important, you need to really follow your nose. Plenty of tools are available to help with this:&lt;/p&gt;
&lt;p&gt;Rails stats, which comes packaged with the framework: &lt;code&gt;rake stats&lt;/code&gt;. It gives plenty of metrics, but what is most important is the Code to Test Ratio. This is most useful for human review and communicating with your team that you need to test more.&lt;/p&gt;
&lt;p&gt;Reek: searches for code smells. There&amp;#8217;s plenty of things this gem searches for, such as dupliation, long methods, uncommunicative names, control coupling, and the list goes on and on. Showing off how to use the command and what it prints out. Reek is best for regular human review and checking your own code.&lt;/p&gt;
&lt;p&gt;Flog: complexity checking of Ruby code. It checks your methods for how complex they are, and warns you when they&amp;#8217;re getting out of hand through a scoring system. Methods with high scores should probably be refactored. You can use flog to enforce code quality at the level of continuous integration: builds don&amp;#8217;t pass if the flog scores are too high.&lt;/p&gt;
&lt;p&gt;Flay: is a pretty complex tool that finds duplicate or similarly structured code. This gem can find potential candidates for refactoring. This can also be used in automation, since it has a score as well. Same concept: if the score is over a threshold, fail the build.&lt;/p&gt;
&lt;p&gt;Roodi: checks for design problems, which involves checking plenty of different code qualities. Basically prints out different problems with your code. One big thing it checks is cyclomatic complexity, which goes higher for the number of branches and loops in a method. It&amp;#8217;s the minimum amount of tests you need for a piece of code, so refactoring it so it&amp;#8217;s lower is better. Another neat thing is that it looks for &lt;code&gt;=&lt;/code&gt; in conditionals. Using Roodi in automation is great since it allows you to tweak the settings that are appropriate for your project, for example the level of cyclomatic complexity that is acceptable.&lt;/p&gt;
&lt;p&gt;Metric-fu: reports on all of the above in one neat package with &lt;code&gt;rake metrics:all&lt;/code&gt;. It also includes some other great reports, such as Churn. Churn will show you what files have changed the most often in your source code repo, which means that you might want to split it up. This is best for regular human review.&lt;/p&gt;
&lt;p&gt;In your CI: flog, flay, roodi.&lt;br /&gt;
For yourself and your team: metric_fu, rails stats, reek (and more!)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/uTxja-8tIGY" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-automated-code-quality-checking-in-ruby-and-rails</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 And the Greatest of these is Rack Support</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/jwLYG-_-k_U/railsconf-2009-and-the-greatest-of-these-is-rack-support" />
   <updated>2009-05-07T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-and-the-greatest-of-these-is-rack-support</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Ben Scofield.&lt;/p&gt;
&lt;p&gt;Lots of awesome stuff is being brought into core: templates, nested attribute assignment, &lt;code&gt;AR::Base#touch&lt;/code&gt;, and finally&amp;#8230;Rack.&lt;/p&gt;
&lt;p&gt;Rack is the Ruby version of Python&amp;#8217;s &lt;span class="caps"&gt;WSGI&lt;/span&gt; (Web Server Gateway Interface). Rack apps require a &lt;code&gt;call&lt;/code&gt; method that returns a very standardized array with a &lt;span class="caps"&gt;HTTP&lt;/span&gt; status, headers, and the response body. The normal flow of web apps is request, application, and response. Rack allows you to insert middleware between these parts.&lt;/p&gt;
&lt;p&gt;Plenty of existing pieces of middleware:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Rack::Profiler&lt;/code&gt;: like rubyprof.&lt;br /&gt;
&lt;code&gt;Rack::MailExceptions&lt;/code&gt;: replacement for exception notifier&lt;br /&gt;
&lt;code&gt;Rack::Cache&lt;/code&gt;: pretty obvious&lt;br /&gt;
&lt;code&gt;Rack::Cascade&lt;/code&gt;: enables different Rack apps to serve one whole app. For example, you can have a middleware to do just file uploads.&lt;/p&gt;
&lt;p&gt;Going through how Rack is integrated into Rails. You can see the middleware that is loaded by default with &lt;code&gt;rake middleware&lt;/code&gt;. Firing up &lt;code&gt;script/server&lt;/code&gt; is now done through Rack, and Ben went through the code of how this works.&lt;/p&gt;
&lt;p&gt;Metal! Basically a way to load Rack apps inside of Rails easily. The main problem with this: it&amp;#8217;s hard to test. You&amp;#8217;re forced to mostly use integration tests.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Rack::Bug&lt;/code&gt; has debugging info that&amp;#8217;s pretty much dropped in, including &lt;span class="caps"&gt;SQL&lt;/span&gt; queries and so on. One gotcha, with middleware it requires a closing body tag.&lt;/p&gt;
&lt;p&gt;Caching. Using Metal for progressive caching can really help, and if you can avoid &lt;code&gt;ActionController&lt;/code&gt; you can shave a lot of time off the request.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Rack::Embiggener&lt;/code&gt; is a simple example of a piece of Metal that lengthens tiny urls. Showing off some code about how this works. Another awesome example: rewriting the hoptoad_notifier in Rack.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/jwLYG-_-k_U" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/07/railsconf-2009-and-the-greatest-of-these-is-rack-support</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Working Effectively with Legacy Rails</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/aIa_1nHAMg4/railsconf-2009-working-effectively-with-legacy-rails" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-working-effectively-with-legacy-rails</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Pat Maddox and BJ Clark.&lt;/p&gt;
&lt;p&gt;Why? Rails is almost 5 years old, plenty of value to be made and everyone writes it. What is legacy code? Code that&amp;#8217;s a few months old maybe? Plenty of defintions: &amp;#8220;Code without tests&amp;#8221; &amp;#8220;accumulated technical debt&amp;#8221; &amp;#8220;code that is difficult to change&amp;#8221;&lt;/p&gt;
&lt;p&gt;Technical debt is not necessarily bad&amp;#8230;it&amp;#8217;s deferring necessary work. Plenty of examples abound: Rails, MediaWiki, ActiveScaffold, all of the code you write on a daily basis. How to figure out where debt exists: easy upfront gains, bad migration paths, difficult to extend. There&amp;#8217;s ways to deal with this though: big design up front, or agile.&lt;/p&gt;
&lt;p&gt;TATFT. The cycle is of upmost importance. People seem to forget about the refactoring part once tests are passing&amp;#8230;don&amp;#8217;t miss it!&lt;/p&gt;
&lt;p&gt;Testing is the best way to minimize debt that someone else didn&amp;#8217;t pay down. Must maintain the existing value along with adding new value. Start testing &lt;span class="caps"&gt;NOW&lt;/span&gt;. Unit tests are extremely important, and Cucumber is awesome for testing the entire stack. When should you test though? Don&amp;#8217;t do it all at once&amp;#8230;do it just in time when you actually need it. Isolation is really helpful for injecting testing in applications. The more split up parts are, the easier it is to test individual sections.&lt;/p&gt;
&lt;p&gt;Let Rails do its job. Plenty of places where code is rewritten: caching, validations, serialization, memoization, and so on. One way to deal with this is make everything a framework, use metaprogramming and DSLs to your advantage. Some pros: it&amp;#8217;s easy to read and the behavior is free. On the flip side: it&amp;#8217;s not as accessible to brand new Ruby programmers. Write your own little framework or use someone else&amp;#8217;s like resource_controller.&lt;/p&gt;
&lt;p&gt;Rails also has plenty of extension points that you should be using: filters, observers, callbacks. Callbacks are great for cleaning up controllers and pushing logic into the model. The main problem here is the indirection when trying to debug, and also testing is a bit harder. However, it&amp;#8217;s practically like using a transaction and it keeps with the skinny controller/fat model standard.&lt;/p&gt;
&lt;p&gt;Ruby seams: &lt;code&gt;alias_method_chain&lt;/code&gt;, &lt;code&gt;method_missing&lt;/code&gt;, &lt;code&gt;send&lt;/code&gt; / &lt;code&gt;eval&lt;/code&gt;. Plenty of places where you can modify code without modifying the actual text you&amp;#8217;ve written. A good idiom to use is default arguments, which is great since classes can be used here as well. Mocking can help out as well with faking out parts of legacy code bases that won&amp;#8217;t help with testing what you need.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s really essential is to understand Ruby as much as possible. Learn to make Rails work for you. Another awesome reference is &amp;#8220;Working Effectively with Legacy Code&amp;#8221; by Michael Feathers.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/aIa_1nHAMg4" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-working-effectively-with-legacy-rails</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 What Makes Ruby Go An Implementation Primer</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/B17iQZWM6_s/railsconf-2009-what-makes-ruby-go-an-implementation-primer" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-what-makes-ruby-go-an-implementation-primer</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk was presented by Charles Nutter and Evan Phoenix.&lt;/p&gt;
&lt;p&gt;Method Calls. What happens? Evaluate receiver and arguments, look up method named &amp;#8216;foo&amp;#8217; (walking up the class heirarchy), and call it. Lookup is the most expensive part. There has to be some sort of method cache because walking through the different classes is really expensive. This involves checking for a cached method and ensuring the class hasn&amp;#8217;t changed since the cache was saved. Huge deal for performance with dynamic method invocation. 80% faster typically with a method cache.&lt;/p&gt;
&lt;p&gt;Tons of things can affect the cache: &lt;code&gt;def&lt;/code&gt; / &lt;code&gt;undef&lt;/code&gt;, &lt;code&gt;Module#define_method&lt;/code&gt;, etc. &lt;code&gt;Object#extend&lt;/code&gt; is the huge problem. Used for mixins with modules and adding methods all the time in Ruby. How does &lt;code&gt;extend&lt;/code&gt; affect the cache? In 1.8/1.9 the entire cache is cleared, but with JRuby (and somewhat with Rubinius) it&amp;#8217;s localized. Extending a module has some massive performance implications. A little increase in syntatic sugar can lead to pretty huge slowdowns. It&amp;#8217;s still definitely useful, but it has to be used with caution or in a different manner.&lt;/p&gt;
&lt;p&gt;Constant lookup! Same deal, lots of searching through the heirarchy. Cached at lookup site, and they are globally cached across all Ruby implementations. So basically, don&amp;#8217;t redefine constants at runtime or frequently.&lt;/p&gt;
&lt;p&gt;Options Argument: Basically passing a hash at the end of an argument. Forcing Ruby to create the hash for you, or passing no arguments at all hurts performance.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;obj.run rescue nil&lt;/code&gt;: eating exceptions in one line. Happens for two reasons: dirty way to fix a problem at 1am, and possibly by design though extremely rare. The big problem: &lt;code&gt;StandardError&lt;/code&gt; has 101 subclasses, and you probably want to know about what happened. Best thing to do: throw it into a logger.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;autoload&lt;/code&gt;: Delay code loading until some later point. Lots of problems though&amp;#8230;for one, it&amp;#8217;s completely thread unsafe. Inherently broken with threads in all implementations. It doesn&amp;#8217;t actually call &lt;code&gt;#require&lt;/code&gt;, so you can&amp;#8217;t autoload gems. Plenty of alternatives though: pretend to go single-threaded, pay the cost upfront&lt;/p&gt;
&lt;p&gt;&lt;code&gt;super&lt;/code&gt;: lots of different ways to use this keyword. One really strange behavior: blocks tacked onto a &lt;code&gt;super&lt;/code&gt; call will be passed up implicitly to the superclass. Parens work really strangely, if you don&amp;#8217;t specify them on &lt;code&gt;super&lt;/code&gt; call it will use local variables that may have changed in lines before.&lt;/p&gt;
&lt;p&gt;To wrap up: simpler code is the better code. Think twice about the fancy features of Ruby and how it might affect your app.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/B17iQZWM6_s" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-what-makes-ruby-go-an-implementation-primer</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Starting up Fast Lessons from the Rails Rumble</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/0o5KsTeXhdQ/railsconf-2009-starting-up-fast-lessons-from-the-rails-rumble" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-starting-up-fast-lessons-from-the-rails-rumble</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A panel on the Rails Rumble moderated by Nick Plante. The panelists: Joe Fiorini, Chris Saylor, James Golick, and Ben Scofield.&lt;/p&gt;
&lt;p&gt;1) How is competing in the Rumble like working on a normal web project?&lt;/p&gt;
&lt;p&gt;Ben: The goal is different&amp;#8230;you want to &lt;span class="caps"&gt;WIN&lt;/span&gt;.&lt;br /&gt;
Joe: Not really a flexible budget or time to reconsider options. The limitations make it more feasible.&lt;br /&gt;
Chris: They did a lot of upfront work and simply executed it.&lt;br /&gt;
James: More focus on the value, since that&amp;#8217;s all the time you have for.&lt;/p&gt;
&lt;p&gt;2) Is it possible to build a real product this way? Have you continued to develop your web apps?&lt;/p&gt;
&lt;p&gt;Chris: They definitely didn&amp;#8217;t intend it to stick&amp;#8230;but they got a call from someone who wanted to acquire them. After actually registering the company, they&amp;#8217;ve built it into a decent business and are actually talking to the Food Network about possibly acquiring it.&lt;br /&gt;
Joe: The real challenge is physical for their team, getting together is rough.&lt;br /&gt;
Ben: Since he&amp;#8217;s the only one working on his project it&amp;#8217;s a lot harder to continue work on it.&lt;br /&gt;
James: Getting feedback is essential, and a 48 hour window forces you to get that as soon as possible.&lt;/p&gt;
&lt;p&gt;3) What sort of up-front planning and design work did you do?&lt;/p&gt;
&lt;p&gt;Chris: Complete wireframes, DB schema, and tasks for people to do.&lt;br /&gt;
Joe: None? Mostly good ideas, and that&amp;#8217;s it.&lt;br /&gt;
James: Some doodling, and using Pivotal Tracker a bit.&lt;br /&gt;
Ben: Some research and finding inspiration for the designs online.&lt;/p&gt;
&lt;p&gt;4) How did you plan for the 80/20 rule in building web apps within a 48 hr time period?&lt;/p&gt;
&lt;p&gt;James: Need to have something ready to deploy. New ideas had to be squashed too and forced into the Tracker.&lt;br /&gt;
Ben: Time limits help out&amp;#8230;do the most difficult stuff first.&lt;br /&gt;
Joe: Their first production deploy was on Friday at 11:30, and it&amp;#8217;s easier once you do the first one. They used a bastardizd scrum process and tried to keep it as simple as possible.&lt;br /&gt;
Chris: The 80/20 rule is crap most of the time! They tried to figure out what was going to take the most time and do that first. They also had to make sure someone was reviewing code.&lt;/p&gt;
&lt;p&gt;5) What are some lessons from the Rumble you can apply to teaching someone new to Rails?&lt;/p&gt;
&lt;p&gt;James: They had at least one pair programming session going on, and that helped out immensely.&lt;br /&gt;
Chris: During the Rumble they taught a designer how to use &lt;span class="caps"&gt;SVN&lt;/span&gt;.&lt;br /&gt;
&amp;#8230;and hijacked!&lt;/p&gt;
&lt;p&gt;6) Did you use automated testing?&lt;/p&gt;
&lt;p&gt;Joe: No. Sort of hard without a good background of testing and not a good place to learn.&lt;br /&gt;
Ben: Not good to learn completely new things, for example a World of Warcraft addon&amp;#8230;which is written in Lua. And he used some automated testing.&lt;br /&gt;
James: Plenty, that&amp;#8217;s just how they write code. Great way to catch regressions and they definitely noticed some teams that had pretty broken apps that didn&amp;#8217;t do any testing.&lt;br /&gt;
Nick: Work with technologies you&amp;#8217;re comfortable with.&lt;/p&gt;
&lt;p&gt;7) What processes/tools were the most helpful?&lt;/p&gt;
&lt;p&gt;Joe: resource_controller was awesome. Also, NewRelic &lt;span class="caps"&gt;RPM&lt;/span&gt; helped when their site got hit from Lifehacker. Basecamp was great for communication too. &lt;br /&gt;
James: Starter apps were really helpful, like bort or blank. Pivotal Tracker is super simple and gets out of your way.&lt;br /&gt;
Chris: Going to be interesting to see how Rails templates will be used. Campfire was awesome too, especially for the history and inline images.&lt;br /&gt;
Ben: Lots of testing gems: factory_girl, shoulda, mocha, etc.&lt;/p&gt;
&lt;p&gt;8) How did you find good people to work with? How similar is this to finding cofounders?&lt;/p&gt;
&lt;p&gt;Joe: Mostly coworkers and friends of them.&lt;br /&gt;
James: He ended up hiring his cohorts since he enjoyed working with them so much.&lt;br /&gt;
Chris: Local user groups are a great way to find people.&lt;br /&gt;
Ben: Teams are for the weak.&lt;/p&gt;
&lt;p&gt;9) What was the most rewarding part?&lt;/p&gt;
&lt;p&gt;James: A lot of great hacking and tons of fun.&lt;br /&gt;
Joe: Good opportunity to learn and nice to see a finished app in one weekend.&lt;br /&gt;
Chris: The belt.&lt;br /&gt;
Ben: Definitely a reminder of why this profession is awesome.&lt;/p&gt;
&lt;p&gt;Next up: August 22/23rd! &lt;a href="http://railsrumble.com"&gt;More info here.&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/0o5KsTeXhdQ" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-starting-up-fast-lessons-from-the-rails-rumble</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Robert Martin Keynote</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/zrLluRmd_j0/railsconf-2009-robert-martin-keynote" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-robert-martin-keynote</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What killed Smalltalk and could it kill Ruby?&lt;/p&gt;
&lt;p&gt;Is Smalltalk dead yet? It was the language that only a few dabbled with in the 70s and also quite a few huge projects written. Why did Smalltalk just keel over? Squeak has become an academic language mostly, no one is doing anything serious in it.&lt;/p&gt;
&lt;p&gt;Smalltalk really was the pinnacle of what object-oriented design was all about. There were some good languages around though&amp;#8230;C++ is man&amp;#8217;s language, Java is more of an estrogen language. Objective-C was really influenced from Smalltalk though. Smalltalk had a huge advantage over C/C++ in productivity. Smalltalk also had a lot of powerful &lt;span class="caps"&gt;IDE&lt;/span&gt; tools, especially for refactoring. But, it still died. It was mostly&amp;#8230;non-hormonal. It makes stuff happen.&lt;/p&gt;
&lt;p&gt;Ward Cunningham is pretty much a badass. He&amp;#8217;s come up with or kickstarted tons of great ideas: design patterns, &lt;span class="caps"&gt;FIT&lt;/span&gt;, the wiki, the list goes on and on and on. According to Ward: clean code is when you look at a routine, and it&amp;#8217;s pretty much what you expected. Clean code has a metric of zero WTFs/minute.&lt;/p&gt;
&lt;p&gt;According to Ward: what killed Smalltalk was that it was just too easy to make a mess. This didn&amp;#8217;t happen in C++ because it punished you for creating a mess. Smalltalk didn&amp;#8217;t complain much about this, and messes could pile up fast and without consequence.&lt;/p&gt;
&lt;p&gt;Ruby has this same problem. Happens with many projects: it&amp;#8217;s just a tangled mess eventually and you have to dive into the framework to see what&amp;#8217;s going on. Apply the Boy Scout Rule to code: random acts of kindness for every checkout. This doesn&amp;#8217;t happen though&amp;#8230;cleaning code is risky. The messes are easy to make, but hard to clean&amp;#8230;it becomes your mess if you break it!&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s a way out of this: &lt;span class="caps"&gt;TDD&lt;/span&gt;! Ruby has this built in, but he&amp;#8217;s afraid that the discipline won&amp;#8217;t grow with the community.  The rules of &lt;span class="caps"&gt;TDD&lt;/span&gt;:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Don&amp;#8217;t write a line of code without writing a failing unit test&lt;/li&gt;
	&lt;li&gt;Not allowed to write more of a unit test when they&amp;#8217;re failing. (Make it green!)&lt;/li&gt;
	&lt;li&gt;No writing of production code without writing another failing test.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The cycle might seem pointless to those outside&amp;#8230;but it really prevents the horrible timesink that is debugging. Having a test suite really helps with refactoring. Tests eliminate fear! A suite of tests removes fear when trying to change things.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt; never became part of the culture in Smalltalk&amp;#8230;it has become part of the Ruby culture, but is it enough? Without tests, you are not in control of your codebase. There was a certain air of arrogance in the Smalltalk community that seemed to keep people away from it. They felt their tools and languages were just better, and they ended up building a wall around themselves.&lt;/p&gt;
&lt;p&gt;Dynamic languages won the language wars, even the static languages have adopted some dynamic principles. There was a certain lack of professionalism that the community just lacked. Smalltalk died since it just refused to address the general problems of the enterprise: parochialism.&lt;/p&gt;
&lt;p&gt;What might save Ruby and Rails, etc from this demise? It&amp;#8217;s not headed in this direction yet. The following must happen to prevent the downfall:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Discipline. &lt;span class="caps"&gt;TDD&lt;/span&gt;. It&amp;#8217;s &lt;span class="caps"&gt;HARD&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;Humility. There are good laughs to be had, but don&amp;#8217;t build the wall (or force them to!)&lt;/li&gt;
	&lt;li&gt;Solving the dirty problems. Bad database schemas, for example. Someone&amp;#8217;s got to deal with it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Don&amp;#8217;t ignore the enterprise.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/zrLluRmd_j0" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-robert-martin-keynote</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Rails 3 Step off of the Golden Path</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/QEqeDdsNJlQ/railsconf-2009-rails-3-step-off-of-the-golden-path" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-rails-3-step-off-of-the-golden-path</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Matt Aimonetti. There&amp;#8217;s a lot of talk about &amp;#8220;the merge&amp;#8221; but not many know why or what happened. Going through the history, starting from the principles behind Ruby, and the process of how Rails came about. The big principles behind Rails: Convention over Configuration, Don&amp;#8217;t Repeat Yourself.&lt;/p&gt;
&lt;p&gt;At some point there was a schism from Rails, and this was Merb. Merb was focused on performance and agnosticism. Lots of drama as time went on and plenty of tension. They finally sat down and talked, and they had the same goals but just had different perspectives.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s in store for Rails 3:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Improved performance. Merb was a speed demon, it&amp;#8217;s time to bring that into Rails.&lt;/li&gt;
	&lt;li&gt;Increased modularity. Bringing this to the next level.&lt;/li&gt;
	&lt;li&gt;Agnosticism in general throughout the framework.&lt;/li&gt;
	&lt;li&gt;Public &lt;span class="caps"&gt;API&lt;/span&gt;, ensure that plugins won&amp;#8217;t break.&lt;/li&gt;
	&lt;li&gt;Mountable apps with Rack&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Rails 3 default stack: ActiveRecord, Prototype, &lt;span class="caps"&gt;ERB&lt;/span&gt;, Test::Unit. No huge changes for end users. Instead of one &amp;#8220;Rails Way&amp;#8221; there&amp;#8217;s going to be many &amp;#8220;Rails Ways&amp;#8221;. A big difference is that Rails 3 will be less opinionated. Not all apps are going to be the same, and this just recognizes it.&lt;/p&gt;
&lt;p&gt;When should you step off the default stack? According to Matt, he believes that it&amp;#8217;s a question of taste along with the requirements given to you.&lt;/p&gt;
&lt;p&gt;Will be able to pick and choose the JavaScript engine you want. For templating engines, it&amp;#8217;s not that big of a change since there&amp;#8217;s really only 2 choices. The more difficult choice will be the &lt;span class="caps"&gt;ORM&lt;/span&gt;. It will be possible to seamlessly swap between the various ORMs available. One of these is DataMapper, which has a lot of great benefits that ActiveRecord doesn&amp;#8217;t. It&amp;#8217;s uses lazy loading along with a smarter way of dealing with potential N+1 select problems that plagues ActiveRecord. Some other neat features: ways to move/migrate from older column names, and a really nice way to define complex queries with &lt;code&gt;Query::Path&lt;/code&gt;. Tons of adapters too.&lt;/p&gt;
&lt;p&gt;Other adapters such as Sequel or Hibernate will work. Plenty of non-&lt;span class="caps"&gt;RDBMS&lt;/span&gt; systems being considered as well. CouchDB, Redis, Tokyo Cabinet, etc will hopefully be easy to build adapters for.&lt;/p&gt;
&lt;p&gt;Create your own Rails: define your own file structure, your own router &lt;span class="caps"&gt;DSL&lt;/span&gt;, and even your own ways to deal with requests. The goal is that the audience for Rails will expand even further, and perhaps grow into places that we can&amp;#8217;t even see now.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/QEqeDdsNJlQ" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-rails-3-step-off-of-the-golden-path</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Getting to know Ruby 1.9</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/Alad17JnBU0/railsconf-2009-getting-to-know-ruby-19" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-getting-to-know-ruby-19</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from David A. Black. No slides for this presentation: all examples of some live code. Going to go over what&amp;#8217;s needed to know to upgrade existing 1.8 code and then dive into what&amp;#8217;s new.&lt;/p&gt;
&lt;p&gt;In 1.8: &lt;code&gt;Object#to_a&lt;/code&gt; works pretty well, but warns you that it will be obsoleted. In 1.9 it&amp;#8217;s gone. One way to get around this: use &lt;code&gt;Array()&lt;/code&gt; to create arrays. There&amp;#8217;s also &lt;code&gt;Integer()&lt;/code&gt; and &lt;code&gt;Float()&lt;/code&gt; which are a little stricter than &lt;code&gt;to_s&lt;/code&gt; and &lt;code&gt;to_f&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;No more comma delineated hashes. &lt;code&gt;a = {1,2,3,4,5,6}&lt;/code&gt; just doesn&amp;#8217;t work.&lt;/p&gt;
&lt;p&gt;In 1.9, &lt;code&gt;String&lt;/code&gt; does not have &lt;code&gt;Enumerable&lt;/code&gt; mixed in. This caused a lot of confusion with 1.8 since &lt;code&gt;String#each&lt;/code&gt; and &lt;code&gt;String#map&lt;/code&gt; behave differently with line breaks. There&amp;#8217;s now a few methods: &lt;code&gt;String#each_line&lt;/code&gt;, &lt;code&gt;String#each_char&lt;/code&gt;, &lt;code&gt;String#each_byte&lt;/code&gt;, and also &lt;code&gt;String#each_codepoint&lt;/code&gt;. Codepoints are used for multibyte/UTF8 strings.&lt;/p&gt;
&lt;p&gt;Finally, &lt;code&gt;String#[]&lt;/code&gt; returns a character and not a number.&lt;/p&gt;
&lt;p&gt;New &lt;code&gt;Hash&lt;/code&gt; shortcut with symbols: &lt;code&gt;h = { one: 1, two: 2, three: 3 }&lt;/code&gt; They&amp;#8217;re also ordered too. When walking through the &lt;code&gt;Hash&lt;/code&gt;, it&amp;#8217;s done by the order that key/value pairs were inserted into it.&lt;/p&gt;
&lt;p&gt;Plenty of new &lt;code&gt;Enumerable&lt;/code&gt; magic: &lt;code&gt;#each_slice&lt;/code&gt; splits arrays into parts, &lt;code&gt;#each_cons&lt;/code&gt; does a sliding door of the given size. It&amp;#8217;s now possible to use &lt;code&gt;Enumerable#cycle&lt;/code&gt; to get a sort of manual iterator that you can stop and start.&lt;/p&gt;
&lt;p&gt;Block scoping with variables works the way people expect. If a variable inside a block has the same name as a local variable, it will use the block scoped variable.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/Alad17JnBU0" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-getting-to-know-ruby-19</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Chris Wansrath Keynote</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/Nyz4eDOlOlM/railsconf-2009-chris-wansrath-keynote" />
   <updated>2009-05-06T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-chris-wansrath-keynote</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Chris is going to talk about how to become a Rails rockstar/ninja/etc. Here&amp;#8217;s what you need to do: Get a blog. Have an attitude of some sort. Don&amp;#8217;t go for the default blog design. Customize it. Choose a tone: just two random adjectives.&lt;/p&gt;
&lt;p&gt;Now for content: just write&amp;#8230;anything. Start some controversy, bitch at other bloggers&amp;#8217; code, copy content from your older blogs. Lots of this and you&amp;#8217;ll become a famous Rails developer. But&amp;#8230;famous != good.&lt;/p&gt;
&lt;p&gt;Code is what brings developers together: not what people are blogging or known for. Chris went through a story of how he created a &lt;span class="caps"&gt;YAML&lt;/span&gt; library for &lt;span class="caps"&gt;PHP&lt;/span&gt; that helped him get a job. Code&amp;#8230;it talks! This is definitely how they found everyone who&amp;#8217;s working for GitHub now.&lt;/p&gt;
&lt;p&gt;Ruby/SourceForge is not about the code, even with the new redesigns. The process to create a new project on SourceForge is ridiculous: huge description, have to pick a license and even a category. Ridiculous, and unnecessary. No approval process on GitHub. All of this is just ceremony, and they don&amp;#8217;t add value.&lt;/p&gt;
&lt;p&gt;Get out of the way: reduce friction! Friction wastes energy and is expensive, need to avoid it. A big deal of creating a business: finding those who can help you.&lt;/p&gt;
&lt;p&gt;We need more of this&amp;#8230;people who contribute more to the community instead of just pushing their own agenda. We don&amp;#8217;t want rockstars, they&amp;#8217;re just unreliable.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/Nyz4eDOlOlM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/06/railsconf-2009-chris-wansrath-keynote</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 The Future of Deployment</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/RsYsiOsFu_Q/railsconf-2009-the-future-of-deployment" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-the-future-of-deployment</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This panel is from the guys behind Heroku. Going through the russian doll architecture of Heroku: Thin, Rack, Rack::Cache, and Sinatra. The guys who wrote this stuff are here, and they have some interesting opinions to share.&lt;/p&gt;
&lt;p&gt;Marc-Andre Cournoyer started Thin as a port of Mongrel that was not threaded. He plugged it into EventMachine, and magic happened.&lt;/p&gt;
&lt;p&gt;Christian Neukirchen started Rack. He didn&amp;#8217;t want to go with Rails for writing his own &lt;span class="caps"&gt;CMS&lt;/span&gt;, so he started it as a Mongrel plugin. He created a port of the Mongrel &lt;span class="caps"&gt;API&lt;/span&gt; to &lt;span class="caps"&gt;FCGI&lt;/span&gt;, brought it to Zed, and he pretty much shot it down. From there he started looking around and found Python&amp;#8217;s &lt;span class="caps"&gt;WSGI&lt;/span&gt; and decided to start on a Ruby version of it. Now at the point where pretty much every Ruby web framework runs on Rack.&lt;/p&gt;
&lt;p&gt;Ryan Tomayko started Rack::Cache since he wanted a much simpler way to deal with &lt;span class="caps"&gt;HTTP&lt;/span&gt; caching, since it&amp;#8217;s usually so complicated it&amp;#8217;s easy to lose people when trying to explain it. He also wanted to show a great example of some Rack middleware.&lt;/p&gt;
&lt;p&gt;Blake Mizerany started Sinatra because he had some smaller apps that he didn&amp;#8217;t need to use Rails for. He started messing around with Mongrel handlers but soon switched over to using Rack.&lt;/p&gt;
&lt;p&gt;Adam Wiggins is one of the founders of Heroku. He thinks the meaning of deployment is changing. It&amp;#8217;s not a slow cycle that requires a lot of hardware and time, and they&amp;#8217;re enabling people to change rapidly and allow developers to focus on writing their application code and not their servers.&lt;/p&gt;
&lt;p&gt;Discussing the terminology behind deployment. Some talk that Mongrel has become a noun, but most people seem to use just &amp;#8220;app server&amp;#8221;. Moving onto middleware and how it can be used. Most people seem to know about it but not actually use it. The real benefit seems to be that you can have small pieces that are easier to test and can be brought together in a simple way. Lots of discussion about queueing systems as well. Plenty of people in the audience are using them, and there also seems to be a decent chunk of people that have rolled their own system.&lt;/p&gt;
&lt;p&gt;(Note: I missed a decent chunk of this panel, the dry Vegas air finally got to me)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/RsYsiOsFu_Q" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-the-future-of-deployment</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Smacking Git Around</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/2CD254017Cc/railsconf-2009-smacking-git-around" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-smacking-git-around</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is definitely for those who use Git daily. Going through a whirlwind introduction to Git in under a minute.&lt;/p&gt;
&lt;p&gt;Learning about Revision Selection first. It&amp;#8217;s an alternate way to referring to ranges of commits. There&amp;#8217;s tons of ways to refer to objects in Git:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;SHA1&lt;/li&gt;
	&lt;li&gt;Partial SHA1 (at least 4 chars and unique in the git datastore)&lt;/li&gt;
	&lt;li&gt;Branch, remote, tag names&lt;/li&gt;
	&lt;li&gt;Caret Parent (&lt;code&gt;master^2&lt;/code&gt;)&lt;/li&gt;
	&lt;li&gt;Numbered Parent (&lt;code&gt;master~2&lt;/code&gt;)&lt;/li&gt;
	&lt;li&gt;Blob Spec (&lt;code&gt;master:path/to/file&lt;/code&gt;)&lt;/li&gt;
	&lt;li&gt;Relative Specs&lt;/li&gt;
	&lt;li&gt;Ranges &lt;code&gt;[old]..[new]&lt;/code&gt; that are reachable. Really useful to see what hasn&amp;#8217;t been pushed yet or what&amp;#8217;s upstream.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What am I going to push? &lt;code&gt;git log origin/master ..&lt;/code&gt; Lots of visual examples that would be way to difficult to show in text only. To see what&amp;#8217;s in a branch and not in another: &lt;code&gt;git log master --not origin/master&lt;/code&gt; or &lt;code&gt;git log master ^origin/master&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Showing off how Git doesn&amp;#8217;t really treat &lt;code&gt;git diff&lt;/code&gt; correctly. Using the &lt;code&gt;...&lt;/code&gt; syntax allows you to check differences when you want to merge. So usually: &lt;code&gt;git diff HEAD...topic&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Changing previous commits with &lt;code&gt;git commit --amend&lt;/code&gt;: first off: you can modify commit messages, and any staged files will get added in.&lt;/p&gt;
&lt;p&gt;Doesn&amp;#8217;t seem like many people understand how &lt;code&gt;git rebase&lt;/code&gt; works. Going through how the rebase process actually does its magic. Showing off a great example of using &lt;code&gt;git rebase --onto&lt;/code&gt;. It&amp;#8217;s used to transplant entire sections of commits cleanly. You can use branches as a lightweight way to refer to commits during a rebase.&lt;/p&gt;
&lt;p&gt;Running through a &lt;code&gt;git rebase -i&lt;/code&gt;. It actually loads a script that&amp;#8217;s executed in reverse order. Lots of fun stuff here: squshing, picking, reordering, and so on.&lt;/p&gt;
&lt;p&gt;Showing off &lt;code&gt;git filter-branch&lt;/code&gt; for rewriting the entire history.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s an alternative to submodules: sub-tree merging. This involves adding a remote for a project that isn&amp;#8217;t a direct clone. You can also use &lt;code&gt;git read-tree&lt;/code&gt; to pull out specific trees from other remotes and merge them in. &lt;code&gt;git merge&lt;/code&gt; has a ton of crazy options: &lt;code&gt;-s subtree --no-commit --squash&lt;/code&gt; whoa.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s possible to stage changes interactively with &lt;code&gt;git add -p&lt;/code&gt;. There&amp;#8217;s also &lt;code&gt;git blame&lt;/code&gt;, and it&amp;#8217;s &lt;code&gt;-C&lt;/code&gt; option. This option allows you to see code blocks that were moved in from other files so you can see when they were originally modified.&lt;/p&gt;
&lt;p&gt;Going through &lt;code&gt;git bisect&lt;/code&gt; and how you can use it to find bugs.&lt;/p&gt;
&lt;p&gt;The git config is full of awesome options (enable with &lt;code&gt;git config --global&lt;/code&gt;)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;help.autocorrect 1&lt;/code&gt;: Git will autocomplete commands that you mistype or didn&amp;#8217;t finish.&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;color.ui auto&lt;/code&gt;: Turn on colors when in the terminal only&lt;/li&gt;
	&lt;li&gt;Custom merge tools: plenty of ways to configure your own. Check the cheatsheet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Lots of stuff that can be done with &lt;code&gt;.gitattributes&lt;/code&gt;. Diffing binary files is one option, which Git usually barfs with. You can tell Git how to diff a binary file. Showing how to set this up. The end result is awesome, &lt;code&gt;exiftool&lt;/code&gt; can show you how resolutions changed, etc. This also works on Word Documents!&lt;/p&gt;
&lt;p&gt;Filters are pretty crazy too. The process is basically this: a &lt;code&gt;smudge&lt;/code&gt; script processes files during checkout, and a &lt;code&gt;clean&lt;/code&gt; filter runs on files when committed. This can be done to implement a $Date$ &lt;span class="caps"&gt;RCS&lt;/span&gt; style variable.&lt;/p&gt;
&lt;p&gt;Scott also uploaded the &lt;a href="http://tinyurl.com/gitrailsconf09"&gt;slides&lt;/a&gt; and a &lt;a href="http://tinyurl.com/gitrailsconf09-cheat"&gt;cheatsheet&lt;/a&gt; so you can see everything that was covered.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/2CD254017Cc" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-smacking-git-around</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Rails is from Mars Ruby is From Venus</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/2ddaNYoy4eA/railsconf-2009-rails-is-from-mars-ruby-is-from-venus" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-rails-is-from-mars-ruby-is-from-venus</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Learning Ruby will make you a better programmer! Why you should you learn Ruby? It&amp;#8217;ll help out with using Rails as well. There&amp;#8217;s tons of great references for learning about Ruby: the poignant guide from _why, the Pickaxe, and tons of real books too.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s your responsibility to listen to your code and figure out what it needs. You need to write Ruby code that is expressive and simple, but also works within the Rails conventions.&lt;/p&gt;
&lt;p&gt;Some of the things that you do that makes Ruby crazy:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Iteration. Don&amp;#8217;t do it on your own. Ruby has powerful ones, use them! &lt;code&gt;for..in&lt;/code&gt; calls &lt;code&gt;each&lt;/code&gt; internally.&lt;/li&gt;
	&lt;li&gt;Not taking advantage of the sugar that Ruby has. Don&amp;#8217;t use ternary operators, use &lt;code&gt;||=&lt;/code&gt;. There&amp;#8217;s also a &lt;code&gt;|=&lt;/code&gt; operator that can help cut code down drastically.&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t use checks against nil or false. Use Ruby&amp;#8217;s sense of truthiness to your advantage!&lt;/li&gt;
	&lt;li&gt;Making code shorter when it doesn&amp;#8217;t help understanding it. Brevity is not the goal, readability is the goal.&lt;/li&gt;
	&lt;li&gt;Not using &lt;code&gt;rescue&lt;/code&gt; on methods.&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t don&amp;#8217;t don&amp;#8217;t use &lt;code&gt;!!&lt;/code&gt;. Ruby does not not like clarity.&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;Base&lt;/code&gt; is a lame class name. Naming is really important.&lt;/li&gt;
	&lt;li&gt;Keep Ruby idiomatic. Named scope are a great example of doing this.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Going over some bad code that generates a &lt;span class="caps"&gt;URL&lt;/span&gt;&amp;#8230;it revolves around checking the class of an object and doing some actions with that object. Instead of using a &lt;code&gt;case&lt;/code&gt; statement for that, it&amp;#8217;s better to push that into the respective classes. This is definitely better since it&amp;#8217;s a decent separation of concerns and just cleaner Ruby.&lt;/p&gt;
&lt;p&gt;Jumping into Rails performance. Don&amp;#8217;t prematurely optimize without knowing what will be slow, but at the same time, don&amp;#8217;t write code that will never be fast. There&amp;#8217;s some ways that Rails helps out with this, like &lt;code&gt;counter_cache&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ruby is fun! (and easy!) The more Ruby you know, the better you&amp;#8217;ll get at Rails.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/2ddaNYoy4eA" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-rails-is-from-mars-ruby-is-from-venus</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/WqmgrtqZMwo/railsconf-2009-notes" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ll be doing liveblogging of the conference talks that I attend this year. This page will be updated throughout the week with links to the notes. Stay tuned!&lt;/p&gt;
&lt;h3&gt;Day One&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-dhh-keynote"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt; Keynote: The real secret to Rails Productivity&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-a-morning-with-github"&gt;A morning with GitHub&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-rails-is-from-mars-ruby-is-from-venus"&gt;Rails is From Mars, Ruby is From Venus&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-the-future-of-deployment"&gt;The Future of Deployment&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-smacking-git-around"&gt;Smacking Git Around&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/05/railsconf-2009-guitar-hero-behind-the-music"&gt;Guitar Hero Behind the Music&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Day Two&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-chris-wansrath-keynote"&gt;Chris Wansrath Keynote: Reducing Friction&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-getting-to-know-ruby-19"&gt;Getting to know Ruby 1.9&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-rails-3-step-off-of-the-golden-path"&gt;Rails 3 Step off of the Golden Path&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-what-makes-ruby-go-an-implementation-primer"&gt;What Makes Ruby Go: An Implementation Primer&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-working-effectively-with-legacy-rails"&gt;Working Effectively with Legacy Rails&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-starting-up-fast-lessons-from-the-rails-rumble"&gt;Starting Up Fast: Lessons from the Rails Rumble&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/06/railsconf-2009-robert-martin-keynote"&gt;Robert Martin Keynote: What killed Smalltalk could kill Ruby too&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Day Three&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/07/railsconf-2009-webrat-rails-testing-evolved"&gt;Webrat: Rails Testing Evolved&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/07/railsconf-2009-and-the-greatest-of-these-is-rack-support"&gt;And the Greatest of these is&amp;#8230;Rack support&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog/2009/05/07/railsconf-2009-automated-code-quality-checking-in-ruby-and-rails/"&gt;Automated Code Quality Checking in Ruby and Rails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/WqmgrtqZMwo" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 Guitar Hero Behind The Music</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/QjQ_YaneT24/railsconf-2009-guitar-hero-behind-the-music" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-guitar-hero-behind-the-music</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is about bringing the data from the game into the web. They&amp;#8217;re going to go over the process, the programming, and the infrastructure behind the Guitar Hero titles. They&amp;#8217;ve built a pretty huge Rails app that collects stats from the game across all of the currently available titles.&lt;/p&gt;
&lt;p&gt;They use feature driven development. This causes plenty of issues: with deployment, with getting customers to use it, and even more. A big part of this is managing expectations of the client. Lots of different stakeholders behind the game, and it&amp;#8217;s the project manager&amp;#8217;s job to deal with them and the developers.&lt;/p&gt;
&lt;p&gt;One huge difference with developing the website is that it&amp;#8217;s never actually complete, unlike the game. They use a modified scrum process for iterations. They had plenty of issues with traditional scrum, though:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lots of unnecessary overhead&lt;/li&gt;
	&lt;li&gt;Sprints were way too long&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They changed it so sprints were much shorter, usually a week, and daily standups to help out with communication.&lt;/p&gt;
&lt;p&gt;Lots of maintenance they have to deal with: managing refactors and upgrades along with making sure people can still use the game. A huge saving grace for this was using continous integration.&lt;/p&gt;
&lt;p&gt;Going over the architecture of their system. The Wii system talks directly to a Rails stack, but the Xbox 360 and PS3 do not, but the data eventually shows up on their network.&lt;/p&gt;
&lt;p&gt;They&amp;#8217;ve made some serious modifications to Rails. &lt;span class="caps"&gt;STI&lt;/span&gt; was not a good solution, it doesn&amp;#8217;t handle millions of rows in a good way. They created the &lt;code&gt;GHConfigurator&lt;/code&gt;, which has a lot of crazy features:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Title specific associations (for example: high scores across different games)&lt;/li&gt;
	&lt;li&gt;DB sharding, and making sure that connections aren&amp;#8217;t opened everywhere&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They used &lt;code&gt;Array#pack&lt;/code&gt; and &lt;code&gt;String#unpack&lt;/code&gt; to cram a lot of data for sending stats to the GH servers. The Wii and Xbox/PS ways of dealing with the stats are drastically different and required ways to work with this.&lt;/p&gt;
&lt;p&gt;They created an event manager to deal with processing stats coming in, but there were a lot of problems. There were too many GH titles, lots of load, the deploys had to wait until the queues were empty, and so on and so forth. It was bad.&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t redesign the solution, solve the problem! They had to fix this monster by splitting it into separate parts:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Reaper: Get events from the DBs and toss them into the queue, using Sparrow. Backed by sqlite3.&lt;/li&gt;
	&lt;li&gt;Dispatcher: Check the queues every so often, create consumers. They had to deal with problems that the game developers send them here as well.&lt;/li&gt;
	&lt;li&gt;Consumer: Parse the xml, actually create the high scores and other magic.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Huge success, lots of great feedback from the community about how well it&amp;#8217;s working. Since it&amp;#8217;s separated out it&amp;#8217;s a lot easier to test, deploy, and manage overall.&lt;/p&gt;
&lt;p&gt;The configurator broke fixtures completely. FactoryGirl saved them from this. Transactions also broke pretty seriously, but it was fixed by patching ActiveRecord. Caching was also hosed. They use fragment caching mostly, and they have to manage expiring them on their own. Caching on pretty much every single query.&lt;/p&gt;
&lt;p&gt;They use capistrano along with branches in &lt;span class="caps"&gt;SVN&lt;/span&gt; for deployment. Three environments: development, staging/QA, and production. Pretty standard set of tools for serving: Thin, Monit, HAProxy, &lt;span class="caps"&gt;NGINX&lt;/span&gt;, Memcache, MySQL.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/QjQ_YaneT24" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-guitar-hero-behind-the-music</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 DHH Keynote</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/6YErAacYOpY/railsconf-2009-dhh-keynote" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-dhh-keynote</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rails 3! This year marks the fifth year of working with Rails (six really for him). We&amp;#8217;re largely doing the same things from 5 years ago. Stop fretting so much if you&amp;#8217;re up to date with the most up to date practices. It&amp;#8217;s possible to enjoy Rails without knowing everything new that&amp;#8217;s going on, and definitely not necessary to rewrite apps as a whole that are using the &amp;#8216;old&amp;#8217; practicies.&lt;/p&gt;
&lt;p&gt;We were supposed to be killed a long time ago. Going through some memories of why Rails isn&amp;#8217;t supposed to make it. First off: it wasn&amp;#8217;t &amp;#8216;enterprise-ready&amp;#8217;. There was this notion that it was a group of consultants more interested in getting more billable hours and selling their books. This is obviously not the case. It takes time for these arguments to settle.&lt;/p&gt;
&lt;p&gt;The next step was copying Rails: Grails, Sails, Monorail, etc. By bringing a few parts that makes Rails awesome into a different language, it can help to make that language not suck. Well, maybe not. If you can boil down what makes Rails coders more efficient, then you don&amp;#8217;t need to learn about Ruby or Rails.&lt;/p&gt;
&lt;p&gt;Switching back to old systems: the first big one was &amp;#8216;7 Reasons I Switched back ot &lt;span class="caps"&gt;PHP&lt;/span&gt; after 2 years on Rails&amp;#8217;. For some reason since Rails didn&amp;#8217;t meet his needs, people saw it as a reason to ignore Rails. News sites like Slashdot and Reddit seem to intensify the arguments behind these posts, but it only lasts for a really short amount of time.&lt;/p&gt;
&lt;p&gt;The failwhale! The core argument behind this: Rails doesn&amp;#8217;t scale. It&amp;#8217;s hard to fight a meme like this, and it&amp;#8217;s better just to accept them. Rails has the both good and the bad with this situation, and it doesn&amp;#8217;t really matter in the long run.&lt;/p&gt;
&lt;p&gt;One of the big &amp;#8216;storms&amp;#8217; was the &lt;code&gt;Array#second&lt;/code&gt; and so on methods, which only lasted for a few days like the other ones. Merb was one of these too, but it&amp;#8217;s stuck around. The arguments at face value may seem very heated, but once you dive in, people are trying to solve the same problems.&lt;/p&gt;
&lt;p&gt;Chill out. We&amp;#8217;re still here despite all of what&amp;#8217;s been going on and it&amp;#8217;s not going anywhere.&lt;/p&gt;
&lt;p&gt;The Philosophy of Rails 3:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lock up the unicorns: Not going to solve all of the problems or be a huge rewrite.&lt;/li&gt;
	&lt;li&gt;No holy cows: Question what&amp;#8217;s going on, get away from things that can&amp;#8217;t or shouldn&amp;#8217;t be changed. Huge example: &lt;code&gt;alias_method_chain&lt;/code&gt;. Nothing is sacred in Rails. Definitely up for improvements that break existing Rails apps, if the arguments are good.&lt;/li&gt;
	&lt;li&gt;Have it your way: the real merge! It allows you to choose whatever you want, there&amp;#8217;s an accepted way to do things, but you can modify it as you want. Keeping people in the community because of this is most important.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The progress of Rails 3:&lt;/p&gt;
&lt;p&gt;No new gems or huge release today. Going over some nice parts of Rails 3 that&amp;#8217;s already in the repo.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;New router: Rewriting it again. Routing based on subdomains and user agents as well. Bake Rack into the router so you can mount multiple Rack apps at the same time. Going through some new ways that the router could be designed, both for old style declarations and new &lt;span class="caps"&gt;REST&lt;/span&gt; routing.&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;XSS&lt;/span&gt; protection: For a long time, it&amp;#8217;s been a holy cow and left to the developers to determine when to use the &lt;code&gt;h&lt;/code&gt; function to escape &lt;span class="caps"&gt;HTML&lt;/span&gt;. Flipping the convention: all default views will be escaped. You have to use the &lt;code&gt;raw&lt;/code&gt; helper to unescape. Mark a string as being safe &lt;span class="caps"&gt;HTML&lt;/span&gt; with &lt;code&gt;String#html_safe!&lt;/code&gt;. Thiswill probably cause the most pain for upgrades.&lt;/li&gt;
	&lt;li&gt;JavaScript: Unobstrusive means that no javascript in your &lt;span class="caps"&gt;HTML&lt;/span&gt;. Rails needs to do this too, but it&amp;#8217;s skipped over this for a long time. Rails is going to adopt HTML5 standards of custom attributes in order to get around this. Showing an example of &lt;code&gt;data-remote: true&lt;/code&gt; for &lt;code&gt;link_to_remote&lt;/code&gt;, &lt;code&gt;data-method: delete&lt;/code&gt; for &lt;code&gt;link_to :method =&amp;gt; :delete, :confirm =&amp;gt; true&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;Lots of more agnosticism: ActionORM, more flexible generators.&lt;/li&gt;
	&lt;li&gt;The great refactoring: Lots of ideas from Merb being brought over. AbstractController + ActionDispatch for making the controllers better and cleaner. ActionRelation will help out with some of the relational math going on under the hood of ActiveRecord.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DHH&amp;#8217;s secret to productivity: renegotiating requirements. Most programmers don&amp;#8217;t seem to be able to do this and push back. The real lesson here seems to be reflecting on what the customers really need, and trying not to sink tons of time into fruitless efforts. We want to be the hero and do everything the client wants. This is bad, obviously. You need to balance motivation along with what the clients want. The definition of programmer is bad: consider them partners instead.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/6YErAacYOpY" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-dhh-keynote</feedburner:origLink></entry>
 
 <entry>
   <title>RailsConf 2009 A Morning with GitHub</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/ycE7nw8jsm8/railsconf-2009-a-morning-with-github" />
   <updated>2009-05-05T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-a-morning-with-github</id>
   <content type="html">&lt;p&gt;This is part of my series of notes on RailsConf 2009. &lt;a href="http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-notes/"&gt;Check them all out here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introducing the guys behind GitHub, and then going through some QA&amp;#8217;s.&lt;/p&gt;
&lt;p&gt;1) Does github use any special techniques for storing so many repos?&lt;/p&gt;
&lt;p&gt;Storing repos uses alternates, which shares objects between different repos. They use Grit for a pure Ruby interface to Git. They use RedHat &lt;span class="caps"&gt;GFS&lt;/span&gt; as a shared filesystem. Lots of caching. No distributed hash table for objects&amp;#8230;yet. Architecture is pretty standard so far.&lt;/p&gt;
&lt;p&gt;2) How do you monitor the whole system?&lt;/p&gt;
&lt;p&gt;Twitter. No, seriously: NewRelic. There&amp;#8217;s also a job queue that they&amp;#8217;ve written custom stuff to look into what&amp;#8217;s going on. Engine Yard monitors the overall health of the system. They use Tom&amp;#8217;s god gem for lots of monitoring. They have to make sure that some processes don&amp;#8217;t kill the servers, such as syntax highlighting or upload-pack running wild.&lt;/p&gt;
&lt;p&gt;3) Do you shard git repos or do you use one big &lt;span class="caps"&gt;GFS&lt;/span&gt;?&lt;/p&gt;
&lt;p&gt;They split up repositories because having thousands of repos in one directory is just&amp;#8230;bad. They use a pretty simple hashing algorithm to split it up.&lt;/p&gt;
&lt;p&gt;4) How long does it take the test suite to run?&lt;/p&gt;
&lt;p&gt;A few minutes? No one seems to know. They use integrity to let them know when the build breaks.&lt;/p&gt;
&lt;p&gt;5) Are they going to open source github?&lt;/p&gt;
&lt;p&gt;Cost of running the open source project is really high, they&amp;#8217;re in this to make money. Parts of it are open source: Jekyll, Grit, the services.&lt;/p&gt;
&lt;p&gt;6) How many servers do you run GH on?&lt;/p&gt;
&lt;p&gt;Hosted at EngineYard. 4 front-end slices, 1 job slice, 1 machine for solr, 1 for gem building. Memcache runs on the front-end slices too.&lt;/p&gt;
&lt;p&gt;7) Is the GitHub source on GH?&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;8) Is GitHub profitable?&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;9) Why an Octocat?&lt;/p&gt;
&lt;p&gt;Tom was looking for a mascot when GitHub was starting, and he was looking for octopus style images since Git has an octopus merge. He found some artist that made him&lt;/p&gt;
&lt;p&gt;10) How do you manage authentication of so many &lt;span class="caps"&gt;SSH&lt;/span&gt; public keys on one user account?&lt;/p&gt;
&lt;p&gt;Someone from EY patched sshd for them. Patching authorized_keys doesn&amp;#8217;t work well with thousands of keys. So now, it looks up the keys via MySQL, which scales pretty well.&lt;/p&gt;
&lt;p&gt;11) When will you offer GH tshirts featuring the Octocat?&lt;/p&gt;
&lt;p&gt;Soon, hopefully.&lt;/p&gt;
&lt;p&gt;12) Naming gems username-gemname sort of works. How can it be made better?&lt;/p&gt;
&lt;p&gt;They&amp;#8217;re not very happy with the setup. They had to deal with some people creating accounts like &amp;#8216;net&amp;#8217; and having an &amp;#8216;ssh&amp;#8217; repo. It&amp;#8217;s been an incredible amount of work and a huge hassle so far for them.&lt;/p&gt;
&lt;p&gt;13) What can we expect in terms of new features on the upcoming months?&lt;/p&gt;
&lt;p&gt;Make sure the site scales. &lt;span class="caps"&gt;GFS&lt;/span&gt; isn&amp;#8217;t going to scale for much longer. They need to make Git scale, not Rails scale. Git wasn&amp;#8217;t really built to do what they need, and it&amp;#8217;s a big problem that they need to tackle. Better documentation for the &lt;span class="caps"&gt;API&lt;/span&gt; along with better integration for third party apps.&lt;/p&gt;
&lt;p&gt;14) Why not use passenger?&lt;/p&gt;
&lt;p&gt;EY manages it. No big reasons to change it yet.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/ycE7nw8jsm8" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/05/railsconf-2009-a-morning-with-github</feedburner:origLink></entry>
 
 <entry>
   <title>Git Started with Git</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/OWublvu4IAA/git-started-with-git" />
   <updated>2009-05-01T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/05/01/git-started-with-git</id>
   <content type="html">&lt;p&gt;One of the best parts about my internship at Thoughtbot is that I&amp;#8217;m able to participate in the awesome Ruby user group meetings nearby. For the month of April I talked about learning Git and how it can be integrated into your daily life at three different venues: &lt;a href="http://bostonrb.org"&gt;Boston.rb&lt;/a&gt;, &lt;a href="http://barcampboston.org"&gt;BarCampBoston 4&lt;/a&gt;, and &lt;a href="http://nhruby.org"&gt;NHRuby&lt;/a&gt;. Here&amp;#8217;s the slides from the talk:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gitstartedwithgit-nhruby-090501133113-phpapp02&amp;stripped_title=git-started-with-git" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gitstartedwithgit-nhruby-090501133113-phpapp02&amp;stripped_title=git-started-with-git" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;What I definitely enjoyed the most was getting questions and feedback from the audience. I was half afraid that I was leaving them far behind with some of the advanced topics (especially with rebasing) but from what I gathered most seemed pretty solid after the talk. I don&amp;#8217;t think I could ask for more than responses like this (thanks!):&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://twitter.com/jayroh/statuses/1521155516"&gt;&lt;img src="http://twictur.es/i/1521155516.gif" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://twitter.com/goldeneye/statuses/1664432958"&gt;&lt;img src="http://twictur.es/i/1664432958.gif" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://twitter.com/renaebair/statuses/1664704854"&gt;&lt;img src="http://twictur.es/i/1664704854.gif" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One aspect that really bit me was dealing with amount of material and questions, especially since the time requirements were different for all three. I cut plenty of slides out to fit it under an hour by the end, since my original timeslot was roughly double that. You can get all three versions if you&amp;#8217;re extra curious &lt;a href="http://drop.io/gitstarted"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/OWublvu4IAA" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/05/01/git-started-with-git</feedburner:origLink></entry>
 
 <entry>
   <title>BarCamp Boston 4 Roundup</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/DLnTLdL3l0s/barcamp-boston-4-roundup" />
   <updated>2009-04-26T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/04/26/barcamp-boston-4-roundup</id>
   <content type="html">&lt;p&gt;BarCamp Boston 4 has been a lot of fun. This post is just a roundup of the talks I went to on Sunday. I gave a talk about &lt;a href="http://drop.io/gitstarted"&gt;getting started with git&lt;/a&gt;, which seems to have went well.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve never been to &lt;span class="caps"&gt;MIT&lt;/span&gt; before, and I need to come back and explore the campus more. It was held in the &lt;span class="caps"&gt;MIT&lt;/span&gt; Strata center, which is absolutely ridiculous. The architecture is really just unreal. Also, I can&amp;#8217;t believe how much pizza a few hundred nerds can down in a manner of minutes.&lt;/p&gt;
&lt;p&gt;One of the neatest things was that a project was being run in the hallway with a &lt;a href="http://wiffiti.com"&gt;Wiffiti&lt;/a&gt; stream of the tweets, pictures, and more that was going on:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;object type="application/x-shockwave-flash" data="http://flash.alpha.locamoda.com/wiffiti.com/cloud/cataclysm.swf?&amp;loca=loca6848&amp;total=4&amp;tags=%23bcb4,bcb4,%21barcampboston,@loca6848&amp;twitter=1&amp;flickr=1&amp;locamoda=1&amp;background=http://locamoda-staging.s3.amazonaws.com/wiffiti_cloud_assets/173/bcamp-logo.png" height="460" width="500"&gt;&lt;param name="movie" value="http://flash.alpha.locamoda.com/wiffiti.com/cloud/cataclysm.swf?&amp;loca=loca6848&amp;total=4&amp;tags=%23bcb4,bcb4,%21barcampboston,@loca6848&amp;twitter=1&amp;flickr=1&amp;locamoda=1&amp;background=http://locamoda-staging.s3.amazonaws.com/wiffiti_cloud_assets/173/bcamp-logo.png"/&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the talks I went to and what I got out of them. You can see the &lt;a href="http://wiki.barcampboston.org/index.php?title=2009_Schedule"&gt;full schedule here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;how to be a freelancer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The person giving this talk wanted to hit like 8 points, but I think he only got to 3. What ensued was plenty of discussion on how to deal with clients, how to ditch them, and problems that come up with freelancing in general. The general gist I got from it: I&amp;#8217;m glad I don&amp;#8217;t have to deal with that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code secrets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This was a great idea: people in the audience write down horrible, deep, dark secrets about code they&amp;#8217;ve written, and then they&amp;#8217;re read off. Hilarity ensued.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Starting a Boston startup space&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sadly I didn&amp;#8217;t pay too much attention to this one, but my basic gist was that it&amp;#8217;s a community service, and it&amp;#8217;s tough to decide a business model that works for the people you&amp;#8217;re serving. I&amp;#8217;ll definitely be utilizing the local coworking if I end up on the lam as a freelancer or mobile worker after school is over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fun with QR Codes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;QR codes are really neat, and can do some ridiculous stuff. They&amp;#8217;re really awesome for embedding URLs into the real life, like putting a QR code near a bus stop that can open a schedule for you. I just wish my phone didn&amp;#8217;t suck so I could actually read them. I do wonder how this concept would catch on with the general public. What is really funny is to watch people try to read the QR code on their phones from the screen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JavaScript Testing Discussion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Lots of gripes about the current state of testing JS in the browser. There&amp;#8217;s plenty of ways to DO testing in the browser, but there doesn&amp;#8217;t seem to be a be-all, end-all solution. Listing out various testing frameworks, but there doesn&amp;#8217;t seem to be many familiar with most of them. Complaints, bitching and moaning about how difficult this situation is. It all boils down to not being able to remove the human element from testing it correctly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ruby Testing Panel&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Seems to be a general discussion of what&amp;#8217;s going on in the Ruby testing world and reactions that people have. Starting off with a rant or reasons why to Test First. Diving into some differences between RSpec and Shoulda and their syntax differences. Some talk about mocking and stubbing and the different libraries. This discussion went for an hour but I skipped out early to make the next talk.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Introduction to the Arduino&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Should be easy to translate software development experience into the microcontroller world. Throwing some around the room so we can get a look at what they are. Huge advantage: the bootloader. All you need is a &lt;span class="caps"&gt;USB&lt;/span&gt; cable and you can load code on it. There&amp;#8217;s ways to get around it or write your own too. Ridiculously neat demo: the arduino spins a platter with a thin slot that has LEDs beneath it. There&amp;#8217;s a lens at the top of the platter that the arduino can hook into, and control the speed of how fast the platter will go. Lots of C code and magic registers that you need data sheets for. I wonder if the Ruby library abstracts any of this away. Data sheets just seem scary, but useful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;LOLCODE&lt;/span&gt; 101&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This isn&amp;#8217;t 100% serious, but for some reason somebody made a programming language around this meme. I would post some code but pygments doesn&amp;#8217;t support the language. Best part of the language: &lt;span class="caps"&gt;DIAF&lt;/span&gt; is exiting with a status code.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/DLnTLdL3l0s" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/04/26/barcamp-boston-4-roundup</feedburner:origLink></entry>
 
 <entry>
   <title>Checkout tracked remote branch with Git</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/m9Ddwiy6TZ8/checkout-tracked-remote-branch-with-git" />
   <updated>2009-01-07T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2009/01/07/checkout-tracked-remote-branch-with-git</id>
   <content type="html">&lt;p&gt;I frequently need to do this when setting up or syncing my various machines, and I seem to forget the command all the time. So let&amp;#8217;s say you&amp;#8217;ve got more than one branch on your remote, and you want to bring it down into your local repository as well:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://gitready.com/images/branches.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Viewing information on the remote should look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;$ git remote show origin
  * remote origin
    URL: *************
    Remote branch merged with &amp;#39;git pull&amp;#39; 
      while on branch master
        master
      Tracked remote branches
        haml master
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Luckily, the command syntax for this is quite simple:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git checkout --track -b &amp;lt;local branch&amp;gt; &amp;lt;remote&amp;gt;/&amp;lt;tracked branch&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So in my case, I used this command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git checkout --track -b haml origin/haml&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can also use a simpler version:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git checkout -t origin/haml&lt;/code&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/m9Ddwiy6TZ8" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2009/01/07/checkout-tracked-remote-branch-with-git</feedburner:origLink></entry>
 
 <entry>
   <title>If you only could follow 10 people on Twitter...</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/X9tBohrrNXA/if-you-only-could-follow-10-people-on-twitter" />
   <updated>2008-12-11T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/12/11/if-you-only-could-follow-10-people-on-twitter</id>
   <content type="html">&lt;p&gt;&amp;#8230;who would they be? I&amp;#8217;m following a staggering number of people (1,337 to be exact), and the signal vs. noise ratio is just getting out of control. I&amp;#8217;m not sure how I got into this situation: I just started following everyone that followed me, and it spun out of control. I see a few options from here:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Remove everyone and start again.&lt;/li&gt;
	&lt;li&gt;Set up groups in TweetDeck and continue to follow a ton of people.&lt;/li&gt;
	&lt;li&gt;Slowly whittle away until my following/follower ratio is down to 1:1.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This got me thinking&amp;#8230;what if you could only follow 10 people? Who would I follow and why? I present my list, and I encourage you to think of your own.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/ablissfulgal"&gt;ablissfulgal&lt;/a&gt;: My girlfriend. I don&amp;#8217;t need to explain this one.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/mittense"&gt;mittense&lt;/a&gt;: Former coworker from Stardock who plays way too many video games.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/GarrettAtreides"&gt;GarrettAtreides&lt;/a&gt;: Classmate at &lt;span class="caps"&gt;RIT&lt;/span&gt;, MS lover, and all around goofy dude.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/AmazingSyco"&gt;AmazingSyco&lt;/a&gt;: Classmate at &lt;span class="caps"&gt;RIT&lt;/span&gt;, Cocoa hacker, and all around funny dude.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/chorn"&gt;chorn&lt;/a&gt;: Local Ruby fan that&amp;#8217;s a riot. Supposedly he&amp;#8217;s a &lt;span class="caps"&gt;CTO&lt;/span&gt; too.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/BreakingNewsOn"&gt;BreakingNewsOn&lt;/a&gt;: For those who prefer their news in &lt;span class="caps"&gt;ALL&lt;/span&gt; &lt;span class="caps"&gt;CAPS&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/defunkt"&gt;defunkt&lt;/a&gt;: One of the GitHubbers and an awesome Rubyist.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/faithfulgeek"&gt;faithfulgeek&lt;/a&gt;: Convert to the Ruby/&lt;span class="caps"&gt;OSX&lt;/span&gt; world from Microsoft. I&amp;#8217;m going through the same transition.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/nakajima"&gt;nakajima&lt;/a&gt;: Ruby ninja who&amp;#8217;s a code machine. And he&amp;#8217;s hilarious.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://twitter.com/guykawasaki"&gt;guykawasaki&lt;/a&gt;: Entrepreneur extraordinaire. I&amp;#8217;m listed on his site as a Twitterati too.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To those who didn&amp;#8217;t make the cut, don&amp;#8217;t feel bad! It&amp;#8217;s not that I don&amp;#8217;t want to communicate with you, just most likely I can communicate easier through a different channel (&lt;span class="caps"&gt;IRC&lt;/span&gt;, IM, what have you).&lt;/p&gt;
&lt;p&gt;Who would you follow? Let me know in the comments or make your own blog post!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/X9tBohrrNXA" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/12/11/if-you-only-could-follow-10-people-on-twitter</feedburner:origLink></entry>
 
 <entry>
   <title>Open Source Collaboration with Git and GitHub</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/mc0m5v_YnOs/open-source-collaboration-with-git-and-github" />
   <updated>2008-12-05T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/12/05/open-source-collaboration-with-git-and-github</id>
   <content type="html">&lt;p&gt;I just gave a talk at the &lt;a href="http://sse.se.rit.edu"&gt;Society of Software Engineers&lt;/a&gt;&amp;#8217; &lt;a href="http://sse.se.rit.edu/programs/tech-talks"&gt;Tech Talk Thursdays&lt;/a&gt; about &lt;a href="http://git-scm.com"&gt;Git&lt;/a&gt; and &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt;. The talk was a mashup of &lt;a href="http://jointheconversation.org/"&gt;Scott Chacon&amp;#8217;s&lt;/a&gt; &lt;a href="http://gitisbetterthanx.com"&gt;various&lt;/a&gt; &lt;a href="http://www.slideshare.net/chacon/getting-git"&gt;resources&lt;/a&gt; on Git along with &lt;a href="http://michaelhartl.com/"&gt;Michael Hartl&amp;#8217;s&lt;/a&gt; &lt;a href="http://www.voicesthatmatter.com/content/downloads/ruby2008/presentations/Hartl.pdf"&gt;presentation&lt;/a&gt; on contributing to &lt;a href="http://insoshi.com"&gt;Insoshi&lt;/a&gt; with GitHub. I think it went pretty well and it was followed by some good discussion.&lt;/p&gt;
&lt;p&gt;The talk is an introduction to Git from the perspective of a student who has used version control before (and hopefully has learned a bit of graph theory). I went over the little history that Git has, why Git rocks, and how helpful and easy it is to use GitHub. Check out the slides: (yes, there&amp;#8217;s puppies)&lt;br /&gt;
&lt;div id="__ss_819316" style="text-align:center"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Open Source Collaboration With Git And Git Hub" href="http://www.slideshare.net/qrush/open-source-collaboration-with-git-and-git-hub-presentation-819316?type=powerpoint"&gt;Open Source Collaboration With Git And Git Hub&lt;/a&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=opensourcecollaborationwithgitandgithub1228427160717862812284469878819539-1228448536513247-9&amp;amp;stripped_title=open-source-collaboration-with-git-and-git-hub-presentation-819316" /&gt;&lt;embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slideshare.net/swf/ssplayer2.swf?doc=opensourcecollaborationwithgitandgithub1228427160717862812284469878819539-1228448536513247-9&amp;amp;stripped_title=open-source-collaboration-with-git-and-git-hub-presentation-819316" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;"&gt;View SlideShare &lt;a style="text-decoration:underline;" title="View Open Source Collaboration With Git And Git Hub on SlideShare" href="http://www.slideshare.net/qrush/open-source-collaboration-with-git-and-git-hub-presentation-819316?type=powerpoint"&gt;presentation&lt;/a&gt; or &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/upload?type=powerpoint"&gt;Upload&lt;/a&gt; your own. (tags: &lt;a style="text-decoration:underline;" href="http://slideshare.net/tag/oss"&gt;oss&lt;/a&gt; &lt;a style="text-decoration:underline;" href="http://slideshare.net/tag/collaboration"&gt;collaboration&lt;/a&gt;)&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;It was definitely a lot of fun. (I almost wish someone was taking notes!) Someone was taking a video, so hopefully it&amp;#8217;ll be up soon. Next time I give the talk I want to show how easy it is to convert from svn/cvs as well as create and browse repositories since I got a lot of suprised looks about &lt;strong&gt;git init&lt;/strong&gt; and &lt;strong&gt;git instaweb&lt;/strong&gt; during Q&amp;amp;A.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/mc0m5v_YnOs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/12/05/open-source-collaboration-with-git-and-github</feedburner:origLink></entry>
 
 <entry>
   <title>GitHub Rebase #6</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/XSyBJXJanas/github-rebase-6" />
   <updated>2008-12-01T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/12/01/github-rebase-6</id>
   <content type="html">&lt;p&gt;The sixth edition of my column is live: &lt;a href="http://github.com/blog/246-github-rebase-6"&gt;&lt;span&gt;http://&lt;span&gt;github&lt;/span&gt;.com/blog/246-&lt;span&gt;github&lt;/span&gt;-&lt;span&gt;rebase&lt;/span&gt;-6&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m slowly improving the parsing process. For the last edition I broke out all of the work the app does into rake tasks, and then the Rails site is just for viewing the data. Basically there&amp;#8217;s a few steps:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Download &lt;span class="caps"&gt;ATOM&lt;/span&gt; feeds (This week, 1400. Last week, 1200).&lt;/li&gt;
	&lt;li&gt;Check that all of the downloads went ok. (Bad gateway errors happen to good people)&lt;/li&gt;
	&lt;li&gt;Parse the files, making sure that events are unique and &lt;span style="text-decoration: line-through;"&gt;users&lt;/span&gt; forkers are logged.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Surprisingly I&amp;#8217;m relying less and less on my app to get the column together, which is good. Huge kudos to the GitHubbers for creating the Recently Created page for each language. This helps me diversify the column while avoiding a lot of data crunching on my end.&lt;/p&gt;
&lt;p&gt;Next week I definitely want to parse the entire month&amp;#8217;s worth of events to really see the trends come out. Luckily their atom feed goes back 4000-5000 pages (of 30 events each) or this wouldn&amp;#8217;t be able to happen. What this will mean is that I&amp;#8217;ll actually have to optimize the download and parsing as much as possible. Stay tuned!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/XSyBJXJanas" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/12/01/github-rebase-6</feedburner:origLink></entry>
 
 <entry>
   <title>Using Berkeley DB and Ruby for Large Data Sets Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/dqX9n1azU_k/using-berkeley-db-and-ruby-for-large-data-sets-notes" />
   <updated>2008-11-20T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/20/using-berkeley-db-and-ruby-for-large-data-sets-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk by Matt Bauer from Pedal Brain.&lt;/p&gt;
&lt;p&gt;Large amount of data in their system with cycling. Tires, speed, wind, etc. 46 data points. 29 collected every 5 seconds. 1.7 &lt;span class="caps"&gt;TRILLION&lt;/span&gt; data points (50 GB!) with over 5000 concurrent requests. Everything from &lt;span class="caps"&gt;GPS&lt;/span&gt; location, power, etc. Devices are peridocially connected so data much be captured quickly and latency must be low. Realtime reporting of where cyclists are at with this system. Ability to do reports on many different levels. Typical report is 40k-220k rows.&lt;/p&gt;
&lt;p&gt;They settled with lighttpd, merb, and sleepycat software&amp;#8217;s stuff with BerkeleyDB. It&amp;#8217;s fantastic: open source and highly concurrent. Can scale to 256 terabytes! Fully featured DB too&amp;#8230;&lt;span class="caps"&gt;ACID&lt;/span&gt;, locking, and more. What&amp;#8217;s special: it&amp;#8217;s embedded, written in C with many bindings. No &lt;span class="caps"&gt;SQL&lt;/span&gt; or schema, doesn&amp;#8217;t operate on keys or data. Like sqlite, but way more battle tested.&lt;/p&gt;
&lt;p&gt;Two data stores. Concurrent data store: no recoverability or transaction capabilities. Transactional data store: fully recoverable and complete &lt;span class="caps"&gt;ACID&lt;/span&gt; feature set. So it&amp;#8217;s very powerful&amp;#8230;but is it good through Ruby? &lt;span class="caps"&gt;YES&lt;/span&gt;! Showing off quite a few tests about how blazingly fast it is. No marshalling data over the wire or through a socket so it&amp;#8217;s very fast.&lt;/p&gt;
&lt;p&gt;Very difficult to handle though. All sorts of special constraints that can be customizable. Two bindings that let Ruby talk to Berkeley. Guy Decoux wrote the original, which is pretty slow and built for a much older Ruby version. The newer once with Dan Janowski is an exact implementation of the C &lt;span class="caps"&gt;API&lt;/span&gt;, quite stable. Only three test cases though.&lt;/p&gt;
&lt;p&gt;Guy&amp;#8217;s bindings let you feel like the data is literally an object in Ruby. Dan&amp;#8217;s way is a lot like C. A bit messy and uses bit flags, but it&amp;#8217;s a direct translation from C anyway. There&amp;#8217;s only one table with BerkeleyDB, but different types of access:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
	&lt;li&gt;BTree: sorted, balanced tree. Ordered insertion results in full pages.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Hash: extended linear hashing&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Queue: fixed length records&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Recno: stable record numbers&lt;/li&gt;&lt;/p&gt;
&lt;/ul&gt;
&lt;p&gt;Variable length key and data means 4 gigs of data. Damn. Transactions and cursors are in there too and can be done completely through Ruby code. Indexes are in too, but requires two separate database connections.&lt;/p&gt;
&lt;p&gt;The future: combine the Ruby feel of Guy&amp;#8217;s code with Dan&amp;#8217;s C codebase, improve tests, more marshaling options. Support for newer version of the DB and moving to GitHub soon.&lt;/p&gt;
&lt;p&gt;Databasess != &lt;span class="caps"&gt;SQL&lt;/span&gt; or Entity/Relationship. Just be happy and use Ruby! Use the right tool for the job too, if it&amp;#8217;s BerkeleyDB, sqlite, MySQL, or whatever.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/dqX9n1azU_k" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/20/using-berkeley-db-and-ruby-for-large-data-sets-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Ruby: Fragile or Agile? Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/RIo0Bx39R00/ruby-fragile-or-agile-notes" />
   <updated>2008-11-20T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/20/ruby-fragile-or-agile-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is by Josh Susser from Pivotal Labs.&lt;/p&gt;
&lt;p&gt;Tons of wonders in the world. What the heck happened to Smalltalk though? Spawned many languages, but it was still superior. Yeah, there&amp;#8217;s Lisp too. Why aren&amp;#8217;t we all programming in Smalltalk? C++ mostly.&lt;/p&gt;
&lt;p&gt;Why is it a bad idea to go with C++ (At Apple!) Alan Kay said that 3 things make up OO: encapsulation, polymorphism, inheritance. For C++: &lt;span class="caps"&gt;WEAK&lt;/span&gt; encapsulation, &lt;span class="caps"&gt;WEAK&lt;/span&gt; polymorphism, &lt;span class="caps"&gt;WTF&lt;/span&gt; inheritance. At Xerox he programmed a smalltalk interpreter (or something) in Microcode. C++ is not a high level language. Just a thin layer on top of C, which is just portable assembly. Smalltalk had a lot of great things&amp;#8230;&lt;span class="caps"&gt;IDE&lt;/span&gt;, garbage collection, and a huge blind spot.&lt;/p&gt;
&lt;p&gt;Josh likes looking at things like their greatest strength is their greatest weakness. Comparing to Superman&amp;#8217;s strength and willingness to do good, which Lex Luthor can manipulate.&lt;/p&gt;
&lt;p&gt;&amp;#8220;An operating system is everything that can&amp;#8217;t fit in a language&amp;#8221; Very meta: Most of smalltalk implemented in smalltalk. Made of a kernel, which made up the fundamental pieces of the language: primitives, datatypes, IO, fundamentals. Virtual image had everything else: compiler, graphics, network stack. VM can be ported from platform to platform, and the image runs the same.&lt;/p&gt;
&lt;p&gt;Virtual image is really cool, but it&amp;#8217;s not without cost. Made applications almost impossible to deliver. He was one of the first at Xerox to deliver commerical Smalltalk apps. Very hard since the code was integrated with the user&amp;#8217;s data. No concept for namespaces, so screwed if vendors use them together.&lt;/p&gt;
&lt;p&gt;So, it&amp;#8217;s a bit of a monolith. You&amp;#8217;re not using Linux, Windows, etc windowing system, you&amp;#8217;re using Smalltalk&amp;#8217;s. It&amp;#8217;s getting old. C++ sucked up all of the oxygen and steam that Smalltalk had built up in a very short period of time.&lt;/p&gt;
&lt;p&gt;Why did that happen? C++ was not better than Smalltalk, but it was just enough better than C. Didn&amp;#8217;t require a big conceptual leap, plenty of tools, easy to implement, tons of tools already available for C. Most important things: Could actually ship applications with C++ to customers. Just enough more productivity! Sometimes, good enough is good enough.&lt;/p&gt;
&lt;p&gt;That brings us to Ruby. It would really suck if we were all programming in the modern equivalent of C++. It&amp;#8217;s not in immediate danger of facing Smalltalk&amp;#8217;s demise, but it couldn&amp;#8217;t hurt to think about ways to strengthen Ruby. Not going to fix the language, but fix the language.&lt;/p&gt;
&lt;p&gt;Rails. Most people came through it, and web development is the center of what&amp;#8217;s being done with Ruby. However, in the long run it&amp;#8217;s a niche&amp;#8230;.like PostScript. The next Ruby &amp;#8216;killer app&amp;#8217; will be outside of the web development domain. Not sure what yet though.&lt;/p&gt;
&lt;p&gt;Proposing that the reasons why people like Ruby is also because of agile development. There&amp;#8217;s a higher percentage of Rubyists that actually do use agile development techniques. It brought joy back to his programming experience because of that. Best thing about Rails is the test directory and how it encourages &lt;span class="caps"&gt;TDD&lt;/span&gt;. RubyGems too since most ship with tests. There&amp;#8217;s a culture of agile development around Ruby and it&amp;#8217;s essential to its future. Performance issued may be solved by Maglev, Rubinius, &lt;span class="caps"&gt;YARV&lt;/span&gt;, etc.&lt;/p&gt;
&lt;p&gt;The amount of metaprogramming in the language helps with the &lt;span class="caps"&gt;TDD&lt;/span&gt; movement. The problem is in development tools: we don&amp;#8217;t have a good &lt;span class="caps"&gt;IDE&lt;/span&gt;! It&amp;#8217;s a joy to program in it, but it makes it hell on an &lt;span class="caps"&gt;IDE&lt;/span&gt; to understand what&amp;#8217;s going on with the language. Smalltalk made decisions to limit the language so good development tools could be created. Simple refactoring methods like extract method, renaming are easy in Smalltalk. Not so much in Ruby because of its dynamic nature.&lt;/p&gt;
&lt;p&gt;Going through how update_attributes works&amp;#8230;it uses send to dynamically set attributes. It&amp;#8217;s incredibly powerful and expressive, but it makes refactoring difficult. This may be preventing people who are working with Java and used to refactoring tools to move over. No way to fully statically analyze a Ruby program&amp;#8230;you&amp;#8217;d need to solve the halting problem: Run the program to see what the program does. Why don&amp;#8217;t we just do that? Run tests to see what&amp;#8217;s interesting about the program.&lt;/p&gt;
&lt;p&gt;Showing off a little example to see what methods have been called on what classes. Can easily hook into Ruby metaprogramming to figure it out, but the main problem with this is that it can be very slow and you need to run the whole program.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/RIo0Bx39R00" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/20/ruby-fragile-or-agile-notes</feedburner:origLink></entry>
 
 <entry>
   <title>RESTful Possibilities - REST in Rails and Beyond Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/Dm7wZHGhCs4/restful-possibilities-rest-in-rails-and-beyond-notes" />
   <updated>2008-11-20T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/20/restful-possibilities-rest-in-rails-and-beyond-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is by James Golick from giraffesoft.&lt;/p&gt;
&lt;p&gt;The Rails community has been outspoken about &lt;span class="caps"&gt;REST&lt;/span&gt;, but it&amp;#8217;s starting to get a stigma where it&amp;#8217;s associated with only Ruby/Rails/Java. However, that shouldn&amp;#8217;t be the case. There&amp;#8217;s plenty of other uses outside though.&lt;/p&gt;
&lt;p&gt;Classic problem in computer science: two computers talking to each other over the network. Typically this has been done with Remote Procedure Call. The idea that you&amp;#8217;re invoking a method on some service. Make the programmer feel like they&amp;#8217;re writing regular old code, especially with &lt;span class="caps"&gt;SOAP&lt;/span&gt; and &lt;span class="caps"&gt;CORBA&lt;/span&gt;. Stack takes care of plumbing and isolates you from the complexities of distributed programming.&lt;/p&gt;
&lt;p&gt;They have some big problems though, especially in today&amp;#8217;s era of computer. Nearly 42,000 lines of code in the &lt;span class="caps"&gt;SOAP&lt;/span&gt; stack for Ruby. It&amp;#8217;s huge. They create way more problems than they solve. Fail.&lt;/p&gt;
&lt;p&gt;The web came around soon after these technologies, especially &lt;span class="caps"&gt;HTTP&lt;/span&gt;. Fielding described &lt;span class="caps"&gt;REST&lt;/span&gt; originally: representational state transfer. Absolutely anything can be resource. Used all the time: &lt;span class="caps"&gt;GET&lt;/span&gt;, &lt;span class="caps"&gt;POST&lt;/span&gt;. Don&amp;#8217;t verb the noun though and complicate things.&lt;/p&gt;
&lt;p&gt;Rails sought to standardize on &lt;span class="caps"&gt;REST&lt;/span&gt;. Based around the map.resources and routing system, which helps out a lot. Standardization is &lt;span class="caps"&gt;GOOD&lt;/span&gt;. New hires can be much more productive because of this. Cheap and clean &lt;span class="caps"&gt;API&lt;/span&gt;. Since there&amp;#8217;s a standardization at a higher level, powerful tooling is available. Easy and refreshing integration. Ridiculously easy to use it, only a few lines of code to even integrate with Twitter. Even more, this makes happy developers, which can lead to a more profitable business.&lt;/p&gt;
&lt;p&gt;Beyond Rails. Building on &lt;span class="caps"&gt;REST&lt;/span&gt; gets you a free server since there&amp;#8217;s tons out there already, and a cheap client since they&amp;#8217;re already implemented and easy to use. Looking at Starling as an example of this. 24% queue, 76% other shit &lt;span class="caps"&gt;LOC&lt;/span&gt;-wise with &lt;span class="caps"&gt;REST&lt;/span&gt;. Going through implementing a queue in Sinatra, which is really quite easy. Building apps on &lt;span class="caps"&gt;REST&lt;/span&gt; is good since there&amp;#8217;s plenty of servers and clients out there that can easy consume and use the services without a lot of code.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/Dm7wZHGhCs4" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/20/restful-possibilities-rest-in-rails-and-beyond-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Professional Ruby Conference Wrapup</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/TzOiBCqZSSs/professional-ruby-conference-wrapup" />
   <updated>2008-11-20T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/20/professional-ruby-conference-wrapup</id>
   <content type="html">&lt;p&gt;If you&amp;#8217;re looking for the copious amount of notes I took for the conference, &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;check out this post.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Speakers, if you have slides up, blog posts, or other stuff you want me to link to, &lt;a href="/contact"&gt;let me know&lt;/a&gt; and I&amp;#8217;ll make sure to add it.&lt;/p&gt;
&lt;p&gt;I had a ton of fun at this conference. I was really honored to meet some of the smartest people in the business and really get a feel for the community at large. I think the most interesting part of the conference was the mix of people involved&amp;#8230;it felt more like a big usergroup meeting than anything. Some people were very experienced, yet others were just starting to look into Ruby and what it has to offer them. Getting perspectives from both sides of the coin was very enlightening.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://bostonrb.org/"&gt;boston.rb pub night/crawl&lt;/a&gt; was a great time too. (&lt;a href="http://twitter.com/padillac/status/1014319333"&gt;At least for most people&lt;/a&gt;) I definitely want to see the rochester.rb group start up again with focused presentations and I&amp;#8217;m going to work towards making that happen. So, what I learned in a much simpler format:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
	&lt;li&gt;Test all the fucking time. There&amp;#8217;s no excuses. Pick a testing framework and go with it.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Ruby is slowly moving into the enterprise, and we have to fight hard to keep it fun and exciting.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Agile development principles are at the core of the Ruby community.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Pair programming helps a lot but is a skill to be learned.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Have fun and be passionate about your work.&lt;/li&gt;&lt;/p&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/TzOiBCqZSSs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/20/professional-ruby-conference-wrapup</feedburner:origLink></entry>
 
 <entry>
   <title>Contributing to Insoshi with Git and GitHub Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/Gh4scrYtJfs/contributing-to-insoshi-with-git-and-github-notes" />
   <updated>2008-11-20T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/20/contributing-to-insoshi-with-git-and-github-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk by Michael Hartl who runs Insoshi.&lt;/p&gt;
&lt;p&gt;Michael wrote Railspace and was part of Y Combinator and built insoshi out of those experiences. It&amp;#8217;s a developer run social network. They got onto GitHub during their beta and it&amp;#8217;s really helped them out.&lt;/p&gt;
&lt;p&gt;Another huge project on GitHub is Rails. Explaining the basics of Git and collaboration. Pushing to repositories, and most importantly: pulling down changes from cloned copies of the source.&lt;/p&gt;
&lt;p&gt;Going over a few features of Insoshi. One such feature is common contacts, which should be as simple as Person.common_contacts_with(@other_person). Contributors submit code constantly that isn&amp;#8217;t tested and somewhat messy, so it helps to clean it up. We&amp;#8217;re going to go through the process of cleaning it up since there&amp;#8217;s various problems from functionality to database vendor problems.&lt;/p&gt;
&lt;p&gt;Showing off GitHub and forking a repository. Forking a repo&amp;#8230;it&amp;#8217;s absolutely the same! They have 2 branches: master (stable) and edge (slightly less stable). Forks can maintain separate branches too. They have a custom script that pulls down changes and creating a separate branch for your own changes.&lt;/p&gt;
&lt;p&gt;Now that we have a forked repo and it&amp;#8217;s updated. So let&amp;#8217;s &lt;span style="text-decoration: line-through;"&gt;change the code&lt;/span&gt; write a test for our new functionality &lt;span class="caps"&gt;FIRST&lt;/span&gt;. Wrote a failing test and going to fix it in the code. Used the &amp;amp; operator to find the intersect between two arrays: person&amp;#8217;s contacts and other person&amp;#8217;s contacts.&lt;/p&gt;
&lt;p&gt;Showing the git commit and push commands and the diff up on GitHub. The pull request feature on GitHub lets you make the project maintainers aware that you&amp;#8217;ve made changes and lets them bring in your work. From there it&amp;#8217;s out of your hands, but they will be notified.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/Gh4scrYtJfs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/20/contributing-to-insoshi-with-git-and-github-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Testing as Communication: Real-World Techniques Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/XfZWpot2CoQ/testing-as-communication-real-world-techniques-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/testing-as-communication-real-world-techniques-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Jon Larkowski from Hashrocket.&lt;/p&gt;
&lt;p&gt;Subset of Obie&amp;#8217;s The Hashrocket Way talk. No mismatch between what the customer says and what the tests give. Hashrocket values agility &amp;amp; transparency. Communicate all the f***ing time, but only if the overhead is low. Two lines of communication:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Client to developer&lt;/li&gt;
	&lt;li&gt;Developer to developer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tools they use:&lt;/p&gt;
&lt;p&gt;Pivotal Tracker: Awesome tool. They don&amp;#8217;t write a line of code unless if a story in the application supports. Seriously, just check out http://pivotaltracker.com Tells you when features will be done with velocity. Again, just go to the site. This helps them out with communication because it lets them know who&amp;#8217;s working on what. Also a huge scheduling tool. Helps developers talk to developers with estimation efforts.&lt;/p&gt;
&lt;p&gt;Stories: All work is driven on stories. Only code what&amp;#8217;s on the card. Stories are tokens of a conversation. Writing stories at a developer level where they can start implementing it is important. They used to use index cards but now they just use the Tracker. They slowly train customers to write their own stories. Standard forms:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;As a / I want to / So That&lt;/li&gt;
	&lt;li&gt;Given / When / Then&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They want to understand development efforts in a larger context, so this helps out to see the bigger picture.&lt;/p&gt;
&lt;p&gt;Pair programming: Keeps developers honest, focused, and leads to higher quality code. There&amp;#8217;s two wheels on the axle since there&amp;#8217;s more than one person that knows the code. Laptops on either side of the computer. Ping Pong: one dev writes a failing test, other writes code to pass the test, rinse and repeat. Daily standups for the entire company.&lt;/p&gt;
&lt;p&gt;Testing: Express client stories as tests with Cucumber and normal &lt;span class="caps"&gt;MVC&lt;/span&gt; tests. RSpec specdoc format creates documentation. Durable system specification since it&amp;#8217;s in English. Tons of techniques used: RSpec, &lt;span class="caps"&gt;MVC&lt;/span&gt;, Factory Girl, Cucumber, Selenium, RSpactor (instead of autotest), Continuous Integration (CruiseControl), even clicking on stuff too.&lt;/p&gt;
&lt;p&gt;Delivery: All the f**cking time. Delivered multiple times a day! Very tight feedback loop with client. Smoke test together to demo features. Deployment with Capistrano to EY or EC2. Some Passenger use.&lt;/p&gt;
&lt;p&gt;Client Acceptance: Developer-assisted! Hold their hands for a while. Video chats, use the Tracker (automatic updates too). Daily standup with client to touch base.&lt;/p&gt;
&lt;p&gt;Impedance Matching: Clients, developers, testers&amp;#8230;all speak different language. The goal is maximum power transfer! Need to be able to talk to clients in their language, and not in geek speak. Bridging that gap requires a geek-to-english filter. Code however is a different answer. Getting the code to a geek speak standard is easy with regular code and &lt;span class="caps"&gt;MVC&lt;/span&gt; tests. With integration tests, it can bring that up to a level where both developers and clients can understand it: &lt;span class="caps"&gt;ENGLISH&lt;/span&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/XfZWpot2CoQ" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/testing-as-communication-real-world-techniques-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Surviving as a Windows Based Rails Developer Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/1vGF8a42EdM/surviving-as-a-windows-based-rails-developer-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/surviving-as-a-windows-based-rails-developer-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is by David Berube.&lt;/p&gt;
&lt;p&gt;Rails on Windows happens because sometimes it&amp;#8217;s a MS shop that isn&amp;#8217;t fully converted to Ruby. Fundamentally, Windows is not a good operating system. It just isn&amp;#8217;t &lt;span class="caps"&gt;POSIX&lt;/span&gt;. Most Rails devs are using &lt;span class="caps"&gt;OSX&lt;/span&gt; and are deploying on some version of Linux. Windows definitely isn&amp;#8217;t suitable for a server environment.&lt;/p&gt;
&lt;p&gt;Easy way to get started is the One Click Ruby Installer (http://rubyinstaller.rubyforge.org) Many intrinsic pitfalls.&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
	&lt;li&gt;Automatic binary conversion: LF =&amp;gt; &lt;span class="caps"&gt;CRLF&lt;/span&gt;. Sucks since you need a special flag to tell Windows not to touch it.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;No Kernel#fork. Can&amp;#8217;t do anything about it.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;No &lt;span class="caps"&gt;GNU&lt;/span&gt; (commands).&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;No Compiler.&lt;/li&gt;&lt;/p&gt;
&lt;/ul&gt;
&lt;p&gt;Running the actual development environment takes a lot of work. Visual Studio does have Ruby in Steel (but that costs money). NetBeans is clunky. He recommends using gvim, despite the obvious learning curve, since it can easily translate on &lt;span class="caps"&gt;UNIX&lt;/span&gt; systems. Emacs? E-text editor too has bundles, but don&amp;#8217;t work all the time.&lt;/p&gt;
&lt;p&gt;POSIXing your Windows box will never happen 100%. Cygwin is a good way to emulate the environment, but it sort of sucks. There are a few ways to emulate linux utilities too: unxutils, gnuwin32. Plenty of other tools too: PuTTY, Filezilla/SmartFTP, Litestep for Virtual Desktops and more.&lt;/p&gt;
&lt;p&gt;Why switch? Go for Ubuntu! (If you can) It&amp;#8217;s awesome. There are some bright sides&amp;#8230;FXRuby and shoes for &lt;span class="caps"&gt;GUI&lt;/span&gt; stuff, and &lt;span class="caps"&gt;OLE&lt;/span&gt; isn&amp;#8217;t too bad within Ruby either.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/1vGF8a42EdM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/surviving-as-a-windows-based-rails-developer-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Sinful Ruby Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/qO4CINXk7l8/sinful-ruby-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/sinful-ruby-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk from Will Koffel from Sermo.&lt;/p&gt;
&lt;p&gt;Sermo is in the health industry and builds a social network for licensed physicians in the US. They have roughly a quarter of all professionals in the field signed up in the country. (100,000!) Creates a unique model for other businesses to come and get opinions from hundreds of doctors. Built with traditional Java setup. J2EE. JBoss. Moving to Ruby now.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Lust. Why would you bring Ruby into your business? Don&amp;#8217;t jump in blind to it. Keep it professional! Top-down adoption in the organization: &lt;span class="caps"&gt;CEO&lt;/span&gt; latched on first by polling VCs. Choose it for the right reasons.&lt;/li&gt;
	&lt;li&gt;Gluttony. Teach it who&amp;#8217;s boss. Is Rails too opinionated for your business? They have some interesting decisions that they didn&amp;#8217;t want to change: No production &lt;span class="caps"&gt;SVN&lt;/span&gt;, sprocs/funcs. Make conscious choices about what to use.&lt;/li&gt;
	&lt;li&gt;Greed. Don&amp;#8217;t need to take the plunge and go 100% Ruby if you don&amp;#8217;t need to. Slowly brought Rails in through some ugly iframe hacking and session cookie reading. They use Thrift from Facebook in house to let Java and Rails talk to each other. Uses the Thrift server front-end to talk to the Rails app sitting in the background.&lt;/li&gt;
	&lt;li&gt;Sloth. Rewriting your front-end in Ruby just isn&amp;#8217;t enough. Architecture, services, and data are still critical. Plenty of new constraints since they&amp;#8217;re using two languages.&lt;/li&gt;
	&lt;li&gt;Wrath. Leads a trail of technological tears for the former stuff in use. &lt;span class="caps"&gt;JSP&lt;/span&gt; is being phased out, but destruction is sure to happen.&lt;/li&gt;
	&lt;li&gt;Envy. Change is hard. Ruby training offered for all developers. Some of the code has an &amp;#8216;accent&amp;#8217;. Build inclusive systems first. Lots of differences between Java developers that are stuck in a inheritance/package paradigm instead of Ruby mixins.&lt;/li&gt;
	&lt;li&gt;Pride. The deadliest sin! Don&amp;#8217;t let the love morph into hate of other languages! Be &lt;span class="caps"&gt;PROUD&lt;/span&gt; though! Find the right ways to introduce Ruby into your organizations. Give back to your Ruby community! Start or join a usergroup! Help the language mature, it&amp;#8217;s going to have the same problems.&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/qO4CINXk7l8" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/sinful-ruby-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Rock Solid Ruby Deployments Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/tLfSBvTmjZ4/rock-solid-ruby-deployments-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/rock-solid-ruby-deployments-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Philippe Hanrigou (&lt;a href="http://ph7spot.com"&gt;http://ph7spot.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Usually deployment is a bit issue/doubt with management and many others when choosing to go with Ruby. As Rubyists we may not be 100% familiar with all of the other tools that help web developers out, like lsof, strace, and gdb.&lt;/p&gt;
&lt;p&gt;The secret to troubleshooting is knowing your stack! You just need to know the basic, fundamental principles that are operating in your stack. You also should know the tools to help out with poking around the stack. There&amp;#8217;s some ways to look at the current Ruby interpreter thread: Kernel#caller, Kernel#raise. Thread#raise too, but not so much.&lt;/p&gt;
&lt;p&gt;The next layer: Mongrel. When mongrel starts, there&amp;#8217;s one thread (or cog, visually). The first thing Mongrel does when a request comes in is handle the request and spin off a new thread. There&amp;#8217;s a Rails handler to marshal the request and attempt to get a hold of the Rails lock. From there, Rails takes over and talks to the database, etc&amp;#8230;but that might take a long time. Other requests are going to spin new threads in Mongrel and sleep until they can obtain the lock on Rails. Phillippe created caller_for_all_threads, which gets a hash of all traces from all threads in Mongrel. You can send a signal to Mongrel and get a dump of where all of the Mongrels are. This will be in the next version of Ruby Enterprise Edition too.&lt;/p&gt;
&lt;p&gt;DTrace! A dynamic tracing tool that can trace the entire fucking stack. All of the other tools like &lt;span class="caps"&gt;GDB&lt;/span&gt; and strace live in the user space, not the kernel space. DTrace runs within the kernel and it can see everything: application, interpreter, and system. Using one tool, you can get information from your DB, memcache, Rails, Apache. It&amp;#8217;s not a static view tool: it can view multiple parts of your system through probes that can be tracked. Since probes are off by default, adding in probes is very cheap.&lt;/p&gt;
&lt;p&gt;The main problem is that dtrace isn&amp;#8217;t ready yet for Linux. Paul Fox (&lt;a href="http://www.crisp.demon.co.uk"&gt;http://www.crisp.demon.co.uk&lt;/a&gt;) is working on it, but it&amp;#8217;s not production-ready.&lt;/p&gt;
&lt;p&gt;DTrace is really good at inspecting garbage collection. Can see when it starts, stops, when exceptions are thrown, and even more. The tool lets you drill down and find the problem easier. It helps you pinpoint the actual performance bottleneck in your infrastructure. You can even see which ruby methods are slowing a particular group of Rails actions. Obviously, database methods will be slow. Can also figure out your memcache hit ratio, slow db queries, network i/o, and more. There are plenty of ways to hook into DTrace from Ruby: tracer, ruby-dtrace. Can allow you to hook into Rails very easily. Once again, know your stack!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/tLfSBvTmjZ4" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/rock-solid-ruby-deployments-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Rails AntiPatterns Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/XTbWsqW-NUg/rails-antipatterns-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/rails-antipatterns-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Chad Pytel and Tammer Saleh from Thoughtbot.&lt;/p&gt;
&lt;p&gt;They&amp;#8217;re gonna talk about things that they&amp;#8217;ve seen that have gone wrong in the Rails world. It&amp;#8217;s not gonna teach you to do &lt;span class="caps"&gt;TDD&lt;/span&gt;. It&amp;#8217;s gonna show you how to fix code better.&lt;/p&gt;
&lt;p&gt;Move code from controller to the model. 14 lines is &lt;span class="caps"&gt;TOO&lt;/span&gt; long for the create action. Might be crazy but you need to keep your guard up. Some crazy stuff is going on in this method. Transaction, catching an exception too. Refactored so it&amp;#8217;s a bit smaller, but not ideal yet. Refactor by identifying parts of code that are identical. Try to weed out unnecessary code too. Use AR callbacks when you can, a &lt;span class="caps"&gt;LOT&lt;/span&gt; easier. DO &lt;span class="caps"&gt;WHAT&lt;/span&gt; &lt;span class="caps"&gt;YOU&lt;/span&gt; &lt;span class="caps"&gt;MEAN&lt;/span&gt;. Have expressive callback names. Constantly check for code that isn&amp;#8217;t needed. Don&amp;#8217;t violate the Law of Demeter&amp;#8230;keep things &lt;span class="caps"&gt;DRY&lt;/span&gt; and look into the rule when you can. Use conditional callbacks in Rails 2.1 to remove even &lt;span class="caps"&gt;MORE&lt;/span&gt; code. Once again, push actions down into callbacks when possible. Get rid of transactions if you can. Only rescue exceptions if they are truly exceptional!&lt;/p&gt;
&lt;p&gt;Putting too much domain knowledge in the controllers is &lt;span class="caps"&gt;BAD&lt;/span&gt;. They move state checking out of the controller and into the model by defining a hash and dynamically creating methods to check the state. Tackle large refactoring iteratively! Shove business logic into the model. &lt;span class="caps"&gt;DRY&lt;/span&gt; &lt;span class="caps"&gt;DRY&lt;/span&gt; &lt;span class="caps"&gt;DRY&lt;/span&gt;. Use named scopes instead of having complex finders in your controllers.&lt;/p&gt;
&lt;p&gt;User Roles. See them all the time in apps. Ugly, messy, thoughtless code. Instead of having a role model, use boolean fields if you only have a small number of roles. If more than that, use has_many and not &lt;span class="caps"&gt;HABTM&lt;/span&gt;. Don&amp;#8217;t build beyond the requirements and don&amp;#8217;t jump to models prematurely.&lt;/p&gt;
&lt;p&gt;Bad code happens to good people. This was all production code that they definitely wrote, but looked like crap 3-6 months down the line. The real lesson is to always be refactoring.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/XTbWsqW-NUg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/rails-antipatterns-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Payment Processing with ActiveMerchant Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/_AC75wWd3m4/payment-processing-with-activemerchant-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/payment-processing-with-activemerchant-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk by Cody Fauser from Shopify.&lt;/p&gt;
&lt;p&gt;Why use it? Need money from customers to survive. Started very small and eventually morphed into Shopify. Shopify had to deal with tons of little idiosyncraies with how different clients wanted to interact with different payment gateways, so they extracted out this logic to make it easier.&lt;/p&gt;
&lt;p&gt;All they wanted to do was charge money and not worry about the payment gateways. Just send the order form and ActiveMerchant handles the rest. Roughly 50% of Shopify&amp;#8217;s gateways use PayPal Website Payments Pro. All of the gateways just &lt;span class="caps"&gt;WORK&lt;/span&gt;. Very easy to tell when it&amp;#8217;s the provider&amp;#8217;s problem because they have a lot of clients and can tell when they break.&lt;/p&gt;
&lt;p&gt;The goal: A simple, uniform &lt;span class="caps"&gt;API&lt;/span&gt;. Another important thing is interpreting the results that come back from the gateways. AM takes care of abstracting all of the messy handling away for you. AM is essentially a universal translator. The alien languages = payment gateway&amp;#8217;s APIs. Our language = Ruby.&lt;/p&gt;
&lt;p&gt;Terminology:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Cardholder: person you want $ from&lt;/li&gt;
	&lt;li&gt;Authorization: Verifies &amp;amp; reserves funds on card&lt;/li&gt;
	&lt;li&gt;Capture: Makes authorization for settlement&lt;/li&gt;
	&lt;li&gt;Settlement: transfers authorized amount to your bank&lt;/li&gt;
	&lt;li&gt;Sale/Purchase: authorization/capture combined&lt;/li&gt;
	&lt;li&gt;Address Verification Service: Fraud protection mostly.&lt;/li&gt;
	&lt;li&gt;Card Security Code: 3/4 digit code on the back of a credit card. More fraud protection since sites are forbidden from saving it&lt;/li&gt;
	&lt;li&gt;Payment velocity: Keeps transaction history to keep track of scammers. They keep a hash of the credit card info and check it if the card is submitted again&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Authorization process takes a long time (4 seconds) and you need to be able to have enough Mongrels to handle. For the other end of the process, settlement takes a few days for the banks to deposit the money. Showing off some code now about how AR works. They use integers for cents instead of worrying about floats and rounding errors. Very simple, clean code. The difference between choosing merchants is as simple as picking the right gateway class for the merchant. The rest of the code to interact with the gateway is the same.&lt;/p&gt;
&lt;p&gt;So, the benefits: it&amp;#8217;s pretty damn simple overall. Rich credit card object that has plenty of validation and helpful methods that do pretty much anything and everything you need. (card.display_number =&amp;gt; &lt;span class="caps"&gt;XXXX&lt;/span&gt;-&lt;span class="caps"&gt;XXXX&lt;/span&gt;-&lt;span class="caps"&gt;XXXX&lt;/span&gt;-1337 for example) AM takes the response from card security code checks and puts it in a form where you don&amp;#8217;t have to think about it. The community has grown substantially&amp;#8230;it&amp;#8217;s open source! Most of the gateways have been implemented outside of Shopify. The project is very extensible and the development time for new gateways it quite low. It&amp;#8217;s production ready code. Well tested, high quality code.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/_AC75wWd3m4" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/payment-processing-with-activemerchant-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Mobile Developments Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/8SjBW1KzJtM/mobile-developments-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/mobile-developments-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Matt Pelletier from Eastmedia.&lt;/p&gt;
&lt;p&gt;Going to talk about the mobile world. ~280 million PC sales worldwide. Around 1.2 billion mobile handsets too. The technologies that are in play:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Voice&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;SMS&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;MMS&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;Mobile Data Services&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Voice: How all of the telcoms started, obviously. Normal calls. Robots too. Tons of VoIP technologies too: Voice &lt;span class="caps"&gt;XML&lt;/span&gt;, Asterisk/Adhersion&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;SMS&lt;/span&gt;: Just recently started to surpass the number of voice calls in the States. &lt;span class="caps"&gt;SMS&lt;/span&gt; has long been used in South Korea/Japan. More &lt;span class="caps"&gt;SMS&lt;/span&gt; than email there! Mobile Terminated: you send a text message, Mobile Originated: you recieve a text message. &lt;span class="caps"&gt;SMS&lt;/span&gt; works even during emergencies and when phones are normally down since it wasn&amp;#8217;t originally a consumer service. There&amp;#8217;s no metadata associated with an &lt;span class="caps"&gt;SMS&lt;/span&gt; though&amp;#8230;just time and 160 characters. Can&amp;#8217;t reply even.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;MMS&lt;/span&gt;: &amp;#8220;A total shit show&amp;#8221;. Even Apple ditched it and used email. It&amp;#8217;s very carrier specific and abritrary. Hard problem to solve though.&lt;/p&gt;
&lt;p&gt;Mobile Data Services: Most sharply rising area that&amp;#8217;s important to businesses. &lt;span class="caps"&gt;WAP&lt;/span&gt; 1.0 was a disaster. &lt;span class="caps"&gt;WAP&lt;/span&gt; 2.0 is a trimmed down Web. Trimmed down version of &lt;span class="caps"&gt;XHTML&lt;/span&gt;. Matt used this for their New York Jets project, which got 2 million hits within 4 hours when Brett Favre got signed. Crazy. The &amp;#8220;&lt;span class="caps"&gt;REAL&lt;/span&gt;&amp;#8221; internet. is involved here too, sans Flash. Browser War v2.0: MobileSafari, Opera, Android Browser, Skyfire. Tons of apps now too. These used to be controlled by carriers in the US, but it&amp;#8217;s changing. This is being slowly eroded by the App Store and Android&amp;#8217;s Marketplace. App development process is &lt;span class="caps"&gt;MUCH&lt;/span&gt; better than it used to be, but it really isn&amp;#8217;t the Web. &lt;span class="caps"&gt;MANY&lt;/span&gt; &lt;span class="caps"&gt;MANY&lt;/span&gt; operating systems on each phone. The best approach to creating these seems to be hybrid: SaaS, iPhone app consuming a Rails app.&lt;/p&gt;
&lt;p&gt;Smartphones are becoming more and more common. What exactly do people want? Twitter/Facebook: talk to each other, find places, search. Americans use the mobile web as an extension of the desktop. Location Based Services aren&amp;#8217;t quite there yet. &lt;span class="caps"&gt;GPS&lt;/span&gt; is still slow. Not able to figure out exactly where you are yet.&lt;/p&gt;
&lt;p&gt;Spot.io: Post online strange stuff you see that&amp;#8217;s location based. Entry points: Twitter, IM, Email, &lt;span class="caps"&gt;API&lt;/span&gt; with OAuth, iPhone client. They&amp;#8217;re also parsing english to extract the most knowledge. Using a hand written parser since people don&amp;#8217;t write the same on Twitter as they do on the Wall Strett Journal.&lt;/p&gt;
&lt;p&gt;iPhone Development: Feels like Rails community 3-4 years ago. Sparse domain knowledge and poorly organized. Apple&amp;#8217;s &lt;span class="caps"&gt;SDK&lt;/span&gt; has code examples but has a lot of holes and problems. Not many good code conventions, but not that bad given it&amp;#8217;s been out for a year. Apple and Google have squeezed down the multiple layers of complexity to a point where you just have to worry about the APIs.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/8SjBW1KzJtM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/mobile-developments-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Messaging with Ruby on Rails Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/J2gSfJg8H6g/messaging-with-ruby-on-rails-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/messaging-with-ruby-on-rails-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk from Blaine Cook, formerly of Twitter. Now he&amp;#8217;s in Ireland!&lt;/p&gt;
&lt;p&gt;Building messaging systems is simple. Talking. Mail. Telephones. Messaging helps out a lot with &lt;span class="caps"&gt;AJAX&lt;/span&gt;. Parallel processing too, especially with technologies like MapReduce. Also important to decrease latency. Definitely important because latency determines context.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt; really isnt messaging. There&amp;#8217;s a requester, and a response. Not ideal&amp;#8230;ends up with a system that constantly asks &amp;#8220;are we there yet?&amp;#8221; Also need a specific address for it, and low latency. You want online messaging to be like fedex: deliver straight to your door, not to a mailbox where you have to go pick it up. Definitely needs to be asynchronous!&lt;/p&gt;
&lt;p&gt;There are many options to do this online: RabbitMQ is Erlang, but a bit odd. ActiveMQ is more enterprisey and Java-based. Starling/beanstalkd are very lightweight, simple, but not a lot of features. Gearman/TheSchwartz is more of a distributing processing framework than a queue server. cron could be used, but it&amp;#8217;s not designed to handle large numbers of messages. &lt;span class="caps"&gt;TONS&lt;/span&gt; of protocols too that each use.&lt;/p&gt;
&lt;p&gt;The queue server/broker needs to be durable: There needs to be a guarantee if the broker dies that the messages are going to get delivered. Beanstalkd doesn&amp;#8217;t have any durability, Spread not so much in some situations. Obviously durability is very important, especially for some domains (financial stuff). Reliability is important too! Starling works a lot like Mongrel: can scale very easily, works well with multiple brokers acting together.&lt;/p&gt;
&lt;p&gt;Another important idea: Safety! If the queue server can&amp;#8217;t finish a job, the job will get picked up by another broker. Starling doesn&amp;#8217;t have this&amp;#8230;results in dropped messages because workers crashed. Very application specific, but basically you need to be able to ensure that the message isn&amp;#8217;t sent twice while recovering.&lt;/p&gt;
&lt;p&gt;Blaine recently built and released ActiveQueue. There&amp;#8217;s many different ways to tackle this problem: Workling, Nanite. Probably 15 different queue servers released in the past 2 years&amp;#8230;which is fantastic since it shows that people are using it and it&amp;#8217;s growing. Doing it yourself is possible too. Clients talk to a queue, and workers pull jobs off the queue. Workers talk to the queue, and don&amp;#8217;t forget to throw in some monitoring of the workers &amp;amp; clients.&lt;/p&gt;
&lt;p&gt;The future: &lt;span class="caps"&gt;XMPP&lt;/span&gt; and cross-site messaging. Moving towards a low-latency, addressable internet! Right now, it&amp;#8217;s like checking to see if everyone you know has sent &lt;span class="caps"&gt;YOU&lt;/span&gt; mail. We can do better than that! Servers need message-oriented backends to deliver message-oriented frontends.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/J2gSfJg8H6g" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/messaging-with-ruby-on-rails-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Battle Royale: Merb's Role in the MVC Holy Wars Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/3pyu6JPQWdo/battle-royale-merbs-role-in-the-mvc-holy-wars-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/battle-royale-merbs-role-in-the-mvc-holy-wars-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Foy Savas. He&amp;#8217;s a Ruby Application Developer and a contributor to Merb and DataMapper Just for Foy:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dan, you better pay up.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The list of web frameworks goes on and on! It&amp;#8217;s important to keep an open mind. Merb has influnces from Django/Pylons from Python. It&amp;#8217;s meant to do what Rails is bad at: quick responses. What is it now? High performance, quick to deployment, fully scalable.&lt;/p&gt;
&lt;p&gt;We can make analogies between the frameworks.&lt;/p&gt;
&lt;p&gt;Application performance: Looking a graph of how the frameworks stack up for requests per second. Fastest is merb routing, faster is merb controller, merb itself handles rendering pages. Rails and Merb eat cake for breakfast&amp;#8230;but merb blazes ahead! How? Uses Ruby, Picks the best, tests for speed. No Symbol#to_proc, considered evil. Merb saves big with design decisions. Merb inline templates into controller as methods! No copying like Rails does. Merb is committed to performance: future releases can&amp;#8217;t be slower.&lt;/p&gt;
&lt;p&gt;Abstract controller: exception, mail controllers. No double renders. Merb uses case statements instead of responds_to. Merb has a worker queue baked in with run_later! Pushes it out of the request, response cyce. Merb is Rack-enabled. Super easy. Magical stuff is possible with Rack middleware and multiple versions of Merb. ActiveSupport is a kitchen sink. Extlib isn&amp;#8217;t. Only what you need, nothing you don&amp;#8217;t. Matz loves the Merb too.&lt;/p&gt;
&lt;p&gt;DataMapper kicks AR&amp;#8217;s ass. Auto-migrations, identity map, lazy loading data sets. Rails loves alias_method_chain. Merb hates it and would rather just refactor. The Merb &lt;span class="caps"&gt;API&lt;/span&gt; public method interfaces doesn&amp;#8217;t change without timed deprecation. Private methods aren&amp;#8217;t supposed to be used so they can factor. Plugins are gems!&lt;/p&gt;
&lt;p&gt;Merb Slices: Rails engines and an official part of the app. Extract code from your app and use it on others. Merb Auth: RESTful authentication that uses the cascading strategy pattern. And more. So much more.&lt;/p&gt;
&lt;p&gt;Tons of Rails production examples. Not so much Merb. But they should be counted as Ruby apps.&lt;/p&gt;
&lt;p&gt;Marketability! They&amp;#8217;re looking to get real with Rails. Looking for smart people no matter what. Gotta respect the leaders of the community.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s the Merb Advantage? Gems. Modularity. Performance. Stack agnosticism. Open-Endedness.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/3pyu6JPQWdo" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/battle-royale-merbs-role-in-the-mvc-holy-wars-notes</feedburner:origLink></entry>
 
 <entry>
   <title>5 Great Talks Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/JCK29F1OQ-o/5-great-talks-notes" />
   <updated>2008-11-19T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/19/5-great-talks-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;a href="../blog/2008/11/19/blog/2008/11/18/blog/2008/11/18/blog/2008/11/18/professional-ruby-conference-notes/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a talk about talks from Matt Knox (filling in for Giles Bowkett, who didn&amp;#8217;t show)&lt;/p&gt;
&lt;p&gt;Matt had a bit of a different start with Ruby&amp;#8230;he learned Rails for a job. Head down coding, didn&amp;#8217;t get involved with the community at all. Eventually he got burned out on it, and he started to get involved and going to conferences.&lt;/p&gt;
&lt;p&gt;1) Avi Bryant: Smalltalk is awesome, Maglev is gonna rock. The language itself is strange, but is veyr powerful. Maglev is crazy, alien technology. Been working on it forever.&lt;/p&gt;
&lt;p&gt;2) Luke Francl: Testing is overrated. Huge norm violation. Amazing that someone has the courage to do this. He was showing that there are many other ways to increase code quality: proofs, reviews, and more. Unit testing works well though.&lt;/p&gt;
&lt;p&gt;3) Damien Katz: Hugely inspirational talk. He sold his house, moved down to NC to write software he was passionate about. He&amp;#8217;s now writing CouchDB and it&amp;#8217;s part of the Apache project.&lt;/p&gt;
&lt;p&gt;4) &lt;span class="caps"&gt;DHH&lt;/span&gt;: Talked about how RailsConf moved from 30 people meeting after RubyConf to a huge conference. He talked about how Ruby isn&amp;#8217;t on the fringe anymore. This is the &amp;#8220;great surplus&amp;#8221; speech, and it will end at some point. The mainstream will copy Rails, something new will come along, or Rails will become the mainstream. What should we do about this? Do &lt;span class="caps"&gt;OTHER&lt;/span&gt; stuff than programming. Read paper (books!). Program less. Get a hobby. Work 4 days/week.&lt;/p&gt;
&lt;p&gt;5) Giles Bowkett: Utterly ridiculous. It was about patronage in Renaissance Europe and how it draws parallels to VC now. What happened was that the artists were worn as fashion accessories that were funded by the rich. As you make money you can go from being a pet monkey to being your own monkey owner! Since it&amp;#8217;s cheap to develop apps now, VCs aren&amp;#8217;t necessary.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/JCK29F1OQ-o" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/19/5-great-talks-notes</feedburner:origLink></entry>
 
 <entry>
   <title>The many facets of Ruby at AT&amp;T Interactive Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/N1r0UVUnt9U/the-many-facets-of-ruby-at-att-interactive-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/the-many-facets-of-ruby-at-att-interactive-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Coby Randquist from AT&amp;amp;T Interactive (and a partner at Confreaks!)&lt;/p&gt;
&lt;p&gt;They&amp;#8217;re already&lt;strong&gt; &lt;span class="caps"&gt;TOO&lt;/span&gt; &lt;span class="caps"&gt;BIG&lt;/span&gt;&lt;/strong&gt;. They handle this by breaking these things down into smaller teams. Everyone does &lt;span class="caps"&gt;TDD&lt;/span&gt;! Mobile development teams too: iPhone, Blackberry, Android. Project managers, plenty of designers. Huge team.&lt;/p&gt;
&lt;p&gt;The site (YellowPages.com) is one of the highest traffic sites on the net. &lt;strong&gt;27 million monthly uniques, 165+ million page views.&lt;/strong&gt; &lt;span class="caps"&gt;WOW&lt;/span&gt;. Basically, they replaced a legacy Java legacy application with a Rails app and service tier with a small team in a manner of months. It&amp;#8217;s been live since July 2007, currently running on Rails 2.1.1.&lt;/p&gt;
&lt;p&gt;How did they scale Rails? Load balancer gets requests that figures out which datacenter to hit it. Load Balancer there =&amp;gt; Web Tier =&amp;gt; Load Balancer =&amp;gt; Service Tier =&amp;gt; Load Balancer =&amp;gt; Oracle Cluster.&lt;/p&gt;
&lt;p&gt;Web tier: 8.4k &lt;span class="caps"&gt;LOC&lt;/span&gt;, 20 servers/data center, 16 mongrels/server. Minimal AR. Communicates with service tier primarily. These process &lt;span class="caps"&gt;ERB&lt;/span&gt; and &lt;span class="caps"&gt;HAML&lt;/span&gt;. &lt;span class="caps"&gt;CDN&lt;/span&gt; servers for images, js.&lt;/p&gt;
&lt;p&gt;Service tier: 10k &lt;span class="caps"&gt;LOC&lt;/span&gt;. 8 servers/data center, 30 mongrels/server, memcached. Talks to search engine and oracle DBs.&lt;/p&gt;
&lt;p&gt;Their production environment runs a custom compilation of Ruby. Plenty of other little tweaks for speed boosts. &lt;strong&gt;They&amp;#8217;re rewriting their service layer in Merb!&lt;/strong&gt; Why? Rails footprint: 60MB/mongrel. Merb footprint: 25MB/mongrel. Huge difference because of their traffic. Hopefully will deploy by the end of the year.&lt;/p&gt;
&lt;p&gt;They&amp;#8217;re huge into Open Source. Plenty of open source projects on GitHub: waves, functors, kablame, crufty, hoshi, live-console. Lots of fun little apps that their R&amp;amp;D is playing with: &amp;#8216;Speak 4 it&amp;#8217;, &amp;#8216;Need 2 Pee&amp;#8217;. Research being done with search, natural language recognition, speech recognition and more. Their site is a huge force in hyperlocal searching.&lt;/p&gt;
&lt;p&gt;Content from other presentations: Their interview process is quite interesting&amp;#8230;they send ruby code first and give candidates and hour to complete a unit test with a class. They use &lt;span class="caps"&gt;SVN&lt;/span&gt; for version control and most developers use git-svn.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/N1r0UVUnt9U" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/the-many-facets-of-ruby-at-att-interactive-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Riding Rails at the New York Times Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/jzrJqUcIdcs/riding-rails-at-the-new-york-times-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/riding-rails-at-the-new-york-times-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Ben Koski from the NYT&amp;#8217;s Interactive News Technology team. The team is a recent addition to the company&amp;#8230;6 backend, 3 frontend people. They&amp;#8217;re a part of the newsroom&amp;#8230;directly working with reporters! Journalistic instead of business.&lt;/p&gt;
&lt;p&gt;Big difference between journalism on the web vs. of the web. On: copy paste from the newspaper. Of: connected multimedia, assets, and more.&lt;/p&gt;
&lt;p&gt;Plenty of Rails apps living at the Times. Big ones like the election tracker to smaller ones like a Guantanamo detainee library. Each application should tell a story&amp;#8230;not just a data dump on the web. Showing off the other various apps that they&amp;#8217;ve done. Dynamic backends, internal research apps, and even more static include generators.&lt;/p&gt;
&lt;p&gt;Going over the election results from the AP feed and the architecture they used to tackle Election night this year. Feed had live results, county-by-county. They had to figure out how to split up 153 different files every 3-5 minutes that were comma-delineated. They used this for the primaries&amp;#8230;but it wasn&amp;#8217;t going to cut it for the general election.&lt;/p&gt;
&lt;p&gt;AP schema feed just wasn&amp;#8217;t rails friendly. (Duh.) &lt;span class="caps"&gt;FTP&lt;/span&gt; is slow, long updates, long rollbacks because of massive amounts of data. Interesting way how they handled updating the production tables from the AP feed by adding in staging tables to &amp;#8216;buffer&amp;#8217; changes. Some awesome stats about how their architecture handled the lode.&lt;/p&gt;
&lt;p&gt;Ben is now going over some what they used to speed up the app. Second highest day of traffic ever in Times history. How did they scale Rails? &lt;strong&gt;They didn&amp;#8217;t!&lt;/strong&gt; Well, wait a minute. They used Rails to generate the &lt;span class="caps"&gt;HTML&lt;/span&gt; and uploaded that up to /www. Works well for high traffic since there&amp;#8217;s no need for dynamic content/interaction on the site.&lt;/p&gt;
&lt;p&gt;More scaling static content techniques: Used memcache and load-balancer caching. Pulled &lt;span class="caps"&gt;AJAX&lt;/span&gt; requests from a &lt;span class="caps"&gt;CDN&lt;/span&gt;, reduced how big the page was, and grouped flash content into one file.&lt;/p&gt;
&lt;p&gt;Strengths:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Rapid start, raw data to app in hours&lt;/li&gt;
	&lt;li&gt;Tweak-friendly. Can easily change stuff because of Capistrano.&lt;/li&gt;
	&lt;li&gt;Ability to drop down to &lt;span class="caps"&gt;SQL&lt;/span&gt; in AR is essential.&lt;/li&gt;
	&lt;li&gt;Web code works well on command line. (In other words, &lt;span class="caps"&gt;PHP&lt;/span&gt; can&amp;#8217;t do that.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Weaknesses:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;NYTimes is mostly a Sun shop. They use EC2 for most stuff.&lt;/li&gt;
	&lt;li&gt;Deployment. What? I missed this.&lt;/li&gt;
	&lt;li&gt;Admin interface isn&amp;#8217;t there out of the box like Django.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/jzrJqUcIdcs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/riding-rails-at-the-new-york-times-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Refactoring Complex Domains in Ruby on Rails Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/9TFZqPCslFg/refactoring-complex-domains-in-ruby-on-rails-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/refactoring-complex-domains-in-ruby-on-rails-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;a href="../blog/2008/11/18/blog/2008/11/18/blog/2008/11/18/professional-ruby-conference-notes/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Shane Harvie.&lt;/p&gt;
&lt;p&gt;Inheritance vs. Delegation. Need to make sure that you&amp;#8217;re using the right technique. Going over a simple example with a bike that has various properties. We want to be able to change the type of bike it is at runtime. State pattern would work well, but let&amp;#8217;s use them with module extension.&lt;/p&gt;
&lt;p&gt;However, Ruby doesn&amp;#8217;t natively provide a way to unmix a module. However, there&amp;#8217;s a new gem called mixology that allows you to do just that.&lt;/p&gt;
&lt;p&gt;Domain evolution. Fat controller are bad. Service layers are good, but can get fat too. Behavior should be defined within models.&lt;/p&gt;
&lt;p&gt;So we&amp;#8217;re modelling a network with various nodes, in building. They can be physically connected or wirelessly at a certain frequency. Nodes can&amp;#8217;t have more than one physical connection. Obviously a decently complex example. Getting a little lost with this example, sorry folks. Creating a service layer helped out a lot. Extracted functionality out to a separate module that handled the complex logic of building nodes.&lt;/p&gt;
&lt;p&gt;However, changing requirements completely mucked up that model. Rewiring multiple AR models is tough! The main problem is that the logic that decides how to do the change gets mixed up with the logic that actually makes the change. The query is mixed with the modifier! There needs to be a way to figure out what the new network would look like if two nodes were connected. This goes on and on until what&amp;#8217;s being returned gets ridiculously complicated. It&amp;#8217;s much better to refactor out into a results object. Way more examples&amp;#8230;I need to pick up Shane&amp;#8217;s book.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/9TFZqPCslFg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/refactoring-complex-domains-in-ruby-on-rails-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Professional Ruby Conference Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/isp6zzHJoSs/professional-ruby-conference-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m going to attempt to live blog and take notes about the talks at the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt; today and tomorrow. Stay tuned! :) (By the way, huge thanks to &lt;a href="http://antoniocangiano.com/2008/11/10/and-the-winner-is/"&gt;Antonio Cangiano&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll keep this post updated with links to the other conference notes posts as the day goes on.&lt;/p&gt;
&lt;p&gt;The slides are going to be posted &lt;a href="http://www.voicesthatmatter.com/ruby2008/presentations/"&gt;here&lt;/a&gt;. I&amp;#8217;ll link the slides to my notes once the conference is over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tuesday&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-keynote-notes/"&gt;Keynote, from Obie Fernandez.&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/riding-rails-at-the-new-york-times-notes/"&gt;Riding Rails at The New York Times, from Ben Koski.&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/jruby-who-what-now-notes/"&gt;JRuby: Who What Now?, from Thomas Enebo&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/introduction-to-mongrel-notes/"&gt;Introduction to Mongrel, from Matt Pelletier&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/the-many-facets-of-ruby-at-att-interactive-notes/"&gt;The many facets of Ruby at AT&amp;amp;T Interactive Notes, from Coby Randquist&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/demystifying-rails-plugin-development-notes/"&gt;Demystifying Rails Plugin Development, from Nick Plante &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/four-years-of-ruby-development-notes/"&gt;Four Years of Ruby Development, from Ezra Zygmuntowicz &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/nature-network-stays-agile-in-the-enterprise-notes/"&gt;Nature Network Stays Agile in the Enterprise, from Matt Janowski &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/18/refactoring-complex-domains-in-ruby-on-rails-notes/"&gt;Refactoring Complex Domains in Ruby on Rails Notes, from Shane Harvie&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Wednesday&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/5-great-talks-notes/"&gt;5 Great Talks, from Matt Knox &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/payment-processing-with-activemerchant-notes/"&gt;Payment Processing with ActiveMerchant, from Cody Fauser &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/rock-solid-ruby-deployments-notes/"&gt;Rock Solid Ruby Deployments, from Philippe Hanrigou&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/messaging-with-ruby-on-rails-notes/"&gt;Messaging with Ruby on Rails, from Blaine Cook &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/mobile-developments-notes/"&gt;Mobile Developments, from Matt Pelletier &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/testing-as-communication-real-world-techniques-notes/"&gt;Testing as Communication: Real-World Techniques, from Jon Larkowski &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/surviving-as-a-windows-based-rails-developer-notes/"&gt;Surviving as a Windows Based Rails Developer, from David Berube &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/rails-antipatterns-notes/"&gt;Rails AntiPatterns, from Chad Pytel and Tammer Saleh &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/battle-royale-merbs-role-in-the-mvc-holy-wars-notes/"&gt;Battle Royale: Merb�s Role in the &lt;span class="caps"&gt;MVC&lt;/span&gt; Holy Wars, from Foy Savas &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/19/sinful-ruby-notes/"&gt;Sinful Ruby, from Will Koffel &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thursday&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/20/ruby-fragile-or-agile-notes/"&gt;Ruby: Fragile or Agile?, from Josh Susser &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/20/restful-possibilities-rest-in-rails-and-beyond-notes/"&gt;RESTful Possibilities &amp;#8211; &lt;span class="caps"&gt;REST&lt;/span&gt; in Rails and Beyond, from James Golick &lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/20/using-berkeley-db-and-ruby-for-large-data-sets-notes/"&gt;Using Berkeley DB and Ruby for Large Data Sets, from Matt Bauer&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://litanyagainstfear.com/blog/2008/11/20/contributing-to-insoshi-with-git-and-github-notes/"&gt;Contributing to Insoshi with Git and GitHub, from Michael Hartl &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/isp6zzHJoSs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Professional Ruby Conference Keynote Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/ejbiT4kqpyA/professional-ruby-conference-keynote-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-keynote-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the keynote of the conference from Obie Fernandez. He&amp;#8217;s going over the Hashrocket Way, or how he runs his company. Explaining the origins of the hashrocket logo&amp;#8230;80s rock. Pretty metal. Going to explain how they work&amp;#8230;based on Agile: Extreme programming, scrum, their own experience. Four principles in the manifesto for agile software development:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Individuals &amp;amp; interactions over processes and tools&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Pair-programming. They use 2 people in front of one computer, 2 keyboards, 2 mice. Both people that way can code and can be contributors. More productive despite only one workflow. Why? Less interruptions (Twitter, questions, bosses, etc) A lot easier to continue when two people are working on the same thing if one person needs to take a break. Pair programming is a &lt;span class="caps"&gt;SKILL&lt;/span&gt; to be learned! Benefits come out over time, not immediately. Need to work at it. Continous code reviews =&amp;gt; produces high quality code =&amp;gt; less defects and problems. &lt;span class="caps"&gt;LEVELING&lt;/span&gt; UP of knowledge because of working closely with skilled people.&lt;/li&gt;
	&lt;li&gt;No interviews. What? No, wait. Phone interviews first. But beyond that, no. Can&amp;#8217;t figure out how they work until you actually &lt;span class="caps"&gt;WORK&lt;/span&gt; with them. Obviously a bit of a problem&amp;#8230;but they should be able to make it if they want the job.&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t get too big. He doesn&amp;#8217;t want the company to get bigger than it is. Rails is productive and the team size can stay small because of it.&lt;/li&gt;
	&lt;li&gt;Small teams. 2-4 people. Roles can rotate&amp;#8230;generally a designer + a senior person who&amp;#8217;s overseeing + client = sweet spot of 5-7 people for a team. Very self-organizing.&lt;/li&gt;
	&lt;li&gt;Everybody together. No one works remotely at Hashrocket. Ever. They have a Guest Star program to bring in people for fresh ideas. They bring in people on short-term engagements. Just bring them in for a week, brings in new blood, excitement, new thinking.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Working software over comprehensive documentation&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;span class="caps"&gt;TATFT&lt;/span&gt;. Test all the fucking time. Showing a snippet from Brian Liles&amp;#8217; talk.&lt;/li&gt;
	&lt;li&gt;RSpec. Think in terms of specifications. Protection against regression, documentation generated for them in the output.&lt;/li&gt;
	&lt;li&gt;Minimum viable product. What&amp;#8217;s the least you can do to get a working site up. Rails Rumble 2007&amp;#8230;powerful constraints, powerful deadlines. Hashrocket builds sites for clients in 3 days flat. How do you do this? If distributed, bring people together in one place.&lt;/li&gt;
	&lt;li&gt;Small Releases. Very short release cycles. 2-3 weeks sometimes, but multiple deploys a day for some clients.&lt;br /&gt;
#&lt;strong&gt;Customer colloboration over contract negotiation&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Onsite customer. Talk to them face to face and get them to answer the questions. Find a way to make your environment desirable. (You can see the beach from their office!)&lt;/li&gt;
	&lt;li&gt;Visual Design &lt;span class="caps"&gt;FIRST&lt;/span&gt;. They require design documents first. Not exactly an XP practice. They focus on programming not design. Awesome hybrid process graphic&amp;#8230;combines steps from classic waterfall with modern, iterative agile methods.&lt;/li&gt;
	&lt;li&gt;User stories are used to define requirements. Narratives about features, with acceptance criteria and relative effort required. Provides a backlog of how long tasks take and leads to better estimation. They use &amp;#8216;storycarding&amp;#8217; to figure out how long features/tasks will take.&lt;/li&gt;
	&lt;li&gt;Master Services Agreement. Way more about this on Obie&amp;#8217;s blog. Defines the relationship and business partnership. Legalese. Keeps IP property separate. Keep these documents simple&amp;#8230;(Doesn&amp;#8217;t look that way to me).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Responding to change over following a plan&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Pivotal Tracker. Cornerstone of his business, and it&amp;#8217;s free to try! Shows current features and a backlog of current ones. (I wonder how this compares to Lighthouse!)&lt;/li&gt;
	&lt;li&gt;Standup meetings. Literally stand up to keep it short. Phone call every day with clients too. Traditional scrum style standup&amp;#8230;what are you doing, what did you do.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One more thing&amp;#8230;&lt;span class="caps"&gt;HAVE&lt;/span&gt; &lt;span class="caps"&gt;FUN&lt;/span&gt;! Should be fun since Ruby is awesome.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/ejbiT4kqpyA" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/professional-ruby-conference-keynote-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Nature Network Stays Agile in the Enterprise Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/VPyNVSooV4o/nature-network-stays-agile-in-the-enterprise-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/nature-network-stays-agile-in-the-enterprise-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;a href="../blog/2008/11/18/blog/2008/11/18/blog/2008/11/18/professional-ruby-conference-notes/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Matt Jankowski from Thoughtbot.&lt;/p&gt;
&lt;p&gt;Showing some hilarious images when you google &amp;#8216;enterprise&amp;#8217;, &amp;#8216;agile&amp;#8217;, and &amp;#8216;agile management&amp;#8217;. All ridiculously complicated. Agile is Thoughtbot. The enterprise is a old, huge publishing group in London. The site itself is social networking for scientists. Provides a forum for online communication and allows them to share research data, etc. Had over 28 people in total working on the project for at least a month.&lt;/p&gt;
&lt;p&gt;What is Agile? Obie explained a lot&amp;#8230;but they do &amp;#8220;lowercase agile&amp;#8221;. Not 100% to all conventions. &lt;span class="caps"&gt;TDD&lt;/span&gt; + &lt;span class="caps"&gt;BDD&lt;/span&gt; / &lt;span class="caps"&gt;TATFT&lt;/span&gt; ^ XP. No pair programming. Elements taken from &amp;#8216;Getting Real&amp;#8217; by 37signals too. Lightweight, goal-driven development.&lt;/p&gt;
&lt;p&gt;What is enterprise? Meetings. Spec documents. Layers of management. Constant re-organization. Bureaucracy. Internal politics. People who &amp;#8220;just&amp;#8221; want a job. Frowning on people like that just isn&amp;#8217;t cool.&lt;/p&gt;
&lt;p&gt;Goals between agile companies and enterprise companies are very different. &lt;span class="caps"&gt;REAL&lt;/span&gt; goals are different. Are the cultures at odds with each other? Can they work together efficiently?&lt;/p&gt;
&lt;p&gt;Getting to the case study! They had some crazy routes that the client wanted, and didn&amp;#8217;t have leverage to say no. Having someone with no check on their power that makes crazy decisions is bad, mmkay? They used &lt;span class="caps"&gt;JIRA&lt;/span&gt; for issue tracker. Ridiculously complicated and not a communication tool like Basecamp is. They also used Perforce, centralized &lt;span class="caps"&gt;SCM&lt;/span&gt;, which emphasized control, not trust.&lt;/p&gt;
&lt;p&gt;Plenty of stakeholders in the project that had conflicting and related requirements. Ad sales, editors, IT Group (Keep this crazy ruby stuff away from our Java app servers!), Developers (keep crazy ruby code away from us!), product/branding team, system architects with tons of experience, QA team, analytics, design team.&lt;/p&gt;
&lt;p&gt;Developers were obsessed with test coverage, not product quality. Obsessed with semantic/valid markup, not site usability. Elegance &amp;amp; refactoring over how the site feels/looks. Developers aren&amp;#8217;t just coders! Devs must have constant access to product team, but the product team can&amp;#8217;t interrupt devs.&lt;/p&gt;
&lt;p&gt;Production site was still very high-quality. Hire excellent people. Enterprise is about avoiding risk and managing change.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/VPyNVSooV4o" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/nature-network-stays-agile-in-the-enterprise-notes</feedburner:origLink></entry>
 
 <entry>
   <title>JRuby: Who What Now? Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/TdlGsGNYD6w/jruby-who-what-now-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/jruby-who-what-now-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Talk from Tom Enebo from Sun Microsystems. He&amp;#8217;s the co-lead of JRuby.&lt;/p&gt;
&lt;p&gt;You don&amp;#8217;t have to be a Java programmer to use it. It&amp;#8217;s just Ruby! Compatible with Ruby 1.8.6. Proving compatability&amp;#8230;passing against tons of Ruby/Rails tests. On target to put our 6 releases a year, 15000 bug fixes, ~3100 changesets. Performance is great and improving.&lt;/p&gt;
&lt;p&gt;They&amp;#8217;re working on Ruby 1.9 support and Java interop. They just released 1.1.5 two weeks ago. Added some caches, supposedly 5-20% faster.&lt;/p&gt;
&lt;p&gt;Some issues:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
	&lt;li&gt;Native-threaded. Not a big deal.&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;No native C-extensions. Ported over some libraries that use it, work to do them&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;No Continuations. (What the heck are they?)&lt;/li&gt;&lt;/p&gt;
&lt;/ul&gt;
&lt;p&gt;Foreign Function Interface: call C functions directly form Ruby. Joint &lt;span class="caps"&gt;API&lt;/span&gt;, started with Rubinius. It&amp;#8217;s now a gem. (This reminds me of dropping down to interop/pinvoke in Windowsland). Going over an example use of the &lt;span class="caps"&gt;FFI&lt;/span&gt; gem.&lt;/p&gt;
&lt;p&gt;1.9 support done by christmas, hopefully. They want to put 1.8.6 and 1.9.1 support in the same binary. JRuby makes Java fun again! Tom is starting to go over a neat 3D pong game that he rewrote in JRuby. It&amp;#8217;s Ruby code, not Java.&lt;/p&gt;
&lt;p&gt;Why Java? Fantastic VM&amp;#8230;500 man-years total on it. (Jebus.) Other typical pro-Java arguments. Going over how JRuby optimizes loops. Garbage collector is better, native threads, more tools (debuggers, &lt;span class="caps"&gt;IDE&lt;/span&gt;, profilers), more libraries.&lt;/p&gt;
&lt;p&gt;Why use JRuby on the web? Once again, it&amp;#8217;s &lt;span class="caps"&gt;EVERYWHERE&lt;/span&gt;. Less political resistance too. Other options: Warbler, Glassfish. JRuby lets you put in parts of Java where you need it.&lt;/p&gt;
&lt;p&gt;Why people are using JRuby: No new software to install, Java libraries fill a void in Ruby (like Swing), works on Windows. Code obfuscation works well since JRuby generates Java bytecode in a way that no decompiler can understand it yet.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/TdlGsGNYD6w" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/jruby-who-what-now-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Introduction to Mongrel Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/mpYZ72YMfRI/introduction-to-mongrel-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/introduction-to-mongrel-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Matt Pelletier from Eastmedia.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a &lt;span class="caps"&gt;HTTP&lt;/span&gt; server written in pure Ruby. History&amp;#8230;other solutions were &lt;span class="caps"&gt;SLOW&lt;/span&gt;! &lt;span class="caps"&gt;FCGI&lt;/span&gt;, WEBrick, mod_ruby sucked. Translation into &lt;span class="caps"&gt;CGI&lt;/span&gt; just slowed everything down. Zed Shaw decides to just write a full &lt;span class="caps"&gt;HTTP&lt;/span&gt; server. Fast, light, plays well with other servers, very configurable and flexible.&lt;/p&gt;
&lt;p&gt;Huge design goal was &lt;span class="caps"&gt;SECURITY&lt;/span&gt;. Most security holes were the fault of human oversight, crappy hand-written parsers, &lt;span class="caps"&gt;HTTP&lt;/span&gt; spec doesn&amp;#8217;t limit sizes. He decided to implement security by putting caps on a lot of the request parameters.&lt;/p&gt;
&lt;p&gt;Production environments: Rails isn&amp;#8217;t thread-safe, but processes are cheap. Use mongrel_cluster to configure. DON&amp;#8217;T use it for &lt;span class="caps"&gt;SSL&lt;/span&gt;. (There were some other no&amp;#8217;s too, but it went too fast) How many mongrels? Depends on your app. There&amp;#8217;s simple ways to calculate and forecast how many your app will need depending on load and other factors.&lt;/p&gt;
&lt;p&gt;Mongrel is thread-safe and is faster than Rails itself! There are plenty of other web servers available to&amp;#8230;Swiftiply, Thin, Passenger.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/mpYZ72YMfRI" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/introduction-to-mongrel-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Four Years of Ruby Development Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/2IkmW0OyCEI/four-years-of-ruby-development-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/four-years-of-ruby-development-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;a href="../blog/2008/11/18/blog/2008/11/18/blog/2008/11/18/professional-ruby-conference-notes/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Ezra Zygmuntowicz from Engine Yard.&lt;/p&gt;
&lt;p&gt;He&amp;#8217;s going to go over his history working and deploying with Rails.&lt;/p&gt;
&lt;p&gt;Started with WEBrick, which rocked for development but obviously not for production. He first tried out Apache with FastCGI. Didn&amp;#8217;t work that well either. Had to write scripts to kill zombies.� Lighttpd + FastCGI was bad. Lighttpd + &lt;span class="caps"&gt;SCGI&lt;/span&gt; was bad. Another Apache combination that sucked too.&lt;/p&gt;
&lt;p&gt;Then&amp;#8230;&lt;span class="caps"&gt;MONGREL&lt;/span&gt;! Pure text, can hit individual mongrels, great platform for sure and still in use. Lighttpd&amp;#8217;s proxy module failed. Lightspeed was next and it was nice, but their license sucks. Mongrel + Nginx was next! This combination works really well and is battle-tested. Ebb is actually faster than Mongrel since it&amp;#8217;s single threaded and event-driven. Mongrel though is still the best general purpose server.&lt;/p&gt;
&lt;p&gt;Passenger has done an awesome job, but it&amp;#8217;s geared mostly towards development and shared hosting/small &lt;span class="caps"&gt;VPS&lt;/span&gt;. Nginx + Mongrel or Thin for high volume deployments. Passenger might be there someday, but not yet. Ruby Enterprise Edition helps with memory, but Apache is a hog so it doesn&amp;#8217;t matter.&lt;/p&gt;
&lt;p&gt;Rack: the great equalizer! Boils down any web server down to an object with a &amp;#8216;call&amp;#8217; method on it. Makes it a lot easier to write handlers that are server agnostic. Rack is fast becoming a standard and it future-proofs your code/app.&lt;/p&gt;
&lt;p&gt;Nanite: builds scalable backends for Ruby apps. Nanite &amp;#8216;agents&amp;#8217; report back to a broker, which then fan out reports to various Nanite &amp;#8216;mappers&amp;#8217; on the front end. It&amp;#8217;s built around RabbitMQ, which is written in erlang. This means it&amp;#8217;s fast, clusterable, and very scalable. Apps just need to &lt;strong&gt;appear&lt;/strong&gt; fast, not actually &lt;strong&gt;be&lt;/strong&gt; fast. This system is crazy useful for building apps on scalable cloud sites like EC2. Basically, it makes it easy to build scalable backends.&lt;/p&gt;
&lt;p&gt;Engine Yard As a Service! Going to open it up for other hosting platforms to use their infrastructure with. Other services are very low level, but they want to make it easy and approachable. They&amp;#8217;re going to attempt to apply the convention over configuration that Rails provides to deployment. Instead of logging into your server to make changes, you log into their application and describe what your app runs on. It&amp;#8217;s the genetic information of your app and allows for greater portability. Allows you to build an entire server from scratch and deploy your app with one click. This is a much different way of thinking about deployment! No manual changes, all done through site&amp;#8217;s interface. Ridiculous.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/2IkmW0OyCEI" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/four-years-of-ruby-development-notes</feedburner:origLink></entry>
 
 <entry>
   <title>Demystifying Rails Plugin Development Notes</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/WuJ7GMWmau8/demystifying-rails-plugin-development-notes" />
   <updated>2008-11-18T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/18/demystifying-rails-plugin-development-notes</id>
   <content type="html">&lt;p&gt;Part of my series of notes from the &lt;a href="http://www.voicesthatmatter.com/ruby2008/"&gt;Professional Ruby Conference&lt;/a&gt;. &lt;a href="../blog/2008/11/18/professional-ruby-conference-notes/"&gt;See them all here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This talk is from Nick Plante.&lt;/p&gt;
&lt;p&gt;Work more on the &amp;#8216;special sauce&amp;#8217; of Rails. Plugins can save you a &lt;span class="caps"&gt;LOT&lt;/span&gt; of time! Generalized, reusable code libraries. Lets us mold the Rails framework into what we want it to be and make it more powerful. It&amp;#8217;s a lot easier than you think! Some examples: User authentication, Pagination, Asychronous Processing, View Helpers.&lt;/p&gt;
&lt;p&gt;Why develop them? Internal reuse, opportunity to refactor &amp;amp; clean up. Also contributes to the Ruby &lt;span class="caps"&gt;OSS&lt;/span&gt; ecosystem! Most plugins don&amp;#8217;t start as plugins. They really shouldn&amp;#8217;t&amp;#8230;they&amp;#8217;re extracted/generalized.&lt;/p&gt;
&lt;p&gt;Nick is going over an example of making a plugin for validating &lt;span class="caps"&gt;ISBN&lt;/span&gt; numbers. Lots of messy code lives in the model&amp;#8230;it can hit a limit. Extract it! Use encapsulation and information hiding&amp;#8230;Extract into /lib, or better yet, make a plugin!&lt;/p&gt;
&lt;p&gt;When designing the interface for a plugin, &lt;span class="caps"&gt;KISS&lt;/span&gt;. Extend the Rails &lt;span class="caps"&gt;DSL&lt;/span&gt; in a natural way&amp;#8230;many pre-existing examples to guide us (ActiveRecord::Validations in this case). Showing some examples of plugins, from Paperclip, acts_as_list, some for ActionController and ActionView too.&lt;/p&gt;
&lt;p&gt;Make people learn as &lt;span class="caps"&gt;LITTLE&lt;/span&gt; new stuff as possible to use your plugin. Showing off an example module for the &lt;span class="caps"&gt;ISBN&lt;/span&gt; validation. Some methods I haven&amp;#8217;t seen before: extract_options! validates_each&lt;/p&gt;
&lt;p&gt;Why is it a module and not a class? A module is a degenerate abstract class and can be mixed into a class. Include for instance methods, extend for class methods.&lt;/p&gt;
&lt;p&gt;Plugin hooks! Install.rb: Auto-run when the plugin is installed with script/plugin install. Used to show the readme and copy any assets over. (Uninstall.rb for the opposite). Init.rb is used to inject plugin code into the framework, runs when the application is started. Common idiom is to use self.included to extend modules as well.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;NEED&lt;/span&gt; &lt;span class="caps"&gt;TESTS&lt;/span&gt;. (&lt;span class="caps"&gt;TATFT&lt;/span&gt;!) If you&amp;#8217;ve extracted it, you should have the tests. Right? Some strategies: mock/stub out the environment if possible. Rake tasks are generated for helping out with testing plugins too. RSpec also has a plugin generator.&lt;/p&gt;
&lt;p&gt;Distributing plugins is super easy. Any old &lt;span class="caps"&gt;SVN&lt;/span&gt;/Git repo, RubyForge, GitHub. They can also be packaged as Gems and use the various rake tasks for gem installing/unpacking. Why use Gems? They have proper versioning and dependency management. GitHub makes creating gems super easy.&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t be afraid! Read the Rails source too.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/WuJ7GMWmau8" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/18/demystifying-rails-plugin-development-notes</feedburner:origLink></entry>
 
 <entry>
   <title>GitHub Rebase #4</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/ll45SIM8B2g/github-rebase-4" />
   <updated>2008-11-17T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/17/github-rebase-4</id>
   <content type="html">&lt;p&gt;The latest edition is now up! http://github.com/blog/224-github-rebase-4&lt;/p&gt;
&lt;p&gt;I really need to get some of this process sped up and automated. Currently I have to manually look up all of the repositories, and creating the table was a bitch. I also need to figure out how to make my Rails site that processes GitHub&amp;#8217;s &lt;span class="caps"&gt;RSS&lt;/span&gt; feed to be multithreaded so it doesn&amp;#8217;t take an hour or two&amp;#8230;or three&amp;#8230;to figure out what&amp;#8217;s going on with it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/ll45SIM8B2g" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/17/github-rebase-4</feedburner:origLink></entry>
 
 <entry>
   <title>GitHub Rebase #3</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/qpoJ5ZOQaVU/github-rebase-3" />
   <updated>2008-11-09T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/09/github-rebase-3</id>
   <content type="html">&lt;p&gt;Geez, it&amp;#8217;s been 3 weeks already? The third installment is up at:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/blog/208-github-rebase-3"&gt;http://github.com/blog/208-github-rebase-3&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/qpoJ5ZOQaVU" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/09/github-rebase-3</feedburner:origLink></entry>
 
 <entry>
   <title>GitHub Rebase #2</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/D9To-zmWR08/github-rebase-2" />
   <updated>2008-11-03T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/11/03/github-rebase-2</id>
   <content type="html">&lt;p&gt;The second edition of my weekly installment is &lt;a href="http://github.com/blog/201-github-rebase-2"&gt;now hosted at GitHub&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Next week I&amp;#8217;m going to release it on late Saturday, or perhaps early Sunday. It&amp;#8217;s a bit late this week, but I don&amp;#8217;t think anyone will notice.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/D9To-zmWR08" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/11/03/github-rebase-2</feedburner:origLink></entry>
 
 <entry>
   <title>GitHub Rebase #1</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/bfPCRGD9QFc/github-rebase-1" />
   <updated>2008-10-26T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/10/26/github-rebase-1</id>
   <content type="html">&lt;p&gt;This is the start of a new weekly column that going to recap some of the action that&amp;#8217;s been happening on GitHub during the past week. My goals with this column include:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Prove that Git is a great choice for version control!&lt;/li&gt;
	&lt;li&gt;See how active the community at GitHub really is and what they&amp;#8217;re working on.&lt;/li&gt;
	&lt;li&gt;Show how Open Source development is truly open.&lt;br /&gt;
Using the magic of feed-normalizer, hpricot, and gchartrb, I&amp;#8217;ve created a little Rails app (dubbed &lt;a href="http://github.com/qrush/rebase/tree/master"&gt;Rebase&lt;/a&gt;, of course) that I can use to rip all of the events that are going on at GitHub. I&amp;#8217;m going to try to keep the format of the column consistent, but I definitely need your feedback to make it better.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Stats Breakdown&lt;/h2&gt;
&lt;p style="text-align: center;"&gt;&lt;img class="aligncenter" src="http://chart.apis.google.com/chart?chbh=22,2&amp;amp;chf=bg,s,f0f0f0&amp;amp;chxt=y,x&amp;amp;chxl=0:|guide+(4)|commitcomment+(190)|member+(288)|wiki+(548)|delete+(729)|fork+(864)|gist+(1110)|follow+(1236)|create+(1274)|watch+(4299)|commit+(15131)&amp;amp;cht=bhg&amp;amp;chs=530x375&amp;amp;chd=s:9RFEEDCCBAA&amp;amp;chxr=1,0,15000&amp;amp;chco=336699&amp;amp;chtt=GitHub+Rebase+%E2%80%94+Total+Events+%E2%80%94+10/18/2008+to+10/25/2008&amp;amp;chxs=0,4183c4,10,1|1,000000,10,0" alt="" width="530" height="375" /&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img class="aligncenter" src="http://chart.apis.google.com/chart?chf=bg,s,f0f0f0&amp;amp;chm=B,bbccd9,0,0,0&amp;amp;chxt=x,y&amp;amp;chxl=0:|Saturday+10/18|Sunday+10/19|Monday+10/20|Tuesday+10/21|Wednesday+10/22|Thursday+10/23|Friday+10/24&amp;amp;cht=lc&amp;amp;chs=530x375&amp;amp;chd=s:llw5934&amp;amp;chxr=1,0,4500&amp;amp;chco=336699&amp;amp;chtt=GitHub+Rebase+%E2%80%94+Daily+Events+%E2%80%94+10/18/2008+to+10/25/2008&amp;amp;chxs=0,4183c4,9,1|1,000000,10,1" alt="" width="530" height="375" /&gt;&lt;/p&gt;
&lt;p&gt;And, just for fun:&lt;br /&gt;
&lt;p style="text-align: center;"&gt;&lt;img class="aligncenter" src="http://chart.apis.google.com/chart?chl=2.55+events/min&amp;cht=gom&amp;chs=400x175&amp;chd=t:25.469246031746" alt="" width="400" height="175" /&gt;&lt;/p&gt;&lt;/p&gt;
&lt;h2&gt;Notably New Projects&lt;/h2&gt;
&lt;p&gt;Each week I&amp;#8217;m going to look over some interesting new projects that have just showed up on GitHub and explain what they&amp;#8217;re about. If you have a project you think I should showcase, let me know and I&amp;#8217;ll see about featuring it!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/josh/wysihat/tree"&gt;Wysihat&lt;/a&gt;: A minimalist&amp;#8217;s approach to &lt;span class="caps"&gt;WYSIWYG&lt;/span&gt;/Rich Text Editor. Right now it&amp;#8217;s very, very beta, but it has the support of 37Signals so I definitely hope it&amp;#8217;s destined for greatness. Once some decent themes are created for it, I&amp;#8217;d definitely consider integrating it in some of my sites. This project definitely is growing and needs help, so fork away.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/android"&gt;Android&lt;/a&gt;: Google announced that their Android framework was going open source and was hosted on Git, so it was clearly only a matter of time before their code landed on GitHub too. They have a ton of projects in their codebase, but it doesn&amp;#8217;t seem like all of them have pushed yet. Definitely looks promising though, and I really would like to see how their system works.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/webco/acts_as_passive_aggressive/tree/master"&gt;acts_as_passive_aggressive&lt;/a&gt;: Just in case you ever needed a way to vent on your users, this plugin provides the perfect opportunity. I love the project&amp;#8217;s readme.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/davetroy/votereport/tree/master"&gt;VoteReport&lt;/a&gt;: This is a new Rails site to track the election next week through Twitter. They&amp;#8217;ve got quite a lot of documentation on their &lt;a href="http://votereport.pbwiki.com/FrontPage"&gt;PBWiki&lt;/a&gt;, and I really hope that this site turns out to be a little more useful and fun than watching tweets fly by on Twitter&amp;#8217;s election page. If you want to help them get the project up and running before the 4th, go for it!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/biilmann/javascript-xhtml-purifier/tree"&gt;javascript-xhtml-purifier&lt;/a&gt;: A new, robust JS script to sanitize &lt;span class="caps"&gt;HTML&lt;/span&gt;. I can guarantee that at some point most web developers will need to do this, so bookmark or clone away. &lt;br /&gt;
Next week I&amp;#8217;d love to break down the stats a little more and figure out what commits were the most commented on, and maybe which projects had the most activity. Let me know what you&amp;#8217;d like to see in the future!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/bfPCRGD9QFc" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/10/26/github-rebase-1</feedburner:origLink></entry>
 
 <entry>
   <title>Pumpkin Carving 2008</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/8xadqKmq7Fg/pumpkin-carving-2008" />
   <updated>2008-10-20T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/10/20/pumpkin-carving-2008</id>
   <content type="html">&lt;p&gt;In 2006 I created a &lt;a href="http://photos-a.ak.facebook.com/photos-ak-sf2p/v49/236/39/24408547/n24408547_30746800_6913.jpg"&gt;stormtrooper&lt;/a&gt;. Last year was &lt;a href="http://www.homestarrunner.com/ween_stencils.html"&gt;HomestarRunner&lt;/a&gt;. This year however, I paid homage to the one and the only, &lt;a href="http://www.youtube.com/watch?v=8hm3E2cGQE4"&gt;Octocat&lt;/a&gt;:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://flickr.com/photos/qrush/2960047774/"&gt;&lt;img class="aligncenter" title="Octocat!" src="http://farm4.static.flickr.com/3050/2960047774_6e39a980dc.jpg?v=0" alt="" width="500" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This of course is the logo of one of my favorite sites, &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt;. We&amp;#8217;re having our Halloween party this weekend so I made this guy a little early this year.&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://flickr.com/photos/qrush/2960048602/"&gt;&lt;img class="aligncenter" title="Octocat 3 GitHub" src="http://farm4.static.flickr.com/3250/2960048602_c23942eda0.jpg" alt="" width="500" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re curious, you can see the &lt;a href="http://flickr.com/qrush"&gt;creation process on my new Flickr account &lt;/a&gt;(their upload and photo managing interface is kickass!). If you&amp;#8217;d like the stencil I used, just leave a comment or email me. Happy Halloween!&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://flickr.com/photos/qrush/2959191819/"&gt;&lt;img class="aligncenter" src="http://farm4.static.flickr.com/3272/2959191819_3797a3c385.jpg" alt="Fork it." width="375" height="500" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/8xadqKmq7Fg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/10/20/pumpkin-carving-2008</feedburner:origLink></entry>
 
 <entry>
   <title>Where do you get Ruby news from?</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/Qad05Z0C6IE/where-do-you-get-ruby-news-from" />
   <updated>2008-10-19T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/10/19/where-do-you-get-ruby-news-from</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m wondering where other fellow Ruby and Rails hackers get their Ruby-related news fix from. For some reason I just feel continually disconnected from the community at large and I just want to make sure I&amp;#8217;m taking advantage of the resources out there. So here&amp;#8217;s my news sources:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Ruby.Reddit (&lt;a href="http://reddit.com/r/ruby"&gt;http://reddit.com/r/ruby&lt;/a&gt;): This seems to be one of the most active sources, and usually the commentors are fantastic. It&amp;#8217;s community-driven news at its best, but sometimes it&amp;#8217;s a little slow compared to the other subreddits. What I like most about it is that the community is relatively small, so if you post a story it usually sticks on the page for a few days.&lt;/li&gt;
	&lt;li&gt;RubyFlow (&lt;a href="http://rubyflow.com"&gt;http://rubyflow.com&lt;/a&gt;): I just got into RubyFlow recently, and it seems more like the community well than anything. You can throw a coin in and wish for some visitors to your blog, but you&amp;#8217;re usually lost in the mix. It&amp;#8217;s a very interesting concept though, and it&amp;#8217;s definitely fun to see big names in the Ruby community on the list.&lt;/li&gt;
	&lt;li&gt;Ruby.Alltop (&lt;a href="http://ruby.alltop.com"&gt;http://ruby.alltop.com&lt;/a&gt;): Alltop is awesome for getting an overall sense of where the community is right now. It&amp;#8217;s Guy Kawasaki&amp;#8217;s &amp;#8216;magazine rack&amp;#8217; of latest Ruby stories&amp;#8230;essentially a &lt;span class="caps"&gt;RSS&lt;/span&gt; aggregator. I&amp;#8217;ve discovered quite a few blogs I didn&amp;#8217;t know about and now keep track of through it. One of my goals with this blog is to get on there someday! :)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I suppose my secondary news sources would be Freenode&amp;#8217;s various Ruby channels (mostly #rubyonrails) and the Rails mailing list, but I don&amp;#8217;t check those as often. I&amp;#8217;ve also heard about a &lt;a href="http://caboo.se"&gt;secret channel&lt;/a&gt;, but who knows if I&amp;#8217;ll ever get in there. Those also don&amp;#8217;t have a handy &lt;span class="caps"&gt;RSS&lt;/span&gt; feed, so I tend not to check them as often. So, where do you get news about the Ruby community from?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/Qad05Z0C6IE" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/10/19/where-do-you-get-ruby-news-from</feedburner:origLink></entry>
 
 <entry>
   <title>Calculating Age in Rails</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/90_MNdai4NY/calculating-age-in-rails" />
   <updated>2008-10-13T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/10/13/calculating-age-in-rails</id>
   <content type="html">&lt;p&gt;You&amp;#8217;d think that this would be easy, but for some reason it wasn&amp;#8217;t, at least for me. Let&amp;#8217;s say you keep track of a User&amp;#8217;s birthday with a date field. Great! Let&amp;#8217;s show the user&amp;#8217;s age.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;age&lt;/span&gt;
  &lt;span class="no"&gt;Date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;birthday&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Done! Right? &lt;span class="caps"&gt;WRONG&lt;/span&gt;. Worked fine for some users, until one of my coworkers asked me&amp;#8230;hey, you&amp;#8217;re not 21 yet&amp;#8230;how&amp;#8217;d you magically gain a year on your profile? Crap. Obviously this will work for everyone&amp;#8217;s whose birthday is &lt;span class="caps"&gt;BEFORE&lt;/span&gt; &lt;code&gt;Date.today&lt;/code&gt;, but not after.&lt;/p&gt;
&lt;p&gt;So, we need a more exact method of calculating the age:&lt;br /&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;age&lt;/span&gt;
  &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;Date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;birthday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;365&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;age&lt;/span&gt;&lt;br /&gt;
  &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;Date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;birthday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;365&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;br /&gt;
&lt;span class="k"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;So what this method does instead is use the &lt;code&gt;Rational&lt;/code&gt; value given by subtracting two &lt;code&gt;Date&lt;/code&gt;s, and divides it by the number of days in a year. Since that number is still a &lt;code&gt;Rational&lt;/code&gt;, calling &lt;code&gt;floor&lt;/code&gt; on it will round it down to the nearest &lt;code&gt;Fixnum&lt;/code&gt;, giving us a (slightly more) precise account of this user&amp;#8217;s age. &lt;strong&gt;&lt;span class="caps"&gt;EDIT&lt;/span&gt;: But this is still inaccurate!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yeah, I thought it was easy too. Perhaps this shows that I need to test my app a little more thoroughly! It also would be nice to save the age in an instance level variable, but right now I don&amp;#8217;t use the age more than once on a page so it doesn&amp;#8217;t matter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;EDIT&lt;/span&gt;&lt;/strong&gt;: It looks like my method is still not sufficient for leap years! The comments have posted &lt;span class="caps"&gt;MANY&lt;/span&gt; great solutions. My method is fine for a general estimation, but the comments have many solutions for that deal with greater accuracy. I&amp;#8217;m honestly not sure which is best, so choose carefully when you&amp;#8217;re developing your app.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/90_MNdai4NY" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/10/13/calculating-age-in-rails</feedburner:origLink></entry>
 
 <entry>
   <title>Loading custom code in Rails</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/mnYVMAuZTto/loading-custom-code-in-rails" />
   <updated>2008-09-22T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/09/22/loading-custom-code-in-rails</id>
   <content type="html">&lt;p&gt;This is a question I&amp;#8217;ve seen asked (including by myself) in #rubyonrails on Freenode quite a few times, and I figured I&amp;#8217;d settle it once and for all. There&amp;#8217;s a few different ways to get custom code loaded into your Rails app. The first solution to this is understanding how code gets loaded with Ruby in the first place, which I usually get confused with. Let&amp;#8217;s do a little recap about your different options that Ruby and Rails provides:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.ruby-doc.org/core/classes/Kernel.html#M005966"&gt;load&lt;/a&gt;: &lt;/strong&gt;Loads and executes the Ruby program in the file &lt;em&gt;filename&lt;/em&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.ruby-doc.org/core/classes/Kernel.html#M005967"&gt;require&lt;/a&gt;: &lt;/strong&gt;Ruby tries to load the library&lt;em&gt;&lt;/em&gt;, returning &lt;tt&gt;true&lt;/tt&gt; if successful.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;a href="http://wiki.rubyonrails.org/rails/pages/RequireDependency"&gt;require_dependency&lt;/a&gt;: &lt;/strong&gt;Reloads source files on each request when in development mode, so changes are reflected on the next request.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;require_or_load: &lt;/strong&gt;There doesn&amp;#8217;t seem to be much documentation on this, but it doesn&amp;#8217;t seem as safe and &lt;a href="http://github.com/rails/rails/tree/master/activesupport/CHANGELOG#L1123"&gt;it may result in your code being loaded twice&lt;/a&gt;. Review the code &lt;a href="http://github.com/rails/rails/tree/master/activesupport/lib/active_support/dependencies.rb#L228-264"&gt;here&lt;/a&gt; before you use it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, the most ideal keyword to use is &lt;strong&gt;require_dependency&lt;/strong&gt;, since it will reload code during development mode when you make changes. Otherwise, you&amp;#8217;ll have to constantly restart your development server/console, and that just sucks. Plus, it&amp;#8217;ll work perfectly in production mode and only load the files once.&lt;/p&gt;
&lt;p&gt;So, where&amp;#8217;s the best place to put the files with your custom code? Well, there&amp;#8217;s a few folders that are on the Rails load path in the first place: &lt;strong&gt;app, lib, vendor and mock&lt;/strong&gt; &lt;strong&gt;paths&lt;/strong&gt; (&lt;a href="http://github.com/rails/rails/tree/master/railties/lib/initializer.rb#L607-609"&gt;source&lt;/a&gt;) you need to add different folders to the load path, that&amp;#8217;s more than possible. In your config/environment.rb, add whatever folder you want in the config.load_paths variable. For instance,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;load_paths&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sx"&gt;%W( custom )&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This will load the custom directory (RAILS_ROOT/custom) to the load path so you can use those files. The problem with files you put in these directories is that they may be in the load path, but you&amp;#8217;ll have to require the custom files you want in each class that you&amp;#8217;ll want to use them. The solution to this is to get the file required for the entire Rails environment, which is a lot easier than you&amp;#8217;d think.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s say we want to load some extensions to String for your app. Being a forward thinking developer, you&amp;#8217;ve created a new folder in lib, called core_ext, where you can put other ruby files in the future if you need to. So in lib/core_ext/string.rb you&amp;#8217;ve dumped for example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;slugify&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gsub&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/[^a-z0-9]+/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;-&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chomp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;-&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;The folder config/initializers contains files that run once when your Rails environment is getting set up. Create a new file in that folder and this will run through your custom folder and make sure that the files are required properly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;CoreExtensions&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;require_core_ext&lt;/span&gt;
    &lt;span class="no"&gt;Dir&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;RAILS_ROOT&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/lib/core_ext/*.rb&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;require_dependency&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="no"&gt;Object&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;instance_eval&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;CoreExtensions&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;So now, you can call &lt;code&gt;require_core_ext&lt;/code&gt; in whatever class you want, and it will reload all of your custom code if you&amp;#8217;re in development mode or if you&amp;#8217;re in production, it will only load your custom classes when the file is first loaded. Now you can call &lt;code&gt;String#slugify&lt;/code&gt; all you want, and if you make changes to the method in lib/core_ext it will be reflected when you refresh the page.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve got any other examples of how you bring in custom code, let me know, as I&amp;#8217;d love to find out.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/mnYVMAuZTto" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/09/22/loading-custom-code-in-rails</feedburner:origLink></entry>
 
 <entry>
   <title>Switching to Rails</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/YHLJxyhB6uM/switching-to-rails" />
   <updated>2008-09-18T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/09/18/switching-to-rails</id>
   <content type="html">&lt;p&gt;For a while now I&amp;#8217;ve been &lt;span style="text-decoration: line-through;"&gt;obsessed&lt;/span&gt; working with Ruby on Rails. Rails has caused me to switch from doing .&lt;span class="caps"&gt;NET&lt;/span&gt;/&lt;span class="caps"&gt;ASP&lt;/span&gt;.&lt;span class="caps"&gt;NET&lt;/span&gt; development on my desktop PC using Windows XP to owning a Mac Mini and putting Ubuntu on Dell laptop. Obviously, this is a huge change, and I&amp;#8217;m going to explain why I&amp;#8217;ve switched.&lt;/p&gt;
&lt;h3&gt;Rails is a combination of software engineering principles and web programming best practices.&lt;/h3&gt;
&lt;p&gt;In this respect Rails is a dream: Active Record. RESTful architecture. Built-in xml/json/etc web services. &lt;span class="caps"&gt;TDD&lt;/span&gt;/&lt;span class="caps"&gt;BDD&lt;/span&gt; practices. I could go on and on, but all that matters is &lt;strong&gt;writing Rails applications is an enjoyable&lt;/strong&gt; &lt;strong&gt;and fun process&lt;/strong&gt;. You&amp;#8217;re not writing &lt;a href="http://www.php.net/"&gt;scripts for pages&lt;/a&gt;, not having to worry about &lt;a href="http://asp.net"&gt;the nuts and bolts&lt;/a&gt; of creating a site, or &lt;a href="http://java.sun.com/products/ejb/"&gt;dealing with painful &lt;span class="caps"&gt;XML&lt;/span&gt; files&lt;/a&gt;. Convention over configuration is a real path to productivity, and it&amp;#8217;s going to take the other competing systems a long time to catch up to the headway that Rails is making on a daily basis. Rails isn&amp;#8217;t the solution to everything, and &lt;a href="http://www.zeitgeist.com/wp-content/uploads/2008/06/failwhale.png"&gt;it certainly has had it share of growing pains&lt;/a&gt;, but it&amp;#8217;s being proven again and again as the most efficient way to create data-driven web applications that are very reliable and follow web standards.&lt;/p&gt;
&lt;h3&gt;Tools on *nix based systems are a lot better for Rails development.&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://java.sys-con.com/node/313594"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt; puts it best&lt;/a&gt;:&lt;br /&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;em&gt;The stigma of being a Web programmer still using Windows will increase.&lt;/em&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;For me, it&amp;#8217;s not that much of a stigma, but more of a practical issue. The power of the Unix command line combined with tools like Textmate makes development on &lt;span class="caps"&gt;OSX&lt;/span&gt; and Linux machines for Rails a &lt;span class="caps"&gt;LOT&lt;/span&gt; easier. The tools on the Windows side are there, but they&amp;#8217;re usually not as powerful and not as easy to set up. Cygwin is piss slow. Most of the non-Visual Studio text editors suck. The command line sucks, and &lt;a href="http://litanyagainstfear.com/blog/2008/03/20/pimping-the-windows-command-line/"&gt;I tried really hard to make it not suck&lt;/a&gt;. &lt;a href="http://blog.mmediasys.com/2008/03/06/is-windows-a-supported-platform-for-ruby-i-guess-not/"&gt; Even Ruby is slower&lt;/a&gt;! All of this pain goes away on &lt;span class="caps"&gt;OSX&lt;/span&gt;/Ubuntu. Rails would be a lot different if it started on Windows, and I wonder if it would really be the same platform. For now though, I&amp;#8217;m loving the productivity boost that I&amp;#8217;m experencing and trying out different operating systems, and it serves my needs well.&lt;/p&gt;
&lt;h3&gt;Bleak future of .&lt;span class="caps"&gt;NET&lt;/span&gt; development.&lt;/h3&gt;
&lt;p&gt;This one will probably get me flamed the most. It&amp;#8217;s not that I don&amp;#8217;t like .&lt;span class="caps"&gt;NET&lt;/span&gt;, it&amp;#8217;s just that I couldn&amp;#8217;t see myself using it any more professionally. I&amp;#8217;m really not a fan of VB.&lt;span class="caps"&gt;NET&lt;/span&gt;, especially compared to Ruby. It&amp;#8217;s a cruft filled language that &lt;a href="http://www.panopticoncentral.net/archive/2007/11/14/22589.aspx"&gt;makes me feel like Mort when writing it.&lt;/a&gt; Great things are possible with the language, but the result is so unreadable and ugly that I don&amp;#8217;t feel it&amp;#8217;s worth it anymore to use, especially if I can choose not to. C# on the other hand I love and always will, especially over Java.&lt;/p&gt;
&lt;p&gt;What scares me more about .&lt;span class="caps"&gt;NET&lt;/span&gt; is where&amp;#8217;s it&amp;#8217;s going: Silverlight and &lt;span class="caps"&gt;WPF&lt;/span&gt;. &lt;span class="caps"&gt;WPF&lt;/span&gt; is supposed to be an awesome new platform that makes it easier for both programmers and designers to collaborate and create great applications.&lt;strong&gt; Seriously though, where are the great &lt;span class="caps"&gt;WPF&lt;/span&gt; applications? &lt;/strong&gt;Why haven&amp;#8217;t we heard as much about them, as say, the newest iPhone apps? I could say the same for Silverlight. Oh wait, the Olympics. ooh, Yahoo Messenger! Whatever. Nothing is going to kill Flash&amp;#8217;s market share.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m sure that things have changed since I was heavy into (bleeding edge) .&lt;span class="caps"&gt;NET&lt;/span&gt; development 6-9 months ago, but still there seems to be no killer app for &lt;span class="caps"&gt;WPF&lt;/span&gt; or Silverlight yet. Until that happens they&amp;#8217;ll just suck like everything else. I&amp;#8217;d love to be proven wrong on this point, so if you know of one please show me.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve switched away from Windows or even if you&amp;#8217;ve become a Rubyist/Pythonista in recent times, let me know what your experiences have been. For now on my blog posts will hopefully be a bit more frequent, and will chronicle various quirks and fun things I&amp;#8217;ve found during my Rails journeys.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/YHLJxyhB6uM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/09/18/switching-to-rails</feedburner:origLink></entry>
 
 <entry>
   <title>Raytracers, snowflakes, and Pac-Man, oh my!</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/FWXnzhbT-30/raytracers-snowflakes-and-pac-man-oh-my" />
   <updated>2008-05-23T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/05/23/raytracers-snowflakes-and-pac-man-oh-my</id>
   <content type="html">&lt;p&gt;So yeah, this is pretty much what I&amp;#8217;ve been up to for the past, oh, 3 months/1 quarter of school. These are a few of the projects I&amp;#8217;ve done for my Computer Graphics 2 class (which I just got an A in, booyah!)&lt;/p&gt;
&lt;p&gt;First up, the classic CG application, &lt;a href="http://litanyagainstfear.com/projects/q-tracer"&gt;a ray tracer&lt;/a&gt; complete with &lt;a href="http://twitter.com/mittense/statuses/805976194"&gt;phongphongphong&lt;/a&gt; shading, procedural shading on the floor, reflection, transmission, and even some tone reproduction.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="/images/reinhard88.png"&gt;&lt;img class="size-medium wp-image-63" title="reinhard88" src="/images/reinhard88-300x233.png" alt="" width="300" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Secondly, my quarter long personal project, a simple particle system/b-spline curve generator in &lt;span class="caps"&gt;XNA&lt;/span&gt;, dubbed &lt;a href="http://litanyagainstfear.com/projects/q-blizzard"&gt;Q-Blizzard&lt;/a&gt;. Turned out to be quite pretty, not exactly configurable though.&lt;br /&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="/images/qblizzfinal.png"&gt;&lt;img class="size-medium wp-image-73" title="qblizzfinal" src="/images/qblizzfinal-300x233.png" alt="" width="300" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;And finally, an image that won me a $25 Barnes and Noble gift certificate in the Pixar Renderman Shader contest. I won third place out of around 30 images! &lt;a href="http://rekaeuqs1.googlepages.com/"&gt;My roommate&lt;/a&gt; noted that I should have added an &lt;a href="http://icanhascheezburger.files.wordpress.com/2007/05/nom-nom-nom.jpg"&gt;OM &lt;span class="caps"&gt;NOM&lt;/span&gt; &lt;span class="caps"&gt;NOM&lt;/span&gt;&lt;/a&gt; caption in for kicks.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="/images/part2.png"&gt;&lt;img class="size-medium wp-image-53" title="part2" src="/images/part2-300x225.png" alt="" width="300" height="225" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hopefully this will mark my return to regular blogging (going to try monday, wednesday, friday) for the summer and onward. Hell, if &lt;a href="http://twitter.com/mittense"&gt;mittens&lt;/a&gt; can keep up his &lt;a href="http://gamedev.net"&gt;Daily GameDev.net&lt;/a&gt; postings for 2 months, I can do it too. Right? &amp;#8230;Right? (I seem to tell myself every few months or so&amp;#8230;)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/FWXnzhbT-30" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/05/23/raytracers-snowflakes-and-pac-man-oh-my</feedburner:origLink></entry>
 
 <entry>
   <title>Rock Band Rocks.</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/rPe279r1TJk/rock-band-rocks" />
   <updated>2008-03-27T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/27/rock-band-rocks</id>
   <content type="html">&lt;p&gt;It simply does. That is all.&lt;/p&gt;
&lt;p&gt;Oh, you wanted to know why! Well, if you&amp;#8217;re still reading and not playing it, there&amp;#8217;s three reasons why Rock Band is an awesome investment (it&amp;#8217;s still $169.99) for your Xbox 360, PS3, or (soonly) your Wii. First off, the UI is a lot cleaner than Guitar Hero 3&amp;#8217;s.&lt;/p&gt;
&lt;p&gt;Now, do remember that 1-4 people are watching the TV at a time for Rock Band instead of only 1-2 for Guitar Hero 3. However, the Rock Band interface is extremely simple. No complex images on the fretboard, a scoreboard that is easy to see, and the Overdrive meter is so much easier to understand than the star power gauges. All you want to know when you&amp;#8217;re playing either of these games is what your multiplier is and if you can use your star power/overdrive or not. With Guitar Hero 3, they&amp;#8217;re on complete opposite sides of the screen! Also, the star power gauge is made of lights that fill up, and it&amp;#8217;s even harder to see when playing with two players. For Rock Band, all of that information is in one place, at the very bottom of the fretboard, beneath where you&amp;#8217;re looking at most of the time to play notes. Obviously, the team behind Rock Band really looked at how people play Guitar Hero and what&amp;#8217;s essential to see when you&amp;#8217;re playing, and turned that into a brilliant design that&amp;#8217;s easy and fun to play.&lt;/p&gt;
&lt;p&gt;Secondly, the downloadable content rules. Grant it, I haven&amp;#8217;t looked that much into GH3&amp;#8217;s available songs, but Rock Band&amp;#8217;s library continues to grow. My most recent downloads have been Limelight and Working Man from Rush, Crushcrushcrush from Paramore, and the huge Boston song pack. These new songs bring so much replay value to the game it&amp;#8217;s not even funny. Obviously they have all 4 playable parts in the songs, but you can opt to play the downloaded songs in the World Tour mode. So now, I can earn money for new looks and instruments by pretending I&amp;#8217;m Geddy Lee.&lt;/p&gt;
&lt;p&gt;Finally, the drums just rule.  It&amp;#8217;s a completely different experience than the lead/bass guitars, and there&amp;#8217;s something truly enjoyable about banging pretend drums with real drumsticks. It&amp;#8217;s also a huge challenge for me, even on Medium the songs are pretty difficult, especially since the bass pedal is a central component to most songs. It&amp;#8217;s a game controller like no other, one you can beat senselessy and not feel bad about it.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re not able to get it yourself, at least visit someone&amp;#8217;s house that has it, I assure you that you&amp;#8217;ll definitely feel like a rock star, at least for a few minutes. Heck, if they get the &lt;a href="http://gizmodo.com/344301/rock-band-stage-kit-gives-you-smoke-lights-asthma"&gt;new lights and smoke set&lt;/a&gt;, all you&amp;#8217;ll need are some serious clothes to match.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/rPe279r1TJk" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/27/rock-band-rocks</feedburner:origLink></entry>
 
 <entry>
   <title>Why I love Twitter</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/f3RzjymCZEQ/why-i-love-twitter" />
   <updated>2008-03-25T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/25/why-i-love-twitter</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve become quite a &lt;a href="http://twitter.com/qrush"&gt;twitterholic&lt;/a&gt; the past few days. In fact, let&amp;#8217;s &lt;a href="http://tweetstats.com/graphs/qrush"&gt;check the stats&lt;/a&gt;. Yeah, I&amp;#8217;ve been pretty much addicted the past few days. Why? Well, there&amp;#8217;s a few things I love about Twitter:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Twitter is short, sweet, and easy to use.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The concept is simple: 140 characters to tell the world what you&amp;#8217;re doing. I don&amp;#8217;t think you can get more simple than that. No complex forms, no huge commitments, just a simple request, and your simple answer. It has a wonderful web interface, and the settings allow you completely customize your page&amp;#8217;s background along with colors for fonts. It&amp;#8217;s just a breeze to use and easy to look at, which is a welcome change compared to Facebook or MySpace.&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It&amp;#8217;s an awesome way to network with highly connected bloggers.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think &lt;a href="http://scobleizer.com/2008/03/23/the-secret-to-twitter/"&gt;Scoble puts it best&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;You&amp;#8217;re communicating to the world that you&amp;#8217;d like to be listened to (golden rule: treat people how you&amp;#8217;d like to be treated).&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;Twitter is becoming the heart of the &lt;a href="http://imgs.xkcd.com/comics/interblag.png"&gt;Interblag&lt;/a&gt;. It&amp;#8217;s what bloggers are doing when they&amp;#8217;re &lt;span class="caps"&gt;NOT&lt;/span&gt; blogging. Obviously yes, we all have our jobs and commitments, but Twitter is a way to connect with those people between their blog, vlogs, or however they communicate with the internet at large. It&amp;#8217;s a way for those who are connected to quickly poll, grow, and comment with their audience. The value to bloggers to be active on Twitter is absolutely critical: these are the people who you &lt;span class="caps"&gt;WANT&lt;/span&gt; to be reading your blog. They&amp;#8217;re the people that will link your blog to others, they know where to share it and who to share it with. They&amp;#8217;re all here folks. Come and find them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It&amp;#8217;s a great way to keep in touch with friends.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think &lt;a href="http://www.youtube.com/watch?v=ddO9idmax0o"&gt;Twitter in Plain English&lt;/a&gt; hits the nail on head: Twitter is a way to converse with friends in a way that isn&amp;#8217;t that important to email them, but doesn&amp;#8217;t necessarily demands their instant attention. Of course now, you can use Jabber/&lt;span class="caps"&gt;XMPP&lt;/span&gt; to interface with Twitter. Anyway, I find it to be a neat way to keeping in touch with people I know in the real world online that isn&amp;#8217;t exactly bugging them over &lt;span class="caps"&gt;AIM&lt;/span&gt; or Facebook.  Also, if you&amp;#8217;re concerned about random people like me following your every move, you can make your page private and only allow those you approve to watch your updates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It&amp;#8217;s just fun to use!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What really gets me with this are the &lt;a href="http://iconfactory.com/software/twitterrific"&gt;fantastic&lt;/a&gt; &lt;a href="http://code.google.com/p/wittytwitter/"&gt;clients&lt;/a&gt; &lt;a href="http://www.kosertech.com/blog/?page_id=5"&gt;that&lt;/a&gt; &lt;a href="http://www.tinytwitter.com/"&gt;seem&lt;/a&gt; &lt;a href="http://pockettweets.com/"&gt;to&lt;/a&gt; &lt;a href="http://twitterfeed.com/"&gt;be&lt;/a&gt; &lt;a href="http://itweet.net/web/indexApp.php"&gt;populating&lt;/a&gt; &lt;a href="http://apps.npike.net/MobileTwitter/"&gt;the&lt;/a&gt; &lt;a href="http://www.twitbin.com/"&gt;net&lt;/a&gt;.  The Twitter &lt;span class="caps"&gt;API&lt;/span&gt; is readily accessible and easy to implement, and that&amp;#8217;s extremely important as it seems that most people use twitter through outside clients or through text messaging rather than their web interface. My personal favorite at the moment is &lt;a href="http://www.twhirl.org"&gt;Twhirl&lt;/a&gt;, which is an Adobe &lt;span class="caps"&gt;AIR&lt;/span&gt; client. It&amp;#8217;s got a neat, clean interface and colors are customizable, so I&amp;#8217;m having fun with it. I rarely have to go to the website anymore, the &lt;span class="caps"&gt;API&lt;/span&gt; is so open that the majority of the functionality is accessible through outside clients.&lt;/ol&gt;&lt;/p&gt;
&lt;p&gt;So, why haven&amp;#8217;t you created a &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; account yet? I guarantee you that it&amp;#8217;ll do nothing but help you get your blog known, and connect with others who are on the same quest. Feel free to &lt;a href="http://twitter.com/qrush"&gt;follow me&lt;/a&gt; as well, I&amp;#8217;ll make sure to follow you.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/f3RzjymCZEQ" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/25/why-i-love-twitter</feedburner:origLink></entry>
 
 <entry>
   <title>Pimping the Windows Command Line</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/YhVMfVjI4Hs/pimping-the-windows-command-line" />
   <updated>2008-03-20T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/20/pimping-the-windows-command-line</id>
   <content type="html">&lt;p&gt;Lately I&amp;#8217;ve noticed that a few of my friends have been able to understand or even be aware of the Windows command line.  I have a hard time myself pulling myself away from Explorer, but sometimes the command line is just quicker. However, it&amp;#8217;s a bit drab by default. Today I&amp;#8217;m going to show you just how you can pimp yours out a bit.&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;First up is a wonderful tool called Console2, which is an open source tabbed command line utility. It allows easy configuration of fonts, colors, the background colors, and even lets you do some really crazy things if you wanted such as adding a background image.  The best feature by far though are its tabs, which I&amp;#8217;m sure if you&amp;#8217;ve ever used IE7+ or Firefox you know how useful they can be for multitasking. Another great feature is that you can set up plenty of keyboard shortcuts if you&amp;#8217;re into that sort of thing.  Check it out here: &lt;a href="http://sourceforge.net/projects/console/"&gt;http://sourceforge.net/projects/console/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Console is great if you want to fire up a specific program all the time, but I&amp;#8217;m used to slamming WinKey + R and typing &lt;strong&gt;cmd&lt;/strong&gt; so much that it&amp;#8217;s basically embedded into my muscle memory. So, I was looking for configuring the default prompt instead of running another program. Pimping out my command prompt has taken me quite a while to find the perfect configuration that suits my needs, and it&amp;#8217;s constantly changing as I find new things to add. Here&amp;#8217;s what I&amp;#8217;ve done to trick mine out:&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m using Consolas as my font. I absolutely love Consolas and I find it much easier to read than Courier New or the default font that the command window has. Consolas is not available by default and requires a simple registry hack along with a reboot in order to work. I haven&amp;#8217;t had any issues with it thus far, and I highly recommend following &lt;a href="http://www.hanselman.com/blog/UsingConsolasAsTheWindowsConsoleFont.aspx"&gt;Scott Hanselman&amp;#8217;s wonderful tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not a  Windows command line user at heart, I was raised during my Computer Science classes to poke around Linux machines. Sadly, certain commands like &lt;strong&gt;ls -la&lt;/strong&gt; come much more naturally to me than &lt;strong&gt;dir /a&lt;/strong&gt;. My solution to this is installing the &lt;a href="http://gnuwin32.sourceforge.net/packages/coreutils.htm"&gt;CoreUtils for Windows&lt;/a&gt; package, which adds most of the core &lt;span class="caps"&gt;GNU&lt;/span&gt; utilities into the command line.  This hack requires installing a package from SourceForge and adding to the &lt;span class="caps"&gt;PATH&lt;/span&gt; environment variable, which are covered in &lt;a href="http://www.askstudent.com/tips/how-to-use-unixlinux-commands-at-the-windows-command-prompt/"&gt;this blog post over at AskStudent.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, I&amp;#8217;m a huge fan of using the &lt;strong&gt;pushd/popd&lt;/strong&gt; commands: push directory and pop directory. Basically it&amp;#8217;s a way to return to directories instead of having to overuse &lt;strong&gt;cd&lt;/strong&gt; or even remember where you were. Luckily, there&amp;#8217;s an easy way to keep track of the amount of directories that have been pushed onto the stack by changing the &lt;span class="caps"&gt;PROMPT&lt;/span&gt; environment variable to:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;code&gt;$p$_$+$g&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.askstudent.com/tips/how-to-use-unixlinux-commands-at-the-windows-command-prompt/"&gt;Check out the AskStudent tutorial&lt;/a&gt; to see how to do get to the environment variables window if you don&amp;#8217;t know how. What this does is add + symbols to the command line window as shown in the screenshot. It&amp;#8217;s ridiculously useful, and now I just wish I could figure out how to automagically &lt;strong&gt;pushd &lt;/strong&gt;and &lt;strong&gt;cd &lt;/strong&gt;at the same time.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve got any questions regarding pimping out your command line or other great hacks I&amp;#8217;m missing out on, let me know!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/YhVMfVjI4Hs" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/20/pimping-the-windows-command-line</feedburner:origLink></entry>
 
 <entry>
   <title>Defraggle Rock</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/HywSYjbW7Sc/defraggle-rock" />
   <updated>2008-03-18T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/18/defraggle-rock</id>
   <content type="html">&lt;p&gt;As always, I&amp;#8217;m late to jump on the &lt;strike&gt;fail&lt;/strike&gt;boat, and this time I&amp;#8217;ve decided to do some serious maintenance on my computer. I&amp;#8217;ve had enough of having to rely on System Restore and worrying that I&amp;#8217;ve lost all of my data, or that my computer is on the brink of death. So, I&amp;#8217;m going to start maintaining my system more, and that&amp;#8217;s  starting with keeping my hard drive as tidy and speedy as possible. &lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;My buddy &lt;a href="http://www.theislanddog.com/" target="_blank"&gt;Island Dog&lt;/a&gt; pointed me towards a great tool called &lt;a href="http://www.defraggler.com/"&gt;Defraggler&lt;/a&gt;, and this started my journey.  Essentially, it allows you to really control the defrag process from a drive and individual file level. It also includes the color graph that sadly, Vista removed. Obviously, this tool is pretty much only for power users, as I&amp;#8217;m sure grandma doesn&amp;#8217;t even know the slightest about what a hard drive even is. Partly I&amp;#8217;m glad that Vista streamlined the process of defragmentation, but I have a feeling normal users won&amp;#8217;t be doing it regularly until Windows does it for them or it&amp;#8217;s watered down to one huge button called &amp;#8220;Drive Maintenence&amp;#8221; that does Disk Cleanup, a defrag, and whatever else fun stuff Microsoft decides that your drive needs.  For users like me however, I like having a bit of control. Not too much though, I&amp;#8217;m not a &lt;a href="http://ubergeek.tv/article.php?pid=54"&gt;supervillian&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, Defraggler is a very neat app. It clearly presents the process, what files need to be moved around, and shows your data being moved around. It also allows you to switch the process priority from normal to background so I can actually use my computer during the process. This is nice for XP, while the visualization helps on Vista.  I find the color graph absolutely fascinating since &lt;a href="http://www.litanyagainstfear.com/blog/2007/11/27/im-afraid-of-low-level-programming/"&gt;I&amp;#8217;m scared to death of low level stuff like this&lt;/a&gt;, but my mind does wonder how defragmentation works under the hood. Maybe someday I will be a supervillian after all&amp;#8230;just definitely not using Linux to control my orbiting brain lasers.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/HywSYjbW7Sc" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/18/defraggle-rock</feedburner:origLink></entry>
 
 <entry>
   <title>Turning off the Firehose</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/-7qhuHUcb8E/turning-off-the-firehose" />
   <updated>2008-03-16T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/16/turning-off-the-firehose</id>
   <content type="html">&lt;p&gt;I recently came across &lt;a href="http://www.philonoist.net/2008/03/14/im-done-with-reddit/"&gt;this post&lt;/a&gt; about a user who decided he had enough of the user-generated news community, &lt;a href="http://www.reddit.com"&gt;Reddit&lt;/a&gt;. I&amp;#8217;ve been a Reddit user for a quite some time now, and I&amp;#8217;ve done my share of down voting Ron Paul stories as well submitting silly pictures that have made it onto the front page. Lately though, it&amp;#8217;s become more than a habit to check this site.  &lt;!--more--&gt;I have a very compulsive personality, and I tend to find some sort of deep and intensive joy in small, minute improvements and changes. I know this is the reason why over 70 days of my life were wasted on World of Warcraft, and I&amp;#8217;m pretty sure it&amp;#8217;s the reason why I find programming so fun. Most people would be frustrated by missing a semi-colon and be absolutely stumped by the quest for perfection that compilers demand, but to me it&amp;#8217;s another challenge, another hurdle I know I can overcome. It&amp;#8217;s also the reason why some days I&amp;#8217;d refresh Reddit every 5 to 10 minutes to see if my karma had changed.&lt;/p&gt;
&lt;p&gt;Reddit has been sucking up way too much of my time during the day, and I&amp;#8217;ve decided to put an end to it. All I did was block it through my hosts file to redirect to 127.0.0.1, which works out well since during my work time it directs me to the website that I&amp;#8217;m developing.&lt;/p&gt;
&lt;p&gt;So, I&amp;#8217;m turning off the firehose. I will probably end up blocking Digg and Slashdot as well, and I need to set up Google Reader for my favorite blogs. Yeah, this means I&amp;#8217;ll sacrifice that information intake that my brain is used to, but I feel that time could be used to read the several books I have lying around my room, be it Code Complete or the Mythical Man-Month. My guitar is also gathering plenty of dust, and I have a few side projects that I could be working on as well. Here&amp;#8217;s to less distractions!  Do you have distractions that you could probably do without?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/-7qhuHUcb8E" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/16/turning-off-the-firehose</feedburner:origLink></entry>
 
 <entry>
   <title>5 Things That Video Games Do That Really Make Me Angry</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/MU7NXzzaQkw/5-things-that-video-games-do-that-really-make-me-angry" />
   <updated>2008-03-13T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/13/5-things-that-video-games-do-that-really-make-me-angry</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m sure that this list could be a lot longer, but I&amp;#8217;m going to focus on six issues that really piss me off when I&amp;#8217;m playing video games. If games happen to have more than 2 or 3 of these traits they tend to collect dust in my game cases very quickly, or they will do the same at your local game store. So, without further adieu:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not being able to skip cut scenes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sometimes, gamers just want to jump into the action. Yes, I know that designers have spent grueling hours working in their wonderful plot into the game, and skipping cut scenes may mean that the gamer will miss out on crucial story elements and possibly even essential game hints. Well, that&amp;#8217;s just too bad, and sometimes I don&amp;#8217;t mind taking that kind of chance. Perhaps I just need to vent a bit by blowing up some aliens or lighting a few people on fire. Another gripe I have with this is that some games don&amp;#8217;t make the option apparent if it is available at all during a cut scene. Please make them optional. I beg you. One game I played recently that either I couldn&amp;#8217;t skip or couldn&amp;#8217;t figure out how to skip was Metroid Prime 3: Corruption. It&amp;#8217;s now collecting dust in my cd case.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bad artificial intelligence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This one is probably hated by most gamers, and we&amp;#8217;ve all seen it. The AI runs enemy monsters or units into a wall, they can&amp;#8217;t figure out how to path correctly to follow you, or perhaps the designer of the game just didn&amp;#8217;t test the AI in the way that you think it should work. Well, it pretty much sucks when this happens. Rarely though is it a reason to stop playing a game, but when the AI is good it&amp;#8217;s easy to tell, and in some cases it&amp;#8217;s actually frightening.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hard to use menus&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a killer when you&amp;#8217;re trying to get things done fast. One might think that this kind of behavior is a no brainer and should be somewhat of an industry standard by now, but sometimes game designers absolutely fail at the 2D portions of the UI. One example I love is simple and definitely proven are any of Valve&amp;#8217;s game menus. They are somewhat of a convention in Valve&amp;#8217;s games and they present easy options first for beginner users while also allowing more experienced users to easily whip through menu choices. Crappy menus and other UI options are very easy to spot. One of the worse things you can do is slow down a user as they&amp;#8217;re going through the menus. Warcraft 3 does this with the stupid chain menu system, which I&amp;#8217;ve grown to loathe. Sometimes games can fail completely in both usability and readability, the biggest example of this I can think of is Dead Rising. I couldn&amp;#8217;t even read the menus since the text was horrible and it was laid out poorly. Ugh.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Collect-a-thons&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When I was 10, I used be able to stand running around various platformer worlds gathering every last bit that games could offer me. Hell, I even got 101% in Donkey Kong 64, but I wasn&amp;#8217;t hardcore enough to get all the stars in Super Mario 64 or all of the golden skulltulas in Ocarina of Time. Now however, I absolutely can&amp;#8217;t stand it. Games can get by without them just fine, but for some reason developers continue to inject these endless quests. World of Warcraft could even be considered one giant collect-a-thon. I guess that this mentality appeals to some gamers, but I&amp;#8217;m over it. And yes, I did beat Super Mario Galaxy, just with the minimum amount of stars.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Voice chat&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ah, the bane and boon of online gaming. I&amp;#8217;ve become somewhat jaded to this miracle of modern technology, and now I&amp;#8217;m absolutely sick of it. If I&amp;#8217;m playing an &lt;span class="caps"&gt;FPS&lt;/span&gt;, I&amp;#8217;m there to snipe someone&amp;#8217;s head off or lay a trap to waste them with, and not to listen how their day went or who in pop culture is ridiculously hot and said nerd doesn&amp;#8217;t have a chance with. I don&amp;#8217;t want to hear about how someone is cheating, hacking, or just being a bag of douche in the game. Get over yourself, and shut up. One of the first things I&amp;#8217;ll do with games that have voice chat embedded is turn it off immediately. I&amp;#8217;d rather leave voice chat to external programs that can be dedicated to the sole purpose of transmitting voice instead of having to build all of that extra functionality into the game.&lt;/p&gt;
&lt;p&gt;What things tick you off about video games? I&amp;#8217;m sure there&amp;#8217;s irksome moments that occur on a daily basis for any gamer, and here&amp;#8217;s your chance to rant about it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/MU7NXzzaQkw" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/13/5-things-that-video-games-do-that-really-make-me-angry</feedburner:origLink></entry>
 
 <entry>
   <title>Flash and WPF: A pain in the ass.</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/nHE1Hyh75h0/flash-and-wpf-a-pain-in-the-ass" />
   <updated>2008-03-09T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2008/03/09/flash-and-wpf-a-pain-in-the-ass</id>
   <content type="html">&lt;p&gt;I could say this about &lt;span class="caps"&gt;WPF&lt;/span&gt; as a whole, but when things actually work with &lt;span class="caps"&gt;WPF&lt;/span&gt; it&amp;#8217;s so damn smooth I can&amp;#8217;t help but feel somewhat accomplished. Nevertheless, I had a real pain trying to get an embedded flash player into my &lt;span class="caps"&gt;WPF&lt;/span&gt; app. Why Flash? Why not&amp;#8230;dare I say, Silverlight? Well, I&amp;#8217;m building a small app that plays YouTube videos, so obviously Flash makes sense. First, here&amp;#8217;s some lessons I learned while on this wonderfully frustrating journey:&lt;!--more--&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;strong&gt;For this instance, the &lt;code&gt;WebBrowser&lt;/code&gt; control blows.&lt;/strong&gt;: My first attempt was to add an embed tag into a &lt;code&gt;WebBrowser&lt;/code&gt; control, which is put inside of a &lt;code&gt;WindowsFormsHost&lt;/code&gt; control, which is how .&lt;span class="caps"&gt;NET&lt;/span&gt; encapsulates pre-3.0 controls. This did not work in the long run because first of all, IE throws script errors when you try to play YouTube&amp;#8217;s .&lt;span class="caps"&gt;SWF&lt;/span&gt; files, and also when resizing the background flashes and looks like utter garbage. Don&amp;#8217;t get me wrong, it has its uses. Just not here.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Pre-packaged solutions also suck.&lt;/strong&gt;: There&amp;#8217;s a few flash solutions out there that I tried, either got working and &lt;a href="http://www.f-in-box.com/dotnet/order.html"&gt;had to pay ridiculous amounts for&lt;/a&gt; (oh look, $1000 off this month!), or plainly didn&amp;#8217;t work at all. Just don&amp;#8217;t use them.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Google is your only hope.&lt;/strong&gt;: Basically any problem I&amp;#8217;d come across I&amp;#8217;d have to google immediately, and answers were sparse. The solution I finally ended up with was embedded ActiveX objects, which I also had a lot of trouble with, hence this blog post.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, here&amp;#8217;s an overview of what I did, and how you can get it working. A small note, I&amp;#8217;m targeting .&lt;span class="caps"&gt;NET&lt;/span&gt; 3.0.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Reference &lt;code&gt;Interop.ShockwaveFlashObjects&lt;/code&gt; and &lt;code&gt;AxInterop.ShockwaveFlashObjects&lt;/code&gt; in your project. The latter assembly may only be the necessary one, but back in the 2.0 world the forms designer added both. These DLLs will be included in the download project, but you can usually find them in the &lt;span class="caps"&gt;COM&lt;/span&gt; tab of the Add Reference dialog.&lt;/li&gt;
	&lt;li&gt;For whatever &lt;code&gt;UserControl&lt;/code&gt; or &lt;code&gt;Window&lt;/code&gt; you want to show this on, set up a &lt;code&gt;WindowsFormsHost &lt;/code&gt;object as well as a &lt;code&gt;AxShockwaveFlash &lt;/code&gt;object. (Make sure to include a &lt;code&gt;using AxShockwaveFlashObjects;&lt;/code&gt; as well)&lt;/li&gt;
	&lt;li&gt;In the &lt;code&gt;Loaded&lt;/code&gt; event for your &lt;code&gt;UserControl&lt;/code&gt;/&lt;code&gt;Window&lt;/code&gt;, &lt;span class="caps"&gt;NOT&lt;/span&gt; the constructor, set up these objects and set the &lt;code&gt;Child&lt;/code&gt; property of the &lt;code&gt;WindowsFormsHost&lt;/code&gt; to the &lt;code&gt;AxShockwaveFlash&lt;/code&gt; object you made. If you don&amp;#8217;t do it in this order, or do this in the constructor, ActiveX gets quite angry at you.&lt;/li&gt;
	&lt;li&gt;Make sure to add the &lt;code&gt;WindowsFormsHost&lt;/code&gt; to the &lt;code&gt;UserControl&lt;/code&gt;/&lt;code&gt;Window&lt;/code&gt;&amp;#8230;this is one of those gotchas that can save you some time.&lt;/li&gt;
	&lt;li&gt;Now you can set the &lt;code&gt;Movie&lt;/code&gt; property of the flash player, and call &lt;code&gt;Play()&lt;/code&gt; and it should work fine. If not, leave a comment and I&amp;#8217;ll help you out.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&amp;#8217;s an example project for you to get started with:&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a title="Flash WPF Example Project" href="http://litanyagainstfear.com/wp-content/uploads/2008/10/freepopcorn.zip"&gt;&lt;img src="http://litanyagainstfear.com/wp-content/uploads/2008/03/flashwpf.jpg" alt="Flash WPF pic" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/nHE1Hyh75h0" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2008/03/09/flash-and-wpf-a-pain-in-the-ass</feedburner:origLink></entry>
 
 <entry>
   <title>I&amp;#8217;m afraid of low level programming.</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/hgzsFkmNz4M/im-afraid-of-low-level-programming" />
   <updated>2007-11-27T00:00:00-05:00</updated>
   <id>http://litanyagainstfear.com/blog/2007/11/27/im-afraid-of-low-level-programming</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s running right now. Beneath those fancy windows. Under the hood. Shifting bits. Moving words in memory. And its scares the crap out of me.&lt;/p&gt;
&lt;p&gt;&lt;!--more--&gt; Why? It&amp;#8217;s a facet of human nature: what you don&amp;#8217;t understand, you&amp;#8217;re afraid of. But what can a novice programmer do about it? One of the main reasons I chose software engineering as a major is because I don&amp;#8217;t want to have to think about the lowest level of computing power if I didn&amp;#8217;t need to. I want to solve problems, help the company I&amp;#8217;m at succeed, and enhance my knowledge of the craft.&lt;/p&gt;
&lt;p&gt;However, I&amp;#8217;m starting to learn that I may need to return to the &amp;#8216;roots&amp;#8217; of programming. I&amp;#8217;m taking a computer graphics course this semester, and it will be the most C/C++ programming that I&amp;#8217;ve done in a while. Now grant it, I have had other classes where we did assembly and C, but not the entire course.  It just seems to me that in order to really solve a problem efficiently, you should understand some of the underpinnings and inner workings of what you are programming.&lt;/p&gt;
&lt;p&gt;So, what&amp;#8217;s my solution to this? Well, for now, tinker around with C++ and maybe even poke around the &lt;a href="http://gregs-blog.com/2007/11/25/update-quake-2-net-port-with-visual-studio-2008-v90-and-managed-c/" target="_blank"&gt;Managed C++ Quake port&lt;/a&gt;. Being in the &lt;a href="http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html" target="_blank"&gt;Kingdom of Nouns&lt;/a&gt; ruled by Java and .&lt;span class="caps"&gt;NET&lt;/span&gt; is nice though, and it really does let you focus on the problem at hand. Sometimes though, I wonder if escaping from those magical places allows the programmer to really dive into the task at hand and nail it down. I don&amp;#8217;t even want to get into some of those esoteric languages that &lt;a href="http://programming.reddit.com" target="_blank"&gt;I happen to see way too much about&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One day I&amp;#8217;ll get around to reading &lt;a href="http://en.wikipedia.org/wiki/K_and_R" target="_blank"&gt;K &amp;amp; R&lt;/a&gt; or &lt;a href="http://www.amazon.com/CIL-Programming-Under-Hood-NET/dp/1590590414" target="_blank"&gt;&lt;span class="caps"&gt;CIL&lt;/span&gt; Under the Hood&lt;/a&gt;, but until then&amp;#8230;Are there any other ways to dispel this fear? Let me know what you&amp;#8217;ve done to get over it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/hgzsFkmNz4M" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2007/11/27/im-afraid-of-low-level-programming</feedburner:origLink></entry>
 
 <entry>
   <title>Digg Labs: Flash doesn&amp;#8217;t suck all the time.</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/oPq_Tfl0IUw/digg-labs-flash-doesnt-suck-all-the-time" />
   <updated>2007-10-31T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2007/10/31/digg-labs-flash-doesnt-suck-all-the-time</id>
   <content type="html">&lt;p&gt;Don&amp;#8217;t get me wrong. I&amp;#8217;m not an expert on Flash. I haven&amp;#8217;t even made anything special in flash. Yeah, I can tween a circle and bounce it around the stage, and that&amp;#8217;s the extent of my Flash knowledge. One thing I do know about it: if you want to drive traffic from Google searches, you&amp;#8217;re better off not using it. Some bloggers even claim &lt;a href="http://www.seoresearcher.com/seo-flash-is-evil-five-big-reasons-not-to-use-flash.htm" target="_blank"&gt;its use to be evil&lt;/a&gt;.  Now I&amp;#8217;m sure there&amp;#8217;s a lot of Adobe fans are ready and willing to tear me a new one by now with arguments about how Flex and &lt;span class="caps"&gt;AIR&lt;/span&gt; will change the face of the interweb, but it&amp;#8217;s my opinion and always will be that your website&amp;#8217;s &lt;span class="caps"&gt;MAIN&lt;/span&gt; content should &lt;span class="caps"&gt;NEVER&lt;/span&gt; be in Flash. Let&amp;#8217;s look at the letters you type into that address bar of your browser at least once every day: &lt;a href="http://en.wikipedia.org/wiki/Http" target="_blank"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/a&gt;. Hyper. Text. Not animations, or effects, but text. Until that protocol changes I doubt Flash will ever be used as a serious web design platform.&lt;/p&gt;
&lt;p&gt;&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Once again, don&amp;#8217;t get me wrong. Flash has its uses. In fact, it&amp;#8217;s completely changed how we use the web. &lt;a href="http://www.newgrounds.com" target="_blank"&gt;Newgrounds &lt;/a&gt;and &lt;a href="http://www.youtube.com" target="_blank"&gt;YouTube&lt;/a&gt; immediately spring to mind, as they spawned entire communities and one could say even industries. Flash even has practical uses within sites, such as &lt;a href="http://swfupload.mammon.se/" target="_blank"&gt;SWFUpload&lt;/a&gt; or various visualization tools that are used &lt;a href="http://www.google.com/analytics/features.html"&gt;even inside of Google&amp;#8217;s own pages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The real magic of Flash is combining its content together with publicly available APIs and doing what Flash does best, even better than Java in some respects: being platform independent. &lt;a href="http://labs.digg.com" target="_blank"&gt;Digg Labs&lt;/a&gt; is a perfect example of this, and their contests are a testament to the real future of Flash and its real use on the internet. Digg Labs is the perfect mash-up: content generated by users and displayed in a (semi) useful, interactive, and fun way. Now, you can even get them to be your screensaver on Windows or &lt;span class="caps"&gt;OSX&lt;/span&gt;. I tried for a long while to turn some of the Digg Labs .swf files into screensavers before, but it&amp;#8217;s quite a nightmare without the right tools, and all the right data from the Digg servers.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s so special about Digg Labs creations is that unlike other visualizations of just raw data, be it traffic to your website or your network speed shown to you on a speedometer, you can actually interact with it. You can see the user who just dugg that story, and you can go check it out for yourself. Yes, it may be flooded with an overwhelming amount of Ron Paul stories at the moment, but at least it&amp;#8217;s not the HD-&lt;span class="caps"&gt;DVD&lt;/span&gt; encryption key, or even worse.&lt;/p&gt;
&lt;p&gt;Other websites out there really need to look into Flash for this purpose. This is a unique and fun way to engage your community while providing an actual useful way to access your site&amp;#8217;s data. Be it Reddit, which I would literally love to see an exact clone of Digg Labs for (or even both together in one app&amp;#8230;Blasphemy!), or Facebook, or any Web 2.0 site, they could really use some Flash visualization/interaction apps that can run on your desktop via a screensaver, Flash executable, or &lt;span class="caps"&gt;AIR&lt;/span&gt;. Imagine pictures from your friends on Facebook showing up in real time on your desktop or Del.icio.us links pouring in under a certain tag in a nice animated fashion.  All of the buzz about &lt;a href="http://www.techcrunch.com/2007/10/30/details-revealed-google-opensocial-to-be-common-apis-for-building-social-apps/"&gt;Google&amp;#8217;s Open Social&lt;/a&gt; and bringing out more APIs into the public for use makes this the perfect environment for more Flash goodness like Digg Labs to happen.&lt;/p&gt;
&lt;p&gt;So yeah, Flash doesn&amp;#8217;t suck all the time. Its niche on the internet continues to expand, but some part of me hopes I&amp;#8217;ll never have to learn more than how to move that red circle around the stage.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/oPq_Tfl0IUw" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2007/10/31/digg-labs-flash-doesnt-suck-all-the-time</feedburner:origLink></entry>
 
 <entry>
   <title>Why every programmer should play NetHack</title>
   <link href="http://feedproxy.google.com/~r/LitanyAgainstFear/~3/STHtZJcgPiM/why-every-programmer-should-play-nethack" />
   <updated>2007-10-29T00:00:00-04:00</updated>
   <id>http://litanyagainstfear.com/blog/2007/10/29/why-every-programmer-should-play-nethack</id>
   <content type="html">&lt;p&gt;I have a place in my heart for an obscure text based game called &lt;a href="http://www.nethack.org/" title="nethack.org" target="_blank"&gt;NetHack&lt;/a&gt;. This game is an archetype &lt;a href="http://en.wikipedia.org/wiki/Roguelike" title="Wikipedia entry on Roguelike." target="_blank"&gt;roguelike&lt;/a&gt; game, and I&amp;#8217;ve been playing it for over a year now. Not a year in actual game time (yes, I used to play WoW, a lot), but I&amp;#8217;ve been into NetHack seriously for the past 6 months or so, and it still kicks my ass. However, I&amp;#8217;ve managed to &lt;a href="http://alt.org/nethack/player-stats.php?player=DoctorNick" title="My Stats"&gt;ascend (beat the game) twice&lt;/a&gt;, and I can even play it on my Motorola Q.&lt;/p&gt;
&lt;p&gt;How has such a game captured my attention for so long &lt;strong&gt;and&lt;/strong&gt; directly apply towards my career as a software developer? Let me enlighten you as to why I think you should play it, and why it still matters so much.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NetHack is &lt;span class="caps"&gt;HARD&lt;/span&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;No, this isn&amp;#8217;t really a reason to play the game. However, it is a testament to how &lt;span class="caps"&gt;NOT&lt;/span&gt; to make your software. The amount of frustration I&amp;#8217;ve had to go through in order to ascend has been utterly ridiculous. Hell, when I first started playing the game, I didn&amp;#8217;t even know there was an ending. I just played because I like to explore. A classic idiom in web development is &lt;a href="http://www.sensible.com/chapter.html" title="Don't Make me think!" target="_blank"&gt;&amp;#8220;Don&amp;#8217;t Make Me Think!&amp;#8221;&lt;/a&gt; I had to do completely the opposite in order to get anywhere in NetHack. One has to remember what monsters do, not to put on that piece of armor because it might be cursed, not to drink from that fountain because snakes might pour out and kill me, and so on and so forth. Well, perhaps under the thousands of lines of C that compose NetHack, someone didn&amp;#8217;t think about that, but I for damn well sure am not going to make sure whoever uses my program won&amp;#8217;t have to think twice about performing actions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After 20+ years of development, it still has a vibrant community of users.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This really should be the goal of any community online going forward, be it you&amp;#8217;re creating a forum for users of your software to request features, or you&amp;#8217;re making a wiki-based community, or any of the above. Where will your community be in 20 years? Will it have &lt;a href="http://alt.org/nethack/"&gt;vibrant fan-made sites&lt;/a&gt;? Will it have a &lt;a href="http://nethack.wikia.com"&gt;fleshed out wiki&lt;/a&gt;? How about a &lt;a href="http://groups.google.com/group/rec.games.roguelike.nethack/topics"&gt;newsgroup&lt;/a&gt;? Or will it fizzle and be forgotten? The lesson here is that in order to make your community bloom you need to first plant the seeds.  Dig in a bit and you&amp;#8217;ll find that behind this game of &lt;span class="caps"&gt;ASCII&lt;/span&gt; characters and telnet terminals there lies a deep and invested group of users passionate about the game and willing to help others how to play. If it wasn&amp;#8217;t for the community and the &amp;#8220;spoilers&amp;#8221; it offers, I&amp;#8217;d probably still be wandering around the Dungeons of Doom aimlessly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;The DevTeam thinks of everything.&amp;#8221;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a classic motto of NetHack&amp;#8217;s development team within the community. The level of complexity of the game is ridiculous. Allow me to elaborate on one specific monster, the &lt;a href="http://en.wikipedia.org/wiki/Cockatrice"&gt;cockatrice&lt;/a&gt;. This monster is one of the most feared in the game because it can turn you to stone. Ah, but here&amp;#8217;s the rub: once slain, you can wield its corpse and stone foes. And this is where the DevTeam starts thinking. You picked it up with no gloves on? You turn to stone. Oops, you tripped down some stairs because you were carrying too much? Stoned. Hit the wrong key and now you&amp;#8217;re eating it? Bam, stoned. The list goes on, and on and on. However, the point is clear: the people behind NetHack have really thought of every possible case, every possible scenario in the game, and there&amp;#8217;s a consequence or action for it.&lt;/p&gt;
&lt;p&gt;I tend to strive for this goal now when I&amp;#8217;m coding. I&amp;#8217;d be proud if my program was so robust, so tested, and so mature that it could be said that I thought of everything. And even then, that&amp;#8217;s still a long shot, perhaps even impossible. In the short term, I find myself trying to think of every possible case that I can while I&amp;#8217;m programming, and I hope someday I&amp;#8217;ll be known to be able to really &amp;#8220;think of everything.&amp;#8221;&lt;/p&gt;
&lt;p&gt;Not convinced yet? Check out &lt;a href="http://archive.gamespy.com/legacy/fargo/nethack_a.shtm" target="_blank"&gt;these old&lt;/a&gt; &lt;a href="http://archive.gamespy.com/legacy/halloffame/nethack_a.shtm" target="_blank"&gt;articles&lt;/a&gt; from GameSpy about NetHack.  And if you&amp;#8217;ve played NetHack (and/or if you&amp;#8217;re a coder), leave a comment and let me know what you think about how NetHack relates to your &lt;em&gt;other &lt;/em&gt;9 to 5 job. And for those of you concerned, there are &lt;a href="http://nethack.wikia.com/wiki/Graphical_user_interface"&gt;several &lt;span class="caps"&gt;GUI&lt;/span&gt; versions of the game&lt;/a&gt; in the case that you&amp;#8217;d rather look at pretty pictures instead of characters.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/LitanyAgainstFear/~4/STHtZJcgPiM" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://litanyagainstfear.com/blog/2007/10/29/why-every-programmer-should-play-nethack</feedburner:origLink></entry>
 
 
</feed>
