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
  • I'm thinking about the tool, instead of my work

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
298 Comments

I work in two locations, with versions 1 and 2 of the same model of printer/scanner/fax/coffeemaker. The version 1 software worked fine with the version 1 hardware, so WHY did I install the version 2 software? I asked myself over and over again, after discovering it DID NOT WORK with the version 1 hardware... and the version 1 software would not install until I spent hours of effort uninstalling and cleaning bits of version 2 out of the registry. Thankfully the version 1 software works with the version 2 hardware, so I just ignore the daily Plug'N'Play exhortations about "new hardware needs new software".
And yes, I got the answer right, "mine!"

Breck Carter on July 22, 2009 2:08 AM

Now don't get me wrong, I hate digital camera software just as much as the next guy. But I can't honestly say that I hate all software that I write.

Sure, I know that some of my code is crap, but I also understand that at the end of the day, the important thing isn't that the code is poorly written, it's that it accomplishes the task it was written to accomplish. As I learn more about coding and learn new skills to apply, I feel that I can improve on my new code by learning my mistakes from the past.

I may not like the way I've written old code, but I'm sure as heck glad I did-- otherwise, how would I know not to make that mistake this time around?

Nicholas on July 22, 2009 2:13 AM

My own software is like bread: it's great when it's just baked, fine for a little while longer, and definitely beyond stale and moldy a year later. Same goes for a lot of stuff I do that requires constant learning. My best today is better than my best a year ago.

Alessandro Dona on July 22, 2009 2:17 AM

You would think hardware companies would at least be proficient at writing drivers, but even this simple task seems to be too much for most of them... Try getting a nforce motherboard's onboard NICs to work properly under Vista (even after installing the "latest" update from M$'s Windows Update). And don't even get me started about trying to install Logitech SetPoint under Windows Server 2003...

Jeremy on July 22, 2009 2:27 AM

Sorry, I totally disagree. Sure, a lot (most) software sucks in some way, but considering Sturgeon's Law (http://en.wikipedia.org/wiki/Sturgeon's_Law), *so does 90% of everything else*, at least if you're going to be nitpicky about it. (And you ARE being nitpicky.) Software is not special in this regard.

Yeah, a lot of the software that comes for free with your hardware gizmo stinks. So what? At least it was free. And at least for me, the free software included with my Canon 40D camera was pretty good (and in fact quite necessary for RAW image processing), and the free software included with my flatbed scanner to operate it certainly was necessary and worked well.

As an experienced software developer myself, I still have no idea why you think all (good) software people do (or even should) hate software. I don't, and I've never heard any coworkers say they did. Sure, I can find room for improvement in any piece of software (including anything I've every done), but hate? No.

What benefit is there to "hating software" for software developers? Why are you encouraging this?

I guess the interview stuff is suppoed to be a joke, but I just find it annoying because some bozo out there might see this and make a real judgement based on asking this question.

LintMan on July 22, 2009 2:31 AM

You clearly haven't had to maintain enough software in your career if you think you software is worse.

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.

No matter what crap I put out, I'll never be able to beat that.

cscalfani on July 22, 2009 2:31 AM

I agreed with you up untill you started saying that one should hate thier code more than any other code. You are right there are much less comptent programmers than incomptenet ones, but IMHO it has nothing to do with the Game. Don't hate the Game, hate the Players.

Well it depends how you define the Game, if the Game is quantity over quality, then yes you should hate the Game. IMHO anyone who thinks their code is not good enough should go do something else right now. Anyone who read this post and agreed to the last statement should seriously consider leaving the business.

I remember hearing/reading a quote (cannot cite it, cause I don't remember the source) OH: You should write code like the person who is maintaining it is a serial killer who knows where you live.

Take your time, do the right thing, consider all software like a space craft mission critical system where if you don't take it seriously could cost you your job at a minimum.

Hatem Nassrat on July 22, 2009 2:34 AM

In reference to your ending (which admittedly was likely said tongue-in-cheek):

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

I agree with what several others have pointed out:

A) While I have written poor code, the worst code I've written certainly wasn't today and it wasn't recent either. This isn't to say that I haven't written poor code recently, just that I'm improving and that my worst is always behind me

B) I've seen worse code still via other channels (DailyWTF, previous MBA's as programmers projects, etc.)

Zach on July 22, 2009 2:45 AM

I'm starting to get sick of reading how we should accept our code is bad, we're bad programmers, and how we're our own worst enemy.
Jeff sometimes I write decent software. I think it out proprly, it does the job cleanly and meets all requirements. Can we celebrate when good software is written for once? Aren't we allowed to take pride in our own code sometimes?
Walking into an interview and stating that the worst code i've seen recently is my own?! seriously man, I understand the need to be modest and to always improve, but I'm not going to walk around in some zombie state telling people (and potential employers) how bad I am at my profession.

