Live data from Hacker News

I’ve made a conscious effort to stop apologizing for bugs in my code

blog.danslimmon.com

171–180 of 194 posts

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#171

Why do software engineers constantly try to project that they are a special snowflake of a profession? Would you accept such nonsense from your plumber, or your dentist, or your electrician? Software engineering is one of the most fundamental building blocks of modern civilization, and yet it continues to be so fragile because of this kind of cavalier attitude. Also, apologizing doesn't mean you have a moral failing.…

I totally agree with you. In fact, some branches of software engineering do have equally high standards as other engineering fields. If you write the software for a medical device or an airplane, you better make sure it doesn't have any critical bugs, otherwise people will die. If you write audio software for professional musicians, you better make sure that it doesn't have any critical bugs, so you don't ruin a live show. I think people claiming that nobody can write bug free code and you shouldn't even try simply work in environments where failures don't cause irreversible harm.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#172

Earlier quoted context omitted.

Orders of magnitude harder? Get over yourself. You sit in a comfy climate controlled office with perks like free food and drinks, gyms, entertainment, etc. You make a mistake, and a program doesn't run correctly. The horror!!!! An electrician, plumber, or dentist makes a mistake and that could result in someone getting hurt or even someone to die. A dentist doesn't get to run a dev/staging/prod environment before dri…

Try working in military applications, aerospace, tax software, medical devices, banking. Making one mistakes can affect the fates of hundreds if not millions. It's way more responsibility and risk than the job you quote. By the way. A dentist gets to try on fake tooth before drilling a real tooth. They actually don't have a choice, that's part of the mandatory training. Doctors gets to train on real people too, medic…

Especially a test environment that accurately mirrors a production environment.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#173

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

>If I make an off-by-one error, where, other than me, did it come from? Could have come from confusing documentation on the appropriate bounds, could have come from an unclear exit condition for the loop, could have come from contradictory requirements that had no real solution. That you're the agent at the end of a chain doesn't release the chain from responsibility. > If I make an off-by-one error, I could have don…

>>If I make an off-by-one error, where, other than me, did it come from?

> Could have come from confusing documentation on the appropriate bounds...

If you are blindly following direction to that level of detail, are you a programmer or a typist? Maybe there will be corner cases like this, but they do not invalidate my point.

> Tyson Gay is only behind Usain Bolt in the 100 meter world record by 0.11 seconds.

This is not a comparable situation. For one thing, off-by-one errors are not off-by-0.11 errors, though the difference is more significant than that.

> If it's about responsibility, then there should be a process for understanding why engineers end up writing bad code.

Of course, and there is no shame in that. Part of answering that question, and in becoming a better programmer, comes from acknowledging and understanding the mistakes we make (this is an important part of aviation safety, and the last thing an instructor wants to see is a student who has a tendentious excuse for every lapse.)

And no-one is responsible for things they cannot control, unless they set them in motion themselves, or ignored the likelehood that they could happen.

>> We should all aspire to do better.

> I agree!

Yes! this is the most imprtant point - and there is no shame simply from falling short.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#174

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> If I make an off-by-one error, I could have done better. "I did not do X, therefore I could have done X" seems clearly false. How do you know you could have done better? And if you could, why didn't you? And if you actually didn't, what does it usefully mean to say you "could have"? You "could have" done better but didn't, does that imply you didn't want to do better? Is that what you want to communicate - you want…

> How do you know you could have done better?

Because it was an error! I could have done better by doing the thing that fixed the error!

I am not a religious person, but the Lord save us from those who have an excuse for everything.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#175
post #131

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> It is not about shame, it is about responsibility. Assigning personal attributes (responsible/irresponsible) like this is a sub-optimal strategy for improving human performance. It conflates what a person does with who they are . What a person does is malleable, and their performance can be improved with teaching, practice, better techniques, etc. Experienced teachers understand this and avoid turning a discussion…

> It conflates what a person does with who they are.

It is not obvious to me that there is anything very wrong with this. In particular, I think it is rather more reliable than going by what they say.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#176

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> We should all aspire to do better. aspiring to do better does not mean aspiring to write bug free code. One is a nearly impossible goal (not over time but certainly at first and certainly when balanced by other constraints) > About the only thing that annoys me at work is people trying to deny responsibility for their actions (or lack of them.) There's a difference between denying responsibility and apologizing. Wh…

