
How to Write Unmaintainable Code - adgasf
https://github.com/Droogans/unmaintainable-code#how-to-write-unmaintainable-code
======
grncdr
From
[http://mindprod.com/jgloss/unmain.html](http://mindprod.com/jgloss/unmain.html):

> I would like to remind you this essay is copyrighted material. It is illegal
> to repost it without permission. I will usually give you that permission if
> you translate the essay into another language and if you provide a link back
> to the English-language original. I do this for three reasons.
    
    
        1. That way any change I make to the essay is instantly reflected in any English-language copy anyone reads.
        2. That way the formatting and images are preserved. Pirated copies usually screw up the formatting.
        3. Google ad revenue from this essay is the main source of income from the website. It pays to keep me on the air.
    

I don't understand how the creator of this GitHub repo could miss this, it's
the first thing in the original article...

~~~
Fej
You know, at first I figured I'd use the original site, but I'm on mobile and
the formatting is atrocious.

~~~
snovv_crash
Same thing happened to me on desktop. They want me to click to another page
for every 3-line paragraph? Gah!

~~~
Fuxy
My first though when checked out the source. That thing is so messy it's hard
to navigate not to mention having to click so much.

If this truly is a source of income he should put more effort into making it
usable. This is a predictable outcome of anyone neglecting their content.

~~~
tokai
I would have been disappointed if the source for that page wasn't a mess.

------
TickleSteve
"Hungarian Notation is the tactical nuclear weapon of source code obfuscation
techniques"

...never a truer word was said.

([http://www.joelonsoftware.com/articles/Wrong.html](http://www.joelonsoftware.com/articles/Wrong.html))

------
alxmdev
I had the pleasure of dealing with C++ classes with a dozen or more
gratuitously overloaded operators, including overloaded cast operators. You'd
cast an object to a certain type in order to access a member of that type,
instead of accessing that member in a normal way. I never doubted for a second
that it was all done for job security, this stuff is real.

------
lettergram
I swear... I have worked with coworkers who have taken a lot of these
principles to heart.

~~~
Ntrails
The paragraph on wrapping all of your global variables in a single static
array nearly killed me. I've seen a global Dictionary<string,object> for that
exact purpose, followed by the proud exclamation "I'm down to a single global
variable".

This was in a brand new tool, the programmer was responding to increasing
pressure from peers to remove global variables in code. Magic.

------
MichaelMoser123
no, he missed one obfuscation trick that should be quite natural in java land
- just create deep nested class hierarchies that serve no apparent purpose -
AbstractSingletonProxyFactoryBean for everybody; no hope to understand what is
going on here.

~~~
mobiuscog
Even better, call it: IAbstractSingletonProxyFactoryBeanImpl

~~~
Animux
Or take a class name from:
[http://www.classnamer.com/](http://www.classnamer.com/)

------
tomelders
Dear god! I'm an awful programmer.

~~~
overcast
Don't sweat it, majority of the planet doesn't write amazing code. The whole
world still runs on it, and it works.

~~~
shapov
I am never going outside again.

~~~
csours
The code is coming from INSIDE THE HOUSE!!!!

------
priitmaxx
Best way to keep a job is to just be a good engineer. When people are
motivated they will deobfuscare the code base.

------
TheCartographer
Write it in R?

~~~
AstralStorm
Yes, mixing languages is a pro's version of this. Earn 10 points for every
language and 20 points extra for every interface between them. Macro languages
like XML do count.

Additionally do some build system breakage with automatically partially
generated code for extra credit.

Of course if you create some DSL or XML, never include schema or any kind of
documentation that is not the parser.

And absolute worst: include optimizrd binary only code - no documentation and
sources. Reverse engineering is fun!

------
nvusuvu
wDiabloical.

