Wednesday, December 19, 2012

Guest Post Today On The Code Climate Blog

The conversation around DCI and concerns in Rails continues today with blog posts from David Bryant Copeland and Jim Gay, author of Clean Ruby.

Last but not least, the conversation also continues with a guest post I wrote for the Code Climate blog, entitled DCI, Concerns, And Readable Code. Code Climate is a web app which provides the best way to ship better code faster. My blog post examines David Heinemeier Hansson's recent post on concerns, and shows how that post links this ongoing debate to a major theme from my book: that Rails makes fluid API design its main priority, and owes a lot of its success to that.

Although there is some funny sarcasm, because I just can't resist a good punchline, I'm aiming on the whole for a more elevated level of discussion than in the past. Here's an excerpt:

Finding “just the right amount of abstraction” requires more than just defining the most readable possible API. It also requires balancing the most readable possible API with the most comprehensible possible domain model. There’s an analogy to human writing: you can’t just write beautiful sentences and call it a day. If you put beautiful sentences on pages at random, you might have poetry, if you get lucky, but you won’t have a story.

Every Rails developer who wants to write good code can get something valuable from this post.