So here I am at the end of the Lonestar Ruby Conference in Austin, TX. The conference videos should be online at some point but I wanted to post a summary for our own team based in Kansas City as well as others who want to get an overview of what they missed.
Highlights
- Matz: Yukihiro Matsumoto, the inventor of Ruby is my new friend from Japan. He is 43 years old last April and first wrote Ruby in 1995. Matz has a great sense of humor and is more warm and genuine than many would imagine. He named the language “Ruby” because “Perl was taken”, and since pearl is the gemstone for the month of June and ruby is the gemstone for the month of July, his new toy was christened “Ruby”.
- Testing: Test your $^# off! If you are not writing tests first or at least after code, you may as well forget it. Testing is truly valuable and yes, we do TDD within our own team but there have been times where I personally have deferred testing. If most of us are honest we have all had those times. However, I am truly committed to TDD all of the time instead of 90% of the time.
- PacketFu: PacketFu is Tod Beardley’s excellent network packet manipulation tool. You can do some really interesting stuff with packets. From scanning, deconstructing and analyzing to creating, manipulating and injecting. Tod’s library makes it very very easy.
- NamedScope: ActiveRecord’s new named_scopes are cool! Use them! A lot!
- Refactor: Constantly refactor. Make your code readable. Keep your methods short and concise, 5-9 lines max as a general rule. If you are writing tests as you should, this becomes much easier to do.
- Tools: Some new (1 year old or less) tools:
- Juggernaut Do server pushes to JavaScript
- Prawn PDF generation
- roo Work with spreadsheets
- DataFabric DB partitioning
- PoolParty EC2 cloud coolness
- Adhearsion Asterisk (VoIP server) integration
- Ruby Best Practices:
- Small Methods
- Simple Classes
- DRY Code
- Intention Revealing Names
- Code Metrics: Testing is great but if your tests don’t really test anything then you are getting nowhere. So use Metric_fu which aggregates stats from Flog, Saikuro and some other stats.
- Use Heckle
Jake Scruggs Metrics Scale: RCov: Code Coverage is the worst metric though it does have a use
- Flog Scores
- 0-10 awesome
- 11-20 good enough
- 21-40 may need refactoring
- 41-60 possible to justify
- 61-100 Danger zone
- 100-200 woop, whoop, whoop
- 200+ someone please think of the children
Create a hitlist of 10 worst methods, examine worst offenders and refactor. If the complexity is really a win then keep it but explain and test it well. Source control churn how many times has a file changed
So those are basically the highlights for the track I was on. I’ll publish the URL for the videos as soon as Confreaks releases it.
Cheers…
I will be attending the conference in Austin this week (Sept 3-6). Hope to see you there!

