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.

What do you do when something makes you angry while programming?

I usually Slap the mouse Hard on my desk and go get a coffee or anything, just to calm down

share|improve this question

closed as off topic by HLGEM, David Thornley, Jas, DavRob60, tcrosley Jun 13 '11 at 23:58

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
"I usually Slap the mouse Hard", hm, weren't it you who wanted to deal with users who thinks that hitting PC would help (programmers.stackexchange.com/questions/2066/…)? :-) –  Pavel Shved Sep 10 '10 at 13:39
9  
How is this related to programmers? –  Roger Pate Sep 28 '10 at 5:12
12  
@Roger Pate : programmers --> programming --> issue --> anger. Did you ever program or what? –  DavRob60 Sep 28 '10 at 11:54
3  
@Roger Pate I'm saying that programming is a job that could generate anger, but unfortunately, it's difficult to program while angry. –  DavRob60 Sep 28 '10 at 12:21
3  
What a silly question. Seriously, it reminds me of Yahoo!Answer's "am i cute?" posts. A good question would have been "how do I constructively and professionally deal with anger when I'm on the job". –  luis.espinal Oct 12 '10 at 22:51

22 Answers 22

up vote 25 down vote accepted

I usually take a walk around the block. The fresh air and actual physical activity calms me down and lets me get rid of any adrenaline.

share|improve this answer
2  
I agree. I usually find that, for me, the anger is the result of frustration and going for a walk also gives my subconscious time to chew on the problem. –  Tangurena Nov 23 '10 at 15:19
1  
Most often, when I'm angry about something around work, it's because I misunderstood something, or am making a mountain out of a molehill - so taking a break and getting perspective helps. If there's legitimate reason to get angry on a regular basis, especially involving the same person or few people, it's important to address that somehow - with them directly, or with management, or looking for another job. Life is too short to spend a lot of it being angry. –  Bob Murphy Jun 13 '11 at 18:32

Listen to 'Damn It Feels Good To Be A Gangsta' by Geto Boys and imagine that you are smashing a printer.

share|improve this answer
8  
@Jas: Whoosh. –  Daenyth Jun 13 '11 at 19:31
  • Rant incoherently
  • Whine on twitter
  • Chain smoke
share|improve this answer
2  
-1 But it will kill you eventually –  Ziv Jun 13 '11 at 20:55

Usually, I think through what I've learned about anger.

For me, anger is essentially how I respond to not getting my way. I want one thing, the world wants another, and I get mad. I want to be valued and respected, George wants everybody to know that the problem we're having is my fault even though it's really his fault, and now I'm mad at George.

Is George a dick? Unquestionably. Am I mad at George because he's a dick? Well, I used to think so. "God damn George, that weaselly little prick," I'd think. "He doesn't have the guts to admit that it's his fault, and so he's letting everybody think it's my fault."

Now, I think, "I want people to think I'm smart and do the right thing, and now this situation's threatening that." My will is being thwarted. How do I choose to deal with it?

Thinking this way helps me sort out the things I need from the things I want. I want people to think I'm smart. I need to be secure. If my security's really jeopardized by what George did, I have to deal with it. If it's not, then I really don't need to worry about it that much.

I can do this because I've had the experience, in my life, of getting everything I wanted and still being incredibly unhappy. I've also had the experience of being remarkably happy even though I'm not getting what I want. From this experience I (eventually) learned that getting what I want and being happy are independent variables.

Given that, once I recognize that I'm angry because I'm not getting what I want, I tend to place a lot less importance on my anger.

Also, this lets me looks at George in a new light. What's he going through that he has to act this way? What's he afraid of? Is there something I can do to help him, so that he doesn't have to continue going through whatever painful circumstance is causing him to act like a dick?

If I focus my efforts on repairing the damage in the world around me, rather than jealously protecting my stuff, I don't stay angry long. Also, people like me more. I like me more. I'm happy. Even though I'm not getting my way.

share|improve this answer

This one works for others who want to remain calm at all times:

