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)
Re:FoxPro for DOS 2.6 (Score:3, Insightful)
Re:FoxPro for DOS 2.6 (Score:3, Interesting)
Having worked at a similar mom-and-pop software shop that has outgrown its humble beginnings, I can say with confidence that there is nothing more dangerous to a company (and a programmer's mental health) than a boss who tries to involve himself in the software development process.
Our flagship product was written (illegibly) in VB6. The codebase hadn't changed since VB3, and it wasn't very well-written to begin with. Our small development team spent about half of our time cleaning up after his architect
Re:Lifetime aint always that long (Score:5, Informative)
I worked for a rather large ISP who in the process up and switched from a rather large home grown custom database program it had used for years to the corporate Vantive which cost them millions at the time.
I asked my manager why would they bother doing such a thing when the old program worked just fine. He said "The guy who made the program died and know one knows how to code for it."
I laughed for a moment and then by his blank face realized he wasn't joking...
Re:Lifetime aint always that long (Score:5, Insightful)
If you're paying someone to do a complex job (hint: if it costs $1 million to replace them, it's a complex job), and they die/quit/retire, find a smart person to replace them. Don't find two dipshits to replace them. Don't give Suzy the secretary a $2 raise to do their job (unless Suzy the secretary really is a smart person, in which case, why weren't you paying Suzy more to begin with?)
I've seen it happen over and over again. Smart person runs entire company single-handedly. Smart person quits/dies. Company panics. Company spends ungodly sum of money to completely redesign whatever it is the smart person was doing. New system ends up missing functionality and costing the company loss of productivity.
Every time, something tells me that if this person was smart enough to do everything they were doing, there was probably a reason for it. That's not to say they can't be replaced, just that they probably can't be replaced with any random dipshit, or any random piece of off-the-shelf software.
So, if you're a manager/owner, and you find yourself in this situation: when smart person quits, put an ad in the paper, hire a headhunter, find someone with an IQ of 130 to replace them. Pay them 20% more than you were paying the previous person. Don't worry about whether the new person has experience doing exactly what the previous person did. Don't worry about redesigning anything. If something needs to be changed, the new smart person will be perfectly capable of changing it.
Re:Lifetime aint always that long (Score:4, Funny)
Re:Lifetime aint always that long (Score:4, Insightful)
Re:Lifetime aint always that long (Score:4, Interesting)
Yup, especially since HR adheres to the "check-box" policy off hiring. Do you have such a skill yes/no? This totally eliminates the people who actually can learn the stuff. I was speaking to one headhunter who said that one company wanted someone who could hit the ground running, because they had a tight deadline, and then as the project got closer to the finish date, and they still hadn't found such a person, they became fussier about thre criteria. This is akin is trying to find the ideal girl friend and upping the criteria when you don't find her.
Okay must admit since taking a sabatical trying to find another job is proving to be a little harder than expected. And the fact that I am in IT doesn't seem to help me find the "beautiful girl, who is smart and funny and I spend my time with" ( match.com didn't help either
missing icon? (Score:5, Insightful)
Re:missing icon? (Score:3, Interesting)
Its an old joke. with a new header. That's all. Next submission please.
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!
I realize that it's supposed to be humor (Score:3, Interesting)
Re:I realize that it's supposed to be humor (Score:3, Insightful)
Re:I realize that it's supposed to be humor (Score:4, Interesting)
it's a dirty way to have great job security.
i'm not sure what would make it harder to sleep at night... knowing that there are outsources ready to take your well maintained project over and remove your source of income, or knowing that you're intentionally putting effort into making a project complex and making a sort of symbiotic leech relationship with your employer.
if i were a programmer full time, i would like to think that there are other ways i could have 100% job security and keep my geek pride.
Old Joke (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:Or just write it in perl (Score:2)
Re:Or just write it in perl (Score:4, Funny)
Don't execute that... (Score:5, Funny)
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:2)
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:Or just write it in perl (Score:3, Funny)
Then the future of programming must be HQ9+!
Re:Or just write it in perl (Score:3, Interesting)
no, you'll just be replaced by a genetic algorythm with a random input for seeding, then let loose to select for the desired behaviour.
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:Or just write it in perl (Score:5, Funny)
Re:Or just write it in perl (Score:2, Funny)
Re:Or just write it in perl (Score:5, Funny)
Yet it still does something in Perl. Witness the power!
How about dc? (Score:3, Funny)
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...
A wise man once said... (Score:3, Funny)
All of the rest will write a Perl program.
Funny (Score:2)
not how it works. (Score:5, Insightful)
Assuming this is tongue-in-cheek. My experience has been no matter how poorly written or unmaintainable something is, it offers little insurance to the author for keeping a job. I've been handed the reins to maintain countless "gone" employees' code. And, if the code isn't maintainable and the program is important or desirable enough, companies just limp along with the deficiencies. I can't think of a single occasion where someone was kept because of fears of maintaining their code, nor where someone was brought back to maintain their 'unmaintainable' code.
(+/- 2 sigma complainers -- reply here)
I can. (Score:5, Interesting)
I can.
My very first programming job - which went on for years and where I did a bunch of stuff - but was quite underpaid. There were two of us programming when the institution in question had a financial crisis and could only keep one. My code was maintainable, the other guy's wasn't. So I got the boot.
And had a new job at higher pay in a better situation 25 minutes after letting it be known that I was available.
Before it was a matter of writing code that *I* could maintain. After it was a matter, not just of principle, but of practicality. By making myself NOT indispensible I made myself valuable.
I went on to a long carreer of mixed consulting and salaried positions, doing software for 35 years, and now hardware and system architecture. (And I once got the layoff because my code was the only stuff that worked, if you can imagine that. From another doomed company.)
The potential value-added in software and computer hardware has been so extreme that management can be AMAZINGLY pathological and still keep a company afloat for a couple years - and then find another job after it crashes. (Investors prefer someone with management experience crashing companies to someone with talent but no management experience. B-( Meanwhile the ones with management experience NOT crashing companies are too expensive or too busy.)
I'm now at six figures, stock options, one house paid for and another in progress, three cars, yacht, putting non-working (at the moment) wife with four degrees so far through more school (so she can do something she LIKES professionally), and held on to the current position through the slump, chapter 14, and out into the recovery. A big part of that was achieved by religiously making myself dispensible.
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:Still people try it (Score:3, Interesting)
I had to point out that if he had a boss who would not know why such a situation shouldn't exist would probably also not know why the network guy shouldn't be laid off.
Re:I can. (Score:5, Interesting)
Re:I can. (Score:3, Informative)
(1) It's much nicer to have money than not to. I'd rather shop at Gelson's or Whole Foods than Ralphs any day. It's just plain fun to go to nice places and be able to afford nice things.
(2) During this time, I worked for someone who was not very nice. Doing so can severely damage your life and happiness level, no matter how much money you earn. At the same time, workin
Re:I can. (Score:3, Informative)
And being able to resolve it by tossing some money at it gives you time to deal with all the larger problems that money can't resolve.
Pug
Oh, but it does work that way, sometimes... (Score:5, Interesting)
I can. In fact, I can think of two people at two different companies.
One kept the only copy of his source code on a laptop that he carried with him. The code was so horribly unmaintainable that none of us would touch it, though it was hardly an issue since we rarely got more than the pre-compiled libraries from him. The boss was so scared that he would lose the source that he falsified and submitted timecards for almost three months when the guy decided he was "unappreciated" and stopped coming to work. It goes without saying, but this manager was just as incompetent. In fact, I'm convinced the only reason either one survived as long as they did was through their symbiotic, parasitic relationship.
The other guy put his code through an obfuscator, literally, that removed all the indentation, carriage returns, and comments, meanwhile renaming all of his class, method, and variable names to random strings of the characters n, e, and w. It also added random comments made up of the same random strings sprinkled with semicolons. Yeah, cute. During the unemployment interview, he stated that he had fulfilled his requirements, the code compiled and worked, there was never a formal standard for the format, and he couldn't be held responsible for the additional work of his former co-workers. I think what clinched his unemployment benefits was stating he had no hard feelings and maintaining that he was available for consulting work if the company had acted too quickly.
Re:not how it works. (Score:5, Funny)
Ira
I can, too (Score:5, Interesting)
They had won a contract from a major hotel firm to design and run their reservation system. The whole system was written by one guy, who by all accounts did an absolutely superhuman job. Of course, the company had to choose whether they wanted the job documented well, or completed by deadline. You can guess what they chose.
Our hero stays busy for a few years, maintaining code and writing new modules, but there are still a long row of empty loose-leaf binders where the documentation should be.
Company gets bought out. After a couple of months, the new owners announce that they're going to rewrite the whole reservation system from scratch, and retire the old system. Our hero comes in next day and demands a large raise. Management declines, hero gives his two weeks, and management cuts him his check and escorts him out the door.
Management then brings in a team of consultants to keep the old system up and running until the new system is ready. Problem is, the team can't get anywhere. Nothings documented, calling the code "spaghetti" would be a compliment, etc etc etc. Meanwhile, they're getting requests from the customer for changes and updates which they can't process. In addition, system crashes now take hours to solve instead of minutes, which is bad because part of the companies revenue is based on system uptime.
After a few weeks, management finally throws in the towel, and realizes they'll have to bring the guy back and pay him what he wants. Except... they can't find him. He's moved, and left no forwarding address. Nobody knows where he is.
Management had to hire a private detective to track the guy down, and they finally found him up in the mountains in Colorado, doing whatever. They convinced him to come back, but I wouldn't want to be managements negotiator in that meeting.
How to write unmaintanable code (Score:5, Funny)
Apply equal parts of Perl [perl.org] and Guinness [guinness.com]
Growth (Score:5, Interesting)
A much better approach to job security is to adapt to the needs inside the company and make sure your skills are needed. This will also lead to more opportunities for pay increases and general healthiness of your psyche.
In the end, what makes you interesting as a developer should be your ability for problem solving and not your ability to obfuscate your work, unless, of course, your intention is not to work
Jeez, just run an obfuscator (Score:5, Informative)
Re:Jeez, just run an obfuscator (Score:5, Funny)
Also, see this link with essays. (Score:4, Informative)
When I was a plumber.... (Score:5, Insightful)
On the code side, things I wrote 10 years ago I look at and think who the F*** wrote this, but back to my plumbing, that was the first lesson I was "Taught" NEVER EVER Say something like who the hell did this this way and why, more often than not after being in the business IT WAS YOU !, sure enough about 6 major jobs I went on to think to MYSELF , who did this holy shit is this complex, well after a day on the job I realized it was ME!!!
Never say "Who the Hell wrote this" out loud...a sure way to hang yourself when you practice this method of job security.
Re:When I was a plumber.... (Score:2)
"Well, that'd be the highly respected developer sitting opposite you who's got 5 years' experience with this code, whereas you have about 5 weeks. Next question?"
Wow (Score:5, Funny)
Bastard.
Not So (Score:5, Insightful)
I have had way too many times in my contract work that I was assigned to upgrade unmaintainable code.
In fact, I earned a reputation as a saving grace and the original coder was never called back and he earned a black eye as a poor coder.
Now who do you think stayed on the job longer?
Re:Not So (Score:4, Funny)
I'm with you.... (Score:3, Informative)
Another benefit of coding to for a bus is that after a couple of successes, the people you work for
guilty as charged (Score:3, Insightful)
Re:guilty as charged (Score:3, Insightful)
I just can not stop using i as an index. My programing teacher learned FORTRAN first and when the taught me Pascal he used i in for loops so I do this day.
If 'i' is obfuscation of 'index' then 'for' is obfuscation of 'for_as_long_as_expression_between_semicolons_is_t rue'.
Re:guilty as charged (Score:3, Insightful)
So it's standard enough, I think.
TheDailyWTF.com (Score:5, Informative)
This is ancient... (Score:5, Informative)
Practical tips for same purpose, but C instead (Score:2)
Using bad code to maintain your employment. (Score:5, Insightful)
Re:And Microsoft rule (Score:3, Insightful)
I am amazed that so many people don't realize that this was a joke. It's a joke people. Are all of these people replying seriously 16? I have to suspect so, because this was immediately iden
More than just a joke... it's a teaching tool (Score:4, Insightful)
And as for the maintainer interpretting it, you're absolutely right that most people just throw up their hands. It's hard to interpret someone else's code for anything past the trivial. Doable, but hard enough that rewriting it often is a good way. Heh, besides which, it's amazing how many times I've thrown up my hands, rewritten the code, and by the experience found that I understood the original code.
Anybody is Replaceable (Score:2, Insightful)
... *even those who spend all their time reading slashdot*
Also, streamline your code to IKEA format (Score:2)
My favourites:
"Always look for the most obscure way to do common tasks."
"People who come after you have no business modifying your code without thoroughly understanding every line of it."
"Wherever the rules of the language permit, give classes, constructors, methods, member variables, parameters and local variables the same names."
"Never perform code coverage or path coverage testing. Automated testing is for
Had to stop (Score:3, Funny)
Instructions! (Score:4, Funny)
I 'm in this situation (Score:5, Interesting)
- This app was originally written in PHP/FI 2.0 in 1997. There were also some C cgi apps and a few Perl scripts.
- Due to performance problems the entire dynamic site was changed to a statically rendered site, so after changes were made to a page that page was rendered as an HTML file.
- In 2000 it was updated to PHP 4 and the app had a core feature bolted on, essentially confusing the difference between a city and a county. This resulted in a worst DB design I've ever seen. I'm talking about splitting up core pieces of data that need to be together, using ambiguous field names (rid means different things in different tables. Some tables relate to each other on field names that seemingly have nothing in common. Some field names have typos, etc).
- The code was written first by a team of six programmers, then by a smaller team of three other programmers and finally by some weird guy who I was supposed to work with when I got hired, but a few days before I started he decided he didn't like computers anymore and he went into the grow-op business instead. My boss claims that maintaining the horrible code base made him go crazy and I'm inclined to believe that.
- Two records in the same table of the database may look the same in all ways, but they are actually entirely different things. The only way the app knows which one to use where is because that data's unique id is hard-coded into the app.
- I am rewriting our site search engine from scratch because touching the old one is dangerous. Altering small harmless-looking bits of code can actually break unrelated pages, but that breakage isn't noticed until that other page is re-rendered into a new HTML page, so I was finding out about problems weeks after I caused them. Arrrg!
- I have been unable to get the app working on any server I have setup. If the live server goes down we're toast because there is no dev box. The app relies on a horrific web of interconnected scripts, cron jobs, strange directories, and it even uses an older version of itself to perform some mysterious actions. I've got an image of the server's hard drive I can use to recover it from.
I have finally convinced my boss that this thing needs to be rewritten *now*. It's a house of cards with our business resting on top.
Old old old (Score:5, Informative)
Roedy Green's fine How To Write Unmaintainable Code has been widely cited all over the web since its original publication in 1997. Surely at least a mention of the author and date of the article could have made the front page, so that those of us who've already seen it multiple times could know to skip it?
Unmaintainable employee (Score:5, Insightful)
If the code is unmaintainable, the end product is probably bad. If the end product is bad, you're not protecting your job but making a case for your worthlessness. Even if the end product is good, most companies would favor a fresh, new person who can differentiate themselves from you by writing a more friendly, maintainable version of the same. When I have come in (back in my indie days) to update or maintain a system that is unmaintainable, I have always made a good case for a more ambitious bid (and more money) to recreate the system from scratch (or recreate as much of it as is necessary) in a more standard, maintainable format.
Besides, as all you open source geeks know, this is (job) security by obscurity, and while it may cause a major inconvienence for your employer, it's not going to force them to keep someone they want to can. IT kids are in for a rude awakening (or have already gotten one) if they think we're still in the era where you're irreplacable, where some other code monkey couldn't come in and do the same or better of a job of what you're doing for less money in a heartbeat.
Here's a hint, find a place that you actually ENJOY working for, that treats their employees well and isn't looking to pull the plug on them at the most convienent time.. And then give them the best work you can offer. Be willing to take the lumps as a line employee for a while and actually earn a career in that company.
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.
Bad, BAD Advice! (Score:5, Insightful)
First rule of business: Don't be irreplaceable. If you can't be replaced, you can't be promoted!
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?
Chester Abramowitz COBOL Savant (Score:3, Funny)
It kept him employed.
Java obfustication tip ... Passive/Agressivness (Score:3, Interesting)
Perhaps you should create an interface (make it an inner interface to a public static inner class, yes its possible).
Make sure you use a common naming convention so you can look up the class using Reflection.
Then once you get your class, make sure you use another factory to get the class you feel comfortable to finally do something.
Finally, put your "do_something" code in the constructor of the class.
When your code base becomes 1,000,000 lines of this, you'll achieve the final Zen obfustication moment, when a new director of engineering asks you to document this and you can say, with a straight face, and in total honesty, "Its too complex to document"
It seems like a joke... (Score:4, Interesting)
For five years I worked for a boss who was in the habit of taking jobs that nobody else wanted. The good thing was that he would get paid a lot. The bad thing was that I had to dabble in unmaintainable code. At one time I even had to make changes in a program for which no source code existed anymore. That was not the worst job, though. The worst was a change I had to make to a program that had the simple task of printing a list of articles in stock, with their locations. It printed the articles in two columns: the left column contained articles of types 1 and 2, and the right column contained articles of types 3 to 9. I had to change the program so that it would print three columns: left column the same, but the right column split into types 3 and 4, and 5 to 9. Does not sound too difficult, right? I mean, even without looking at the code, purely knowing the function of this program makes you think "that should been done in no more than 2 hours."
It took me two weeks. The program was peppered with functions that were copies of other functions with a very small change. The original programmer used ridiculous methods to fill print lines. The general way of printing a line is collecting information through a central function, and when that function has all the information it needs, print the line. In this case at dozens of points in the program the programmer tried to predict whether or not he would have enough information to print a line, and then do it. If I would have a design document, I would have rewritten the program from scratch, but of course no such document existed.
Every little change I made to the program had unforeseen effects. When I started, I had (of course) made a test-print, which I could use to compare outputs. I made a small change, and suddenly the list contained less articles than the original list. Another small change, and suddenly the list contained more articles than the original list. I tried to assess what reasoning the program would use to include or exclude articles, but there was no way to determine that from the code.
After two weeks of work the program printed three nice columns, with all the original articles there, and a few, very few, that were not on the original list. I could not understand why these extra articles were there, but if they should not be there, I thought it would be best if I would just implement a condition to exclude them, if I would know what that condition should be. So I called the company who used the programs and asked them about these extra articles. Their answer was, "My God, we have been missing those for YEARS. Now we'll finally be able to find them again."
Insecure Programmers (Score:5, Insightful)
I've found Perl just perfect for that task! (Score:3, Insightful)
I've leared that the hard way, by starting my Perl education maintaining the code written by someone else. I've fought back by writing the number of apps in Perl, as well. Poor suckers kept calling me at my new job, long after I quit.
Re:April Fool's Right???? (Score:4, Funny)
Re:April Fool's Right???? (Score:3, Interesting)
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
Biased, much? (Score:4, Insightful)
Who said he or she was an American? I've seen plenty of posts on Slasdhot writen in English from people who were not American. Biased, much?
Re:Biased, much? (Score:4, Funny)
Re:Biased, much? (Score:2)
(FTA: "This essay is a joke! I apologise if anyone took this literally. Canadians think it gauche to label jokes with a
(RBTL:
Its Funny. Laugh. And a jab at the IT industry. (Score:3, Insightful)
Did you miss the "Humor" tag?
Did you even read the article or are you responding to the blurb on the front page?
Its a jab at the IT industry (and an old one at that - been around for quite some time - this is the second time this thing has appeared on Slashdot that I can remember); think of it as an article on Worst Practices. No one is supposed to be doing these things; they are illustrations of things that *still* happen that
Hard Drive Size... (Score:2, Insightful)
that there are people that think that way in the programming industry.
Not to start flaming, but I've always maintained that the expansive
hard drive sizes over the years certainly hasn't aided in the idea of
creating (and maintaining) tight, clean code. Yes, the topic has been
beat around a lot; however, it's perfectly valid. I certainly I have
spoken to more than a few long-time programmers that - though not
outright - have indicated that the l
Re:Hard Drive Size... (Score:3, Insightful)
hard drive sizes over the years certainly hasn't aided in the idea of
creating (and maintaining) tight, clean code.
Just to play devil's advocate for a moment, small hard drives and less powerful systems didn't exactly encourage readable code either. Unrolled loops, cycle saving "tricks", and millions of premature optimizations were a large part of the earlier days of computing.
Java is actually quite interesting because it's one of the first
Uhm... Quark.. (Score:2)
Re:If I were the manager... (Score:2, Insightful)
Re:If I were the manager... (Score:2)
Re:If I were the manager... (Score:2)
If I were the manager...I would fire *you* (Score:2)
How about reading the FA before you sound off:
Re:Off to a bad start (Score:2)
All this (and more!) where you'd expect to find it [wikipedia.org].
Re:just right here (Score:2)
this code has no comments. It was hard to write, it must be hard to understand
followed by ten thousands lines of a single, not indented main, full of goto's and undecryptable variable names.
thanks god I never had to put my hands on it.
What's the problem? Just use f2c which will turn it within seconds into ten thousands of lines of C code, full of goto's and undecryptable variable names...
Re:Dupe (Score:5, Funny)
Yeah... still a dupe.
1997 ... dupe from 1999 (Score:5, Funny)
Another good one (Re: *yawn*) (Score:5, Interesting)
Thankfully, the OP provides a link to the original author, Roedy Green.
Here's another good article he wrote in the same vein called How to Code like a Newbie [mindprod.com].
I was in stitches the first time I read it several years ago.
Re:Until you get promoted ... (Score:5, Interesting)
... for enforcing the Corporate Coding Standards.
In a rational world, Corporate Coding Standards, enforced by code reviews, would have something to do with maintanability. In some organizations, they are ... probably those that live or die by the quality & maintainability of their code.
But quite the opposite was true in the large insurance company (nearly 1000 programmers alone) where I held my last salaried programming gig. Their Coding Standards were all about Not Rocking The Boat. They included several elements of "How To Write Unmaintainable Code" as Enforcable Standards. Remember when "Structured Programming" was a new idea? I got me bottom kicked for arguing that coding units should not end with a wholly unnecessary "Go To End" ... because the STANDARD was that ALL modules exits were via "Go To End".
Fortunately, their coding quality algorithm had to do with number of lines of code changed ... again, nothing to do with actual quality. Deleting redundant code merely enabled me and the software to work faster & better, which did not count as quality. When I learned to comment out redundant line, so they counted as "lines changed", my coding quality scores vastly improved!
Perhaps the insurance industry is so darn profitable that optimizing its software is not nearly as important as maintaining internal discipline. The ideal employee was the scion of two current employees who had met in the cafeteria, and was engaged to another employee who they'd met the same way (I Kid You Not!) If these programming methods imposed excessive costs, they just upped their premiums.
It was a soul-destroying experience.
Re:Until you get promoted ... (Score:3, Insightful)
Sounds like a way to learn a bad habit on top of a bad habit:
100 LOC
*/
= 2 LOC changed
= 100 LOC changed
Re: What does it matter? (Score:5, Interesting)
One section of the code consisted of a number of modules that were basic copies of each other with small local customisations. Think hundreds or thousands of lines in common. No, I didn't write them, but I had to maintain them. So I took these, pulled out some code into common libraries, and wrote a code generator to produce much of the rest from input files. I was also careful to work on non-coding tasks for the remainder of that week; essential stuff but the sort that had been put off for a while. My net code contribution that week: Negative several hundred lines of code. The code also became infinitely more maintainable, and I fixed countless copy/paste bugs in the process.
No doubt someone fudged my negative figure upwards when it went back up through the management chain to avoid rocking the boat, no doubt to a nice small number of positive line chances to ensure I looked bad. But, if only to myself, I had proved my point.
Re:The Daily WTF (Score:3, Informative)