Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As practicing (as much as I can at least) "egoless programming", I'm focused on solving problems whoever wrote the code related (if that person don't make dangerous code) and I like to understand the problem fully to be sure to solve the source of this problem.

However, when someone point my code to show an error, I often try to remember what was my mindset while writing the defect code and I try to explain it to the guy pointing the error to make clear what was the error source (for example when some names are badly choosen, you might use them in a way they were not intended too and with apparent success...).

Now, I do this by reflex and most of my coworkers does understand this reflex. But I also worked in companies where coworkers were in a mentality of blaming the people that made the identified problems, with or without humour (for me it have the same not-sane effect anyway).

In this kind of environnement, explaining why you got to write wrong code makes others think that you're trying to build an excuse. I remarked that most non-technical people (or non domain-expert, not sure, it's only personal experience) also react exactly like that when you try to explain why you did something wrong.

So, when dealing with this kind of people/environnement, how do you manage to explain the real source of the error without looking like "making an excuse"? (and is it even worth trying to explain?)

share|improve this question
    
had this happening to me (on non-technical stuff) during an HR interview... not fun :/ –  Matthieu M. Dec 16 '10 at 19:17
add comment

9 Answers

up vote 10 down vote accepted

I think it's just a matter of making your words match what you are feeling inside, and putting the thing you feel most strongly (egoless problem solving) first in your response. When a coworker points out a terrible variable name, you could say "I was really tired that day," or you could say "You're right, that is a terrible name; I was really tired that day." or "I am the one who did that; I was really tired that day." or "Thanks for finding that for me; I was really tired that day." Etc. If you lead with the reason, it sounds like an excuse. If you lead with owning the mistake, thanking someone for finding it, or just agreeing with them, the reason doesn't sound like an excuse so much.

As a bonus, when you practise this, you will almost certainly find less need to offer the explanation for those "I was tired, I didn't think anyone would use it for that, I was in a hurry" situations. You can still use it for "well sales never mentioned that they told the user that feature would be added, Bob didn't explain that to me properly, if Joe chose a better variable name I would have got it right, it worked until you changed the spec" situations, when root cause and underlying change analysis may be needed.

share|improve this answer
    
I guess that's the best solution. In the end I'll get more time and more energy focusing on agreeing and fixing the problem and only explain the problem source I thought about if asked about it. After all, by default, I'm the only one to care about it. If they care they'll ask I guess. –  Klaim Dec 16 '10 at 10:09
add comment

These kinds of misunderstandings are common between pragmatists and idealists. The pragmatists just think, “something went wrong... who can we blame?” The idealists are already trying to figure out how to prevent that thing from going wrong ever again.

Ashton got into San Francisco in the afternoon. He took a SuperShuttle to Fisherman’s Wharf and, famished, went into a restaurant and ordered a big stack of pancakes.

That’s when the implications of abandoning his former life in Michigan really started to sink in. He had no job, no place to sleep, his car was gone, he owed $40,000 in student loans, and had exactly $173 in his wallet.

But goll-ee, they sure do have pretty waitresses in San Francisco, he thought, admiring the strawberry curls of the Molly Ringwald-lookalike standing by the front cash register. A little over five feet tall, maybe. Crazy freckles.

While Ashton stared at her from across the deserted restaurant, a couple of well dressed boys came in and started talking to her. Tourists, maybe, or students? Were there any schools around here? There must be schools in San Francisco. He couldn’t hear what they were saying, but it seemed a little bit more complicated than “can we have a table and buy some pancakes please.”

“Molly” got out her purse and rummaged around. She gave the kids some money. The conversation continued. She tried to make a phone call; nobody answers. Eventually she opened the cash register and counted out rather a lot of money, which she gave to them.

“That’s weird,” Ashton thought, but he paid the check, and went across the street to an Internet cafe to look for an apartment on Craigslist.

