September 7, 2008 - Tags:

Crafting your code and respecting other’s

I noticed that a lot of developers don’t take responsibility laying out their code anymore. Using auto-formatters, auto-sorters and auto-clean-up-ers they surrender their work to their IDE.

I like to craft my code. I’ll break lines where it makes sense. I group methods in logical blocks. Every space I insert is intentional. It’s all part of the art.

Until a minute later someone runs their little helpers making a mess out of what was once a beautiful piece of text.

The number one reason seems to be to “reduce version control conflicts”. Of course there are less conflicts if all code looks the same. But: If you just keep mine as it is and don’t reformat it there wont be any conflicts either. Sorting methods alphabetically? Breaking a line in an awkward spot just because it has 83 characters instead of 80? Reordering import statements?

A good set of sensible coding guidelines and responsible programmers who love their art should be enough to keep a clean code base.

0 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

(C) 2008 - Stephan Brosinski - All Rights Reserved