LSRC – Day 2

September 5th, 2008 by admin Leave a reply »

The second day at the Lonestar Ruby Conference was filled with heavy hitters: Bruce Williams, James E. Gray, Bruce Tate, Evan Phoenix, and Yukihiro Matsumoto (aka Matz) himself. I was also excited to see Dave Thomas (a personal hero, he wrote the “pick-axe” book and does the Pragmatic Books). I learned a lot.
Ruby 1.9

The day started with a talk by Bruce Williams. He’s well known and respected in the Ruby community, and he lives in Austin, TX – which is cool. It has that “Lance Armstrong” effect when you have notable people living in your own town. Anyhow, he talked about what’s coming up in Ruby 1.9. It was a lengthy technical discussion about the inner-workings of Ruby 1.8 vs 1.9. I will not get into it here, there’s plenty on the net about it.
Hidden Gems

The next talk was by James Edward Gray II, and it was one of the best presentations of the whole conference. He compared what’s going on in the Ruby community to Battlestar Galactica and presented a series of lesser known Ruby Gems that could help make life better. He debunked the myth that Ruby is slow saying, “Ruby is slow—it’s not true. It’s as fast as you want it to be.” (The “Ruby is slow” or “Rails can’t scale” were recurring themes in a lot of presentations – it’s the biggest misconception the community is wrestling with right now.) Some of the gems he presented that I found interesting were:

* NArray (Numerical Array) – really good a heavy number crunching, provides a 3-dimensional array
* SQLite – it’s a fast and free database, often overlooked by people
* RBTree – James considered this the “big gun of computing” (like the cylon soldier robots)
* FSDB – this isn’t a gem, but it works better than a RDBMS in storing time-sorted data (eg logs, reports, etc)
* Rinda – it comes with Ruby and doesn’t need to be installed, it is dirt simple IPC

He also plugged Scout, which is a Rails server monitor he wrote.
Ruby Best Practice Patterns

The last presentation before lunch was on best practices and patterns, presented by Rein Henrichs. I found his presentation to be clever. He presented it as a parody, “unfactoring” as he called it. The premiss was that developers who write clean, easy-to-maintain code were stupid and soon to find themselves out of a job. Instead he proposed we write code that was hard to maintain and thereby keep our jobs secure. Of course he wasn’t being serious.

Some of the points that I took away (and many of which I already subscribe to) were:

* Use intention revealing names for variables and methods
* Write code for maintainability, optimize for it, since 90% of a project is maintaining code you wrote
* You should be able to read something at a glance and understand what it’s doing (if you have to take time to “walk through the code” before you understand what it’s doing, it’s badly written)
* Use around_filter (in Rails) instead of before_filter + after_filter

Javascript Frameworks

This session was insightful. It mainly focused around SproutCore, which is the same JS library that’s used by Apple’s MobileMe. You can write an application with very ERb’ish style mark-up. You can get SproutCore on GitHub. Some of the highlights of SproutCore:

* standards based
* builds desktop grade apps in your browser
* mvc
* used by MobileMe
* more Ruby flavored
* generators
* fixtures
* uses Merb for local development

The Care and Feeding of Ruby Developers

This session was presented by the VP of Development and Technology at FiveRuns. He’s come to the conclusion that Rubyists are a different breed of developer. They’re not like the Perl and C++ folks. Rubyists actually care about aesthetics! Some of the highlights of his talk:

  • Pervasive Aesthetics
    • visual design aesthetics are very important, essential
    • aesthetics of the work environment (they will find a good place if you don’t provide one)
  • Collaboration
    • baked into the community from the beginning
    • course correcting feedback
    • independent of physical location
    • independent of organizational boundaries (business competition, politics, etc., not as much a factor)
    • people who are not contributing, etc. get seen as not being alive, fade into the backdrop
  • The Doing is Close to the Planning
    • results in more Stars
  • Living on the Edge with the Latest
    • tend to be early adopters
    • comfortable with the rapid iterations of open-source
  • Enlightened Capitalists
  • Care and Feeding?
  • Awareness
  • Purpose
  • How well do your other communities match these qualities?

Tate’s Talk

Bruce Tate gave a talk about unconventional wisdom. Rails was great in that it brought a lot of people to Ruby, but at the same time it made a lot of people stop thinking. The auto-magical nature of Rails makes it easy to take off your thinking caps. His talk was to challenge us to get back into thinking critically about what it is we do as Ruby developers. Dave was in the audience on this one. At one point he said, “The boilerplate controller code in Rails is crap; and it shouldn’t of been done that way.”

  • What do you aspire to be?
  • What motivates you? Beauty? Money?
    • money should be the motivator
    • beauty helps you get there
  • Who’s the beholder?
    • consider perspectives
    • REST has its advantages, but it comes at a cost
  • Fixtures and testing—remember isolation is the goal, and islands are not dry!
    • use fixtures for small projects, simple models, and teams with few developers
    • go fixtureless when it’s a large project, complex models, or teams are large or inexperienced
    • don’t use fixtures for edge cases
    • don’t use more than 4 then that’s a code smell, refactor
    • don’t use fixtures for count or roll-up tests
    • don’t use fixtures for edge cases

Tate’s final comments:

* Have purpose
* Value the economics (money)
* Your code should tell a story and be readable

Tate’s challege to us all:

* We are in a fortunate time and industry (with Ruby, in the US), mentor someone in Ruby
* Find ways to give back to the community
* Use your skills to change the world

Later that Evening

Evan and Matz were the keynote speakers. Out of respect I kept my laptop shut and listed to their talks. So not many notes here. Both presentations were very good. Matz reminded me a lot of working at NTT Verio—I miss those days.

Advertisement

Leave a Reply