## Nobody Hates Software More Than Software Developers

### July 21, 2009

A few months ago we bought a new digital camera, all the better to take pictures of our new spawned process. My wife, who was in charge of this purchase, dutifully unboxed the camera, installed the batteries, and began testing it out for the first time. Like so many electronic gadgets, it came bundled with a CD of software. So she innocently ejected the DVD tray, and dropped the CD in.

I happened to notice out of the corner of my eye that this was happening. At which point, I – now, try to imagine this in exaggerated slow motion, for full effect – screamed "noooooooooooo", and frantically launched myself across the room in a desperate attempt to keep that CD from launching and installing its payload of software. It worked, but I nearly took out a cat in the process.

There's nothing wrong with the software that comes bundled with a digital camera. Or is there?

1. It's probably unnecessary. Any modern operating system (and even Windows XP!) can see and automatically download pictures from a new digital camera. No extra software needed. But in a questionable attempt to add "value" and distinguish themselves from their many digital camera competitors, some executive at the camera company came up with a harebrained scheme to include software with a bunch of wacky, unique features that nobody else has.

2. Hardware companies don't generally do software well. Digital camera companies excel at building digital camera hardware. Software, if it exists at all, is an afterthought, a side effect, a checkbox on some marketing weasel's clipboard.

3. Software of unknown provenance is likely written by bad programmers. All other things being equal, the odds that new, random bit of software you're about to install will be pleasant, useful, and stress free are ... uh, low.

One of the (many) unfortunate side effects of choosing a career in software development is that, over time, you learn to hate software. I mean really hate it. With a passion. Take the angriest user you've ever met, multiply that by a thousand, and you still haven't come close to how we programmers feel about software. Nobody hates software more than software developers. Even now, writing about the stuff is making me physically angry.

Isn't that an odd attitude coming from people whose job it is to write software? How can we hate what we get paid to create every day?

David Parnas explained in an interview:

Q: What is the most often-overlooked risk in software engineering?

A: Incompetent programmers. There are estimates that the number of programmers needed in the U.S. exceeds 200,000. This is entirely misleading. It is not a quantity problem; we have a quality problem. One bad programmer can easily create two new jobs a year. Hiring more bad programmers will just increase our perceived need for them. If we had more good programmers, and could easily identify them, we would need fewer, not more.

How do I know, incontrovertibly, beyond the shadow of a doubt, that the world is full of incompetent programmers? Because I'm one of them!

We work at the sausage factory, so we know how this stuff is made. And it is not pretty. Most software is created by bad programmers like us (or worse!), which means that by definition, most software sucks. Let's refer to Scott Berkun's Why Software Sucks to nail down the definition:

When people say "this sucks" they mean one or more of the following:
• This doesn't do what I need
• I can't figure out how to do what I need
• This is unnecessarily frustrating and complex
• This breaks all the time
• It's so ugly I want to vomit just so I have something prettier to look at
• It doesn't map to my understanding of the universe

How many of those do you think would be true of the software on that CD bundled with the digital camera? I'm guessing all of them. That's why the best choice of software is often no software – and barring that, as little software as you can possibly get away with, and even then, only from the most reputable and reliable sources.

I don't look forward to installing new software. On the contrary, I dread it.

Let me share a recurring nightmare I have with you. In this dream, I'm sitting down in front of a computer which boots up, running an operating system I've written. I then launch a web browser I've created from scratch, all by myself, and navigate to a website I've constructed. I click on the first link and the whole thing bluescreens. And the bluescreen itself bluescreens and begins to fold in on itself, collapsing into a massive explosion that destroys an entire city block.

That's the good version of the dream. In the other one, there's just … screaming. And darkness.

In short, I hate software – most of all and especially my own – because I know how hard it is to get it right. It may sound strange, but it's a natural and healthy attitude for a software developer. It's a bond, a rite of passage that you'll find all competent programmers share.

In fact, I think you can tell a competent software developer from an incompetent one with a single interview question:

What's the worst code you've seen recently?

If their answer isn't immediately and without any hesitation these two words:

My own.

Then you should end the interview immediately. Sorry, pal. You don't hate software enough yet. Maybe in a few more years, if you keep at it.

Posted by Jeff Atwood

I get grumpy with my wife too - normally when she stacks the dishwasher wrong.

Andrew on July 23, 2009 1:23 PM

Let r be the rate at which your coding ability is improving. Given the nature of the game... the higher the r, the better the programmer.

The amount of time that must elapse before you start hating your old code is proportional to 1/r = C

The fraction of code you yourself have written that you now hate at time t is then:
F(t) = C/t

note lim t->\infty F(t) = 0.
ergo in the limit, all competent programmers (r > 0) hate all their own code.

Ben on July 23, 2009 1:38 PM

