本文转载至:http://blog.codinghorror.com/nobody-hates-software-more-than-software-developers/
译文参考:http://www.csdn.net/article/2014-10-17/2822150
A few months ago we bought a new digital camera, all the better to take pictures of ournew 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?
- It's probably unnecessary. Any modern operating system (and even Windows XP!) can see and automatically download pictures from a new digital camera. No extra software needed. But in a questionable attempt to add "value" and distinguish themselves from their many digital camera competitors, some executive at the camera company came up with a harebrained scheme to include software with a bunch of wacky, unique features that nobody else has.
- Hardware companies don't generally do software well. Digital camera companies excel at building digital camera hardware. Software, if it exists at all, is an afterthought, a side effect, a checkbox on some marketing weasel's clipboard.
- Software of unknown provenance is likely written by bad programmers. All other things being equal, the odds that new, random bit of software you're about to install will be pleasant, useful, and stress free are ... uh, low.
One of the (many) unfortunate side effects of choosing a career in software development is that, over time, you learn to hate software. I mean really hate it. With apassion. 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.
Written by Jeff Atwood
Indoor enthusiast. Co-founder of Stack Exchange and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: http://twitter.com/codinghorror