Naming to keep it all unmain

I just read ScottW's post on naming gadgets in a certain theme.. This reminded me to post one of the worlds most funny programming site ever written. It also gave me the idea to start my own category for collecting funny unmain practices (to be used when your employer starts to misbehave)

"How to write unmaintainable code" by Roedy Green as kept me and my fellow programmers laughing for lots of tiresome hours when the level of coffee exeeds the level of red stuff in our bloodstream. Especially notice the section on naming. I'll include some of my favorites here:

Be Abstract: In naming functions and variables, make heavy use of abstract words like it, everything, data, handle, stuff, do, routine, perform and the digits e.g. routineX48, PerformDataFunction, DoIt, HandleStuff and do_args_method.

Names From Mathematics: Choose variable names that masquerade as mathematical operators, e.g.: openParen = (slash + asterix) / equals;

Conventions Schmentions: Ignore the Sun Java Coding Conventions, after all, Sun does. Fortunately, the compiler won't tattle when you violate them. The goal is to come up with names that differ subtlely only in case. If you are forced to use the capitalisation conventions, you can still subvert wherever the choice is ambigous, e.g. use both inputFilename and inputfileName. Invent your own hopelessly complex naming conventions, then berate everyone else for not following them.

No Comments