First time here? Get updates by RSS feed or follow me on Twitter.

Close

« Seth Godin to speak at Business of Software 2008 | Main | Setting up your own software company: not as glamorous, or easy, as you think »

March 27, 2008

Coding standards: die, heretic scum

Geeks - the good ones, anyway - get passionate about the smallest things. Should braces sit on a line by themselves, or be next to the if clause? Is dynamic SQL better than stored procedures? XSLT - good or evil? I'm often reminded of this Emo Philips sketch:

I was walking across a bridge and I saw a man standing on the edge, about to jump. So I ran over and said "Stop! Don't do it. There's so much to live for!"
He said, "Like what?"
I said, "Well, are you religious?"
"Yes"
I said "Me too! Are you Christian or Buddhist?"
"Christian."
I said, "Me too! Are you Catholic or Protestant?"
"Protestant."
I said "Me too! Are you Episcopalian or Baptist?"
"Baptist."
I said, "Me too! Are you original Baptist Church of God, or are you Reformed Baptist Church of God?"
"Reformed Baptist Church of God."
I said, "Me too! Are you Reformed Baptist Church of God, Reformation of 1879, or Reformed Baptist Church of God, Reformation of 1915?"
He said, "Reformed Baptist Church of God, Reformation of 1915."

I said, "DIE. HERETIC SCUM!" and I pushed him off.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e008c58a4e883400e5517823998833

Listed below are links to weblogs that reference Coding standards: die, heretic scum:

Comments

The analogy is quite good. Whether it is coding standards or matters of religion, there is an objective truth.

Different people can believe different things about how to lay out code. But in every case the result will depend on how you do it. I used to write many functions all on one line, until I realized it actually caused me to make a lot of mistakes. Some layouts are objectively more readable than others; some are more error prone.

The same is true of religion. There is one objective truth, and what you believe will affect the eventual outcome.

You have to be quite similar to someone to _really_ hate them. I'm sure the leninists and trotskyites hated each other far more than they hated the nazis.

Anyway, the only reason to write the ugly:

while ( true ) {
...
}

Instead of the much clearer 'one true way':

while ( true )
{
...
}

Is to save space in books. Anyone who says otherwise must be purged.

I think a lot of confusion coming from the question 'What is better?'. To my mind coding standards are not designed to solve that problem. I strongly believe that the major reason to have one coding standard and follow it is to make the code maintainable. Everybody have their own style and which one is better doesn't truly matter. What matters is an ability for you to get to the piece of code that you didn't write and still figure out in the shortest time period possible what's going on there and adjust it to the current requirements...

We all following the rules of roads not because they are convenient to follow or because they fit our style, but merely because following rules of roads will get you to your destination faster and safer(most of the times)... Sometimes, sure enough, we break them to cut the corners :)

The comments to this entry are closed.

About Neil Davidson

Joint CEO of Red Gate Software and organiser of the Business of Software conference. Read More.

Free eBook

Don't just roll the dice How do you price your software? Is it art, science or magic? This usefully short book will help you get the theory, practical advice and case studies you need to stop you reaching for the dice.

Creative Commons

Creative Commons License

This work is licenced under a Creative Commons Licence.

Business of Software 2010

a Joel on Software conference

Boston
October 4th-6th

Subscribe to conference updates and get a free ebook!

View more posts