Portland OregonLast week I was in Portland Oregon for RailsConf 2013.  Portland is a great city with beautiful views of mountains that us East Coasters dream of, unusually good weather (last week anyways), and a very entertaining soccer team.  But none of that is why I spent a week and some long flights going there.  Here are eight takeaways I had from RailsConf…

1. Real Time Rails takes a step forward

Brian Cardarella demo’d how Rails 4 makes it easier to write real time apps in Rails that were previously better done in something like nodejs.  Brian’s slides are here, but most of his talk was a demo so the slides don’t do it justice.  For a hint of how this is done in Rails 4 you could also check out this blog post from Tender Loving.  To see how you can do similar things now before Rails 4, try out this blog post by Liam Kaufman.

2. Hiring Volatiles and Stables – So Happy Together?

On Monday night, Michael Lopp gave the evening keynote.  My takeaway from his entertaining (if rambling) talk was about how to build a successful but still innovative company, you need to balance the conflicting desires of very innovative-but-difficult-to-manage developers (the Volatiles) and those very reliable-but-not-very-creative developers that drift to more established companies RailsConf Exhibit Hall(the Stables).  As AgilityFeat grows, I can start to see this tension coming into play.  While this was not a technical talk or specific to Rails, there were some very good nuggets for where I am at right now.

3. Snappy Apps take advantage of asynchronous workers

David Kapp from coshx labs gave a very good overview of how to use asynchronous workers in rails, and it reminded me to remind myself to use them more often.  He listed these candidates for aynch calls:

  • call external apis, especially slow ones
  • number crunching
  • document generation
  • image or video manipulation
  • sending email
  • payment processing
  • geolocation

David was using Resque in his example, but other frameworks would work well too.  He suggested starting with 2 or 3 worker threads initially and then monitoring the workload, make sure things are not being queued faster than they can be processed.

4. Split Testing in Rails

RailsConf sessions were packed!Bryan Woods talked about how to do split testing using Rails, and introduced an open source frame called Experimental that has come out of his teams’ work.  They built this framework after realizing that doing simple splitting techniques like odd/even user id’s was not working well for users.  For example, they realized they typically gave all the changes to even numbered users, and so those user saw lots of changes all the time, making them look bad as a company.  The odd numbered users always saw stability and never a change.

Experimental allows them to bucket users and put them in specific experiments easier to ensure a better experience for everyone.

5. WTF is the deal with PRY?

Conrad Irwin gave a great tour of PRY, which is an alternative to the ruby console tool IRB.  It allows you to do all sorts of cool things like “ls” commands to see the methods on a class, code documentation, and the very entertaining “wtf?” command that shows part of the trace resulting from the most recent command.  Very useful stuff for debugging.

6. Datomic and “newSQL”

If you are tired of noSQL vs SQL debates, then you can take comfort in a third option:  what Yoko Harada called “newSQL.”  Yoko showed how the diametric gem will give ActiveRecord-like model functionality in Ruby on top of a Datomic data store.  Datomic’s “fact based” database is supposed to be very good for large-read database needs and also has a sense of time built into it that makes it easy to roll back data and look at what it was previously.

7. BDD for iOS? Yes you can with RubyMotion!

2013-05-02_07-02-15_34Brian Sam-Bodden showed us how to use MacBacon to do behavior driven development of an iOS app using Ruby Motion.  BDD is not something you normally see on iOS apps, and while RubyMotion is not appropriate for all mobile development it can be a very useful way to bridge the gap to mobile development for Rails developers.  Especially if you don’t want to give up your RSpec ways.

8. Running with Rails coders

The best things at conferences usually happen outside the sessions.  RailsConf is no exception.  Going to the Portland Timbers soccer game was great, but perhaps even better was taking the initiative to go running with some Rails coders.  Darin Swanson kindly organized two runs during the week.  One was a riverside run in downtown Portland and the second was a mountain top trail run near the Portland Zoo.  I ran a little farther on those runs than I typically do, because I was inspired by the scenery as well as the example set by those marathon coders I was running with.  It as a very friendly group and a real highlight of the trip –thank you to everyone I met along the way at RailsConf!