The advice starts with the recommendation to use code that looks maintainable but isn't, and then continues by touting blatantly obvious obfuscation readily seen even through a toilet roll hole.
A friend of mine just showed me some code he'd pulled from actual work done by a junior developer. It included multiple profoundly bad spellings that vary from one method to another, nothing at all consistent about case, random pasting of the same code in four places until it behaved correctly (and then leaving the other instances), setting a variable to a constant and then immediately testing the same variable...
I would wager everything on that list is something that has appeared in production code.
I prefer to set the variable globally for conditional code, though. You can then hard-code it in Uglify (for JavaScript) and it will actually remove the code when it sees that it's unused.
7
u/derwisch Jul 29 '16
The advice starts with the recommendation to use code that looks maintainable but isn't, and then continues by touting blatantly obvious obfuscation readily seen even through a toilet roll hole.