Programming Standards are NOT pointless

It seems some people took my other article a bit too seriously.  While I was very serious and feel strongly about my convictions when it comes to HTML “validation”, the same cannot be said of programming standards.

For those of you that have never programming professionally, this stuff may be very new to you.  However, trust me, it is extremely important.  Programming standards are not stupid, are not corners to be cut, and must be strict, otherwise they ARE pointless.

There are standards when it comes to documenting your code, and I wont get into them.  But if you are interested there are programs out there which more or less set the standard if you want to use them.  JavaDoc, PHPDoc, and for those MS folks….. .  Go check out their websites for good advice on how to format your comments in your code.

Now, for actually coding, I have my own set of standards, developed over the years, to make the code both readable, but also hopefully logical.  Most people I run into think my code is pretty readable, some languages more than others.  Let’s face it, Perl code will never, ever, be as readable or “pretty” as Python.  It just isn’t going to happen.  Sorry you old UNIX guys, but Perl just isn’t very pretty.  The OO languages are much easier on the eyes.

So, other than for documentation reasons, readability (which leads to maintainability), are there actually other reasons to program to a standard?  Only if you want to use your code in some sort of portfolio.  But those first two reasons are EXTREMELY important.  Everyone out there that has programmed professionally will know exactly what I mean.

Tabs or spaces?  Braces at the end of a line or on their own line?  Spaces between concatenation or operators?  Double quotes or single quotes?  Print to buffer or hold in variables?  Globals or object variables?  Arguments or variables?

There are a ton of questions, and I cant answer them all.  But think about why you do something, and if you cant come up with a good reason, probably time to stop doing it.

Reblog this post [with Zemanta]
  • Share/Bookmark