[LRUG] Your Code is My Hell

Anthony Green anthony.green at bbc.co.uk
Sun Sep 4 04:16:00 PDT 2011



Graham Ashton wrote:

> The funny thing about Rails is that it doesn't require any knowledge of
> OO design to keep things tidy on a small project. Few Rails developers
> (even amongst the more experienced ones) seem to recognise the smells
> (e.g. controllers with far too many responsibilities, and therefore
> private/protected methods) when a project grows. I've never heard a
> Rails developer say "I think we should extract this behaviour into a
> separate class…"

Gary Bernhardt produces some excellent screencasts on just this topic:

https://www.destroyallsoftware.com/screencasts

> I've put this down to them never having worked on a project where
> they've been forced to learn those skills, but perhaps the lack of
> discussion of these topics in the wider community is a bigger
> contributing factor.

> The Ruby community seems very fashion lead to me (and we have our own
> unique sense of style). How else can you explain the widespread adoption
> of cucumber?

Silver bullet syndrome ?
Cucumber is regularly mis-appropriated or mis-understood I find, 
particularly around the overuse of the imperative style.


I don't dispute that it could be a useful communication
> tool in some circumstances, but it seems very strange that it should be
> adopted by so many projects on which the only people who read the tests
> are developers.

If you're not collaboratively writing them with your 
stakeholders/product owners at the very least to tease out requirements 
I would regularly reflect upon their value.

> Rspec has contributed context blocks to the testing landscape, but the
> rest of it has added nothing to the state of the art (yet has cost a
> significant amount of effort). I think Rspec simply became fashionable too.

I think Ruby and by association its toolsets have contributed a 
significant amount to the expressiveness of the 'things' that we write.
That's what I feel attracted those early adopters of Rspec.

> How does the change in culture you're referring to relate to trends like
> these?

I wonder how frequently these tools are actually used, and if so with 
what level of understanding. Of their origins, their rasion d'être, 
their role in design.

-- 
Anthony Green
Apprentice Developer : BBC Future Media
Developer Evangelist : Developer Outreach Group





More information about the Chat mailing list