views:

810

answers:

26

I am sure most programmers out there know how its like to code under the hood of redhot deadlines and seemingly almost impossible requirements.

How do you deal with such pressure? Spent sleepless nights?

+1  A: 

Caffeine. Lots and lots of Caffeine.

And it certainly doesn't hurt to have an awesome playlist queued up.

Dortz
Tastes differ, but I think these are both terrible ideas. Caffeine wrecks concentration. (Good) music distracts.
slim
+18  A: 

I like to try and get to gym. Try to keep the balance there despite the pressure to just stop the rest of life and pull all-nighters. Keeping your self fresh is in my opinion better than working forever. I am pretty sure that a fresh guy could do the same amount of work in half the time as the work-a-holic.

uriDium
Ditto this. When I have crazy deadlines and pressure, the gym is one of the first things out of my day to slide -- but I've found over the last couple of years, that I absolutely *have to* make exercise a priority, every day. It has a positive effect on everything else I do, especially my work.
bigmattyh
+1 with the gym ... it helps a lot!
WestDiscGolf
+1 totally agree. It's my sanity tool.
Ian Suttle
+8  A: 

Here are a couple of useful tips

  • Enjoy coding, be passionate - Don't be afraid to ask questions
  • Drink lot of water to maintain the water level in your body
  • Exercise or Practice some yoga and pranayams
  • Be smart enough to provide solutions, so that you can control the thought process of stakeholders (so that you won't have that feeling of 'getting forced to work')
  • Escalate risks at correct time
  • Meditate, feel relaxed - or go for a walk at times. Don't get glued to your seat
  • Enjoy some music
  • Be aware about your breath pattern.
  • Try Ayurveda - I've found Triphala is an excellent way to maintain your body's balance
  • Take good, balanced food - Don't skip meals.
  • Plan well. Know what you do, and focus on what you want to finish.
  • Interact with your family at times - Call your mom, wife or kids. That'll help a lot
  • Games - Cycling, Tennis, Cricket - What ever you love
amazedsaint
+5  A: 

In the past, I've always found the following setup has served me well.

First, split the task into subtasks with at least a basic priority ranking so you have somewhere relatively small to start. This gives you a doable task to dig into, instead of being overwhelmed by the enormity of the entire project.

Then, just focus on this single task and dive in. Nothing fancy to it, but I find the simplicity of the approach works better than other methods I've tried.

A: 

I have spent many sleepless nights. I've avoided caffeine for the most part. I think the best solution is to keep a balance between work and relaxation, by going for a walk, listening to music etc. I am not a professional programmer yet, so I am as interested as you are to see what solutions people come up with. What I have learnt is that it isn't worth sacrificing my health for work and I make more mistakes when I lose sleep.

batbrat
A: 

That pressure is the only way I get any serious work done.

Oh, I get work done normally too, but I seem to get twice as much done with a bit of pressure.

Caffeine is a part of my normal daily regimine anyway, but it certainly doesn't hurt either.

Music helps me think, but again, that's part of my daily normalcy anyway (I'm lucky enough to work at home, at the moment atleast).

Matthew Scharley
+8  A: 

Know when to ask for help! I've seen too many colleagues get burned-out.

Once, when i was in an impossible situation, i wrote a mail (i think it was 2:30 a.m. or something) to my boss stating clearly things couldn't continue like this and i really needed more resources on the project. This was about 1 month before the deadline. Luckily i was taken serious and the resources actually came.

tehvan
+7  A: 

Just don't let the pressure get to you: if you do what you can, there's not much more you can do. The main thing is to realize that to be able to get things done, you've to stay focused, so don't look at your email every 5 minutes, don't look at stackoverflow.com every 10 minutes to see if there's a question out there to be answered, just do your job, get it done.

One can't stay focused for 8 hours straight, so plan breaks, and TAKE them. Also, to be able to stay focused, make sure you're not interrupted by brainless co-workers who want to ask you silly questions or just want to ramble about the hot chick/bloke in accounting, stay focused. Programming is about a house of cards. Every interruption makes the house of cards tumble down and you've to start over again.

Frans Bouma
A: 

I try to discipline myself so I don't have to have that kind of problem. "A little every day" is how I strive to work.

Paul Nathan
+4  A: 
  • Breath deeply and frequently.

  • Exercise. I feel that Martial arts are the best. Punching and Kicking burns stress.

  • Take breaks to think and relax.

  • Use stress in your favor. Feel motivated and see it like a game. Try to transform it into euphoria. It is like "Can I do this in just X hours? Let's bet"

  • I would avoid more caffeine unless I really need it. The stress is enough. It is bad for concentration.

  • I use music to have some control of my mental state. Music for thinking, Music for rutinary tasks, music for keeping awake.

