Hacker News new | past | comments | ask | show | jobs | submit login

Just curious - did the fact that it was hard to get people to renew maintenance contracts have any effect on your code quality at all?

No, I take bugs personally. If you actually take bugs personally they hurt and you don't want to have to deal with them. Thus you make them go away.

For literally decades I have advocated this attitude. Time and time again my efforts are beaten back with "Bug-Free doesn't sell" and "Bug-Free doesn't pay" and, most insidious, "Bug-Free is impossible."

This last is then followed by

* You have to verify the compiler,

* You have to verify the hardware,

* You have to verify that there wasn't an error in loading the code,

* You have to use radiation-hardened hardware

* ...

and so on.

They miss the point!

Bugs in your code are way more likely than any of the other problems, and they matter.

I've generally given up, but at least it's nice to see the attitude here not being instantly shouted down.

I'm with you on "Bugs in your code are way more likely than any of the other problems, and they matter." This is very true. A while back Eric Raymond had a post called "When you see a heisenbug in C, suspect your compiler’s optimizer" (http://esr.ibiblio.org/?p=1705) which I felt was very wrong and responded with "A bad workman blames his tools" (http://blog.jgc.org/2010/02/bad-workman-blames-his-tools.htm...).

As might have been predicted the bug that Raymond was talking about wasn't caused by the optimizer at all (http://esr.ibiblio.org/?p=1705#comment-248328).

It's depressing to think that when your code works, it's almost always your fault.

I think I got my attitude from finding a bug in a major production compiler. I sent in my snippet to demonstrate the problem and got very short shrift from the company.

And they were right - my code had bugs in it.

So I recrafted my code and effectively, informally proved it to be correct. Then I sent it in again and got a formal acknowlegement that I had, indeed, found a bug.

Over the next 2 years I found 5 bugs in three different compilers, but in the first few cases I spent ages crafting my examples to prove the problem wasn't my code. Then it dawned on me, why not right the code to be correct in the first place, then I wouldn't have to re-write it when I found bugs that might be mine, and might be someone elses.

My productivity improved dramatically, and I was hooked.

Indeed. My C++ teacher's mantra for students was "the compiler is always right".

Obviously, this false, but until you are smart enough you'll never know when the compiler is wrong.

Interestingly, ESR himself says "don't claim you have found a bug unless you are very, very sure of your ground": http://catb.org/~esr/faqs/smart-questions.html#id478549

Can you transfer this attitude to, say, a larger piece of software? I'm thinking of working on an "enterprise"-level project, where requirements may be vague, or timelines constrained.

I'm not disagreeing with your premise, but I find my attitude can be different depending on the scope of the project. For example, if I'm working on a smaller project, I find I can focus on the overall quality and strive for "no bugs." But on a larger project (often behind schedule and over-budget, most often not because of the dev team, directly), there are lots of edge cases that get ignored, at least during the first release cycle.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact