Reply to post: One of my comments

This is why copy'n'paste should be banned from developers' IDEs

Anonymous Coward
Anonymous Coward

One of my comments

One day my company suddenly denabled a source code style checker when checking in. It checks for copyright, tabs and curly brackets in the "right places".

And here was what I wrote at that check in after adding a fail-safe part and seeing red from the checker:

"Conforms to the "coding style" - doesn't make it more readable of course or bugs free.

And if you can't read unformatted code then you should not be a programmer/coder.

Also the (c) after Copyright is not recognised legally. Use © instead and you may stand a chance."

It took me over 10 minutes to move the curly brackets from it's own line to one space after the "if", "do", "when", "for", etc. Also I needed curly brackets around a single statement too.

Yes, you guessed it, I hate coding style, especially when a single person imposes them onto the rest of the company.

Incidentally, the "best" comment I have written while debugging some awful code was:

"If you can't do simple maths then don't bother with programming". It has a huge switch statement on some variable N to create a string of N zeros (1 to 10 iirc). I replaced it with a single line of course.

Anon just in case they are reading :P

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019