I must not fear.
Fear is the mind-killer.
Fear is the little-death that brings total obliteration.
I will face my fear.
I will permit it to pass over me and through me.
And when it has gone past I will turn the inner eye to see its path.
Where the fear has gone there will be nothing.
Only I will remain.
share|improve this answer

I usually listen to calming music and just kinda close my eyes and take a 10 min powernap.

share|improve this answer

I have a whole set of mantras that I have to run through with the order depending on the situation:

  1. "It has been wose." Because it has.
  2. "What if my kids could see me right now?" Am I dealing with the situation or am I a useless whiner? Which would I want the kids to see?
  3. "Am I the problem here?" Because I might be.
  4. "At least I'm not unemployed." Because I have been.
  5. "At least no one's shooting at me." Because there are those who are getting shot at.
  6. "There are people counting on me to get this right, whether I'm angry or not." See point 5.

And then I schedule some time to kick the heavy bag.

Martial arts classes give you a lot of useful perspective. It's hard to get quite so worked up when you remember that your hobby includes a real possibility of getting kicked in the head. Maybe that annoying guy in the meeting isn't such a big deal after all....

share|improve this answer

Depends on the degree of the anger I have:

  1. Mild frustration - What I thought would fix a bug, doesn't and it is back to the drawing board again. In this case, it may give me a bit of energy to keep going but my mind is still relatively clear on being able to work. This is kind of in that land of, "Well if Plan A fails, I still have B, C, And D to try."

  2. Mildly disruptive anger - Now this is where I have to switch to something else as I'm just too angry to focus on the task at hand. This can be switching to a different application to do something else, like check e-mails or project documents, or doing something physical like walk to the washroom or cafeteria. The key here is to break my environment at least for a little while. This could be seen as just switching long enough to cool down some. Here I need a break to come up with some more plans.

  3. Fuming anger - At this point I'd likely go home or take an extended break of an hour or two. This is where I'm more than a little frustrated and may need to call upon reinforcements to help me calm down,e.g. calling friends that can help me improve my mood or create some e-mails to send to friends. This is also where a little break won't really solve the problem as I'm too distracted to focus properly on work even after a half hour break. I can end up talking to friends for hours in this state as it isn't that easy to calm me down in some cases. This is where I may just need some solitude or good company.

  4. All consuming anger - This would be the highest on the scale and is where I'd probably take myself to the hospital again. This is just for safety reasons as sometimes my thoughts can get rather dark and aren't easy to handle in this case. However, the people at the hospital tend to be rather nice and help me get a different view on things. One could also think of this as getting a complete change of scenery and routine as there is nothing like hospital food to put some things in perspective.

This is mostly from a work situation where it may or may not be code that is causing the frustration that is being turned into anger emotionally. Another way to see this is how much control does my emotions have over me at any point in time: Just a little as something didn't go my way but my tenacity and confidence are still there to keep at it, more than a little so that I have to do something else to clear my head for a short time, quite a bit as I need to retreat into my comfort zone where I can employ any of a few coping techniques like playing video games, talking to friends, getting exercise, having something to eat, or taking a nap, or lastly if I feel I've lost most of my control and want to be committed for a little while.

share|improve this answer

Go to Starbucks or other coffeehouse and relax for 5 minutes with a mocha.

share|improve this answer

"Everything can be taken from a man but one thing: the last of human freedoms to choose one's attitude in any given set of circumstances, to choose one's own way." (Viktor Frankl)

The anger you describe is created by your mind.

Between the trigger (something happened) and the emotion (the consequence), there is you with your beliefs.

The emotion can be fear, jealousy, depression, shame, etc. In your case it's anger.

The most well known technique to change how you react to events is to use the ABC model.

In short this technique will helps you understand you control response to emotions. However you can't control your emotions.

If it's too technical for you (it should be), I suggest you to read the first chapter (habit) of the 7 Habits described by Stephen Covey.

It's easier to understand and he talks about excellent Viktor Frankl's work.

share|improve this answer

For the practical course of action, talking to my better half relieves me of most of my frustration, or a close friend that has no relation to my work. They usually give sound and impartial advise. And halfway while talking, sense usually gets knocked into me either by realizing how silly, easily resolvable or futile the problem is.