MC on July 22, 2009 3:49 AM

Most old code I look back on I'm not especially proud of, but was the best I could produce under the deadline and with my existing set of experience. If it satisfied the stakeholders, then I was pleased at doing my best. In retrospect, I may have done a few things differently, but I don't regret it, much less hate it.

Skepticism of one's code is well and good but you seem to dwell on it. You can't make every line of code perfect. Don't let the profession change you. My girlfriend pointed out I'm always finding every little possible problem to a given situation almost immediately when asked. That isn't how I want to live.

Matt Green on July 22, 2009 4:26 AM

RE:

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
-I'm thinking about the tool, instead of my work

This is far too complicated, when all you need is the last point:

-When people say "this sucks" they mean that they are thinking about the tool, instead of their work.

All of the other points can be derived from this last one.

System-Centred Design creates Friction, frustrating concentration and lowering productivity. Conversely, User-Centred Design (that is systems designed for humans not computers, which have their designs tested on real users, rather than just "assumed to be nifty" by their programmers) can create Flow, encouraging concentration and increasing productivity and actual work quality.

Consequently, the only word of advice you would need to give out is:

FLOW.

Uncompetative on July 22, 2009 4:50 AM

Mr. Frank, this software will address problems you never had!

nervokid on July 22, 2009 4:51 AM

Example .. i just installed iTunes (windows) .. again! Everytime there is an update there is just a little bit more added to the total download. Last check - 84.9 Mb - for an update! WTF?! You can just tell this is a piece of software that is made "better" by a team of (how many devs?) writing more and more code. I have only noticed one change to the application that actually seemed like an "update" and not some stupid Apple idea that a robot can tell me what music I already like listening to. As I see it, the goal of software maintenance is to eliminate code, while making the app faster, and faster and lighter and lighter. I guess that applies to everything though and I'm either going to get spiritual or quantum engineering about things soon, so i'll stop.

Aidan de Graaf on July 22, 2009 5:01 AM

BTW - my code sucks too.. but my old code sucks way more. I learnt from the worst .. and they really sucked. I just saw one of them on the tram .. I assume her code is better now too. ah memories.

Aidan de Graaf on July 22, 2009 5:02 AM

This reminds me of G.K. Chesterton's famous reply. When asked, along with other famous writers and thinkers of his time, "What's wrong with the world?", he answered simply, "I am."

cvaldivia93 on July 22, 2009 5:06 AM

This is an awful way of putting things... I *love* software because it's difficult to use but on the other hand I am conscious that other people hate it for that so I create simple-to-use software for the money and keep it complex on the inside for the pleasure ;)

PS: I'm sure I typed the previous captcha correctly, are you sure reCAPTCHA accepts '-' (dashes) ?

Tom on July 22, 2009 5:11 AM

The way I have always thought of this is via the question...

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

Eoghan on July 22, 2009 5:57 AM

It takes reasoning and understanding to work with code, whether it is your own code or someone elses code. Being humble and admitting that your own code isn't perfect is a good thing. Asking an interviewee about bad code should be about determining if that person is humble enough to admit that even they don't write perfect code. Writing code will always entail a certain mental capacity and stamina. Before God confused the languages at The Tower of Babel was communication so fluent that no one misunderstood anyone else? What if computers had existed at that time? What language would have resulted? Computer languages manipulate two states on and off. That is perfection. The human brain doesn't work like that. Why are programmers poor socializers? Because they think logically all day long. After 8 - 12 hours of logical thinking how can you possibly communicate well with someone directly after such a session. It doesn't work. Translating the illogical thought process of a human to the perfect logical construction of computers is a tough thing to do indeed.

http://stackoverflow.com/questions/679621/how-to-overcome-the-everyone-elses-code-sucks-attitude

Apologies if this post is somewhat illogical.

Anonymous on July 22, 2009 6:28 AM

The part about frantically leaping towards your spouse, hoping to cancel an install before it starts? I've been there. More than once. Complete with the slow-motion and the "Noooooooooo....."

There should be a law preventing hardware companies from writing software. I'm looking at you, HP.

Curt Hagenlocher on July 22, 2009 6:41 AM

Hehe, nice post. It resonates with me because i believe that if you ever start thinking that what you produce is 'pretty damn good' you'll stop trying to improve and in this industry when that happens you're in trouble and so is everyone you work with.

Alan Skorkin on July 22, 2009 6:49 AM

I think there's a sort of honeymoon period that accompnies the writing of code - for a while, everything is perfect, you're so happy with how everything is working out. And then, there are problems. Little problems at first - but you fix them. Later, you realize that there were problems with the way that you fixed the little problems - and now you've got big problems. You start to wonder if it'd be easier to just start over - but you've already put so much effort into it that you feel committed - why waste all the work you've already done?

