Over a million developers have joined DZone.

Clean Code is just a Crutch

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

Last week I was at the completely awesome SoCraTes conference. It was the first meeting of the German Software Craftsmanship Community. Some of the attendees argued that some day in the future there might be a way to measure the quality of software which in turn would help to argue with management about the need for refactoring and similar actions. I strongly disagree. What amounts to quality in one environment is a lack of quality or even a bug in another environment. So there can’t be a single metric.

Apart from being utopian the idea of a single quality measurement might actually hide a dangerous attitude: The attitude that clean code has a value on its own! It doesn’t. Even if you don’t like it: The only things that count in the end are measured in dollars, euro and yen.

In this sense clean code is only a crutch. We do it in order to get somewhere where we can’t go without, or at least not as easy.

We are convinced that improving our code, and writing tests

  • makes us faster (and therefore our work cheaper) in the not to long run.
  • makes the code easier to maintain.
  • makes it easier to add features tomorrow.

And as long as I’m convinced it is helping with these aims I’ll continue to do so, and so should you.

But if your are doing it just because it is in some fuzzy sense the ‘right thing to do’ you are doing it for the wrong reason and you might be doing the wrong thing.

From http://blog.schauderhaft.de/2011/09/04/clean-code-is-just-a-crutch/

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}