Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Clean Code is just a Crutch

DZone's Guide to

Clean Code is just a Crutch

· Java Zone
Free Resource

Learn how to stop testing everything every sprint and only test the code you’ve changed. Brought to you by Parasoft.

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/

Get the top tips for Java developers and best practices to overcome common challenges. Brought to you by Parasoft.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}