9 ms·
How to Write Unmaintainable Code
- lettergram 10y agoI swear... I have worked with coworkers who have taken a lot of these principles to heart.
- Fuxy 10y agoI've worked with someone who managed to make a PHP string manipulation function look and function like C code a very broken C code at that. It was so horrendous I had to redactor it to keep my sanity. It takes amazing skill to write code so badly although it's not something I would hire for.
- Ntrails 10y agoThe 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.
- nvusuvu 10y agowDiabloical.
- tomelders 10y agoDear god! I'm an awful programmer.
- overcast 10y agoDon't sweat it, majority of the planet doesn't write amazing code. The whole world still runs on it, and it works.
- shapov 10y agoI am never going outside again.
- 0xdeadbeefbabe 10y agoLOL
- csours 10y agoThe code is coming from INSIDE THE HOUSE!!!!
- TheCartographer 10y agoWrite it in R?
- AstralStorm 10y agoYes, 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!
- shitgoose 10y agonah. R is actually not bad. i would go for nodejs. or any sort of dependency injection, so no one would ever know what method behind an interface is being called. not to mention kdb+, which is write-only by design.
- grncdr 10y agoFrom 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 10y agoYou know, at first I figured I'd use the original site, but I'm on mobile and the formatting is atrocious.
- snovv_crash 10y agoSame thing happened to me on desktop. They want me to click to another page for every 3-line paragraph? Gah!
- Fuxy 10y agoMy 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 10y agoI would have been disappointed if the source for that page wasn't a mess.
- gcr 10y ago
- alxmdev 10y agoI 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.
- MichaelMoser123 10y agono, 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.
- TickleSteve 10y agoYup! "Architecture as Obfuscation".
- mobiuscog 10y agoEven better, call it: IAbstractSingletonProxyFactoryBeanImpl
- Animux 10y agoOr take a class name from: http://www.classnamer.com/ http://www.classnamer.com/
- TickleSteve 10y ago"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)
- deleted 10y ago[deleted]
- priitmaxx 10y agoBest way to keep a job is to just be a good engineer. When people are motivated they will deobfuscare the code base.
- priitmaxx 10y agoBest way to keep a job is to just be a good engineer. When people are motivated they will deobfuscate the code base.