But there is most certainly a point, early on in the process, where you have a sweet little bundle of code that you love more than anything in the world.

matt on July 22, 2009 6:55 AM

I concur with the HP printers comment. I prefer using HP printers on Ubuntu than on Windows, it's so damn easier.

That said, Vista and 7 seem to detect my HP printer out of the box, similar to Ubuntu, no need to install HP printer drivers/extraneous shitty software.

Jean Azzopardi on July 22, 2009 6:57 AM

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

It's not "my own"; it's not even "yours" (which is the obvious retort)

It was a Win32 C program written by a COBOL programmer.

Invisible dialog windows were created to be used as processing steps and data buffers and never released (but they were orphaned). There were no typedefs and no structs; all variables were global. There was zero code reuse. Code was obviously cut and pasted multiple times, even in the same function, with no variation. Several functions were over ten thousand lines long.

I couldn't write code that bad if I tried. I couldn't write code that bad if I erased my memory and started over from scratch. In assembly language.

An ex-military friend of mine refers to this level of incompetence as "weapons-grade stupidity". And he's right. Twenty minutes of running that program was guaranteed to blue screen the machine so bad you had to turn it completely off and frequently you also had to repair the disk drive on reboot.

Summary: you just think your code is bad because you have such high standards. But your code, like mine, is pure gold compared to the truly clueless!

Steven A. Lowe on July 22, 2009 7:01 AM

holy crap, that was the funniest thing i have read all week. your dreams are hilarious

abel on July 22, 2009 7:06 AM

@panuta

"You said "Any modern operating system (and even Windows XP!) can see and automatically download pictures from a new digital camera."

Well, this is not always true. At least my Canon EOS 350D DSLR is not being detected by Windows XP without WIA driver because it does not support Mass Storage Device."

You are doing it wrong.

You shouldn't be directly connecting your camera to your computer except in dire circumstances. Pop the card out and into your card reader, then download the pictures four or more times as fast (I had the 300D before my D40, and it was an 8x difference between reading from the camera interface versus a fast firewire card reader; my D40 is about a 3x difference; your 350D should be somewhere in between).

Really. It's silly to directly connect a big, bulky, fancy camera up to your PC to download pictures. Just use a card reader!

(For what it's worth, my 300D directly connected up to my Mac with no special drivers, and I'm sure there wasn't a Windows Imaging Device driver snuck in there without my knowing ... there's usually a camera setting enabling "PC Mode" for transfers which changes the firmware over to calling itself a mass storage device)

Tom Dibble on July 22, 2009 7:33 AM

You're absolutely right. When I develop software or a website, it always feels less "clean" than other software/websites that someone better than me made. Even if it works perfectly fine.

Matt S on July 22, 2009 7:51 AM

Software typically sucks because of a few reasons.

Ever changing requirements, that were poorly accessed in the first place.

As well as over estimated project time frames and limited / unsuitably skilled resource's.

If you say the worst code you have seen is your own. You obviously haven’t met a programmer who’s attitude is short variable names is less typing and ‘why do you need documentation or comments? The source code is right there...’ who’s working on a project with the traits described above.


Jason on July 22, 2009 7:51 AM

Ummm, Did you just review the software by the process of not installing or trying it?

Seems like an extreme case of navel gazing to me.

Nic on July 22, 2009 7:59 AM

Yeah sure, my code IS bad. But really, I've seen much worse :)
It's not stopping me from hating my code though...

Broken on July 22, 2009 8:00 AM

I am first? At once?
Sorry for silly comment...

cr0t on July 22, 2009 8:01 AM

100% real.

But come on, hating your own code is stretching it. Sure my code isn't providing the performance I originally intended. Sure, it didn't fit the original memory budget. Sure, the HW requirements are steep...
But I find hating it is a bit too much. I've seen some systems getting my same performance, while using more memory to churn a 100x smaller dataset. I've also seen some system mangling the same dataset with 6x the performance but hating your own code is weird to say the least.

The answer to "What's the worst code you've seen recently?" is "My own" not because I hate it, but because it's the only code I've seen recently (couple of weeks).

MaxDZ8 on July 22, 2009 8:03 AM

I think this is a case in which software development and building construction are similar.

If you hire 10 incompetent builders then at some point you will have to hire a good builder to fix all the mess. Which if you had hired that one good builder at the beginning you could have just done without the 10 incompetent ones.

jzd on July 22, 2009 8:08 AM

Have you actually gotten that answer ("My code is the worst that I've seen recently") from an interviewee? Did you hire him/her?

C on July 22, 2009 8:11 AM

My codings not great!!!
So i prefer to look at it after ive spent hours debugging it, rather than before. So worst the thing i wrote and second the thing i debugged.

Great site by the way

Matt on July 22, 2009 8:12 AM

