⊙ AntiQuark

Truth, Beauty, Charm, Strange


No Hacking Logo

No Hacking!

This image now graces the front page the coding guidelines where I work. It's not intended to mean hacking in the criminal sense, but more in the sense of a hackjob that produces wretched code. Since this logo came into being, crappy code at our company has gone down by 38.5%. Special thanks go out to my autistically gifted cow-orker J'ohn!

Speaking of coding standards, I just worked my way through a Big Client's standard the other day. We're expected to follow it. If I could describe the theme of the document in one sentence it would be "Hungarian notation is our saviour." It's a hyperdetailed 20 pager describing how you shall name variables, where you shall put spaces, how you shall indent your braces... I think the word "shall" is used 200 times in that document. It's odd to read, how often do you hear the word "shall" in everyday life? Maybe they got a lawyer to write it.

One thing that's conspicuously missing is any mention of C's assert function. (I actually searched, and it wasn't there.) Saturating your code with asserts WILL make a difference in code quality. The asserts won't magically make your code better, but if the code's crappy, it won't run for very long; it'll repeatedly crash and produce terse error messages of what went wrong (which is what asserts do). Asserts will force you to improve the quality of your code.

Besides, whenever a big software failure happens, how often do you hear the official reason being, "oh, one of our developers used 4-space tabs instead of 8-space tabs." Never.


Post a Comment

<< Home