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?
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.
| [advertisement] Interested in agile? See how a world-leading software vendor is practicing agile. |
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 6:51 AMYeah sure, my code IS bad. But really, I've seen much worse :)
It's not stopping me from hating my code though...
I am first? At once?
Sorry for silly comment...
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 7:03 AMI 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 7:08 AMHave 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 7:11 AMMy 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 7:12 AMI 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 July 22, 2009 7:12 AMIt'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 7:12 AMAbout 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 7: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 7:17 AMI 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 7: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.
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 7:21 AMI 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 7:21 AMDisclaimer: 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 7:22 AMWell, 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 7:22 AMHere 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 7:23 AMI 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 7:23 AMI *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 7:28 AMHP 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 7:36 AM@mgb Barry can't run Picasa. He's got a Mac. Poor Barry...
Sea Cat on July 22, 2009 7:37 AMCan'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 7:41 AMThis post made me nod so hard that my head nearly fell off.
Ohai on July 22, 2009 7:41 AMI 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 7:42 AMWell, 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 7:43 AMHmm, 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.
> 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 7:47 AMI 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.
manchester lunged
fred on July 22, 2009 7:51 AMI 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 7:53 AMCan 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.
Are you depressed?
psychologist on July 22, 2009 7:56 AMBeautiful and true :-)
Matt on July 22, 2009 7:57 AMYou 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 7:57 AMI don't hate my code. But I'm always suspicious that it's rubbish.
Durkin on July 22, 2009 8:01 AMI 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 8:01 AMAmen!
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.
@Sea Cat: What's this then? http://picasa.google.com/mac/
Vald on July 22, 2009 8:04 AMI 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 July 22, 2009 8:05 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 8:09 AMAll 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 July 22, 2009 8:09 AMIf 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 8:11 AMSoftware 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 8:12 AMThe 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 8:13 AMIf 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 8:14 AMThe 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 8: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 8:19 AMBeautifully 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 8:20 AMI'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 8:20 AMNice 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 8:24 AMWhy don't you just have AutoRun turned off?
RalphB on July 22, 2009 8:25 AMI 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 8:25 AMWhen 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 8:27 AMJeff, 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.
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 8:31 AMSorry, 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 8:31 AMNot 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 8: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 8:39 AMSo 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 8:43 AMI actually laughed out loud when I read about your dream.
"That is the good version" lol
Dean Nolan on July 22, 2009 8:44 AMI 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 July 22, 2009 8:49 AMI'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 8:49 AMThat 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 8:55 AMI 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 8:56 AMBtw, 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 July 22, 2009 8:56 AMOne cannot be more contemptuous than against one's self...
Mac on July 22, 2009 8: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 9:02 AMAny 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)
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 9:04 AMJeff, you're damn right.
Fede
Federico on July 22, 2009 9:07 AMSorry 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 9:08 AMI 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.
Thank you for using the term "Sausage Factory"
Broham on July 22, 2009 9:14 AMSorry, but my answer to "what's the worst code you've seen recently" will probably always be "this code we got from an Indian company we outsourced a project to."
My code may not be great, but I've definitely seen worse...
Telos on July 22, 2009 9:18 AM
Great article.
I think your use of the word hate is stretching it too far. Sure, we dislike our code and want to improve it all the time. But there needs to be some motivation to improve our code and that can't start with hate!
Rohan Almeida on July 22, 2009 9:22 AMAddendum,
In the begging there was the CRT. And it sucked. And its interface sucked, and its command line driven software sucked. And it's 1, 2, 3, A, B, C menus sucked.
And the Xerox said; "There has to be a better way."
And it gave birth to the mouse. And behold the mouse begat the GUI and the GUI was stolen by Apple. And Xerox said nothing.
Then Apple gave birth to Lisa. And Lisa was expensive. Too expensive.
Then Apple gave birth to the Macintosh. And the Macintosh was pretty and cute and far more powerful than a PC but similar to a Ferrari with a 2 gallon gas tank. And it was still expensive. And it needed its mother; Lisa for only Lisa could begat the Mac's GUI. And only Apple certified priest of programming with Lisa at their side could breathe life into the Macintosh.
And the GUI was simple, easy to use and intuitive.
Then, the evil god in the Northwest, not content with 90% of the PC market, was determined to undermine everything the GUI had stood for...
An evil spell came upon the land, Windows...
Windows 1, like the early terminators in the rubber suits it stood no chance.
Windows 2, better than Windows 1 but still no cigar.
Meanwhile, the minions at Apple finally came to realize that they need other developers so third parties first and then, Apple released compilers so that the 'other' programmers could write the GUI for the Mac.
The evil kingdom was hard at work and finally, Windows 3 was release.
And all those enslaved to DOS shouted HALLELUHA; we have been saved by Windows 3's GUI not realizing that it was just a fancy facade.
But this was the beginning of the GUI's downward spiral into 'the Abyss' of user confusion and malcontent.
As Windows popularity increased it seemed certain that the Macintosh would be forever banished to a faraway place, the niche market.
And, as Windows market place grew, so did its software base, a little good and a whole lot of bad.
And the users were confused. And the users were frustrated. And the user's managers were in denial.
And, like a virus, Windows morphed:
Windows 95
Windows 98
Windows Millennium
Windows ME
Windows 2000
Windows XP
Windows XP Service Pack 1
Windows XP Service Pack 2
Windows XP Service Pack 3
Windows Vista
Windows XP Seven
Each being touted as an 'improvement' over its predecessors, except Vista.
Not only did Windows morph, but both Microsoft's and third party software morphed as well. Like the infamous Ribbon in Office 7.
And the users were even more confused.
And IT said 'No one ever got fired for buying Microsoft...'
And Apple was saved by the music.
I think its healthy to be critical of one's code, but if you hate your code and think it to be the worst you've ever seen that seems self-defeating.
I follow a rapid iterative development process, so if I find terrible code I wrote I iterate over it and clean it up, and next week when its still terrible I clean it up some more, and after a few months working on a project I'm normally pretty happy with the majority of my code.
Never be afraid to refactor, refactor the crap out of your code, if you break other code, well good that code was probably awkward and stupid because of your other ugly code.
In general I like my code, I've worked in enterprise software long enough to have seen far worse, and I think I've side stepped the "rockstar code god" complex that the other side of the spectrum falls into.
My code is no where near perfect, but it is not the worse.
Matt Nowack on July 22, 2009 9:26 AM99.9% of the time the prepackaged software that comes with hardware is utterly useless or broken, however, I was pleasantly surprised by the software that came with my new Seagate hard drive. It was easy to use and did everything it said it would without and problems. For the first time in my life I was impressed with a piece of software that came with a hardware purchase.
Billkamm on July 22, 2009 9:35 AMVery well written post!
Anonymous on July 22, 2009 9:37 AMNot only I don't hate my code, but I love it, no matter how crappy it is. It is this love what keeps me trying to improve it everytime I can.
I don't think a hate attitude for something makes you actually a "good" anything.
The fact that you love your code doesn't mean you think it's perfect, the same way you can love other people even if they are not exactly the way you want (maybe an exaggerated analogy!). Being happy with what you do is not a mediocre attitude, if your happiness comes from the fact that you know you did your best.
Alejandro on July 22, 2009 9:39 AMSorry Mac, all OS's suck. All of them, no exceptions. Where is my copy of XTree Gold??
Mark on July 22, 2009 9:43 AMIn a former life I worked on cars; crashed cars. We would call ourselves "hacks" as a right of passage (good frame straightening techs are years in the making). Anyone who wouldn't call them self a hack, was really a hack 95% of the time. I find the same for software developers.
Don on July 22, 2009 9:45 AMI am not sure if what you say is entirely helpful. The problem is that you make people feel good about the bad code they write because all the great programmers think their code sucks too.
So if I think my code sucks, I must be not so bad after all. I believe self-critisism is very important but as the saying goes (translated from german): "If my reputation is already ruined I can continue freely w/o any shame".
What you are suggesting is collectively ruining our self respect as progerammers, but as a consequence we might just continue to write w/o respect for our own code and not even feel guilty about it.
Manu on July 22, 2009 9:49 AMYou can't really hate something with a passion until you have truly loved it first. It is true of divorce, it is true of software development.
Andy Lumb on July 22, 2009 10:01 AMOMG Jeff! Nail meet head.
This makes the top 5 right next to "Cleaning Your Display and Keyboard".
I /hate/ installing software. Thank god for VM's to at least test all those nice fresh steaming piles.
For the most part I agree but I really like Canon's ZoomBrowser software.
d on July 22, 2009 10:13 AMThis post ranks right up there with your May 12th 2008 post on people who touch monitors. Good stuff.
TheGeoff on July 22, 2009 10:19 AMI haven't coded any code in a while now. I've reviewed several projects, so the worst I've seen lately hasn't been my own. It is right up there with the worst I've EVER seen though. I looked back at some coding I did my first couple years out here in the wild. Embarrasing to say it had my initials by it.
Cory A. on July 22, 2009 10:20 AMI often curse my past self with vast invective, but I'm still not the worst coder it's my misfortune to maintain code for. I worked with this one guy who looooooved complexity for its own sake but wasn't a big fan of comments. Or doing things the same way twice. Suck.
I nearly wept when I used Google's Picasa for the first time because I knew that my very best code would never be half so useful, pleasant and intuitive.
The only thing worse than knowing ur doin' it wrong is knowing that it is POSSIBLE (if very hard) to do it right.
Brenda on July 22, 2009 10:21 AMThis goes a long way to explaining why software developers are so opposed to electronic voting systems.
Mike on July 22, 2009 10:22 AMvvvvvvvvvv
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
^^^^^^^^^^
...they clearly don't read TheDailyWTF.
My code tends to actually compile and run, and do more-or-less what it's supposed to do most of the time, and be fairly comprehensible with a bit of effort. So while it may not be all that good in an absolute sense, it's still way better than a lot of other code that I've seen out there.
Tim on July 22, 2009 10:23 AMYou are absolutely correct, Jeff, yours IS the worst code I've ever seen.
Martin on July 22, 2009 10:23 AMerr, "...they just might read TheDailyWTF". Or they might be not answering because they forgot their coffee and fell asleep.
Tim on July 22, 2009 10:25 AMI can't say that I *hate* my own code. I've been EMBARASSED by my own code because I know I can do better. Sometimes circumstances required a 'compromise' and I'd comment the heck out of the code with the intent of coming back and 'fixing' things - but we all know how often we get to do that.
But *hating* code? No, I've seen code so far beyond god-awful that it boggles the mind. It's THAT level of 'badness' that I reserve the 'hate' emotion for.
David on July 22, 2009 10:27 AMI am a programmer, and I love software... I love all this free software I have found over the years, making my life easier, not getting in the way. The CLCL clipboard manager, the Flexible Renamer, the VirtuaWin, the BareGrep, etc. Of course, they are not perfect, sometime even buggy, some are almost abandonware, but hey, they get the job done, they are lightweight, here when I need them. In the case of my favorite editor (SciTE), I even helped in getting the features I wanted...
Now, indeed, software can be irritating, too big for their purpose (more later), slow, missing some feature essential for me, or just some ergonomic facilities, etc.
And my code is far from perfect, particularly the one I wrote some years ago (starting both in Java and OO, in particular!).
But hey, I try and improve. And if still not perfect, I don't necessarily shot it down.
I agree with you on software coming with hardware. In France, Orange ships a CD with their ADSL box. A must avoid, even their technicians agree! The box has an IP address allowing all necessary management, yet they provide a bloated software, sure with a nice face (skinning) but totally on the way: I had to fight it on some friend's computers...
Skinning seems to be the rage, the excuse for bad ergonomics. 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.
I won't say for my numeric cameras as I didn't even installed their software... But I see complete paper manuals are out of fashion, you have to load the CD to access the full menu description! (while getting hundred of paper pages... in foreign languages! The joys of packaging.)
Software is hard to do. Good ergonomics are even harder, and too often designed by programmers, not by competent people.
I do such designs, but at least liking software, I vaguely know some things about what is good and what is not.
Ok, wait.
programmerHatesOwnSoftware != everythingElseIsCrap
These two statements are wholly incompatible, yet Jeff hawks both of them in this post...
Not sure today's post is a healthy attitude.
Rick Cabral on July 22, 2009 10:29 AMAh, the old crappy software bundled with your new hardware! Great!
A bunch of stuff came with an external hard drive that I just got recently. 3 of the pieces of software were to help with backing up, and the other 2 were things from Google. :|
The craplets that you find on commercial desktop computers are one of the key reasons I won't buy one. That, and the proprietary hardware of questionable quality. They are just too easy to build on my own.
Though I've written some code that I really didn't like, I can't say that I hate any of it. If anything, I'm more often disappointed that the design was less than stellar, or that I had to implement hacks for whatever reason to complete the work. But even the worst (IMHO) I've written was not the worst code that I've seen. That prize goes to a complex inline calculation that was duplicated 6 times in the same program.
Craig Boland on July 22, 2009 10:44 AMAre you *sure* you stopped that CD before it splattered junk into the registry!?
Chris Noe on July 22, 2009 10:45 AMI always want to believe that my current code doesn't suck, but always looking back on a project or piece of code written 6, 3, or even 1 month ago always leads to eye-rolling and muttered cursing.
I think the biggest mistake we could ever make is thinking that what we are writing right now is perfect and "bugless".
BJ Neilsen on July 22, 2009 10:46 AMI'd agree - if the worst code you've ever seen isn't your own, then you're not looking at your own code closely enough. My code is easily the worst I've ever seen.
And then I fixed it.
A Gould on July 22, 2009 10:57 AMReferencing this:
>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
Maybe it's not your code that sucks, but your process. You need to get yourself some usability/user-centered design/user experience (pick your flavor) folks! (or pass your app by a customer before you ship it....)
Mike Moroze on July 22, 2009 10:57 AM"Professional" developers working in development organizations seldom get rewarded for avoiding writing software. The entire incentive process for developers typically encourages them to churn out code whether or not it's the right code, or even necessary code. It's another form of measurement dysfunction a.k.a. perverse incentive or incentive distortion.
Chip Overclock on July 22, 2009 11:06 AMMy response to you jumping across the room to stop your wife from installing software: Don't be cheap! Get her a computer of her own. I did that and I've never been happier :)
Paul Hobart on July 22, 2009 11:07 AMI think part of the problem here is that "code quality" can be very subjective. For instance: is it "good" to have hard-nosed exception handling for even simple operations, even though it might clutter up your code? Or should you err on the side of readability and just throw the exception back up the stack? The answer usually varies depending on whether you're maintaining the function in question or just using it.
Quality measure also varies with context, language, etc. I've written some pretty heinous stuff before, with lots of nested data structures and other fun things, and I'm hardly proud of it (though the end result worked pretty well). But is bad code still bad if it was the best approach given the circumstances?
Sometimes the basic issue is a reverse of the old saying: if every problem is a nail, all your tools start to look like hammers.
Justice on July 22, 2009 11:11 AMplease, tech bloggers, stop referring to the conception and birth of your beloved children in terms of computer jargon.
haha. captcha: new mistake
sensibility on July 22, 2009 11:15 AMAs web developer, I'm absolutly agree with Jeff.
I noticed that almost any project I found in my career is totally a crap. When I see an online catalog, my brain says "pretty sure it is outdated", when I see a searchbox I think "sure they didn't index all the site", when a web ask me for personal data, I inmediatly think "probably they are going to store it in a plain text file". Why? Becouse a lot of web projects (including my ones!) do that sort of things. And probability laws says that the web you are facing to, probably is doing that sort of nasty things.
Kent Mentolado on July 22, 2009 11:16 AMI 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.
I think that's why it's so impressive when you get a nice piece of software, like FireFox or Picasa, that just really excels. Most Mac programs also seem to be a cut above all the windows software out there.
Jeff Lorenzini on July 22, 2009 11:28 AMThe converse of this is that when I stumble upon really good software, I appreciate it more than others, because I know how hard it is to create.
Trieu on July 22, 2009 11:36 AM@Andy Lumb - "You can't really hate something with a passion until you have truly loved it first."
So true. We hate it because we care. It's hard not to be a critic when you're passionate about a given subject, and programmers aren't the only ones who do this. I used to know these two guys in film/tv production and I found it was impossible to watch a movie with them because they'd spend the whole time critiquing the production values - it was all "good panning this" and "bad lighting that". They just didn't experience a movie the same way others did and I think we do the same with software. Sort of like a magician may appreciate a good illusion, but for entirely different reasons than you or I.
Chucklehead on July 22, 2009 11:38 AMAgree: Jeff Atwoods code is the worst i've seen yet. Looks likes he hates software eng. and just hacks.
Oh.. and give yourwife a chance for easier software. YOu have no idea how much about imageing hardware manufactures like Canon know and how much software is *within* a simple camera.
So it's okay when you lie art us. but are you also lying to yourself (i remember your post on getting hyped by iphone software....)
offler on July 22, 2009 11:42 AMOh.. i'm often surprised when looking at old code o mine how good it is working, and for how many more things something can be used. Even surprised that i thought of thigns an conditions which come on handy a few years after.
But i do engeneering before writting code. Maybe that is the difference?
thrawn on July 22, 2009 11:48 AMThe problem isn't hating your code vs. loving some other site more. As several have mention before this post in not the same words is you know all the details of your code they come in like a flood when you use it. You think of improvements and wish to do it over again. IF you get another chance, you have to decide whether to start from scratch or evolve it some more.
Jim on July 22, 2009 11:49 AMJeff -
Failure is concomitant (unfortunately) with the human condition. Recognition of that may cause your elders to snicker in their beards (welcome the real world). But if you're unhappy with your work, perhaps it's time to find something else to keep the family fed.
I've been quite happy (and dismayed) something I wrote (over the proverbial weekend) is still running 12 years later. I looked at the source code a few months ago and was appalled. Now I'm afraid to touch it.
- Lepto
Lepto Spirosis on July 22, 2009 11:51 AMReviewed code from indian developers. And I can really say:
If i can get drunk far over limit, so drunk that i cannot drive or think clearly, I think i could produce better code. Heck I had a review on code that had no change to even compile. Far away from doing stuff. A bit of copy and paste without the knowledge for what the parts which were copied are for. Instanciated variables which are never used. Exactly the same 8not working) function copied in different classes.
The review was succesful in one thing: One of the developers never asked me a question again....
sunfire on July 22, 2009 11:58 AMI think the lack of quality programmers can be boiled down to two things:
1) The constant push for shiny new technologies and hoards of new features without the discipline (or time) to understand any of them deeply. Where I work, we are using .NET 4.0 beta. And no one understands .NET 3.x very well at all yet. But 4.0 is the Big New Thing, so we have to use it.
2) A general disagreement on what good quality software is. The software "generational gap" brought on by the tendency of developers to stick to development principles they learned early in their career causes friction between generations. The New Blood thinks TDD produces good software, but the Old Guard insists otherwise.
Just my $0.02.
ncloud on July 22, 2009 12:05 PMWow. You're software must really suck.
Gerry The Bastard on July 22, 2009 12:13 PMOkay, I maybe don't write good software but sure I do write a lot better than my boss. When I try to explain something I can see in his eyes how his head starts to hurt and how badly he's longing for a soothing long drink.
It's the same with all professions - I have a friend who is a gym teacher - he now hates gym and children, talk about coincidence. Keep going long enough in all professions and you will soon hate everything in it!!
But isn't that a very pessimistic way of seeing things? How many times have you been excited about some new software? Sure is a couple of times!!
How true this is. In the past I always avoid using information systems of internet shops just because I knew how faulty they could be
schizoid on July 22, 2009 12:20 PMself-loathing day, Jeff?
securityhorror on July 22, 2009 12:34 PMI don't agree about the "worst code" = "my own". Because, unless you think you have a solution that is at least marginally better than the previous guy's, you should refrain from touching the keyboard.
Marc on July 22, 2009 12:37 PMWell. I can write pretty code, or I can write useful software.
I've seen pretty code, and well, it tends to not be very useful.
Practicality on July 22, 2009 12:38 PMThat's pretty narrow-minded, Jeff. While one shouldn't think their code is above reproach and it doesn't have bugs, it's hardly logical to think you should end an interview because someone doesn't want to devalue their programming in the interview, or they think the absolutely horrible broken code on the Daily WTF is worse.
leetdood on July 22, 2009 12:49 PMGreat post.
One word came to mind as I read this post..."Sony"
Worst software developers on earth, judging by every piece of firmware or software included with one of their devices.
JohnFx on July 22, 2009 12:51 PMI 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!"
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 1:13 PMMy 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 1:17 PMYou 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 1:27 PMSorry, 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 1:31 PMYou 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 1:31 PMI 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 1:34 PMIn 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 1:45 PMAs 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 July 22, 2009 2:02 PMI'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.
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 3:26 PMRE:
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 3:50 PMMr. Frank, this software will address problems you never had!
nervokid on July 22, 2009 3:51 PMExample .. 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 4:01 PMBTW - 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 4:02 PMThis 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 4:06 PMThis 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 4:11 PMThe 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 4:57 PMIt 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 5:28 PMThe 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 5:41 PMHehe, 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 5:49 PMI 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 5:55 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 July 22, 2009 5:57 PMI 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 5:57 PM"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!
holy crap, that was the funniest thing i have read all week. your dreams are hilarious
abel on July 22, 2009 6:06 PM@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 6:33 PMSoftware 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.
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 6:59 PMI 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 7:39 PM@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 7:56 PMI 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 8:02 PM"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_.
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 9:04 PMI got angry too and decided to write my own personal blog to complain.
But Google wasn't built in a day. Writing software doesn't suck so much when you're on a good team that's sitting down and working together.
Steve on July 22, 2009 9:13 PMQuote: If the worst code you've seen recently is yours, then you haven't been reading many questions on StackOverflow.
Well, that's true. There are some real shockers to be found there. But I'm doing my bit to help -- my rating is all the way up to 76!!! That's almost 0.1% as high as the top guy!!!!!!!!!!!!!(ad nauseum)
well ive been working in an older website written in asp, old school asp in vscript, heres a few things that have struck my attention
- vbscript as a language has unacceptably large issues, scope is broken, explicit declarations is broken, objects are barebones, includes cannot be conditional etc etc ... but worst of all...
-ive seen variables initialised in a file and then dimensioned (declared) in another included file (as a way of passing variables to code)
- implicit html generation
- ive seen code weaving between 3 files backwards and forwards, declaring variables in one file, then using them in the next subroutine asif ... and all so casually, with no attempt to have any code structure.
- vbscript and html written inbetween each other without any structure, just a giant page of garble
- unbelievably bad logic flows, like ifs and elses written plain wrong, like ill delete parts of it because im so sure its unecessary, only to find that it was necessary for a use case the comes from another file completely at random and even though the functionality is completely different
- absolutely no commenting
- code replication .. same function over and over and over ...
its quite funny how bad the code is ... I dont think I could write it that bad
Although to be fair, my 3am coding attempts are pretty WTF the next morning when i wake up
mordy on July 22, 2009 10:05 PM@Eoghan - "Would you fly in a plane that was reliant on software you'd written to stay in the air?"
It depends. How much time did I spend writing it, and how well did I understand what it had to do?
I'm not a slacker, but if you give me an impossible deadline and tell me to cut corners, I'll cut corners and anything else that gets in my way. Why? Because you're the one ultimately responsible, not me. Just following orders, boss.
Do I like doing it this way? No. I'm a professional, and I'll do the best I can under the circumstances. But if you don't know the difference between professional and amateur quality, and you're paying me the same either way, or worse, screwing me over if I act professional, then I think you get what you deserve.
alt on July 22, 2009 10:19 PMYou're right, that cd is full of old drivers and crappy software. good instinct.
But... turn off autoplay, already!
mango on July 22, 2009 10:43 PMMaybe this explains why it's so hard to make yourself test the stuff.
Joe Landau on July 22, 2009 10:57 PMThere's nothing wrong with rounded corners.
There's nothing wrong with new hardware.
Well, software is a little more complex that it appears eh. It's always easy to be 10% done. Heck it's easy to get to 90%. It's always that last 10% that takes just as long as the first 90% of the effort.
One peeve is all software has to work for all permutations all the time. Despite "standards" people write different browsers, and some changes in a library break other stuff.
It happens with browser, with java, and with anything that decides to do something based on capabilities. We never win.
Another is how much effort goes into such mundane tasks, and how none of it is really fast. I have to jump through so many hoops to do really simple things. UI / database. Every week some mook has a new framework idea, except it's half-assed. Every week Microsoft brings out another new data access framework. While I applaud their effort, a new team gets to 90%.
My favourite computer is the xbox / playstation. They're not moving targets once they've been released. If all computers were like that we'd all be better off. Turn on and it works. I haven't played a game on a pc for over 5 years.
Maybe everything should be scripted / JIT'd. Should we outlaw compilers?
Bender on July 22, 2009 11:27 PMSeems like the guy who wrote this article is forgetting a notable thing: that software has become so complex, that it is going to have a few bugs in it.
Now, yes, some of the software that comes with printers, digital cameras, etc. IS unnecessary (save for the driver itself).... but I cannot really blame the hardware manufacturers because someone, somewhere had to have ASKED for this type of software to be included with the camera.
Personally, I would NOT 'nearly take out a cat' just to stop someone from installing something on one of my computers.... seems like putting the cart before the horse doing that.
Christopher on July 22, 2009 11:33 PMIt also seems that he is hating on software when most times, software installs without any problems. Let's face it: without software, our computers wouldn't be able to do anything, so we should not be hating on software and secondly, you should NOT hate your own code. If you have done the coding to the best of your abilities.... love your code, because you have done the damned best with it that you can and you know that you have!
If someone else finds problems with it, tell them "Hey, did it to the damned best of my abilities, so I won't apologize for it! You think you can do it better.... do it yourself!"
I have honestly told people that MANY times in my life, and they usually say "Oh NONONONONONONONONONONO!" because they know that they couldn't do any better when it comes down to it.
I get grumpy with my wife too - normally when she stacks the dishwasher wrong.
Andrew on July 23, 2009 12:23 AMLet 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.
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 12:46 AMAmong the people who hate their code are the ones who don't stop trying to improve.
These are the ones that you want to hire as long as they are smart enough to be successful.
I was with you all the way until the last point. Sorry but i have seen code written by others that was so bad i know its worse than anything I've done. I'm talking about seriously scare stuff.
Kai on July 23, 2009 1:11 AMI strongly disagree with the interview question. I've worked software maintenance for almost a decade now, for three different companies, and from day #1, the code I've seen has curled my toenails. I've written code that bad when I was *twelve*, fer cryin' out loud. If I'd *ever* write code that bad, I'd probably quit and get a job as lorry driver or something. Yes, I hate software the same way you do, Jeff. I'd probably have risked the cat, too, to save myself from having to reinstall my wife's computer afterwards. But does the fact that I've always strived to get better, as opposed to the bastiches who commited the crimes-in-code I have to work with all day, make me an instand interview-fail in your eyes?
DevSolar on July 23, 2009 1:46 AM"Q: What is the most often-overlooked risk in software engineering?
A: Incompetent programmers."
NO! INCOMPETENT MANAGERS!
Who hired these incompetent programmers. It is said that interviewers tend to hire people very much like themselves. Incompetent managers are the real risk. By definition a manager has more control over the software development process - if there is one - than one programmer, so the risk is greater.
It is fitting that this article come just after the 'Software Engineering: Dead' one.
I'm never satisfied with the software engineering work I produce or the code I have written.
Mr Atwood, again you are writing before you think. To say that you would would cut short an interview with an interviewee if they did not answer the question as you suggest indicates that you are, or will be one of those managers that are THE risk to software engineering.
Or did you write that for dramatic effect? Either way, try to curb these urges!
Sam on July 23, 2009 2:08 AMWhile I agree that my code sucks, it's quite far from the worst code I've seen. It's also better than most code I've recently seen. It's also much better than my code from one year ago, which I had to go back to last week.
So if you aks me: "What's the worst code you've seen recently?" my answer will not be "My own".
Oh, and by the way: You should hire me. I'm that good. Really. ;-)
Treb on July 23, 2009 2:18 AM@C.M.
>> 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.
I hear this argument for Open Source all the time, but let me ask you ; have you actually ever fixed a bug in some Open Source-application that you were using ?
Darren on July 23, 2009 3:06 AMI disagree. I consider myself and most (not all) of my colleagues to be competent programmers, some of them are really really great. What's more, I work for a company that prides itself on hiring the best talent available (this posting doesn't represent my company so I won't mention their name).
With all this in mind, while it is true that there is some correlation between how good a dev is and how careful they are about managing their environment, I couldn't honestly say that any of them *hate* software.
In line with that argument, I find it offensive that you're essentially calling myself and all my colleagues incompetent, simply because that isn't true.
You're also oversimplifying interviews greatly by claiming its possible to distinguish a good programmer from a bad one by that simple question - I would not ever want to work for you, because I could never be honest about the state of the code in source control?
I think you would do well to start respecting yourself and your trade.
Johan on July 23, 2009 4:43 AMI disagree. I consider myself and most (not all) of my colleagues to be competent programmers, some of them are really really great. What's more, I work for a company that prides itself on hiring the best talent available (this posting doesn't represent my company so I won't mention their name).
With all this in mind, while it is true that there is some correlation between how good a dev is and how careful they are about managing their environment, I couldn't honestly say that any of them *hate* software.
In line with that argument, I find it disrespectful and offensive that you're essentially calling myself and all my colleagues incompetent, simply because it isn't true.
You're also oversimplifying interviews greatly by claiming its possible to distinguish a good programmer from a bad one by that simple question - I would not ever want to work for you, because I could never be honest about the state of the code in source control?
I think you would do well to start respecting yourself and your trade.
Johan on July 23, 2009 4:45 AMJeff is right, and HP are a serious offender - why on earth do you need more software to go with a printer when the printer is natively supported by your operating system? Nokia spent years shipping annoying little Windows only software clients to go with the annoying nonstandard cables, until quite recently they realised that the sensible option was to make the phone mount as a USB flash drive when you hooked it up.
And the hatred. it is good!
Alex on July 23, 2009 4:56 AMOn the subject of how much developers hate software more than the layman, I find this is a complicated issue.
On one hand, I can really hate some software because it it has trivial faults, and I know how easy it would be to fix them, whereas someone outside the proffesion will simply not see the problem. They assume that's how software works and don't know any better.
On the other hand, I can get quite defensive of software that outsiders are abusing because it doesn't work the way they expect. I understand the limitations of software, and how to figure out the correct way of using it, and alos how to get rid of it if it doesn't work. Therefore, I find I'm more willing to install software than a non-programmer.
Phenwoods on July 23, 2009 5:03 AMThis is so awesome because now I have a great answer for such an interview question.
Q: What's the worst code you've seen recently?
A: Jeff Atwood's.
Captcha: "Ross melts." Poor Ross
Dan on July 23, 2009 5:38 AM@ Darren:
> let me ask you ; have you actually ever fixed a bug in
> some Open Source-application that you were using ?
Actually, yes I have - I submitted a patch to Boost that made it compile correctly on AIX using the IBM compiler (which it didn't since 1.33 at least).
But I admit that was the first, and very likely only, occasion.
DevSolar on July 23, 2009 5:46 AMI am not proud of all the code I have written so far. I thought I was worst programmer that there can every be, but I have come across some nice well formatted, structured,following coding conventions/standards etc, but still their code is worst. On the other hand I have come across code that is very haphazardly written code, but great code, code copied form the net and used after some modifications. Maintaining such code is a nightmare, its like you more bad code to the already existing code, to make the new code work with the existing one you have to follow the same path. Trying to fit proper code with bad code is a nightmare, because you have to first repair the badly written code and then continue with the new code which is easier said than done.
AnandVVN on July 23, 2009 5:46 AMAmen. 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 July 23, 2009 5:57 AMI totaly agree with you!! This is so true!
You should see how many programmers we have at my workplace, and how many we need more! ; )
Any modern operating system (and even Windows XP!) can see and automatically download pictures from a new digital camera.
As others have said, this isn't true. You *do* need software to read RAW format of camera manufacturers. The software that comes with the cameras tends to suck, though, so you're right on that front. You can use something as simple as Picasa to read the RAW files, or as sophisticated as Apple's Aperture, or Adobe's Camera RAW or Lightroom. I prefer Lightroom.
Seinberg on July 23, 2009 6:08 AMCertainly my code is bad, but I try not to make it the worst I've seen :)
Pandermander on July 23, 2009 6:35 AMActually, Canon's bundled software is excellent; I wish my Olympus had come with something nearly as good. You won't find out by not trying it though, so keep a VM instance handy.
Louis-Eric on July 23, 2009 6:55 AMI feel like it is fair to say that if anyone hates software more than software developers, it is compiler developers. Or, in my case (and even worse for it), JIT compiler developers. (for Bender's comment: JITing is, by definition, more error-prone than static compilation)
Developing a huge optimizing compiler that must support every paradigm, every corner case, every programmer blunder, every silly hack and convert them all into well-performing machine code that plays well together in a minimum amount of time, in a minimum amount of space can be exceedingly stressful.
On top of all that? We still have the same problems with bugs and bad programming (albeit, commercial compiler developers tend to be slightly more selective in their hiring process. Just not by much).
If software developers find it difficult to deal with users who complain: "This function is broken." or "This program crashes when I do this.", then imagine compiler developers getting flack from SOFTWARE DEVELOPERS saying: "This program always worked on the last version of the compiler." or "We were able to compile on compiler X, why can't I get it working on your compiler to get better performance?"
Jeremy on July 23, 2009 6:57 AMPoint number 2 is completely false and your argument for it proves that. If that camera company is so great at making cameras, then the embedded software on the camera must be great as well. Pretty much every digital device these days has a microcontroller or something like that in it.
Devin on July 23, 2009 7:06 AMWow that is so true! finally a really nice story worth reading :)
alexandrojv on July 23, 2009 7:45 AMContradiction. Didn't you just say that only competent programmers hate their own code while calling yourself incompetent because you think your own code is so bad?
Interesting article by the way. Love the quote about a bad programmer creating more jobs. I couldn't agree with that more. How about a programmer reading your site what he/she should be working?:)
loyalBrrown on July 23, 2009 8:07 AMI'm glad many people mentionned the Canon image Browser! I normally never install the CD, but once I installed the Canon one I realized it was quite good, and provided the basic RAW processing I needed. I use Lightroom now, but really the bundled Canon stuff was enough for me. I seem to recall there was some stitching software, too.
However, the Canon software was unnecessary and not very up to standards on the Mac.
Ulric on July 23, 2009 10:21 AMMy code is perfect cause I'm perfect. I love my code! I love mysleft!
You, yes youuu, you can admire me!!!
Ouuuuuuhhh yeahhh!
Also, nobody hates software blogs more than software developers. ;-)
("total dustbins," agrees ReCAPTCHA.)
Shmork on July 23, 2009 11:07 AMHey, it's good to see I'm not the only one who thinks his own software sucks.
The biggest and most problematic project I made is the most hated by me, at the end it worked but I think it's code was horrible... Argh! Only think about it makes me angry!! >_<
Darth T on July 23, 2009 11:35 AMAs several have already said, TheDailyWTF (Formerly known as Worse Than Failure) harbors actual horrible code. I visit it almost every day, so my answer will never be "my own"...
Izkata on July 23, 2009 11:51 AMI just hate those lazy manufacturers that load tons of freeware on their CD installation disks. Most of it is downright dangerious to your pc system. If I want this garbage I can get it off the Internet, too.
fxp on July 23, 2009 12:14 PM@Phenwoods:
"On one hand, I can really hate some software because it it has trivial faults, and I know how easy it would be to fix them, whereas someone outside the proffesion will simply not see the problem. They assume that's how software works and don't know any better."
Exactly. THAT'S what aggravates me about software. I know how easy it is to include the finer touches that could make a "good" piece of software "great", but instead here it is representing my profession with substandard work, and for lack of being dreadful, is held up as the pinnacle of achievement.
The software that has more fundamental problems doesn't raise my ire nearly so much as the could-have-been-greats.
@Devin:
"Point number 2 is completely false and your argument for it proves that. If that camera company is so great at making cameras, then the embedded software on the camera must be great as well. Pretty much every digital device these days has a microcontroller or something like that in it."
There's a world of difference between writing faceless microcontroller logic and a real-world general-purpose CPU and OS application.
Similarly, a great OS X development team will likely build a substandard Windows application, and vice-versa.
Even if you're talking about the user-interfacing bits, there is a fundamental model difference between what you can represent with the limited inputs and outputs of a device's screen and what is expected in an application on an OS, as well as the expectation of interoperability and multitaskability.
In general, when I use software bundled with a device it either:
1. Fails to integrate with the OS nicely (makes itself obtrusive and attempts to take over everything; yes, of course, I booted up my computer therefore I must be wanting to print something or scan in something, HP All-In-One Suite!)
2. Fails due to heavy modality (assumes that nothing on the file system is changing while it is working, or locks up everything so that nothing will change while it is working)
3. Is out of date (drivers are almost always out of date by the time the hardware box is opened!)
4. Is crapware lowest-bidder third-party software included in the box so the hardware manufacturer could put another "feature" on their ad (One year I got four different copies of Adobe PhotoDelux software and two of Adobe Photo Album something or other; all software which no right-minded consumer wanted to buy, but which "sounds good on paper" so for $0.10 per disk gets thrown into the hardware boxes)
The first two are due to firmware-specializing development shops trying to build consumer-grade software; the last is due to corporate bean-counting and consumer gullibility.
IMHO, the amusing thing comes with #3 and #4 collude: I bought a just-shipping Canon camera (and not a cheap one either!) a while back and got in the box a version of Adobe Photoshop Elements which was *THREE FULL VERSIONS* behind what was in the stores at the time. Granted, PS Elements is something I'd maybe pay for, but not a version many years out of date!
Tom Dibble on July 23, 2009 1:14 PM("collude" -> "collide" ... I don't really thing they collude ... )
Tom Dibble on July 23, 2009 1:17 PMMy old boss used to always say "The day you look at code you wrote a year ago and say it is good code, is the day you need to change professions and not program any more" I totally agree with that, the day you stop learning in this field is they day you have lost the passion for writing software (time to become a manager - ha, ha).
I've written code 6 months ago that I look at and see things I can change based on what I have learned since I wrote the code. Any developer that says that code they wrote over 6 months ago is the best it can be are liars.
smehaffie on July 23, 2009 1:26 PMThe problem with a digital camera is that it is a computer.
ProkNBenz on July 23, 2009 2:14 PMThe software that came with my parents digital camera goes so far to actually store the images in a hidden directory (probably a misguided attempt to protect the users from themselves). The only way to access your images is by using this crappy software. To add insult to injury, the sofware does not offer a way to copy the files somewhere else.
Who conceives such crap?
Thomas on July 23, 2009 2:24 PM100% agree with you Jeff. Worst code out there is mine :)
Joe Mo on July 23, 2009 3:00 PMIn an interview? You expect someone to actually say that they are a crap-programmer, which is one possible implication of such a response, in an interview?
I hope that a statistics professor fires off a missive to you, on the topic of getting clean data from surveys.
I agree with the sentiment, and if it is over pizza-and-beer with people who are working in the industry and comparing notes, think you're absolutely right.
But... in an interview?
My meanest question is a bit less awful: "tell me about some technical problem you have recently encountered, worked through, and why it was technically interesting." (It emphasizes communication skills, debugging/trouble-shooting skills, technical perspective, and lets them feel like they're in control as they describe it. It also forces the question, "what did YOU do on the project, as opposed to what did the team do.")
Jeff Bowles on July 23, 2009 5:28 PMWe need more bad programmers to boost the economy.
S Wong on July 23, 2009 6:13 PMIf one bad programmer can create two new jobs a year.. just imagine what one bad ux designer can do for the economy?
Jeffrey on July 23, 2009 7:38 PMSensationalism. It's hard to hate something I try to take pride in, and I'm sure I'm not the only one.
Chris on July 23, 2009 8:49 PMThis is more pointless drivel. This is just cliché modesty and just ignorant generalization. I'm not suprised at all the "Amen" comments; that's pretty typical too. It's just not very interesting.
We.
Get.
It.
There's a lot of bad code out there and "we" are to blame.
Wow, how profound. It's not as if every other post doesn't express the same ideology.
Metaphor Monster on July 23, 2009 10:15 PMIt's actually a sea ,no matter how much intelligent and experienced you're there will be scripts that will terrify you.
djashish on July 23, 2009 11:04 PMThat'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
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 3:12 AMI so agree with this article..!! Amazing...
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...
your code is bad and you should feel bad
Anonymous on July 24, 2009 4: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 5:41 AMHi 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.
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 7:19 AMI object to the term "marketing weasel" as it is defamatory of the entire gamut of weasel species.
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 10:00 AM@ 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 July 24, 2009 10:24 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 10:46 AMYeah, 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..
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 12:53 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 1:36 PM@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 5:48 PMYeah, 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.
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 4:17 AMI 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 4:18 AMYes You are very true.
But we do have big issues in hand SCHEDULE
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 6:42 AMhi
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 9:18 AMI'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 9:41 AMI'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 10:48 AMI 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 11:05 AMSame 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 5:01 PMNonsense.
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 6:54 PMNah, 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 12:24 AMI 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 3:28 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 4: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).
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 5: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.
>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...
“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 7:50 AMSteve 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 11:58 AM@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 2:41 PMAtwood 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.
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 July 26, 2009 7:40 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 1:22 AMThe actual contents of this article sounds to me like:
"Hardware developpers: don't make sofwate! Let the job be done by M$!"
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 6:24 AMThere 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 6:27 AMI 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 7:08 AM>"Hardware developpers: don't make sofwate!"
I think there's something in that for all of us.
Dave on July 27, 2009 7:15 AMYou'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 7:39 AMWow...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 8:53 AMalthough 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.
I don't think he is joking. I think he is using hyperbole.
john on July 28, 2009 6: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 7:31 AMYes 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 7:40 AMThe code next yard is always greener.
Felipe on July 28, 2009 9:18 AMWorst code I've ever seen: GCC.
Do I still get hired?
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 10:02 PMIt is true that most of the developers hate software.. me too but I love to code it..
It is true that most of the developers hate software.. me too but I love to code it..
It is true that most of the developers hate software.. me too but I love to code it..
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 7:45 AMSure, 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 9:04 AMI 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 5:46 PMlolololol
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 1:40 AMWhile 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 4:30 AMErm.... 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 4:36 AMReally 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 12:36 AMcue the Butlerian Jihad
John Ferguson on August 4, 2009 3:45 AMI hate how hard it is to write good software but I love writing software.
Anonymous on August 4, 2009 7:47 AMI'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 8:36 AMI 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 10:38 AMThere 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 1:20 PMI was shock when see your title. Actually, I agree with you.
Phaoloo on August 9, 2009 7:24 AMI 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
Maria on August 9, 2009 11:28 PMI've been trying your interview technique, and, uhh, no dice.
Still Jobless on August 16, 2009 4: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.
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 3: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.
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 2:26 PMI don't understand what is keeping you from writing good code - incompetence
links of london on August 26, 2009 12:41 AMhehe, 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 12:58 PMI 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 12:11 AMTiffany 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 2:17 AM[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 10:45 AMI was shock when see your title. Actually, I agree with you.
richard on August 31, 2009 9:47 PMi cannot say any thin yet because i am little one in this field
sorry
i am little one to say something at this stage
naveed on November 7, 2009 1:58 AM| Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |