Live data from Hacker News

What was the strangest coding standard rule that you were forced to follow?

stackoverflow.com

1–10 of 83 posts

Re: What was the strangest coding standard rule that you were forced to follow?

#5
I was talking to someone today, and they commented:

"Good programmers eventually learn to misspell words like void or int so that they can name their variable names what they want to name them."

I of course told him that this was terrible advice, and would mess with the next person who had to maintain the code because you couldn't tell at a glance if a word was a keyword or a keyword mispelled. I asked him what language he was using.

FORTRAN.

Where did he work.

The United States Air Force.

For how long?

Six years.

When?

Before 2000.

Since he had more experience, he claimed I was de facto wrong.

I fought him on it some more.

He told me it was personal preference. I told him you'd have to make me do it.

It was at that moment I figured that someone, somewhere, had probably had to do this as part of a coding guideline.

Re: What was the strangest coding standard rule that you were forced to follow?

#7
In my first job as part-time programmer at a bank back in 89, we were developing a large system in C, pretty advanced stuff compared to the usual 'buy from IBM' approach at the time. The 'systems analyst' broke down the design into modules and functions for the entire system, and everything was named something like 'ABM10EI00405'. Yeah, those were the actual names we had to use for .c files and functions.

Re: What was the strangest coding standard rule that you were forced to follow?

#8

I'm not sure what's up with all the hate for reverse hungarian notation, but I personally think it is helpful when writing C/C++.

I think it is crazy. Especially today, when IDEs can show you the declaration of a variable or method while hovering over it, there is no need to encode the type of a variable into the name. Variable names need to be sensible to humans, the compiler doesn't do checking on them anyway: it's all too common for the type prefixes to become misleading when a program has been refactored and they don't match up anymore.

Re: What was the strangest coding standard rule that you were forced to follow?

#10
The strangest one was when I was a COBOL programmer in the mid 80's and was forced to learn and used the GOTO verb. Having learned COBOL JSP style I was unaware that goto even existed in COBOL until then.

There again same place made me retest a program I'd tested and was fully working as a full-stop was missing of a comment line.

Crazy days.

Post reply on HN