Using Rake to Make Your Builds Majestic

Rake is a software task management tool, written in ruby for managing ruby projects. By leveraging gems like albacore, rake can be used to automate tasks such as builds, configuration, assembly versioning, database deployments, unit testing, etc. for .NET projects as well. Nicholas Cloud talks about some of these features, and how you can use rake in your .NET environment with minimal friction and maximum synergy! Be sure to bring your hard hats folks.

Ruby Hoedown V – Friday Afternoon

After lunch on Friday, there were four remaining sessions to go before day’s end.  All were good, but I’m only going to recount the two that left the biggest impression on me.

Alan Johnson talked about his project Handlebars.js, an open source project for templating data in views with Javascript.  It is a spiritual ancestor to mustache but simplifies some of the more convoluted mustache conventions and introduces a slick set of “helpers” that make templating ridiculously easy.  The premise of both Handlebars.js and mustache is that view data should be just that — only data — and that the view should be responsible for organizing that data into meaningful patterns.  In traditional web architecture, this has always fallen to the server (at least on initial page load).  This is fine until you start introducing Ajax calls that are going to load up additional data from the server and use it to populate your views client-side.  At that point, you are probably creating partials on both the server and the client, effectively duplicating code.  Javascript UI frameworks like Handlebars.js and mustache move this all to the client, which means that views and view logic exist in one place.

Alan did a great job demonstrating this and giving the justifications for why this might be a legitimate approach in certain web application categories.  His explanation of why he chose to create a new project instead of simply extending mustache was also interesting (ultimately too much mustache code would need to change at too low a level).

The last session of the day was about debugging techniques in Ruby.  Jim Weirich talked about the Ruby gem Pry, which is like the Immediate window in Visual Studio jacked up on steroids.  He dropped some “pry” statements in his code and ran it through IRB, and whenever a pry statement was executed the interpreter would stop and generate a bunch of data about the current code being executed.  He queried object data much like you would in a traditional debugger, but then he demonstrated how, using traditional file system commands like “ls” and “cd”, one could traverse scopes of execution and examine data anywhere in the application.  Which was pretty damn amazing.  Being an Emacs fan, he also demonstrated how the Ruby debugger could be wired up to Emacs to give a much more “visual” debugging experience.

One thing I didn’t realize is that, in the Ruby community (and perhaps in other open source communities as well), there is a general antipathy toward debugging (tests should find all your bugs, right?), and when debugging is necessary, many ruby developers prefer to simply litter code with “puts” statements to see state changes in the application.  This method is simple, quick, and effective, but is also quite limited when non-trivial debugging is required.

On Friday night, everyone went over to The Red Door bar on Music Row for a fine party hosted by the Github reps who were participating in the conference.  A good time was had by all!

Ruby Hoedown V – Friday Morning

This weekend I’m in Nashville at the Ruby Hoedown V conference.  This is my first Ruby conference, and I am really enjoying it so far.  Mark, Josh and I arrived last night and had drinks and dinner at a local dive bar called Mojo’s.  The night cooled down a bit and outdoor seating was very nice.  I had a wonderful Stone 15th Anniversary Black IPA which is like the love child of a dark porter and a traditional hoppy IPA — very nom — and perhaps the best beer I’ve ever had.  We stayed up way too late talking tech and arguing politics.  It was a great start to the conference.

This morning we heard from Lance Ball at RedHat, who talked about their Ruby application server, TorqueBox.  It’s pretty badass.  It runs on top of JBoss and uses JRuby and the JVM to execute Ruby code.  Cluster management happens through mod_cluster running on an Apache proxy server, which can detect when TorqueBox nodes come online, and when they go offline.  The configuration is stupid simple.  It has a pretty hardcore messaging system, too, for queuing up messages on its internal service bus and delivering them reliably to subscribers.  The whole system is open source, including all of their performance tests (which were pretty impressive).

Before lunch Jon Distad gave a unconventional presentation which was only tangentially related to Ruby (well, programming in general).  He opened with an interesting description about what scientists believe about the nature of existence–how and why atoms form matter that ends up being awesome things like rocks and dinosaurs and humans and stars.  I don’t know about the science involved, but I certainly am interested in doing further research.  Anyway, his main point was that the basic nature of the universe is such that, at a certain level it seems to be chaos, but at another level it appears to be order, which he roughly translated into: don’t be afraid to try new things in life, don’t be afraid of failure, because out of the “chaos” of failure you can actually learn and produce something awesome.  In general I think he made some good points, and it was inspirational.

Over lunch we were treated to the music of The Farewell Drifters, a pretty kickass bluegrass band from Nashville.  They tore it up with a great acoustic set on stage, and all the geeks killed the wifi with downloads from the iTunes music store.  Of all the conferences I’ve attended, Hoedown had the best lunch.

Another post will come later…