> aspiring to do better does not mean aspiring to write bug free code. One is a nearly impossible goal...

Hence 'aspiring' not 'achieving'.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#177
post #121

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

I think in some ways the author is on their way to making a greater point about making mistakes without quite hitting the nail on the head. Guilt and shame are the enemy of responsibility and those who seek to inflict guilt and shame are toxic to any organisation. They encourage those who are focused on maintaining an image of never being wrong while punishing those who seek to better themselves and obviously make mi…

You make a valid point here. In a toxic environment where guilt and shame are tools of oppression, you do not, in practice, have the option to be candid.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#178

Earlier quoted context omitted.

Orders of magnitude harder? Get over yourself. You sit in a comfy climate controlled office with perks like free food and drinks, gyms, entertainment, etc. You make a mistake, and a program doesn't run correctly. The horror!!!! An electrician, plumber, or dentist makes a mistake and that could result in someone getting hurt or even someone to die. A dentist doesn't get to run a dev/staging/prod environment before dri…

Try working in military applications, aerospace, tax software, medical devices, banking. Making one mistakes can affect the fates of hundreds if not millions. It's way more responsibility and risk than the job you quote. By the way. A dentist gets to try on fake tooth before drilling a real tooth. They actually don't have a choice, that's part of the mandatory training. Doctors gets to train on real people too, medic…

> A dentist gets to try on fake tooth before drilling a real tooth.

Are you saying you went straight to writing production code before you ever studied any software engineering? Sounds unusual for practitioners of an industry endowed with such a critical responsibility.

A dentist can easily kill someone through malpractice... There's no code review, there's no test environment, and there are always difficult (often time-sensitive) decisions to make and difficult people to deal with.

If all you know is estimating story points and merging pull requests to make your burn-down chart look pretty you probably shouldn't be so confident that your profession is more difficult or more superior than one that you have no understanding of.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#179

Switch from apologizing, to thanking the person that found the issue. Profoundly different effect. One is all-about-you. The other is a team-building action, recognizing the folks who normally get a lot of grief(denial; accusations; ignoring their input). Testers respond amazingly when they're heard and treated seriously. It is so profound, let me tell you an anecdote. My test lead had gone to a conference (they have…

That's what I do.

What is funny is sometimes I'll run into a problem customer that other developers complain about and I'll profusely thank that customer for finding the bug (even if they are being jerks about it).

After a few rounds of that and they think they're a valuable power user with lots of insight who is saving us all. (Doesn't matter if it is true or not.)

Suddenly they bring me bugs all happy as a clam that they found something that nobody else could (again doesn't matter if it is true or not), and they're all proud and in a much better mood and feel better about the product.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#180
post #35

Earlier quoted context omitted.

A more specific and concrete than the culture and process answers is someone should have reviewed and approved the code.

But that's just reassigning or distributing 'blame' to the approver. So what is the responsibility of the key-puncher if it isn't turning requirements into robust, correct code? Many comments here seem to suggest that programmers are just there to produce some sort of fuzzy first-stage approximation of what the code could be. In that case, just employ an automated code generator and push the burden onto reviewers.

I think it would be great if we a group of people whose entire job was to watch over the programmer's shoulder, and every time they make any kind of mistake, SHAME THEM. Because shaming the developers is more important than anything else, apparently. All we need is other people who can 100% reliably detect errors in code... oh. They could simply be the developers instead!

> So what is the responsibility of the key-puncher if it isn't turning requirements into robust, correct code?

How can it be a responsibility to never make a mistake? Nobody can never make a mistake.

> Many comments here seem to suggest that programmers are just there to produce some sort of fuzzy first-stage approximation of what the code could be.

Many comments here seem to suggest that producing high quality code is a team effort supported by a company or department which values high quality code. If you had mythical no-mistake employees you could do away with most everything else. Why even have tools, tests, revision control systems if you're not making mistakes?

And if you are using tools, tests, etc. as part of not making mistakes, why not reviewers, bug testers, quality analysts, as well?

Post reply on HN