Monthly Archives: July 2011

Fowler on Rails

Projects using Ruby on Rails often lack strong distinctions in two main areas: The model/record conflation: Seeing “models” as strictly DB-backed resources. The view/template conflation: failing to draw a line between view objects and HTML templates. The conflations are encouraged … Continue reading

Posted in Ruby | Tagged , , , , , , | 18 Comments

The Procedure/Function Block Convention in Ruby

Ruby lets you enclose blocks in either {…} or do…end delimiters. Which you choose is a matter of style. There are two conventions that I know of for deciding which form to use.  The one I see people using most … Continue reading

Posted in Ruby | Tagged , , | 16 Comments

New at WideTeams.com

I don’t usually cross-post content from my other blogs. But since it’s gone a few months without an update, I thought I’d mention here that I finally have some new content up at WideTeams.com. If you’re not familiar with that … Continue reading

Posted in Announcements | Tagged , , , , | Leave a comment

An intro to throw and catch in Ruby

I’ve got a guest post up at the RubyLearning blog today, an introduction Ruby’s throw/catch construct.  It’s  a bit more novice-oriented than the stuff I typically post here. Here’s an excerpt: If you’re familiar with Java, C#, PHP, or C++, … Continue reading

Posted in Ruby | Tagged , , | Leave a comment

Demeter: It’s not just a good idea. It’s the law.

Is #try really so bad? In response to my recent post about #try being a code smell, a lot of people made the reasonable objection that the example I used—of using #try on a a Hash—was a pathological case. A … Continue reading

Posted in Ruby | Tagged , , , , , , , , , , , , | 72 Comments