It's usually not the code you wrote today. It's the code you wrote six months or a year ago that you're looking at today. If it still looks good, you're either that good (unlikely) or you're about to appear in the Daily WTF.

Stuey on July 22, 2009 8:12 AM

About digital camera software: I have experience with two companies here (Canon and Panasonic), and I must say that the Canon experience is very good - they have software for the casual user/amateur that even my 70-year-old mother uses happily and successfully, and software for the professional that is well thought out, highly functional, stable, and free.

On the other hand, the junk that came with my father's new Lumix gave me an experience like the one described above. One example: New pictures are sorted into ddmmyyyy folders. No way to change that. Some stuff only works when you're an admin. Etc. etc....

So there

Tim on July 22, 2009 8:16 AM

...are exceptions to the rule that hardware companies make bad software. Sorry, last sentence got lost in my previous post.

Tim on July 22, 2009 8:17 AM

I can't say I "hate" my code. I'm just never happy with it. It could always be better, I always have to do something kludgy that makes me cringe, and all I ever see are the things I wanted to do to make it better but didn't have the time/budget/energy to do so.

I always have an imaginary developer on my shoulder going, "Is that *really* that's the way your doing that, putz?"

Captcha: problem eric

Chris Rikli on July 22, 2009 8:18 AM

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

Gotta differ with you there. I'm currently in a very painful project, editing and extending the feature set of a VB.NET/ASP.NET website written by two guys who had never written ASP.NET code previous, and one of whom had never written VB (he was a Java guy). Almost every function or method of every class and page has me wondering how either of these guys make it through a single day without hurting themselves.

The only problem I have with my own code isn't so much a problem with my ability to write good code, but that the technologies are changing so freaking fast that I don't have the time to really study and adopt the best-practice way of doing things for a given skill set. And because technology is moving so fast, the answer inevitably is: don't worry about writing to the best practice: we're going to pitch this code and re-write everything in three years anyway.


My point being that the lack of stability of the technology in our profession almost guarantees that programmers, on the whole, will not write good code.

Sea Cat on July 22, 2009 8:19 AM

As a developer you should be critical of your own work, but that doesn't mean hating it, rather it means trying to perfect it.

There's nothing wrong with tasking a pride in your work, and someone who thinks everything they write is bad, will probably only write bad code.

Last time you wanted programmers to be craftsmen, but I wouldn't expect a craftsman would hate their work.

Phenwoods on July 22, 2009 8:21 AM

I sort of have to disagree with your last premise:
"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 as soon as possible. Sorry, pal. You don't hate software enough yet. Maybe in a few more years, if you keep at it."

While looking at my code depends on the code I'm looking at. If I wrote it last week, its probably pretty good per my current standards. If I'm looking as something I wrote 2 years ago, very different answer. And I have certainly seen some code recently that I couldn't/wouldn't have written in the past 10 years. I'm sure you will agree that software development is a growth process. I'm sure that 2 years from now, I will look at code I wrote today and say to myself, "GAWD, did I really do it that way??!?" :-)

Robert Beaubien on July 22, 2009 8:21 AM

Disclaimer: I own a mac and manage my photos through iPhoto.

That said, the only time I've ever installed software from a camera was with my recent Olympus DSLR purchase (a used e-520 i got for a song), and that was purely because of the raw conversion that comes with it.

Barry on July 22, 2009 8:22 AM

Well, I'm definitely not gonna ace that interview. But my own code is the *best* I've seen recently. And by recently I mean the past 5 years.

And no, I don't like my own code very much, every time I see it I want to rewrite it. It's just that everything else I come across is so infinitely much worse.

It took me 15 years to figure out that no matter how incompetent I thought I was, I am a friggin' coding genius compared to 90% of clueless morons out there.

So I've stopped hating my own code, thankyouverymuch. And now excuse me while I go refactor the crap I wrote last week...

Rick on July 22, 2009 8:22 AM

Here here. I recently uninstalled a bunch of HP printer software from my parents' PC. This one lousy inkjet printer had something like 6 applications installed to support! It even had an icon in the system tray, and was constantly looking for updates for telling me to install updates, or something. Get over yourself, HP, your dinky printer driver has no place in my system tray.

Captcha: drains yard

Mike Sickler on July 22, 2009 8:23 AM

I think one reason software developers hate software is because we feel like we could make a better version of that program our self, "If I only had time...". That's probably not true though, and very rarely has it's been done successfully.

On the other hand, one reason that I like Open Source is that if some small silly bug really annoys me I can just fix that thing, rebuild the program and be done with it. Only to have that option to fix problems myself if I want to takes away most of the hateful feelings.

C.M on July 22, 2009 8:23 AM

I *wish* my code was the worst I'd seen recently -- but ever since I learned how to give variables names rather than single letters, the bar is just too high for some.

Trevel on July 22, 2009 8:28 AM