share|improve this answer

Loud music. Very loud music. "I am hated", "everything ends" and "people = shit" are all very good choices. For me, it really does help... Im not a phcologist, but what I think happens is that it channels anger into energy, to the point where you can just sit down and hammer out whatever dumb/pointless/inane task you were asked to complete and not even think about it.

I think to answer your question: the most professional way to deal with it is not be confrontational (at least while you're angry, and until you can assess the situation with a clear mind) and turn that momentum into productive work. The worst thing you can do is argue with the subject of your anger, as these confrontations will turn bad very quick. Its good for neither party.

share|improve this answer

When I get mad I just bask in whatever aspects of my program I've completed. Then play some other games.

share|improve this answer

Succumb to the Dark Side, focus your anger and prove whoever/whatever is provoking you wrong.

share|improve this answer

I think it's good to do something non-frustrating for a change, like read a few pages of a book, exercise, take the dog for a walk, and generally do something very different to give your brain a break and get perspective.

This is not an exact parallel, but I get to a certain point in translation (usually a few long paragraphs) and I simply become temporarily exhausted, and need to do something different so I can continue later.

share|improve this answer

Feel the anger.

Feel it.

FEEL IT.

Think about it.

It's anger. See? You just felt it.

You are not your anger.

Anger goes away.

share|improve this answer
6  
I first thought you where going to tell something about the power of the Dark Side... –  DavRob60 Sep 28 '10 at 0:30

I frown when I'm really angry then I shift back my focus to coding.

share|improve this answer

Instead of "releasing" my anger, I used to just slam my first onto the keyboard. It felt good and keyboards were cheap.

Unfortunately, I forgot to stop this habit when I got a laptop. Guess what's under your laptop's keyboard? Your hard drive. Guess what happens when you apply a lot of blunt pressure to a hard drive?

At least I had backups.

share|improve this answer
1  
And the mouse too :P –  pramodc84 Sep 28 '10 at 4:36

I rant. Much to the amusement of my co-workers, but it helps me let off steam.

Favourite phrase: "...and another thing"

share|improve this answer

There is a little difference between what I do and what I should do.

What I do (not so bad): stop programming, make a pause.

What I should do (better): take a nap. It is impressive how a difficult problem solve himself after a nap.

share|improve this answer
7  
+1 for Nap..... –  Nivas Nov 23 '10 at 13:33

I draft a blog post about the situation... and then delete it, because who cares? The only person that cares about the situation is you, and frequently nobody else wants to hear you whining. Much as I would like it to be the case, I'm not the center of the universe - if I were, perhaps my insights and experience would be more valuable. As it is though, pretty much nobody cares about what I have to say, no matter how insightful it is - why? Because pretty much everything I have to say has been said by one or other more famous people than me because much of what I think about today has already been thought of weeks, months or years ago by someone else.

It is therapeutic to write about it, and try and justify why I feel the way I do about it. Often, the process of trying to justify my feelings either makes me feel better and gives me an approach to resolve the situation, or it makes me realize I was being an idiot.

Either way, it's good therapy.

share|improve this answer
1  
If you have a friend or significant other who is willing to listen to you when you're upset, I think that is another good option; although you may want to take care not to annoy them too much. I think that putting your anger into words, whether in a "conversation" (read: rant) or in a fictional blog post, is a great way to deal with your anger. While you may still be upset, I find that after expressing my feelings it's much easier to decide how I want to proceed with dealing with the situation and move on. –  Dr. Wily's Apprentice Nov 23 '10 at 20:28

Pull up Starcraft and take it out on some Zerg.

share|improve this answer
13  
If I ever got caught playing Starcraft on work hours, that's will be YOUR fault! –  DavRob60 Sep 10 '10 at 14:19
3  
def Answer (game, enemy) "Pull up #{game} and take it out on some #{enemy}" end I find it works equally well for "Gears", "locust", "Fallout", "raiders", and "Cooking Mama", "omelettes". YMMV. –  Inaimathi Nov 23 '10 at 15:17

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