And of course:

  • Avoid it if possible. If it is a cronicle problem in your company you have a problem. Ask for resources. Look for help. Improve your productivity. Work smarter, not harder, and... if nothing works, Change job.

Other resources:

borjab
breath frequently? :)
tehvan
How do people meditate? breathing deeply. We have little control on our bodys. Saying. "hey body, Do relax!" may not work. Breathing deeply seems to help.My sensei insist in fighting relaxed. When one bigger, black belt guy is trying (succesfully ) to puch you in your head is not so easy
borjab
Also good to breathe *fresh air* - actually go outside and have a good 5-10+ minute walk at lunch, rather than quickly nipping to the canteen/cafe and back.
Peter Boughton
+1  A: 

I usually slip off my shoes, turn up the volume of my headphones and try to get concentrated on the job which has to be done.

When the working day is over it's best to try to turn the knob and make the evening at home as enjoyable and relaxing as possible.

I always go to work with my bike so it's a good way to immediately vent some stress after the work hours.

Gerrie Schenck
A: 

My answer would definitely be yoga. I hope you don't mind me quoting my answer to a question about RSI:

Not for everyone, but yoga and/or meditation are a great way to relief stress. Yoga may seem too "granola", or you may not like the "spiritual" aspects of it. In that case, just find yourself a yoga studio that doesn't focus on those aspects! Yoga is what you make of it, and it can be very down-to-earth. In the end, though, it's an absolutely great way to relax your body and mind, and to build up strength and flexibility [...]

I discovered yoga about a year ago, and it has helped me tremendously. It enables you to completely let things go once in a while, and after some practice, you'll also be able to take that habit into the rest of your life and work. Yoga classes do take time, that's true (which makes it hard to keep doing them if you feel you too busy :) ), but it certainly pays off.

onnodb
+12  A: 

Most programmer presssure is self-inflicted.

Learn some negotiation skills. Learn to estimate properly (no more "Oh, I don' think this feature could take more than a day or two"). Learn to manage expectations. Learn to avoid heroics.

Morendil
The heroism can have its egoistic appeal, but I agree, resist it, if at all possible. If you code yourself into the expectation where you are valued for your ability to work "hard", you will be sought out for more impossible tasks and then it will become the norm.
EnocNRoll
This comment would be even better if you gave some pointers to or examples of *how* to do this.
Joe Soul-bringer
+5  A: 

Best way to deal with it for me is one small little thing: HEAVY METAL!

The more the pressure the louder the volume in my headphones. Favourites Bands to work to is Metallica, Trivium and Slipknot. The faster the guitars the better I work. but thats just me ;)

FailBoy
I prefer black metal, even faster :D
Gerrie Schenck
Yeah!!! Go Metallica!!!!! (not heavy metal but i also love the offspring) lol
lucifer
+3  A: 

What is a "high pressure situation"? A normal high pressure situation is one where requirements are changed or expanded with little or not time given to meet the change. That can happen in any organization. How should we deal with these "high pressure situations"? As learning experiences, of course.

When I am luck enough to be modifying an application I designed myself, I find those high-pressure situations to be excellent tests of the flexibility of my design. If I've done my job right, I don't spend a sleepless even if the day starts out looking like I might have to.

High pressure situations are also great tests of how well you've done your user stories; if you know your users well enough, you will have designed your app to be extensible in the direction they are thinking about so. So a lot ordinary design involves creating the flexibility to dealing possibility of a future high pressure situation.

There are lots of good ways to deal with raw stress. Exercise, meditation, deep breathing, etc. There are dubious ways too: alcohol to begin with. I personally can't handle caffeine for more than 12 hours at a time.

I said normal high pressure. There is also bad high pressure situations. These are the situations that happen all the time. When there's a fire to fight everyday, when the end of each cycle requires a sprint, etc, etc. This is normal for the bad, old model of software development. Agile methodologies address this. Scrum, for example, is rigorous and demands performance but does not expect a sprint. Instead, A scrum team works at a constant velocity. This is how you produce good software. Modern methodologies are moving in this direction. I suggest that we work to educate our teams, managers and managees about this.

Joe Soul-bringer
+3  A: 

If something is technically not possible, I tell it to the project manager. Usually they understand it and accept it since we are being honest and trust each other.

If you constantly work under pressure and fight with impossible requirements, that is the sign that the organization is badly managed. Either lack of people to do much work or not professional preparation/organization of the project.

Work sleepless nights? Out of the question. Since I'm not paid on the per-hour basis, I only devote 40 hours pro week to the job.

Of course there are sleepless nights. When I work on my private projects.

The best way not to burn out is to not care.

User
+1 For the last comment (...care.) - been my motto all my life :-)
ldigas
A: 