HP software is the worst. You can always spot when a manager bought a new HP printer/camera - their laptop takes an hour to boot and the systray is full of a 'dozen upload to web' type apps.

It could be worse - each printer maker could decide to install their own word processor!

@Barry Picassa can read almost all raw image formats. You do need the Olympus software to upgrade the camera/lens firmware

mgb on July 22, 2009 8:36 AM

@mgb Barry can't run Picasa. He's got a Mac. Poor Barry...

Sea Cat on July 22, 2009 8:37 AM

I beg to differ. Hating your own code is not healthy. Taking pride in your work makes you want to be better at it. Stop churning out bullshit just to fill the time.

Some of your writing is inspired but this is not one of them.

Jem on July 22, 2009 8:39 AM

Can't think of the number of times I've looked at code i wrote 2 months ago, and thought "what was i thinking when i wrote this?"

Dwayne on July 22, 2009 8:41 AM

This post made me nod so hard that my head nearly fell off.

Ohai on July 22, 2009 8:41 AM

I sometimes hate my own code, and sometimes not. Almost without exception, though, the code I hate is the code without tests, and the code I love is the code with tests. I'm not a TDD zealot by any means, but the more I practice it, the better code I write. There's a high correlation between tests written and readability/maintainability.

Doug R on July 22, 2009 8:42 AM

Well, yes. The worst code I've seen *recently* is, in fact, my own.

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.

xebecs on July 22, 2009 8:43 AM

Hmm, I guess I won't get hired in your interview process. My own code has problems, but I've always been really self-disciplined in cleaning it up on an ongoing and regular basis. Code a little, clean a little.

The worst code I've seen, I've seen from the way it runs, the actual source was hidden (as it should be, it is probably very embarrassing). Slow, bloated, inconsistent stuff were the manual is full of more exceptions than consistencies.

The next worst code I've seen was so because the authors chaotically applied design patterns and various rules of thumb to the point were the whole thing was wonderfully correct, yet total unreadable. I won't want to be the one that has to touch that ...

Paul.

Paul W. Homer on July 22, 2009 8:43 AM

> My own.

The key is to code with your eyes closed. Really. But then among all the crap that comes across your finger/key interface, you'll miss the few beautiful, Tom-Hanks-I-have-created-fire! gem that comes along once in a blue moon and makes it all worthwhile.

Captcha: "remotest TRENTON" - Indeed. Where's Wilson when you need him?

Dennis on July 22, 2009 8:47 AM

I don't *hate* my own code, but there's always that gut feeling that 5 minutes after it's deployed you know you could've done something better. No different than the artist who has to finish the painting, song, novel, etc. at some point. You finish and move on to the next project and vow to do better than the last.

But like you, I do *hate* installing bundled software. First step after buying a new PC is always to wipe the HD and install from scratch.

JM on July 22, 2009 8:48 AM

manchester lunged

fred on July 22, 2009 8:51 AM

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?

Steve Syfuhs on July 22, 2009 8:53 AM

Can I take this opportunity to moan about the Dell Mouse driver software I use. Two problems
1. It doesn't remember the custom settings for the button (I like the scroll wheel click to mean double click) so I have to put it in my startup group so it runs every day.
2. Once it runs it then sets the remembered settings, so it could be worse I suppose. So all I have to do is click the OK button. Then the bad bit starts - the dialog slowly fades away. Someone's written a loop to change the transparency gradually to 100% and then dismiss it. While it's fading away this loop seems to use a lot of CPU because the mouse goes really slow, so it's not like you can get on with something else. THIS IS SO ANNOYING.

Thanks, I feel better now.

Paul Morriss on July 22, 2009 8:54 AM

Are you depressed?

psychologist on July 22, 2009 8:56 AM

@Mike Sickler - that is so true. Always had issues with our HP printer until I finally uninstalled the crapware that came with it.

H on July 22, 2009 8:56 AM

Beautiful and true :-)

Matt on July 22, 2009 8:57 AM

You have no idea how many times I come across a class and my first instinct is "What jerk wrote this piece of crap" ... but the secret is I'm the jerk almost every time. Ok strike that .. every time.

I hope one day not to suck ... but I've gotten used to disappointment.

pfranza on July 22, 2009 8:57 AM

I don't hate my code. But I'm always suspicious that it's rubbish.

Durkin on July 22, 2009 9:01 AM

I feel your pain. I'm not a developer, just a lowly end-user. But I started in 1982 and have witnessed the gradual degeneration of word-processing software. WordStar was a wonderful tool for writers - difficult to learn, but with wonderful functionality and control. WordStar was the LAST word-processing app that was actually fun to use - you could really churn words. (Millions of people must still do that today in their jobs, and would be willing to endure a learning curve; surely there's an updated version of WordStar, waiting to be born.)