The first thing that hit him was that the prices for apartments were insane. Back in Michigan, he was paying $475 for a really nice one bedroom, but in San Francisco, things seemed to be triple that. Without a job, he wasn’t even sure if anyone would rent to him. While he was pondering this problem, he noticed the waitress from the pancake place come out, clearly distraught. She sat down at a bus stop and started crying.

Now, the old Ashton would never, never just go up to a random girl on the street, least of all one who was crying, but the magical spell of San Francisco somehow made him lose his inhibitions, so he bought two cups of peppermint tea, went to the bus stop, sat down next to her, and said, “I seem to have an extra cup of peppermint tea. Would you like it?”

The girl looked at him, perplexed, and then laughed a little bit.

“I’m sorry,” Ashton said. “I don’t usually do this. I saw you working in the IHOP, and then when I saw you out here.... Oh. I’m Ashton, by the way. With an N.”

“I’m Becca,” she said. “With an M.”

Ashton said, “The M is silent, I assume?” They laugh a little bit. Becca sniffs. Ashton finds a handkerchief in his coat pocket, a vestige of living in a really cold climate.

They start talking. It turns out Becca just got fired.

“That stupid old man. He wouldn’t listen to me! I took some money out of the register to bail out his own son, but he didn’t want to hear about it. He just assumed I stole it.”

“What?”

“Well, these kids came into the restaurant, they were schoolmates of Daryl, Mr. Dimitrious’s son.”

“That’s the owner?”

“Right. Anyway these kids seemed nice, they said that some drug dealers got pissed off at Daryl for some reason and they needed $200 to rescue him.”

“Rescue him from what? I don’t get it. How does that work?” Ashton asked. It didn’t sound like a real story. But maybe this was how things worked in California.

“I gave them $40 of my own, but they were very insistent that if they didn’t come up with $200, Daryl would be hurt. I couldn’t reach Mr. Dimitrious by phone, and I was scared, so I took $160 out of the register and gave it to them. But when I tried to explain that to him, he just flipped out and wouldn’t listen to me. I was trying to tell him that Daryl was in trouble, and all he wanted to talk about was that I was stealing from him. How could he fire me for trying to help his own son? What is wrong with that man?”

Ashton was pretty sure Becca had just gotten scammed, but he couldn’t quite bring himself to break it to her. And even though she was visibly upset, he was really enjoying talking to her, so he dragged the conversation on. He started blabbing about how, when he was working at the furniture company in Michigan, everyone had to take a course called “Five Whys.” The idea was that every time something went wrong, you had to ask why to get the immediate cause. Then you asked why again, to figure out what caused that, and you kept doing that, about five times, until you found the root problem.

“So, for example, you got fired. Why? Because money was missing from the cash register. Why? Because you gave it to some kids. Why? Because they told you Daryl was in trouble. Why?”

“Wait, why what?” Becca asked.

“Why did they tell you Daryl was in trouble?”

Becca thought for a minute.

“I got scammed, didn’t I.”

“I think maybe you did.”

Becca was silent for a really, really long time. Then she started laughing, and it infected Ashton, and they were both laughing like crazy, and it felt great, after a stressful day.

“You’re a total nerd,” she said. “Five whys.” He had to concur.

They were having a good time. They walked all over the North End, and they talked for hours. He told her about being a programmer, and the furniture company, and how, in two years, not a single thing he did at work mattered, and he was sick of it, and starting a new life, and here he was, without a place to stay, on a winter night in San Francisco.

“Oh gosh,” Becca said, “I know just the place. I’m living in a big shared house in Russian Hill. There’s an empty room now.”

“Where’s Russian Hill?” Ashton asked.

“It’s not far. I’ll take you. But wait... would you mind waiting so I can go try one more time to get my job back?”

Ashton was happier than he had been all day. Things really do have a way of working out.

“Sure!” he said, almost giddy. “Just a sec.” And he took out $160 from his wallet, leaving exactly three dollars, and he gave it to Becca, and said, “Take this, it might help you get your job back.”

