How To Write Unmaintainable Code 437
An anonymous reader writes "Make sure you're irreplaceable -' In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code! You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise it stands the risk of being rewritten or refactored. '"
FoxPro for DOS 2.6 (Score:5, Funny)
Or just write it in perl (Score:5, Funny)
&!@&/*!QW(*()@!@(I!@()!@)(!@*/\()!@&*(@!/*(&
Ok, I admit it. I just banged on the keyboard
Re:April Fool's Right???? (Score:4, Funny)
Re:April Fool's Right???? (Score:5, Funny)
I think we're supposed to take this with a certain amount of salt.
OOps, I see you're Canadian. Well, nobody's perfect
How to write unmaintanable code (Score:5, Funny)
Apply equal parts of Perl [perl.org] and Guinness [guinness.com]
Re:Or just write it in perl (Score:4, Funny)
Don't execute that... (Score:5, Funny)
Re:missing icon? (Score:5, Funny)
If you've seen the Slashcode, you would know why this joke would be lost on Hemos and the rest of the staff here.
Zing!
Re:Don't execute that... (Score:4, Funny)
- Don't read that, the Mod Points generate a brain dump!
Re:Or just write it in perl (Score:5, Funny)
Re:Or just write it in perl (Score:3, Funny)
The principle is clearly that if you can do absolutely everything in 20 indecipherable characters, your code will never need to be maintained.
Re:Biased, much? (Score:4, Funny)
Re:Or just write it in perl (Score:2, Funny)
Had to stop (Score:3, Funny)
Re:FoxPro for DOS 2.6 (Score:1, Funny)
Re:Dupe (Score:5, Funny)
Yeah... still a dupe.
Instructions! (Score:4, Funny)
Re:Until you get fired (Score:2, Funny)
1997 ... dupe from 1999 (Score:5, Funny)
Re:Jeez, just run an obfuscator (Score:5, Funny)
Re:Or just write it in perl (Score:5, Funny)
Yet it still does something in Perl. Witness the power!
Re:Or just write it in perl (Score:3, Funny)
Then the future of programming must be HQ9+!
How about dc? (Score:3, Funny)
Re:I can. (Score:5, Funny)
Were you age discriminated?
http://www.law.cornell.edu/uscode/29/ch14.html [cornell.edu]
Or were you a whaler?
http://www.law.cornell.edu/uscode/html/uscode16/u
Re:Or just write it in perl (Score:5, Funny)
That's odd---I do the same thing when I'm coding Perl. Usually with my forehead, though...
Re:Or just write it in perl (Score:5, Funny)
It's all fun and games until your "iPod sync" Perl script becomes self-aware and threatens life as we know it.
Re:Until you get fired (Score:2, Funny)
Wow (Score:5, Funny)
Bastard.
Meta application of these rules in real life: (Score:5, Funny)
The next day we had a meeting to examine a legacy application that we were going to be re-writing. Another dev was discussing the DataLoad method. Which loaded a flat CSV file.
And validated the data
And stored the result in a database.
It is very hard to look professional in a meeting when your face is beet red and your eyes are screwed up tight to keep from breaking out it gales of laughter.
PL/I is great for unmaintanble code (Score:3, Funny)
And how can you not love a language that has a data type for Pounds Sterling?
Obfuscation (Score:2, Funny)
The new manager came in and Mr. Zero was summarily given a quick bum's rush. Mom never wasted much time on such things.
Re:Not So (Score:4, Funny)
Chester Abramowitz COBOL Savant (Score:3, Funny)
It kept him employed.
Re:FoxPro for DOS 2.6 (Score:1, Funny)
Along similar lines... (Score:2, Funny)
12 Things A Klingon Programmer Would Say:
12. Specifications are for the weak and timid!
11. This machine is a piece of GAGH! I need dual Pentium processors if I am to do battle with this code!
10. You cannot really appreciate Dilbert unless you've read it in the original Klingon.
9. Indentation?! -- I will show you how to indent when I indent your skull!
8. What is this talk of 'release'? Klingons do not make software' releases'. Our software 'escapes' leaving a bloody trail of designers and quality assurance people in its wake.
7. Klingon function calls do not have 'parameters' -- they have 'arguments' -- and they ALWAYS WIN THEM.
6. Debugging? Klingons do not debug. Our software does not coddle the weak.
5. I have challenged the entire quality assurance team to a bat'leth contest. They will not concern us again.
4. A TRUE Klingon Warrior does not comment his code!
3. By filing this SPR you have challenged the honor of my family. Prepare to die!
2. You question the worthiness of my code? I should kill you where you stand!
1. Our users will know fear and cower before our software. Ship it! Ship it, and let them flee like the dogs they are!
Comment removed (Score:2, Funny)
Old Joke (Score:5, Funny)
Re:not how it works. (Score:5, Funny)
Ira
No, no no. The author has it all wrong. (Score:1, Funny)
The way to make your code unmaintainable is through proper use of design patterns. Don't skimp. Combine many design patterns together to make your code so complex that nobody can ever figure it out, even by stepping through your code with a debugger. Use factories to produce composite visitor objects that bridge each other recursively. God, that just gave me a tent thinking about it.
If anyone complains that they can't figure out your code, tell their manager that you're worried about poorly trained programmers that don't keep up with good programming practices. So-and-so doesn't know even the most basic design patterns. Express your concern that such low-level programmers might screw up the code and require you to have to return to the site for maintenance, with your very high fee.
Re:How to write unmaintanable code (Score:1, Funny)
At my college, we call that "intoxicoding."
A wise man once said... (Score:3, Funny)
All of the rest will write a Perl program.
Re:Lifetime aint always that long (Score:2, Funny)
Re:Lifetime aint always that long (Score:4, Funny)
Re:I can, too (Score:1, Funny)
My name is Naorumi Hajan, I own a large scale of hotels in Swede Arabia. You probably don't know me, but I was very scared by your comment. We can lose millions ($16000000USD) of dollars because our profits depend on uptime. The analyst told me the other day that we make $1M per minute at average. Imagine what can happen! I don't understand anything about what these programmers are doing. I wish not to risk looosing all this dollars. You can help me. I want to buy your book on good coding practices. You deserve to be rich because I am very afraid by your story. I will also buy any encyclopedias you sell.
Send me your credit card info.
Unmaintainable code in just In 3 easy lessons. (Score:2, Funny)
2.) Avoid specialized classes and functions like the plague. Place everything in gigantic Sub or void methods, trying to pack as much of your programs functionality as you possibly can into each block.
3.) Thoroughly document your code by scattering non-sequitor comments at random points.
This is a proven tecnique. In fact it works so well that anyone with a brain that gets a look at it will recommend that your app be shitcanned immediately rather then waste another dime maintaining it.
Re:Or just write it in perl (Score:2, Funny)