WordPerfect for DOS was wonderful in its power, but in terms of writerly control, it took word-processing a big step down from its origins. Let's not even mention that other program.

Where are the openings for cool, modern apps? Here are my thoughts. 1. Look for control, power, and a learning curve. 2. Look for modularity - equation-editors should be add-ons; and once you've "modularized," you can dream up wonderful tools for writers. Plus, programming modules, surely, would encourage greater creativity - VW's are more fun to work on than Greyhound buses. 3. Find the users, and deliver what THEY want. There's too much ego in software development - the lingering thought that because software can do something cool, it will best serve the user's needs.

And so on, and so forth. I, too, hate much software - though there are certain apps that are a delight. Picasa, to a certain extent; FileZilla; etc. They serve, they work, they don't get in the way, much.

Anonymous on July 22, 2009 9:01 AM

I agree with leetdood above; while recognizing the need for improvement in your own code is a virtue, so is the ability to view others' code with a critical eye. This is especially important when judging tasks such as sources for copying-and-pasting code, or when deciding whether it's better to take an off-the-shelf solution to a problem or roll your own. In both of these cases, an irrational and overriding loathing of code you've written isn't going to help you accomplish the task, and it isn't going to do the best job at keeping your software from sucking.

What merit there is the the camera software anecdote doesn't come from a moral imperative to avoid new software. If it did, many of us would never have discovered some of our favorite tools or operating systems. The specific reasons Mr. Atwood gives for being suspicious of the camera software are quite sufficient, without requiring that he cite hatred of new things that would not be out of place on the lips of a true Luddite.

When you're sitting at a desk for an interview and pondering the code you've happened across in the past week or so, if none of the examples in the Daily WTF are worse than the fruits of your own labor, then the interview should probably end immediately anyway.

Marty on July 22, 2009 9:02 AM

Amen!

It's always been strange to me that hardware companies try to treat their software as a competitive advantage. Usually it's the achilles heel, and the most painful part of using their hardware. Drivers in particular, since they're unavoidable.

Which begs the question, why do hardware companies keep their drivers closed-source? Typically it's *not* something you could use with a competitor because it's specifically tied to their hardware. Drivers are *only* ever a deal-breaker as they don't support a platform or have a critical bug. The closest to a "competitive advantage" you can get is if your driver actually works invisibly, plug-and-play, and they other guy's *doesn't*. That's not an advantage for you, it's really still just a deal-breaker for him.

Ethan on July 22, 2009 9:03 AM

@Sea Cat: What's this then? http://picasa.google.com/mac/

Vald on July 22, 2009 9:04 AM

@xebecs I cry for you.

I can second the feeling about software, especially software from non-software vendors, but as for my code... sure, the first attempt at something I write is always garbage, but after some tests and refactorings, I'm usually not disgusted by it.

Steve-O on July 22, 2009 9:09 AM

If the worst code you've seen recently is yours, then you haven't been reading many questions on StackOverflow. I agree that every software developer thinks, after the fact, "how could I have written that?" That doesn't mean that there isn't worse code in the world, though.

I don't hate all software. I don't even hate all of my software -- sometimes the love/hate relationship does fall more on the hate side, however. I do hate crappy software. I especially hate my crappy software. Fortunately, I seem to be writing less crappy software as time goes on. Unfortunately, the side-effect of that is that over time my older code becomes more crappy.

tvanfosson on July 22, 2009 9:11 AM

Software sucks not because of bad code, it sucks because of bad interface design. And I'm not talking graphic design. I'm talking about the way people actually are forced to interact with the software. It's mostly horrible, yet 99% of programmers websites still focus solely on programmers issues, rather than users issues.

D on July 22, 2009 9:12 AM

The worst code I've seen recently is in the FormatToHtml macro I use in Visual Studio. I'm just kidding. I'm currently learning FoxPro 2.6 for MS-DOS which will surely expose me to some really horrible code.

Robert S. Robbins on July 22, 2009 9:13 AM

If the worst code you've seen recently is your own, you probably don't work on a very large team or you never have to maintain legacy spaghetti code written by people who've long since left the company.

Travis on July 22, 2009 9:14 AM

The worst software ive seen is the kind that comes with musical devices. Setting up play lists and syncing is always a nightmare especially when the kids get devices from several different companies, and each one comes with its own software. On top of that we got iPods which required iTunes. iTunes has the gall to make a copy of every single song in our collection in its own format, and now its impossible to use the other pieces of software for other devices because every song shows up twice. argh.

J on July 22, 2009 9:14 AM

"It's so ugly I want to vomit just so I have something prettier to look at ",and "marketing weasels", are the reasons why _everything_ sucks.
Sheeple have been conditioned to demand a certain amount of aesthetics in everything they consume. But all that glitters is not gold...

