• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to write unmaintainable code

That is evil 😀. I've seen so much code that fits a lot those suggestions but the scary part is it was unintentional. In the realm of human chaos, these things just occur because of the slight change of patterns in the brain on a daily basis. It starts when you get up with each little thing you see, hear of even smell kicks off little rabbit trails in your brain. If could be a news story, billboard on the street or the smell of fresh cut grass that starts it. You arrive at your workstation just in time to pick up on conversations, email and office aromas to send those rabbits off again. It does not affect a seasoned programmer that is experienced as an IT person as much as it will say an engineer or other profession that programs for their benefit. Non-true IT people are more likely to not use long names and Hungarian notation. The effects of daily life will change their habits from day to day causing a pattern creep. I've seen the names of common variables such as loopers, change over time. For a while it's i then it becomes ii.

You can buck this trend by walking their code and changing all the looper variables to idx1, idx2 ... then they will be lost and you might become owner of that code. Just be prepared for the heat when you break something while refactoring.
 
29. How To Fix Unused Variable Errors
If your compiler issues "unused local variable" warnings, don't get rid of the variable. Instead, just find a clever way to use it. My favorite is...
i = i;

Brilliant Stuff. LMAO.
 
Hide Macro Definitions
Hide macro definitions in amongst rubbish comments. The programmer will get bored and not finish reading the comments thus never discover the macro. Ensure that the macro replaces what looks like a perfectly legitimate assignment with some bizarre operation, a simple example:

#define a=b a=0-b
That is so cruel....
 
Originally posted by: statik213
Hide Macro Definitions
Hide macro definitions in amongst rubbish comments. The programmer will get bored and not finish reading the comments thus never discover the macro. Ensure that the macro replaces what looks like a perfectly legitimate assignment with some bizarre operation, a simple example:

#define a=b a=0-b
That is so cruel....

What a headache that would case...
 
Back
Top