“Oh I couldn’t!” she said, but Ashton insisted, and they agreed to meet in half an hour at the Steps of Rome on Columbus Ave., where Ashton went to sit and nursed a single cup of espresso while Becca walked back towards the restaurant.

And it got kind of late.

And an hour passed, then another, and the Italian waiter obviously had a crush on Ashton, so he didn’t bother him about just ordering one coffee and sitting at the table for hours, and it’s midnight, then it’s one a.m., then it’s two a.m., and the waiter finally says, “Look, I’m sorry guy, we’re closing, you have to leave.”

share|improve this answer
5  
Hey, Joel, there are some really great ideas here... maybe you should consider a blog? –  Macneil Dec 16 '10 at 4:58
2  
-1 for another non-answer. This is not a thoughtful answer to a complex question but rather a train-wreck in progress. –  Josh K Dec 16 '10 at 4:59
2  
@Macneil: This? This is a ramble and a mess. A farce of an answer. I respect Joel, and think he has written some decent stuff. This? This is a joke. –  Josh K Dec 16 '10 at 5:36
1  
@Bob: Inquiring minds should look somewhere else for an answer. –  Josh K Dec 16 '10 at 5:48
1  
@sharptooth: The OP blabs his inner thoughts about his bugs to people who don't care about what he thinks and just want their bugs fixed. It's an irrelevant waste of their time, just like Joel's pointless shaggy dog story. Joel took what the OP does and translated it into the SE context, and demonstrated that it's really irritating to everybody but the person doing the blabbing. There's no moral in the story; the story is the moral. –  Bob Murphy Dec 16 '10 at 6:11
show 16 more comments

I feel like the best option would be to just admit the problem and promise to fix it quickly. People in general aren't interested why and how you made a mistake, the only exception being your manager for he needs to continuously assess you professional fit.

As for blaming the one who made a mistake, it's in human nature and you can't help it. The best advice is to build a mental barrier and try no to take it too personally, not to let their criticism "touch" you. It's difficult though.

share|improve this answer
add comment

Short answer: you don't

Chances are that whoever is pointing out the error is not interested in why it's wrong, they just want it fixed. That fact that you want to discover why the error was made and what you can learn from it and thus improve upon is laudable, but again whoever is pointing out the error is probably not interested in hearing your internal monologue.

keep doing what you're doing, it helps you improve. But don't do it out loud in front of the user.

share|improve this answer
    
Absolutely right. If a waiter in a restaurant brings me somebody else's meal, I just want him to take it away and bring me my meal as fast as possible. I don't want to hear about why he did it. –  Bob Murphy Dec 16 '10 at 5:28
    
@Klaim: Just say, "Sorry for the problem. I'll fix it." That's all you should say, because that's all most people care about. –  Bob Murphy Dec 16 '10 at 5:44
    
@Bob Murphy, why bother with "sorry?" Why not just say, "Noted, next?" Sorry is part of a blame cycle. It's broken and needs to be fixed. Nothing to apologize for. –  Yar Dec 16 '10 at 7:07
    
@Bob Murphy: Yeap, you see, I'm sorry is used waaay too often, and usually it doesn't mean that someone is sorry - it's just a protocol keyphrase. Do we need protocol keyphrases where real action and attitude is what's actualy needed? –  sharptooth Dec 16 '10 at 7:23
1  
@Steven: I completely agree. In fact, I often think American politics would benefit greatly by a return to dueling. –  Bob Murphy Dec 18 '10 at 19:24
show 6 more comments

Regardless, you made a mistake, so you should admit it. You may have had an infinitely small chance avoiding it, but you wrote it and it got released.

When dealing with people with no domain or technical expertise, why are you giving detailed explanations? It either sounds like an excuse or an explanation that is over their heads which they'll interpret as an excuse.

share|improve this answer
add comment