Personally, function IS form. A 25$ Hecho-en-Chine computer case is beautiful to me - it does what is, and nothing more, nothing less. This undue focus on aesthetics, driven in large part by marketing, leads to unnecessary effort drained away from 'core competency'.

Let me put it another way: Whenever I get a new Windows machine, or perform a new Windows (from XP up) install, the very first thing I do is turn off all the rounded corners, animations, and other stupid crap that is completely unneeded ('adjust for best performance'). With XP on older hardware, performance jumped roughly 10% and memory usage decreased by roughly the same. With a few more tweaks, commodity hardware of yesteryear could be productive with a measly quarter-gig of memory.

The web is another arena where form is valued over function; gone are the days of near-instantaneous page loads, because nearly everything has stupid Flash or Silverlight or ECMA script clogging it. And it's crap. I want textual _data_, not pictures of some rent-a-face that doesn't even work at your company or buy your products. I might need diagrams or graphics, but they should be hyperlinked, and kept off of the front page. Wikis and other crap (Joomla, Zope, Drupal, et al.) have further served to obscure the data I want by festooning pages with a bunch of artsy crap.

If you have time to notice how ugly the interface is, I would argue you aren't really engaged in your work or the problem you are trying to solve. Function IS form. Rounded corners aren't going to speed up your builds. Fancy, rounded, anthropomorphic figures in the margins aren't going to help your thought process as you try to decide on an algorithmic implementation, or help you to remember to put the TPS cover sheets on the weekly reports.

Pure waste, integrated from inception, serving only to further reduce efficiency, and keep marketing afloat. Marketing should have perished with the cold war; both are based on outmoded, paranoid delusions from the 1950's, and era where Valium and alcohol reigned supreme in the thought process of industrialized nations.

The results are all around. Crap cars that look nice and rounded but are being recalled (even the Japanese are slipping in this regard, probably due in no small measure to Western influence) because their engines fall out or their seat belts fail or some sensor was made to the wrong specification.

Demand function. Eschew aesthetics. Or live with crappy, buggy implementations of _everything_.

Tarkin on July 22, 2009 9:14 AM

@Orange - it is called humor... get used to it on this site.

I find this situation funny, because what you are really choosing is the OS version of external storage reader SOFTWARE, which you seem to like. I prefer it too, only because it's the lesser of two evils. There has to be some way to get the photos off the camera and onto the computer, and it just happens the built-in software is usually better.

Now... skip to video. Got a hard drive video camera? You're hosed... you're going to use the camera software. This really annoys me - I can see the files on the camera, but my computer can't see the actual files, they are in some weird format, and to turn them into something I can actually use, I have to use the video camera software. It is some of the worst software I've ever used. It takes forever to start up, and takes forever to shut down, it has a bad interface (again, videos sorted by date). And the worst part: it won't split up the clips from the camera, even though it shows each one in the interface - everything from a particular day becomes a single video file with no markers or anything to help me figure out the difference between one video and the next. I have to go down to the frame level in Adobe Premiere and cut the video myself. I might as well just leave the camera running all day. Very annoying.

Jasmine on July 22, 2009 9:19 AM

Beautifully said. Not the best interview advice as I've only found 1 company I've interviewed with that responded well to such candor. Still, I wholeheartedly endorse the sentiment. My code isn't the worst I've ever seen. My code from a year ago is worse. My code from 5 years ago simply makes me cry. I can't imagine what I'll think of my current code in 5 years

Dinah on July 22, 2009 9:20 AM

I'm guessing (hoping!) that the last paragraph is just jokey hyperbolism. After an entirely serious article though it took me a few seconds to realise this. Maybe make a little more obvious?

nine on July 22, 2009 9:20 AM

Nice post, but I can't agree with your proposed litmus-test at the end there - it's a nice a shocker to drive home the point of the article, but in practical application, I think it'd be a terrible gauge. I know excellent programmers who'd flunk, due to having been scarred by dealing with the hideous code of others (there are degrees of terrible), and I know mediocre-to-poor programmers who'd pass it because they're naturally self-deprecating.

Eric on July 22, 2009 9:24 AM

Why don't you just have AutoRun turned off?

RalphB on July 22, 2009 9:25 AM

I couldn't agree with you more except for the part about hating my code. I don't think I'm particularly good, I just think it's impossible for a passionate developer to hate their code. This is because a developer who really wants to write good code - writes it to the best of their ability no matter what. Therefore they never know there is better until they get a code review, then maybe they hate their code for a short period and then fix it.

Just my $.02

My god do I hate almost all software. When you know how easy it is to make something work and work right, and something you pay for doesn't - it makes me irate. OSS ftw. It might still have issues but I can be ok with it's shortcomings because "at least it was free".

Anonymous on July 22, 2009 9:25 AM

When I read this I had to stop myself and make sure I hadn't somehow hacked into this site while I was asleep and wrote it myself. :) The exact same thing happened when my wife got her digital camera last Christmas, and my sentiments exactly on hating software as a software developer.