I drink a lot of coffee and convince myself that the stress comes from the coffee.

Plus I have a cool Powerball. ;-)

MiniQuark
A: 
  • i-pod
  • TT, Gym, Basketball
  • Coffee/ Juices
  • Walk out with my friend/friends, when stress reaches the peak.
  • Call for a meeting
Techmaddy
I find meetings generally increase my stress level, not decrease them. It does give a chance for a break though.
Matthew Scharley
Most of our meetings are cool and again it depends on the Manager :)
Techmaddy
+1  A: 

Fast-paced dance music is always good for heavy coding sessions - it blocks out everything else and can help you get into a mental rhythm.

ck
+1 lots of coding == hardcore dance music ... although code review comments and bug fixing == 80's music :-)
WestDiscGolf
A: 

The main ones for me is trying to be motivated to go to the gym which recently has helped a lot especially as I'm trying to improve my fitness/loose weight for UK disc golf tour, playing disc golf regularly (walking and fresh air) and leaving the office on time.

Before I got married and lived close to the office I found myself getting in early (to avoid traffic) and leaving late as I was in the groove, or wasn't motivated to go home or the usual "I'll just do this little bit before I go" and it got me in to the sleep, work, sleep, work cycle which wasn't healthy. Now I have got married and live over 85 miles away from the office, I get the train to work ... work my day ... and make sure I leave at 5:30 at the latest to get my train home (and yes I do some work on the train) so I'm not late home so I can see my wife :-)

I didn't realise until I did this how important it is to leave work on time when you can, then when you do need to work late towards a tight dead line it's not the norm and it's more productive.

WestDiscGolf
+2  A: 

Start smiling and laughing at random intervals in random places for no obvious reason. You will feel relaxed watching the reaction of your colleagues and the management will finally understand the message.

User
+1 made me laugh out loud in the office ... and feel better :-)
WestDiscGolf
A: 

I think the most important thing is to realize that you can't work miracles. No matter what you are being asked to do you need to prioritize tasks and work on them as you have time to work on them. When you get piled up with multiple #1 priorities, you need to bring it up with your supervisor/manager and ask them to decide what your real #1 priority is. You can only support one at a time.

If you are comfortable in your abilities then you just need to be honest with management. Don't burden yourself with impossible expectations. You need to be realistic and communicate it to the others that you work with.

If your entire team is being burdened with too many priorities then you need to perform triage and prioritize them. Throwing people and time at the problem is counter productive unless you have come up with a prioritized plan for attacking them.

You don't want to spin your wheels. Working long hours and spending sleepless nights is usually a waste of time. Working a well thought out plan (even if you have had to come up with that plan under tremendous pressure) is better than just churning in reaction mode.

It has been my experience that if you can show that you have a cool head while others are freaking out then you have a good chance of helping to shape the response to the emergency.

I don't mind working long hours or weekends, but only when I find it a reasonable response to the problem. I will always try to come up with the best solution and rarely is that to have people work long hours and weekend.

bruceatk
A: 

For me it is all about focus and trying to juggle all the issues that come up when you are implementing something new. If you are on a deadline you need to be hyper organized and not get distracted chasing down answers. In that case, I like making a very fine grained lists of tasks that need to be accomplished and manage that list slavishly as I am working. That way when things come up I can add them to the list rather than being distracted.

Mark Mascolino
+1  A: 

Firstly, train for it:

  • Make healthy dietary choices, such as minimizing sugar and caffeine, so that your body is already optimized to handle stress more effectively.

  • Exercise so that your body can handle bursts of adrenaline that are released during stressful times. This will also enhance your performance because your breathing will be regulated and your blood pressure will be under control.

  • Practice code sprints. Challenge yourself to code something quickly, or find some coding puzzles, like those used at programmer competitions, to test your metal. This is critical to helping you find your zone. Programmers deal with coding crunches most effectively when they spend most of that time in "the zone".

Secondly, make sure that management understands that You Know that it is CRUNCH TIME.

Then keep your own schedule. For me, that basically means working as much as possible, sleeping when I need to and getting up and continuing, on my terms. I happen to work best in isolation and usually also in the evening or into the night, so this means that the concept of arriving on time to work goes out the window. I flex hard. The pitfall, here, however, is that once you have done this so many times, you inadvertently change your cycles.

The bottom line is to anticipate and prepare for these crunch times.

EnocNRoll
A: 

Sugar, caffeine, and nicotine.

Wait, this wasn't confessional?

Sorry. Wrong group. I have nothing useful to add. :(

Mike Hofer
A: 

Try to isolate myself for the most part (put on head phones even if you not listening to anything , most people will leave you alone) , unlike most people i prefer the silence over noise. While music does help get you into the zone its the silence that helps you to focus.

RC1140