[LRUG] Your Code is My Hell

Paul Robinson paul at 32moves.com
Fri Aug 26 08:44:35 PDT 2011


On 26 Aug 2011, at 08:25, Anthony Green wrote:

> These days *I* don't see as much discipline as I did back then. I see a growing body of what Mat Wynne describes as 'Mortgage Driven Development'.


In the words of my boss (in a startup) who was pushing hard for us to drop BDD:

"I would rather accumulate technical debt than, you know, actual debt..."

He has a point, and he's not alone. Some have argued that in the early stages of a startup getting customers is a more important priority than getting test coverage. I disagree, but then the debate is valuable as it helps everybody around the table set out their priorities, and given 80% of software development is about communication and only 20% is about writing code, anything that helps communication is good. Assuming everything "must" be a certain way harms teams, in my experience.

There is no homogenous culture in Ruby. Since I started coding Ruby in 2005 (previous: PHP, ASP, Java, Perl, C, C++), and whilst watching Rails evolve from 0.6.3 (when I first started tinkering with it), I have seen multiple cultures develop, mature, and retire. For a long time the very best text we could point new-comers at to learn the language involved cartoon strips of talking foxes making jokes about chunky bacon: that wasn't just a funny aside, it's all there was!

What has stayed consistent however is this one idea: it doesn't matter what test framework you use, as long as you're using a test framework. Unit testing might not sate all the desires of a Cucumber fan, but even the most ardent Cucumber fan would argue that unit tests are better than no tests at all.

However, back in 2005-2007 there was an attitude that there was "a" Ruby way. There was a book called that, there was a series of idioms that were considered "standard" and the mark of a good Rubyist was to instinctively drop in a .map and throw in lambdas and yields in a context that took time to understand. Given the question "how do I do this", the answers on the mailing lists converged to a single, authoritative answer.

As a result, many are still under the belief that there is still one way to do things, when in fact we've matured as a progamming community to allow more ideas to develop. I think the rise of different test frameworks, even not using tests, and to start applying patterns, discarding patterns, to focus on user interaction over object internals or vice versa, these are all part of the debate, and is perhaps the Ruby community's equivalent of Luther hammering a note to the door of his local cathedral.

To use a metaphor, Ruby isn't Catholicism. It's Zen. Each programmer needs to find their own path, and for each developer the result might feel a little different with each step, but we all know what we're heading for: flowing, elegant code that you can confidently refactor. It is freedom from the decisions of past or the plans of the future and to work with the present, here and now.

I know none of this helps with the fact you're frustrated with crap code, but Ruby exposes the weaknesses of us all, and in time it makes us all better. In time, you'll see the developers who picked it up over the last half dozen years get better, and to see more consistent adoption of the different emerging philosophies.

Personally though, if I walked into a shop where I heard any of the quotes you list in your article, I'd get a workshop together and have the discussions: they've drank some pretty odd kool-aid there...


> A couple of years ago I postulated that Ruby's biggest challenge was going to be growing the community whilst retaining it's culture.
> I don't think we're doing a very good job of it.


I disagree. Ruby's core culture - the thing that underpins all others - is one of pleasurable programming and experimentation. I still think that's very much alive and kicking.


More information about the Chat mailing list