I totally agree with you, but the last point.
I have seen code, even Roedy Green (http://mindprod.com/jgloss/unmain.html) can learn some lessons from it.

I'm a Sun Certified Java Programmer and I stick very much to coding conventions and co, so my (Java) code is not that bad...

But sometimes my design structure is very bad, or my logic, etc.
There's much you can do wrong when you are developing software and coding is just a small part of it.
Additional, most developers doesn't read API contracts/javadoc, so they assume that the API will always do the same on every computer, leading to many failures. This is especially true for a software which is developed in no time, just to have something to put on a CD for your camera/printer/scanner/whatever.
A software developer knows, that every additional piece of software means an additional risk. And the risk for software build by a hardware-company is especially high.

Nonetheless, nice entry!

Nyarlathotep on July 23, 2009 1:46 PM

@Steve

I have to agree with you. I agree with Jeff that we should try to 'suck less each year' and I think that is a good attitude. I work at a small consulting company and we are handed wtf code to fix all the time. I am continually amazed at the crap we get.

Do I suck a lot? Yes. But really, I see stuff I could never write all the time, and I've been programming for 13 months ...

anonymous on July 24, 2009 2:36 AM

That's true, as Joel said "close to metal" software is a very different world than "close to user" software, and requires different skills and mindset.
An hardware pusher should focus on doing good hardware and good "close to metal" software, possibly spending programmer's resources and talent to build an easy to interface driver model rather than thousands of shitty drivers for (each model variant * each operating system revision)!
"Close to user" software should be let to software developers.

As for "any developer thinks the worst code is the one written by himself", it is true too, because one understands better his own code, and errors and limitations are consequently more obvious to spot out.
And for the principle that a good programmer is always an unsatisfied programmer, that means that the bad part of the code tends to irritate the good developer more than the good part satisfies him... IMHO

That Man on July 24, 2009 4:06 AM

I've seen things you people wouldn't believe.
And all those... lines will be lost...

And still my own code is even worse...

Bruce on July 24, 2009 4:12 AM

When you're a programmer, tiny details can be a 1000 times more annoying for us than the normal users...
"Why the hell didn't he make the form contents resize along with the form?"
"Wtf... Didn't he test this himself? How can you not run into this issue while testing..?"
...And these unnecessary software cd's... Don't get me started on those...
...And applications that silently add another program without notice ("Bonjour" is my enemy #1 with that)
..And applications that will not finish the installation without installing Crapdobe reader... (No! I don't need it! Don't want it! *adds developer company to ever growing blacklist*)
And when these applications actually make it to the market, with success: my conclusion is, they have a very powerful marketing department, nice PowerPoint presentations, dinners with the correct people, a lot of "supervisors" and "advisors", some nice (and useless diagrams) and absolutely no investment in development...

NNM on July 24, 2009 4:45 AM

Anonymous on July 24, 2009 5:52 AM

"What's the worst code you've seen recently?
"My own"

What if one's code inspires such levels of revulsion that one doesn't consider it code at all, but the $#!+ that some baboon [named similarly to me] puked into my desktop? Wes on July 24, 2009 6:41 AM Hi Mark, OS's are software and all software sucks to a degree. Even the software inside of our heads. I'm not purporting Mac's OS over Windows or any other OS, it's just that the current largest 'tower of babble' is Windows. By the way; I program in vb, c# with vs2008. Why? Because clients pay more money to Windows programmers than Mac programmers. What I was really about was how this whole sordid affair of evolution occurred; since I am older than dirt and have been at this for some 30 years. Mac on July 24, 2009 6:48 AM @Tarkin: "Demand function. Eschew aesthetics." I used to think like that. But now? I want to live in a pleasant universe, not just a working one. Demand function. Demand aesthetics. Form follows function. But formless function fails in the primary function of uplifting humanity. Things like rounded corners that please the eye can indeed improve the efficiency and happiness (which is a form of compensation, so again, efficiency) of the people working with them. Design is communication. Good design is good communication. Purely functional (non-)design can only be good communication by accident. It's like the difference between trying to learn by reading a technical manual full of tables and figures and jargon, and a longer textbook filled with examples and demonstrations and introducing concepts progressively. As an aside, typically the "classic mode" interface of applications is a bit of an afterthought. I think in many cases it uses more CPU than the themed versions, going down non-optimized codepaths (and eschewing bitmaps for CPU-rendered patterns). I demand function, and one of the functions I demand is reasonable aesthetics. Ens on July 24, 2009 6:48 AM It looked very interesting the subject about incompetent programmers and the relation to job offers. Working for a recognized consulting firm, I was wondering why project was so bad in all levels, in this particular case I'll focus only in the programming factor. Various dozens of people coding in Java most of the code using the copy-paste software pattern and this just one of many "codinghorror"s I am able to mention. But what's behind this? This is a real source of jobs, this practice (in my opinion, a bad practice) is generating jobs and with these though times, I wonder if its advisable to rise the hand and try to modify this modus operandi... A. Patino on July 24, 2009 8:19 AM I object to the term "marketing weasel" as it is defamatory of the entire gamut of weasel species. Kris Cook on July 24, 2009 8:24 AM Yeah, I don't know Jeffe, I think developers don't like other developers stuff because we know what goes into making it. If we didn't then a lot of the idiosyncrasies would go unnoticed. Also, I can’t imagine any company hiring me if I told them my code was the worst I’d seen. If I heard an applicant say that I’d think they didn’t get out much… Hang on…that’s it isn’t it? You’ve reached that first stage of fatherhood where you get disconnected from reality by the staggering pile of diapers that no genie can mask. Congrats on the new kid. I hope they are as warped as you.  Robert on July 24, 2009 8:52 AM Gee, I guess I'll go whip myself and put ground up glass in my food. Self deprecations is sooo passe. I like some of my code, very much. Steve on July 24, 2009 11:00 AM *Indeed.* My software sucks, but I try every day to improve it. Some days I'm more successful than others. Sidebar: I watched the Google Wave demo the other day and was floored (impressed) by it. But at the same time I mentally noted many ways it sucks and how that would drive design decisions by people that integrate/extend it, thus promulgating the "suckiness." While my application suckiness is bad, platform suckiness is the gift that keeps on giving. CircuitPeople on July 24, 2009 11:46 AM Yeah, i love my our own code!! It's so freakin' good and when I watch my code again I'm amazed how good it is.. narcissus on July 24, 2009 12:11 PM Sorry, but "my own"? Not when the codebase I work on has gems like public static final char COMMA=','; and, another favorite , String text = .... (long block). if (text.find( "http://www... long url here , along with long parameter string) ==-1 and some condition) { } else if (text.find ( the same url) and (some other condition)... { } else if (...repeat ad nauseum).. Yes, we may all be working in sausage factories, but there's still some escapees from Upton Sinclair's Jungle out there. The only reply to "you should hate your own code more than anybody's" my only reply should be "you don't know suck like I know suck". Steve on July 24, 2009 1:53 PM I thought the same, especially after my experience with mobile phone software. Unfortunately, for mobile phones you are frequently stuck with whatever the maker of the brand has given you, if you want to sync or backup your contacts or calendar. However, for digital cameras especially, I beg to differ. If you are using a Canon DSLR (as opposed to point-and-shoot) camera and photography is either a hobby or profession for you (which means you probably shoot RAW instead of JPEG) the software they include with camera is quite good and the alternatives are not free. Emils on July 25, 2009 5:17 AM I thought the same, especially after my experience with mobile phone software. Unfortunately, for mobile phones you are frequently stuck with whatever the maker of the brand has given you, if you want to sync or backup your contacts or calendar. However, for digital cameras especially, I beg to differ. If you are using a Canon DSLR (as opposed to point-and-shoot) camera and photography is either a hobby or profession for you (which means you probably shoot RAW instead of JPEG) the software they include with camera is quite good and the alternatives are not free. Emils on July 25, 2009 5:18 AM Same thing happens with MP3 Players, except for the simplest (read cheapest) ones. Gotta love spending$200-$300 for a piece of hardware and getting it home only to find out it uses some propriety BS protocol to do the exact same thing any modern operating system can do, the simplest way possible with drag and drop. Of course, Proprietary = Install crapware that auto runs on startup and hides itself in the background supposedly to make the program 'start up faster' but really does nothing useful except pop up advertisements for accessories every now and then. Disable auto running via msconfig and that works until you launch the app again then it resets itself to auto run. From a non-programmers prospective, unless I'm using a program EVERY TIME I turn on my computer, I don't need it to auto run, thank you very much. When are software developers/greedy corporations going to realize that it's my computer and I have the final say on what runs on startup and eats resources, not you. Big Dan on July 25, 2009 6:01 AM Yes You are very true. But we do have big issues in hand SCHEDULE Ramesh on July 25, 2009 7:18 AM Jeff - On the other hand, I recently retired some software which had been running for more than ten years. (The system which provided the input was shut down, so no need for my stuff to continue). It never crashed. I used it every day and never saw it crash. People around me used it and never reported a crash. Friends in a few places around the world used it, but no crash reports. Oddly enough, the only rule or law or method or paradigm I followed was "it shall not crash." -Lepto Lepto Spirosis on July 25, 2009 7:42 AM Nonsense. Good programmers should love their recent code. Otherwise how can they even write it ? They might hate their old code. Bad programmers hate all code. Recent and old. hari on July 25, 2009 7:54 AM hi i agree with everything youve written. but this argument is very true of most professions. take a plumber. and read the para phrased in with plumbers instead of programmers "Incompetent plumbers. There are estimates that the number of plumbers needed in the U.S. exceeds 200,000. This is entirely misleading. It is not a quantity problem; we have a quality problem. One bad plumber can easily create two new jobs a year. Hiring more bad plumbers will just increase our perceived need for them. If we had more good plumbers, and could easily identify them, we would need fewer, not more. " Thank you for your time krishna on July 25, 2009 10:18 AM I've thought about this for a while, and I don't think you're drawing a fair conclusion. Sure software developers hate hardware-bundled software, but so do most power users who don't know anything about code. It's not software we hate, it's intrusive, needless software, which is what software bundled with hardware almost always is. It wants to run on startup, stay in the system tray, and pop up notifications all the time. If you don't know anything about computers, you may need this much intrusion to use your digital camera (you may not know that you CAN still transfer pictures if the tray icon disappears). If, however, you're comfortable with your computer, you don't need it, and having it just gets in the way. That kind of software I certainly hate, but I install new programs so often I can't even keep track of what's on my computer most of the time. Fortunately, open source software is rarely as intrusive. Linux software even less so. (On that note, I've noticed that Linux software is much more intrusive of the file system and Windows software much more intrusive of the UI. With Windows, you can generally keep programs wherever you want and have each program entirely independent from the rest of the system... but you get junk on startup and junk in the system tray and junk everywhere else. With Linux, you just have to accept that installing a program is going to put files in 800 different places, none of which you'll ever be able to find on your own.) I think I have at least a dozen text editors and CD burning programs installed. Clearly, this means I haven't found one that really works for me yet, but it also means I have no problem with installing more of them. However, there's no way I'd install a CD burning program that ran continuously and provided a drop-box on the system tray I could use. I don't burn CDs every day, so I don't want crap on the computer every day. The problem with hardware-bundled software is that that crap is usually unavoidable. The software may even change file associations and such. Who wants to deal with resetting all of your file associations manually because some idiotic program wanted to be associated with all image files (and why do systems allow programs to decide this stuff anyway??). Developers and power users tend to prefer a clean UI. I happily have no icons at all on my desktop or my quick launch panel. If I want to run a program, I Alt+F2 and type the name of the program. This is fine for someone who is used to keeping track of different programs and keyboard shortcuts. Average users don't do that though. Hardware-bundled software is designed for average (or totally clueless) users. It has nothing to do with hating software. It has to do with wanting software that matches your skill level. Daniel Straight on July 25, 2009 10:41 AM I'm going to have to agree with some of the others who posted before me; the answer to that interview question definitely doesn't have to be "My own." Sure, my code is never where I wanted it to be originally. Sure, I read code from other programmers and think; "Why didn't I think of that?". But I also see a whole hell of a lot of code that makes my head hurt; from problems with simple logic to formatting that would make Darth Vader cry. So maybe the question should be, "How do you feel about your own code?". If they don't answer with something along the lines of "I'm never satisfied" then you might want to rethink hiring that person. Kyle on July 25, 2009 11:48 AM I frequently go completely bonkers over little things in software products that my friends shrug off as minor things they don't worry about. Daniel Huckstep on July 25, 2009 12:05 PM @Dave on July 26, 2009 4:58 AM What version of Zoom browser are you using? My 4 year old version stores photos as JPegs in folders based on the date they were taken. I was going to mention it as an example of good bundled software (much better than the default XP handling), but others beat me to it. Gerry on July 26, 2009 3:41 AM I love my code. I nurture it and care for it the way a mother does the same for an ugly child ;) Ashley Davis on July 26, 2009 4:28 AM Atwood is a fucking idiot. Some of us do PROGRAM good code that is well commented, modular and future friendly. Just because we aren't self hating or self deprecating doesn't mean you should to advise to lock US out of jobs. Your giving more to the pseudoscience of hiring instead of lending credence to experience, projects and character. Thanks a lot jackass. Coder on July 26, 2009 5:12 AM >I really like Canon's ZoomBrowser software. Funny, I was just going to bring up ZoomBrowser as an example of software where the developers should be killed and then eaten to prevent them from passing on the genes. Where shall I start... perhaps the fact that there are these things called directories (or perhaps folders) that most of the world knows about but they don't, choosing to store everything in this ingenious homebrew self-corrupting database that, like email DBX files, can lose all your photos at once with no chance of recovery. Or the fact that they know that locking is a good thing but haven't heard that Windows provides functions for doing this, instead choosing to write a magic ID value into the start of the homebrew database (without an synchronisation controls), which remains in place after ZoomBrowser crashes (which it does quite a bit) so that any later attempt to access it fails because it's still "locked". Like Lotus Notes for UI design, ZoomBrowser could be used to teach a course in how not to do data management... Dave on July 26, 2009 5:55 AM >I really like Canon's ZoomBrowser software. Funny, I was just going to bring up ZoomBrowser as an example of software where the developers should be killed and then eaten to prevent them from passing on the genes. Where shall I start... perhaps the fact that there are these things called directories (or perhaps folders) that most of the world knows about but they don't, choosing to store everything in this ingenious homebrew self-corrupting database that, like email DBX files, can lose all your photos at once with no chance of recovery. Or the fact that they know that locking is a good thing but haven't heard that Windows provides functions for doing this, instead choosing to write a magic ID value into the start of the homebrew database (without an synchronisation controls), which remains in place after ZoomBrowser crashes (which it does quite a bit) so that any later attempt to access it fails because it's still "locked". Like Lotus Notes for UI design, ZoomBrowser could be used to teach a course in how not to do data management... >Picasa Oh, you mean the one that segfaults if it's not run as Administrator, and where the developers' response to repeated user complaints is "well it's your fault for not running everything as Administrator"? (People sure seem to pick strange examples of "good" software). Dave on July 26, 2009 5:58 AM Jeff, please understand that the CD that comes with a camera is meant to help the layman manage his photos.Your post begins with something and concludes on something else? Whats wrong with you? Not enough inspiration for your blog I guess.Well stop wasting peoples time,and trying to make your post seem relavant,you suck! Luligan on July 26, 2009 6:00 AM >The software coming with my mobile phone is of same category: I install >it (bloated, several MB too) and on first run, it download several other >MB of update! Installing a bloody media player (as if I needed another >one...), and lot of unnecessary similar stuff. I installed to easily >manage the address book (no direct way for this) to avoid the phone >keyboard but it is so crippled and lacking of features (perhaps half the >possibilities you have on the phone itself) I renounced to use it. Not sure if you're a Sony/Ericsson user but that sounds a lot like their software... MyPhoneExplorer, which does pretty much everything S-E's CD-full of bloatware does in a single executable of a few MB. Even S-E's own tech support recommend this over the bloatware that comes with the phone. S-E should have the author on retainer for the service he provides to their customers. Dave on July 26, 2009 6:08 AM >Early in my career, when I was writing Z80 Assembly code, I came >across some code where the "developer" set the stack pointer to a >location in memory and proceeded to PUSH onto that stack as a mechanism >for moving data around. That was a standard technique, since it's the fastest way to do things like clearing a block of memory on the Z80. I guess you didn't write much code where speed was an issue... Dave on July 26, 2009 6:12 AM “Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.” Yoda on July 26, 2009 8:50 AM Steve Syfuhs on July 22, 2009 7:53 AM said: "I agree. I am a terrible programmer. In a lot of cases it's more important to get the code out there, than to make sure it's written properly. I suppose the only real question that's bothering me is: What seperates us, the bad programmers, from the good programmers? Who *ARE* the good programmers?" The good programmers, bud, are the ones who if they were boarding an aircraft and knew their own work was controlling/performing critial functions during the flight they would *STILL* get on board the flight. This is how you should view every paid, commercial job you get. Not always possible, I know, especially if you are rescuing a project with a shitty codebase, but if you're starting with a clean slate then no excuse for not turning in a perfectly reasoned bit of software engineering from first principles. And always FULLY understand what it is you are trying to achive from day one and do not loose sight of it. Once done and it fits the spec, stop and hand it in. Window dressing crap code isn't programming: its masturbation. GregF on July 26, 2009 12:58 PM Nah, we don't hate software. We just don't want to install uninspected half-baked junk and as you so rightly mentionned it, a lot of the software that comes with cameras and printers is plain rubbish, so we don't bother with it anymore. As far as my own code is concerned, well, yes, it could be improved, a lot, and sometimes it feels really ugly and clumsy and I am sure that someone else would just wipe that convoluted mess and punch out a few magic lines that would do the work just right. But then I remember the problem I am trying to solve (file preparation for translation) and I realize that the alternative involves writting regex blindfolded while trying to navigate UIs so atrocious that they should have been condemned in the Nuremberg trials, and paying a king's ransom for the privilege, and even that is better than endless hours of manual highlighting. I might be exagerating a bit but the point is that I love software when it helps me with a real problem, and a lot of them do. Sylver on July 26, 2009 1:24 PM >What version of Zoom browser are you using? My 4 year old version >stores photos as JPegs in folders based on the date they were taken. I don't use it, my dad does, my exposure to it has been trying to recover data for him that it's lost, and trying to figure out what it's doing to be so broken. Knowing him it's quite possible that he's using a version carved in stone by monks in the early middle ages, but I can't check until he next needs me to fix something. (My exposure to Picasa's bugs was during an attempt to wean him off ZoomBrowser. He finally switched to whatever Microsoft's image-management program was, just before they discontinued it). Dave on July 27, 2009 2:22 AM The actual contents of this article sounds to me like: "Hardware developpers: don't make sofwate! Let the job be done by M$!"

JL on July 27, 2009 6:20 AM

Nobody who pays the paycheck really cares how good your code is. Just get the software working when they want it and doing what they want. Even other programmers I work with don't care how clean it is as long as they look good to the users.

Been doing this for 25 years. It doesn't change.

I don't hate my code. I do however write better code when I can "write" the code before writing the code. However the best written code is code that helps the business reduce cost of an activity or find opportunities faster.

AC on July 27, 2009 7:24 AM

There are just too many products these days that come with this sort of crapware.

It took me 1 hour just to uninstall all sorts of crapware that came installed on my laptop. (Vista Operating System topping the list with degree of annoyance as a criteria)

Akshar on July 27, 2009 7:27 AM

I don't think I hate software. Software is what pay my bills.

But for sure, for the reasons you've exposed, I don't trust software. Software scares me.

That is the feeling that make me think a lot before to install any software anywhere.

Rafael Romão on July 27, 2009 8:08 AM

>"Hardware developpers: don't make sofwate!"

I think there's something in that for all of us.

Dave on July 27, 2009 8:15 AM

You're full of crap as usual Jeff. You're last article was all about doing away with any kind of rigorous treatment of the software development cycle (not for the first time) and now in this blog you admit how bad a programmer you are!

Clearly you're in the wrong job. But hey, I don't mind goons like you turning out $hit. It pays for MY mortgage when I fix crap - and I have made a career of doing just that. Jackie on July 27, 2009 8:39 AM Wow...what an article. It's one of the most self-deprecating pieces I've read in a while. As a Software Developer, I don't hate my job nor do I hate programming or the code that I write. I believe I write very good code that rarely "breaks." I completely disagree with your assessment of software perspectives. I embrace the code I write by equating it to endowing the computer with an "intelligence" of sorts by providing instructions off of which the computer operates. I happen to think that this phenomenon is not something to hate but rather, something developers should embrace! Brice Richard on July 27, 2009 9:53 AM although I liked your article, what I found most interesting is how many people were not able to tell you were joking about hating your own code. dan da man on July 27, 2009 11:22 AM Worst code I've ever seen: GCC. Do I still get hired? Mr.'; Drop Database -- on July 28, 2009 6:42 AM I don't think he is joking. I think he is using hyperbole. john on July 28, 2009 7:56 AM >> For the most part I agree but I really like Canon's ZoomBrowser software ditto...ZoomBrowser by Canon is solid and I've been a user with multiple Canon cameras. jg on July 28, 2009 8:31 AM Yes I am a software developer. Yes, I hate software. But there is one thing I hate more than software (well, not really since it is software): Internet Explorer 6. I hate IE6. Chris Hiester on July 28, 2009 8:40 AM The code next yard is always greener. Felipe on July 28, 2009 10:18 AM The beauty, the pride you feel when you look at a piece of elegantly written code... that is what it's all about. Not self-deprecation. Though you should be critically aware of your own work, and when it's done you should go through it and study if you can improve, optimize and re-write. And study what parts you may improve in the future with more knowledge. Alex on July 28, 2009 11:02 AM It is true that most of the developers hate software.. me too but I love to code it.. samta on July 28, 2009 12:01 PM It is true that most of the developers hate software.. me too but I love to code it.. samta on July 28, 2009 12:03 PM It is true that most of the developers hate software.. me too but I love to code it.. simmy on July 28, 2009 12:05 PM I don't hate my software... until i revisit it again in 2-3 months time. THEN i'm scratching my head wondering what I was thinking WAY back then! Andrew on July 29, 2009 6:46 AM I, too, am a software developer and I, too, hate software, including some software that I've written. Software that comes bundled with hardware can seriously grind my gears, especially when it is accompanied by the rare virus or adware or other malware, but more importantly when it doesn't do what it's supposed to do, help a particular piece of hardware talk with the operating system. Off-brand hardware is appealing for the price, but when you try muddling through whatever cruddy excuse for a driver or helper application is bundled, the aggravation can make you wish you'd stuck with a reputable brand. I also hate Internet Explorer with a passion, all versions. Right now, I'm typing this comment in the latest IE while performing a merge with TortoiseSVN, and IE can't seem to keep up with my ~100 or so cwpm typing speed. I literally can't see what I'm typing until I stop for a few seconds, it's a good thing I learned to touch type early. My own software I also hate, depending on the circumstances under which I created it. If the project was one rife with scope creep and vague or improvised or nonexistent business rules, I grit my teeth every time I must crack it open to maintain or update or fix it. In the early stages of a project, I like to plan out how I'll do things, try to do stuff creatively and elegantly where such is called for, but all too frequently these noble aspirations are dashed against the jagged cliffs of reality. Darth Continent on July 29, 2009 8:45 AM Sure, I hate some of my own code. If I didn't, I wouldn't be improving as a developer. I look back at my old code and think "How could I have written that?" But it certainly isn't the worst code I've seen. Any developer who does maintenance work will, on a regular basis, come across code that makes them want to gouge their eyes out just to stop the horror. The sad story behind most of this digital barf is that it was written by developers who firmly believed they were "Competent". And the sins of the developers are not confined to the code alone. I have the misfortune of working (distantly) with a massive software package that is the 'new' Windows version of an old console app. The interface is just... off, sort of like a glass of milk that has been sitting out a little too long. Some operations have 4 different ways to do them, with not one of them being the standard way. It is days like this that I weep for my profession. Zorro on July 29, 2009 10:04 AM lolololol I work in software maintenance and I have seen so bad software that it's impossible to consider that mine is the worst! It is sooooo bad, and in a lot of projects I see lots of incompetence and no professionalism in making good programs. I know I am bad, but I have seen so much s"#$t that it is impossible to say it is the wrost

glacius on July 30, 2009 2:40 AM

While I agree with most of your article, I can't agree with your final conclusion.

I certainly agree with the spirit with it. Over self-confidence can be a problem in pretty much any field. However if someone always insists that compared to other's their own code is the worst that is not a sign of modesty or member ship to any elite club other than the low self-esteem club.

In my job I have to work with other people's code as well as my own. I do criticise my own code and don't pretend to be perfect (not nearly as often as other people's code though given the fact that mine actually works most of the time). In fact I'll generally criticise any code that is clearly terrible and complement any that seems to be comparitively good.

However much like the poster above me I come across some extremely bad code on a very regular basis. This is because as the most competent programmer here (company I work for) I'm the one that has too fix everything that is fubared.

Saying it doesn't really do my position justice so instead I will give an example:

Recently we contracted someone to make a few pages for us in PHP for generating pages with some moderately simple JS, CSS and HTML, nothing particularly fancy. After a very long time we eventually got the PHP files and deployed them. From the start the "finished" system only worked allot of the time. The system, while it sort of kind of worked it had a veritable swarm of bugs.

However things really didn't start to get bad until I opened the PHP files. Almost every single line violated some kind of best practice. In fact that is an understatement. They violated good practice.

The first issue was the code organisation. I have never seen so much inconsistency. First up there's the indentation. It was almost random. Some blocks would use two tabs, some would use one, some had spaces, many lines had indentation at the end presumably from deleting things and moving things around and one file for some reason had double lines. That is the file didn't have any single "\n" characters in it but instead used "\n\n" to end each line. How it got like that is a mystery as none of the other files did it.

String literals and concatenation were another serious problem. Sometimes it escaped out of PHP using (?php> and query($sql); mysql globalised the last connection so it acquired a correct link by sheer luck. In another file..$sql=('SELECT row FROM db WHERE condition') or die(mysql_error());
$database->query($sql);

It wasn't just a few lines like this, almost every line had something severely wrong with it. And the semantics... Huge hundred line if cascades used where a few dozen line switch statements would suffice. Variables copied to other variables for no other reason than arbitrary renaming and then randomly using one of the two after with no consistency or purpose, no escaping on user input that goes into mysql queries, improper escaping on output for HTML, getting results and putting them in an array using the iterator provided and then only using the array from 0 to length, it goes on forever.

If done from scratch, it would NOT be hard to get it done "right". I am even considering much of it to be a "write off". It would be in many parts of the system faster to do by scratch than to fix it all.

If confronted by the code that I saw I'm sure that it would be worse than the recent code of many of the viewers here who may well be coders worth hiring. For them to maintain that their code is unconditionally worse would be a lie with no room for doubt.

If you're in fact a good programmer then there's one thing harder and more annoying than getting your own existing code working and that's getting other people's existing and considerably worse code working. Maybe I would take more hardship in getting my own code working if I had time to do that, owing that I'm always being diverted to fix the vulgar mess made by "lessers".

j on July 30, 2009 5:30 AM

Erm.... PS: I think I just found some of your own code that is worse :P the end php tag wasn't escaped or something. I think it deleted a chunk.

Let me let you in on a little secret... replace greater than with and less than with or just use the html escape function your environment probably provides.

There's no need to try and be clever and to strip out stuff that looks like XSS.

j on July 30, 2009 5:36 AM

Really Jeff? No response to any comments here? What a pity.

Considering the backlash over the last few lines you wrote, I was hoping to get some sort of response in which you either find a way to maintain your stance or admit that it doesn't quite make sense.

Oh well, I guess if you haven't responded by now, you probably never well.

Fred on August 2, 2009 1:36 PM

There is too much that programmers need to take into account. Most of the stuff should be put away into designer's or such table so that a programmer could actually concentrate on programming. As a programmer I shouldn't need to worry about different kinds of technical optimization aspects nor design pitfalls. That stuff should be the concern of some technical person. As a programmer I should be able to just create software functionality, not swim in endless swamps of bottlenecks and settings.

Silvercode on August 4, 2009 2:20 AM

I hate how hard it is to write good software but I love writing software.

Anonymous on August 4, 2009 8:47 AM

I've always been interested in programming and software development but after seeing the programming that goes into software, I changed my mind. I found something else to fall in love with.

Jimmy on August 4, 2009 9:36 AM

I always think that what i coded before 2-3 month was not as standard and efficient as it should be.

Software developer continuously improves as he gets experience and come across different techniques and frameworks.

Kunal Shah on August 4, 2009 11:38 AM

I was shock when see your title. Actually, I agree with you.

Phaoloo on August 9, 2009 8:24 AM

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Maria

http://memory1gb.com

Maria on August 9, 2009 12:28 PM

I've been trying your interview technique, and, uhh, no dice.

Still Jobless on August 16, 2009 5:34 AM

"Nobody hates software more than software developers"

Oh wow you are bang on. I think we notice things that other people take for granted. Plus we have to _work_ with software on a daily basis to accomplish our jobs. My daily gripes:

- Why is Visual Studio so darn slow? I love when it blocks everything and brings up a popup to tell me it's catching up the BACKGROUND processes.
- Tortoise SVN folder cleanup/commit loop hell.
- Why can't Window's Movie Maker open .mov files. I now have a ton of movies on my digital camera that I can't do anything with unless I download some sketchy converter program.
- Etc.

Sherri on August 19, 2009 1:53 PM

The problem is not bad programmers or bad code. Most programmers are quite good and are able to produce quite nice code. The problem is time. To produce good code we need a proper piece of time, but if we got it, our competitors will do their job faster than we will and they will sell their products, we won't, although they products will be worse.

Przemek R. on August 21, 2009 4:16 AM

What is wrong with you people ? Just want to represent those of us who love our code - I wouldn't write it otherwise.

I don't understand what is keeping you from writing good code - incompetence ? I'm sure you can find a line of work that you are good at, or at least one where you don't hate what you are creating.

Anonymous on August 22, 2009 1:46 PM

I have the upmost respect for software developers you people have amazing skills, I would love to learn it sometime.

Ron on August 24, 2009 3:26 AM

hehe, I agree, The ones that are good on something are the ones that hates it most, just like Software Developers lol

Nike shoes on August 27, 2009 1:58 PM

Tiffany Jewellery barely 2-year-old result called Iridesse is set to the more Tiffany Key Rings South Coast Plaza setting was the jeweler’s supreme tome branch stockTiffany Bracelets diamonds are about more than absolute condition, cut and beauty - they are one of our diamonds underscores.Tiffany Sets reputation as a world premier jeweler synonymous with diamonds of the finest feature,” added Bennett.

tiffany jewellery on August 28, 2009 3:17 AM

I don't understand what is keeping you from writing good code - incompetence ? I'm sure you can find a line of work that you are good at, or at least one where you don't hate what you are creating.

abercrombie and fitch on August 28, 2009 1:11 PM

[quote]But I have NEVER produced anything as bad as the C code my ex-boss created. Switch statements 5 layers deep. A 10,000-line function, with ALL of the variables global to the entire function, including the one used only once at line 9500 (he didn't know about adding { } for scoping when there was no looping or conditional logic involved), and variables named "count" and "total" that were used 20 different places in 20 different ways.... that I had to maintain.[/quote]

I've worked on one like that!

Try this:
In a C program in the late 80's/early 90's there was a global variable called simply 'i'.

So if you created a for loop and forgot to declare your own 'i' it iterated the extremely important global variable 'i'.

But it gets better... the guy needed (I use that term loosely) another global variable and his favorite meaningless variable 'i' was already taken so guess what he called his new global variable: yep, you guessed it 'ii'!

And this was written by the software manager, someone who was viewed by the non technical people as a 'software god' - very funny.

He was also the sort of a**hole who was extremely reluctant to help newbies, like me at the time, try to understand what the hell some of his code was intended to do and what the hell was the purpose of some of his suite of very unsafe global variables. I guess he hated me because my questions were exposing how absolutely crap the software he had written was and how absolutely amazing it was that it actually managed to work some of the time.

blinko on August 29, 2009 11:45 AM

I was shock when see your title. Actually, I agree with you.

richard on August 31, 2009 10:47 AM

I think we like tools that do their job. I don't know if this is a programmer thing or not, but I do know it's well expressed in The Pragmatic Programmer in their desire for Small Sharp Tools. I think the desire for simple things that just work and don't tell us how to do things appeals to a certain type of person, which is perhaps also the type of person who likes to solve problems and maybe on of the kinds of people who become programmers.

I find in lots of areas of my life I would prefer to be good at something myself or to have something simple that works rather than have something complex that I can't use in the way I want to use it.

Da 'tron on February 6, 2010 11:15 PM

I like looking over the comments I sprinkle in my code to read things like:

"God, what a kludge."

"There's got to be a better way to do this."

"Uuuuuugly..."

"Boss, if you ever reads this, I'm really sorry."

Aaron on February 6, 2010 11:15 PM

All software is crap. Agreed, until:

"My own".

No, sorry. I work in other people's code day-in and day-out, and most of it is uncut, pure, refined, distilled, 100% crap. My own code is competent at worst, and only kludgy when having to inject it into 30-year-old legacy crap. I write good code. And the word from other developers that have been in my code for the past 20 years, it's always been good.

[I make mistakes, sure. Everyone does.]

Jeff, for someone who's self-admittedly "not an expert" and still learning the trade, you seem confident enough to make some pretty broad (and wrong) generalizations sometimes.

Clinton on February 6, 2010 11:15 PM

I am never proud of my code; it is never elegant or tight enough for me to be satisfied. i need to improve on it continually.

But, there is in reality no way i can ever, honestly, claim my code is the worst. That would be a flat out lie. It is not the best, but neither is it the worst. How i objectively perceive this is by way of my job in the past few years of fixing and correcting the buggy, messy, inefficient, unreadable code written by others. I can write bad code for sure; not stating my code is perfect, but really, these folks take the prize; their level of malquality is amazingly unfathomable. I cannot defeat them. At the same time, there are clever code and techniques so stunningly elegant and succinct in their achievement they inspire and teach me.

Going with such an extreme claim is like declaring I am the _worst_ever_ snowboarder in the world, when I took two days to learn the basics and started carving down slopes. How can i lawfully claim that when i know there are folks who spend weeks at it and still struggle to stand and control their board and tumble into snowballs?

All I know is I need to be working towards "better". I am not good enough. But neither am I the worst. I stand in the middle.

Aaron Seet on February 6, 2010 11:15 PM

Btw, i capture photographs in Raw format so I do need the manufacturer software to process the photo and convert to Jpeg. (yes, i do not own Photoshop or Lightroom)

Aaron Seet on February 6, 2010 11:15 PM

I agree...reluctantly. But there are good software products, and I enjoy using them. If this is advertising, feel free to scratch this comment - but I really like using xplorer2, PDFExchangeViewer and FileZilla. I think those are possibly the best software I ever came across.
But I also agree with Chip here - our companies don't encourage us to code the best we can. Just the fastest we can.

Broughton on February 6, 2010 11:15 PM

As Mike Moroze said:

Ergonomist/usability specialist (missing?)=>* This doesn't do what I need
Ergonomist/usability specialist (missing?)* I can't figure out how to do what I need
Ergonomist/usability specialist (missing?)* This is unnecessarily frustrating and complex
Developpers =>* This breaks all the time
Graphic designer =>* It's so ugly I want to vomit just so I have something prettier to look at
Ergonomist/usability specialist (missing?)* It doesn't map to my understanding of the universe
Ergonomist/usability specialist (missing?)* I'm thinking about the tool, instead of my work

So... You are doing bad code as a developer.
We (I) am doing poor user's contextual observations, analysis and interface design.
Someone is doing poor project organization and task sharing.

We have to think more "A team" ;)

Nobody know that usability specialists can help them. Cooper (guru in our area) said: let´s developers code. What do you think about that?

Gluon on February 6, 2010 11:15 PM

@Eoghan - "Would you fly in a plane that was reliant on software you'd written to stay in the air?"

Yeah, that's a fun question. I consider myself a better developer than most, but I'm well aware the code I write isn't always perfect - maybe I've overlooked an edge case, or even some silly error that I've missed in testing. So, probably not, is the answer to that question.

Simon on February 6, 2010 11:15 PM

Amen. Oh, A-MEN!!!

You just summed up my life.

And do you know what the most horrific thing in a software developer's life is?... A fellow software developer that doesn't realise he hates software.

Jason Snelders on February 6, 2010 11:15 PM

@ Darren:

> let me ask you ; have you actually ever fixed a bug in
> some Open Source-application that you were using ?

I do it all the time. Except, replace "application" with "library."

Mason Wheeler on February 6, 2010 11:15 PM

I bought a new phone at Telus expecting it to have the same minimal feature set of a past Telus phone I had 5 years ago. I found out that the texting "iTap" feature that allows a single numpad keypress per letter (where it figures out which word you meant, giving options when there's duplicates, remembering new words you've entered, and most importantly allowing you to enter new words) didn't work: it didn't allow me to enter new words. If the word wasn't in the dictionary, it just STOPPED allowing me to type letters. I had to go into the options to change the input format, go back to the text, finish the word, then repeat in reverse to set the entry option back to iTap. I took the phone back the next day and got into an argument on whether the software was broken. Get real. iTap is supposed to make texting quick, and if it doesn't allow that (because you have to go in and our of options/settings), then the software is broken. It's like having a browser that doesn't make links clickable because they forgot to add it, and since the software does what the programmers wanted, it 'works'.

So, yeah... I hate software. But doesn't that help me make better software?

Jason Doucette on February 6, 2010 11:15 PM

John Ferguson on February 6, 2010 11:15 PM

I mostly agree with you about the worst code you've ever seen, but I see two flaws with that in an interview question.

1) The interviewee needs to come across as confident and admitting that he/she writes bad code could be taken the wrong way by an interviewer.

2) Many developers (myself included) have seen code so bad that we would rather write it from scratch than pollute our code base with their mess.

I agree that I stress over the imperfections of my code more than anybody elses code. I get what you're saying, but it's not quite on the mark.

Senfo.blogspot.com on February 13, 2010 7:01 AM

everyone is banging on about the poor hardware developers. in terms of the worst software that has ever come with hardware, my no 1 is definitely intellipoint and intellitype. sure, your macro keys are great, but I use the media keys far more often with WINAMP (not media player). this is Microsoft. sorely dissapointed. pure crap. that is all.

Jcdickinson on February 13, 2010 7:33 AM

I would have to agree with you. I think the biggest problem is that it is very difficult if not impossible to predict or envision what the perfect end result would have to look like, and and function like in order to not result in the answers your listed.

"This doesn't do what I need"
"I can't figure out how to do what I need"
"This is unnecessarily frustrating and complex"
"This breaks all the time"
"It's so ugly I want to vomit just so I have something prettier to look at"
"It doesn't map to my understanding of the universe"