BTW, to they guy having problems with iTunes. There's a setting that tells iTunes not to copy the files.

rickb on July 22, 2009 9:27 AM

Jeff, you just inadvertently found another advantage of open source. When I load an unknown package from the Ubuntu repository, I have the expectation that it'll work pretty well, and I'm usually not disappointed. There are hundreds of thousands of OS programs out there, and if one of them was good enough that a Debian developer took the trouble to package it, it's been vetted.

Combine that with the fact that 99% of open source software is written by volunteers, the people who're so fanatical about creating software that they don't get enough of it in their day jobs.

kbob on July 22, 2009 9:31 AM

Dangit my name didn't show! The most recent post from Anonymous is me! And also, Orange, you do need to quit crying. Not wanting software is a perfect excuse to jump across the room while in the process of squashing the cat. Luckily Jeff managed to miss the cat, so I would say a kudos to him.

PS if you didn't catch it this was another attempt at humor.

Russ on July 22, 2009 9:31 AM

Sorry, I've written ugly code before, but I couldn't even imagine in my wildest dreams the abominations that I have to support.

Steve on July 22, 2009 9:31 AM

Not all developers write shitty code. I think your sample data is a bit sparse/specific. I certainly can't say my code is the worst I've seen (in a given time period).

tim on July 22, 2009 9:36 AM

It is only natural to hate your own code from 5 years ago. Reason being is that you get better as time goes by...hopefully.

whocares on July 22, 2009 9:39 AM

So true.

It's empowering to know that it's the software that sucks and not me (the user). I frequently have to explain to friends and family that it's not their fault when they don't understand something. I tell them that it's the designer/programmer how is at fault by making a crappy piece of software. (I credit Donald Norman for that piece of advise).

Benedict on July 22, 2009 9:43 AM

I actually laughed out loud when I read about your dream.

"That is the good version" lol

Dean Nolan on July 22, 2009 9:44 AM

I'm much much more relaxed when installing and testing new software since I'm using virtual machines. Just don't forget to make a snapshot first (not with your new camera)...

Secure on July 22, 2009 9:49 AM

That digital camera software would probably also run on startup, obviously it must be the first thing you want to use everytime you switch on your computer :)

I hate software with a passion!!

pete on July 22, 2009 9:55 AM

I hate my software, but my interfaces tend to be better than most.

Seriously. It's not just my opinion either. Other people like them too.

It is, however, so good that they can't see the underlying code which is a stinking cesspool of loose ends, failed ideas and blathering comments better left unsaid.

ThatGuyInTheBack on July 22, 2009 9:56 AM

One cannot be more contemptuous than against one's self...

Mac on July 22, 2009 9:58 AM

"In short, I hate software -- most of all and especially my own"

Don't worry Jeff we all hate your software. Only kidding :)

pete on July 22, 2009 10:02 AM

Any software that is needed for a camera to work with a computer via a standard usb connection really should be on the camera itself (and really shouldn't be needed for most of them) ;-)
This way you can plug the camera into *any* computer & use it!

Maybe the camera should come with recommendations of photo editing software, preferably freely downloadable stuff

--

The worst code I've seen recently is *partially* mine & what it's supposed to do has been rather warped ;-)

--

@Benedict
I think designers/programmers usually just need to explain what it's supposed to be more clearly, it's often a misunderstanding of how the software's expected to be used (ie unclear/unfamiliar interfaces)

imma on July 22, 2009 10:03 AM

You said "Any modern operating system (and even Windows XP!) can see and automatically download pictures from a new digital camera."

Well, this is not always true. At least my Canon EOS 350D DSLR is not being detected by Windows XP without WIA driver because it does not support Mass Storage Device.

panuta on July 22, 2009 10:04 AM

I've worked with one particular horrible terrible programmer, that I can no longer look at my code and see it as bad. Don't get me wrong, I go back to some old code, and wonder what I was thinking, but even then I can see proper structure and proper algorithms and know it's better than that guy's code will ever be. I can't decide if by working with him I am better or worse, or if I have seen the worst and try my hardest to not be like that.

Anonymous on July 22, 2009 10:04 AM

Jeff, you're damn right.

Fede

Federico on July 22, 2009 10:07 AM

Sorry Jeff, but if I went to an interview and told them the worst code I had seen was my own, I don't think I'd be getting a job there!

Tim Gradwell on July 22, 2009 10:08 AM

I look at code I wrote anytime over 6 months ago and I freak out. What was I thinking!! Right now it's "Look at all of this polymorphism! Holy Crap, I could have done the same thing with a while loop and a sentinel, and it would have been so much easier to read!"
The bandwagon is not always a good place to be.

Mark on July 22, 2009 10:11 AM

More comments»

The comments to this entry are closed.