Here's what you say:

"I take full responsibility. I'll do my best to correct it and not do it in the future."

What can someone say then? They either accept what you have said and move on or they discipline you. That's it. It puts the onus back on them to do something or, as I said, move on.

share|improve this answer
    
Not so good when the reason for your mistake is someone else's mistake which also needs to be corrected. –  Kate Gregory Dec 15 '10 at 18:29
    
@kate you might be surprised how much a responsible person can get away with. –  johnny Dec 15 '10 at 19:02
    
I"m not worried you won't get away with it, I'm worried nobody will go over to the other guy and get him to stop doing whatever he did wrong, or change it, or whatnot. The root cause is often (almost always) way more important than who to blame. –  Kate Gregory Dec 15 '10 at 19:03
    
@kate depends on the supervisors and the atmosphere. He could always say I take full responsibility for whatever my part is. –  johnny Dec 15 '10 at 19:14
    
He could also say, "Sorry there's a problem. I'll work with my other team members to get it fixed." –  Bob Murphy Dec 16 '10 at 5:45
add comment

In many respects I don't think you can avoid this conflict.

Explaining the rationale as to how you arrived at whatever point you are at is important in understanding the "big picture" around the issue in many cases, but there will always be people that see this as an excuse.

Selecting who you have the conversation with is the closest I have ever gotten to managing this issue. In general that boils down to don't discuss it with the business folks and only discuss it with people that are going to be involved with the technical solution.

Even that approach fails at times because today's wrong is often linked to a previous requirement and you get drug down that path anyway.

In general I try not to worry about it too much as if people are going to pick that as something to raise as an issue about you they are likely sufficiently motivated they will find another issue as soon as you can "correct" this one.

share|improve this answer
add comment

Take responsibility for it. Steven Covey phrases it as response-ability: your ability to respond. Say what you will do in the future to prevent doing something like that again, and follow through. Overall you should be concerned about your long-term reputation, and not the immediate moment.

If you own up to mistakes, people will appreciate it and respect you more. It will give you more credibility when something isn't an error (or at least not your own) and does need explanation.

Also, even if not delivered well, take it as constructive feedback and thank whoever pointed out the problem. If you are unsure what they say is wrong with your code, ask follow up questions.

share|improve this answer
    
I'm not sure your answer answer directly my response. I take responsibility for the problem and try to provide a good solution, but to do this I first need to find why I did the wrong code in the first place. Whatever the why, that's the explaination (or the very fact to try to explain maybe?) that seem to trigger "you're making excuse" cutting sentences that just stop you trying to explain anything. That said, it's not a big problem for me as I still can solve a problem, but it's more a communication problem I guees. –  Klaim Dec 15 '10 at 17:09
    
Your urge to "explain" is trying to save face. I'm saying you should do that in a different way. I'm not answering your question at the surface, I'm helping you with the root cause. –  Macneil Dec 15 '10 at 21:11
add comment

Most of the times errors are there, because programmer forget to consider all the cases. Sometimes you write the code keeping one scenario in mind and then the other scenario failed. In this case if one asks your answer should be "That case was not considered. Let me correct it, and we will document that whoever is touching this part of the code should code according to this case also".
Normally making mistakes are not the issues, but repeating them is problem. Hence when someone shows you the mistake you should say, "Thanks for finding that out. I will correct it, and mention it in the coding guideline."
But if someone is continuously finding the stupid errors and if that bothers you, then every time you change the code, go to that person and tell him to check the code for errors. Some day he/she will get frustrated and stop it.

share|improve this answer
1  
If someone keeps finding stupid errors in your code, you should make sure to double-check your work before bothering that person to do your error checking for you. The goal is to eliminate errors, so trying to frustrate someone who's trying to improve quality is not the way to go. –  Anna Lear Dec 16 '10 at 5:37
    
Good suggestion. Thanks! –  Manoj R Dec 16 '10 at 6:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.