Wednesday Afternoon Session Notes
November 19th, 2008
The Voices That Matter ruby conference is a single track conference emphasizing short 30 minute presentations that give you a taste of a variety of topics. These are my notes:
I met Jon “Lark” Larkowski at lunch who spoke about Testing as Communication: Real-World Techniques. Testing is communicating which means that we should be communicating all the f’ing time. HashRocket uses PivotalTracker all the f’ing time. No programming is done without a story in PivotalTracker. It keeps track of the velocity of todos getting done while providing transparency between management and the programmer. A Story contains (As a/ want to/ so that/ given/ when/ than). client vs. developer vs. code vs testing are all speaking a different languages from a different point of view. The goal is the transfer information and ideas seamlessly. At the end of his talk, Jon took a moment to point out that the Ruby community fosters inclusiveness. He encouraged us to walk up and talk to him or Obie because we come to the conference to share. What a sweet guy! :-)
David Berube was brave enough to present Surviving as a Windows-based Ruby and Rails Developer amongst a large majority of mac users. Still, I was grateful for the topic since I am still Windows based. But basically, Dave just spit out a bunch of tools that are needed to get up and running on Windows… but I’m already working in it, so not super useful. Not surprisingly, he told us that not all the third party software will work right on Windows, and there are other pitfalls as well. Ruby code that opens binary files doesn’t work because LF => CRLF and vice versa. There is no Kernal#fork. No GNU or compiler out of the box. But there are some good IDEs out there like Ruby in Steel, NetBeans, gvim, Emacs, or E text Editor (Textmate clone). (We use Aptana) POSIXing Your Windows Box…. you can never get all the way there. I haven’t needed to do this yet, thankfully. The closest you can get is Cygwin, but you can only have one Cygwin dll in your searchpath at a time (if windows detects more than one dll in the search path it simply won’t run). Unxutils is preferred. In the end, this talk was basically a commercial to switch away from Windows and go to Ubuntu. Of course, if your clients are windows based, then you need to have a windows based machine to test with… which is the case we find ourselves in… and so far, I’ve been happy enough with my work enviornment in Windows (even though Aptana can be kinda bloated and kludgey)… so I guess I’ll stay here for now.
Chad Pytel and Tammer Saleh (who I also met at lunch) gave the best presentation yet called Rails AntiPatterns. What does Red-Green-Refactor mean? Red: write a test (it fails of course), Green: write the least amount of code (the simplest thing that works) to make the test pass, Refactor: rearrange your code to eliminate duplication and allow patterns to evolve. The boys stepped through moving code from the controller to the models by giving specific examples of how certain pieces could be moved into callbacks and migrations to make the code more concise. They also made it a point to name their callbacks as specifically as possible. Also, don’t forget that you can add a condition to your callback. Even a 15 line controller action is too long. Exceptions should be exceptional, and your models should use callbacks to add complex behavior. Tackle large refactorings iterively. Push as much business logic into the model as possible. In lots of code, simple DRY pricnciples will lead to a lot of refactoring. Named_scope is a shortcut for defining a helper method on your model. Bad code happens to good people. Bad code works. Refactoring is not bug fixing. Always be refactoring.
Foy Savas also gave an engaging and entertaining talk about Merb in his presentation Battle Royale: Merb’s Role in the MVC Holy Wars. Foy is writing The Merb Way and even more impressive he can read chinese. Merb is a new database framework that takes the best of existing frameworks and claims to do what Rails is bad at: quick responses. Merb can handle more requests per second. There is a Merb Performance Promise. No release of Merb will be released that is slower than the last. Merb works with any server that has a Rack interface. Rack allows you to string together apps using Rack:Cascade. DataMapper destroys ActiveRecord by making working with collections easy. Merb gives us granulated modularity increasing the potential reuse of code. Where do you go for help? Just look though the clean source code. The books are coming out, but aren’t ready for primetime yet.
Will Koffel presented a Case Study: Sinful Ruby at Sermo. Sermo is a discussion community for nearly 100,000 US licenced physicians. Wish I could have stayed to learn more about their RoR and various tools choices, but I need to get home early to put my little girl to bed. All in all a great day at VTM!
Entry Filed under: Ruby on Rails
1 Comment Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed

1. Jon Larkowski | November 21st, 2008 at 6:49 pm
Nice to meet you at the conference. Thanks for taking the time to blog about all the sessions. And thanks for calling me, “sweet.” ;) See ya at the next conference!