612

I'm having a hard time taking my mind off of work projects in my personal time. It's not that I have a stressful job or tight deadlines; I love my job. I find that after spending the whole day (8-10 hours) writing code and trying to solve problems, I have an extremely hard time getting it out of my mind. I'm constantly thinking about the current project/problem/task all the time. It's keeping me from relaxing, and in the long run it just builds stress.

Personal projects help to some extent, but mostly just to distract me. I still have source code bouncing around my head 16 hours a day.

I'm still relatively new to the workforce. Have you struggled with this, perhaps as a new developer? How did you overcome it? How can I wind down after a long programming session?

Related:
Ways to prepare your mind before coding?
When to take a break?

348 accepted

Funny you should bring this up, because I have the same problem, and I have actually devised a technique that works really well for me. I use the last 5 minutes of my day to write myself a debrief note for the next day. This will do three important things;

  1. It takes your mind off the complexities as the debriefing will be a short form of all the things you've worried about, and helps clear the mind of all the what-if things.

  2. If your mind has a long down-settling time, the debrief note is the perfect place to use for a central of "things I forgot about" or should note somewhere. The debrief note becomes a knowledge central for whatever you did that day.

  3. It focuses your mind on the real issues. One thing is to clear the mind, another is to let it keep going, but more focused. So even if your conscious mind is letting go, it's probably a good idea to let your unconscious mind keep churning at the problems, and a good way to help your mind do this is to be slightly futuristic in your notes (thoughts on direction, for example).

Here's a real example from my note yesterday (with some notes in brackets) ;

  • Struggled with the new simplified data model for Topic Maps integration as recursive key/value pairs don't always explain complex relationships, but think that the added 'scope' column handles most if not all of my use cases. I feel I've reached a good place where some heavy coding can take place. Enough thinking, more doing. (Helps me get a feel for what I was doing, what I struggled with especially, and that it's about my feelings. Feelings is actually important in trying to make the brain settle.)

  • Implemented the dreaded global stack which seems to be working fine. (Focus your fears and worries where it belongs. 'Dreaded' prepares me for uglies in the future)

  • Talked with ZZZ about banners for the front page, and can probably do this through the Index Front Controller the easiest. (Put down some thoughts you've had on upcoming work. Once down on 'paper', out of mind)

And so on. I never have more than 3 to 5 notes on any day. If you feel there's more issues, try to classify them into 3 to 5 notes anyway. Anything more than that will freak your mind, and you're back to square one. :)

An added bonus of this is that this is, in fact, a developer's log, which many, many would recommend. After a while these notes will be so good they fit into release notes as well. Practice, practice, practice.

Good luck, and tell us what you came up with (a debrief note, if you will :).

247

2 parts gin, 3 parts tonic water, 5 ice cubes, squeeze of lime... and a willing spouse.

167

Program some more. Only the weak can't program 24 hours straight.

:)

Anyway, I like to go outside and play with my pets, something physical and less mental.

111

I found work was a bit of a contrast to academia, in that when you're studying there's no 9-5 ? your hours are when you want them to be. In work, I've tried to keep a crisp boundary between the 9-5 day job and my personal life.

Some things that help are:

  • Stick to regular working hours: I try to be strict with myself on how many hours I spend at work. This helps to keep a healthy work-life balance and prevent work taking over my mind.
  • Cycling to and from work: I ride daily and, in addition to keeping me in shape, it helps to take my mind off work on the commute home. (There's no time to think algorithms when you're pre-occupied trying to predict which motorist is going to try to kill you next.)
  • Watching a little TV: After the ride home, a 30 minute sitcom can help me lighten up and get my mind wandering. Or if I'm feeling more serious, I'll watch a few TED Talks and realise there are much bigger problems in the world than my current work challenge :-)
108

Sex... See, you stopped thinking about work already

95

alt text

Try a couple of these just up to the point you can't think of programming anymore


Image source: http://futureblog.designhotels.com/2008/08/

73

In the initial years, yes, all things are new and they keep bouncing. Once we are used to working with some years of experience, our mind automatically starts looking for something different, and sometimes we get married as a result :-) ...

68

Ballmer Peak

64

I try and bike home - cycling, especially long, hard rides, with climbs, will do wonders for your well-being. When on a bike, redlining your abilities, its really hard to think about anything else. Plus a little vigilance goes a long way when dealing with cars and other things on the road.

63

make out with a girl

51

Do something to make youself forget about it; like go out with friends for drinks, play sports, etc....

Try to have other hobbies besides programming

50
  • Swing dancing. Exercise and socializing and good music all at the same time. I do this twice a week, and it's the best thing I've found to keep me sane. (There are also women there. True story.)

  • Have a beer. Something fairly light (not a lite beer; just not stout---a nice amber ale or something) and cold. Just sit there and sip the beer, and don't think about anything. Sit on your front step, watch the clouds drift by, and sip your beer. And use a freakin' glass, you heathen.

  • Cook a tasty dinner, and have a few friends over to enjoy it with you. This should involve wine and conversation (about stuff like movies, books, music, your last vacation, etc., NOT work).

  • Read a book. Not Code Complete, you geek; read a damn novel. Preferably something you wouldn't normally read (i.e. don't re-read Lord of the Rings for the seventh time).

  • Take a vacation. Don't go to Florida and sit on the beach with your laptop, though; go hiking in the woods for a few days where your cell phone doesn't even work.

  • Listen to music.

  • Play music.

39

A number of things could help - exercise, meditation, art, music.

Some disciplines like yoga, and martial arts are particularly good at developing clarity of mind.

38

I try to leave work at work. This means doing something completely different after hours: working out, hanging out with significant others/family, TV, reading, etc. Anything not related to my day job does wonders.

I also find that working regular hours (meaning, leaving at the same time pretty much each time) also helps to keep a clear mind.

35

No need to do anything special.

The human internal garbage collector runs automatically when you slow down and stop focusing ,since it's based on a genetic algorithm evolved overt thousands if not millions of years, it is very efficient, you will barely even slow down when it actually runs :)

If anything is leftover, sleep will take care of it by rebooting your short term memory subsystem.

35

I've had similar experiences from time to time, depending on the nature of the projects I've been working on. A few things I've found help:

  • Many of your habits were likely formed while a student. Remind yourself that you're at a computer 8 hours a day now, so some of them can go, e.g.:

    When you get home, don't check your emails. Or use the damn computer. No one will have sent anything that important in the time it took you to get home. You probably had your personal email open at work all day.

    Learn the art of the of the 7-10 minute nap. After a hard day, just make sure to spend ~7-20 minutes in a decompression routine you figure out over time.

    I used to live in a flat with a band practice room in it that someone would be using when I got in. That's the opposite of what you want.

  • If you have trouble leaving before 5:30 or so, take a cue from the business analysts (or various non-developers) and just leave on time. It's too easy to get caught up in the 'just fix a few more problems' state, particularly when there's a group of devs in that state and no one wants to be seen to be the first to leave. Sure, do your work, but set yourself some rules about when it stops.

    Typically it'll take until most people's next 2-week holiday (usually the new year period) to re-resolve to do this.

  • Good old fashioned beer. Not a lot of it, just one or two. Make sure to have a few with your co-workers, particularly non-devs. If it isn't happening, instigate a few work beers once a month on Wednesday or so, or around milestones.

    I'm not saying this as a silly ode to drunken chatter, it's just that it's been an incredibly valuable tool for getting out of the incredibly focused mindset of the problems you're coding/debugging tend to leave you in. Sure, you're likely doing great work, but there's a bigger picture, and this is a time-tested, simple way to remember this.

    (Usual caveats apply on this one)

  • What everyone's getting at with the sports / hobby / girlfriend thing is simply to find stuff to get you out of your head. You spend all day inside the thing, and your body's happy to leave you there - and that's the source of your woes.

    Find something that exerts / exhausts you, is creative / abstract, or otherwise deals with the world around you. Which is why I'd suggest avoiding reading - at least for the purpose of your goal you've stated.

    Of course, the girlfriend part will occasionally leave you with bigger logic gaps to comprehend than the code you're worried about, but...

Anyway, enough from me.

Hope this helps.

27

Martial arts help me clear my mind.

24

A young developer myself, I know where you're at. Believe it or not starting your own project at home to work on 1 or 2 hours a day after work seems to give a different perspective on things. Do a simple project 3-9 months (estimate). Only work on it for a limited time, especially on weekends, to make sure you go out and have fun. Chances are you probably have some old abandoned hobby you can get back in to. Things from our childhood make us especially happy (google Seligman + psychology).

One of the most important problems we're facing is that all of a sudden we're faced with a much more sedentary life style. Try to go for a run or do something to stay physically fit, it helps the mind, and our egos.

23

Play Team Fortress 2 or go to Starbucks to read and study.

20

Ah Bryan

What a fantastic problem to have!, What luxury!. Love your job, your mind filled with interesting code problems. I dont think you realise how lucky you are.

As you travel along in your IT career, more and more your problems will become less interesting, you mind filled with administritave procedures, budgetary constraints, people issues, legal hassles.

Now is a golden time for you, just relax and enjoy the moment. :)

Michael

20

Not directly to get your mind completely off of it, but for me it has helped a lot to have pretty steady working hours and a stationary computer at work. I.e. not a laptop that you bring with you home that lay somewhere screaming for attention:

Use me! You know you want to! You could get so much done if you just pick me up and work a little! You know that thing you are thinking about right now, come try see if it works!!

19

After I'm done working, I tend to cook (a similar but different exercise) which is generally relaxing. If I've had a rough day, playing some xbox seems to help, especially an FPS, or just listening to music or watching TV.

However, if I need a technical "hit" I might pop onto Stack Overflow and answer some questions - engages my mind technically without wandering into work related problem solving, which tends to keep me awake at night.

15

Decompression happens naturally on the drive home as long as I can go over 50. Some days on long shifts, I have to take a drive in the middle of the day for this reason; when I go back it's like going in in the morning.

Then I go home and play video games about driving fast.

14

Join a local rock climbing gym. It will be the most fun and best way to stay in shape. You have to focus on what you are doing. It's easy to let your mind think only about the next hold and the next movement up the wall.

Of course that brings a new problem: How to wind down at night after climbing...

14

There are 3 things that really help me with this problem:

  1. Excercise, excercise, excercise (For me, it's jogging in the woods...)
  2. Make a to-do list for yourself for tomorrow, or debrief yourself as AlexanderJohannesen wrote (Excellent post btw)
  3. Don't engage your thoughts

With the last one, what I mean is this: when something about programming pops into your head, simply note to yourself what you're thinking about right now; don't try to force it out of your head. Don't start to solve any problems, but make a note that you're thinking about a problem. Be a spectator to your thoughts and not a participant. Strange, but it works! ;-)

10

Weight training / Body building... well more weight training then body building. I'm not willing to put forth the effort to do true body building.

I started 3 years ago not being able to bench press 100 pounds. Today I weigh 168 and I can bench press 225 on a good day and 205 any day. I used bench press as an example because it's the most common measure. I feel incredible and it helps to clear my mind.

I would like to know if there are other developer that like to do weight training.

9

Find other things you are passionate about. For me it's my kids, politics, church.

9

Sex. And cuddle time after.

7

When I was young, I had a pretty close group of friends and we were all similar techs, we would purge all our thoughts by ranting at each other for 30 minutes, after that we had to stop talking tech (allowance made for films, gadgets etc).

These days its easier, I stop work, go upstairs and put in some decent family time, cook the dinner, and have a glass of shiraz.

7

Here's the question... If you love coding so much, then why do you want to force yourself to get take your mind off the thing you like? I mean, if you truly love doing something and can do it 24x7, then why not? Let it be!

I have a feeling that either someone tries to force you off coding (parents, girlfriend, etc), or makes you feel uncomfortable when you're at computer; or you yourself are thinking that this is not good to code too much. In the latter case, you gotta recognize that each person is different and if you like to do something that "conventional" folk doesn't do, it's not a problem. People only look similar, each of us has vastly different interests and it's not constructive when you're trying to squeeze yourself into a "normal" person's envelope. The reason I'm putting "normal" and "conventional" in quotes, is that such thing doesn't even exist :)

If it's family or friends, or significant other who's trying to not let you do what you like, be firm. It's your life, you are the one who decides what to do and how to live.

6

Buy a house.

You'll instantly have dozens of things to take care of that don't involve any programming at all.

5

For me, many things work, and I do try to leave work at work. But 2 top methods if I need to specifically evict work stuff:

  • Music (listening to, playing)
  • Exercising

Both of them are generally relaxing, and help if I feel tired (although if superb exhausted, best way is to sleep of course).

5

I've once had a boss who was very tolerant to us, the IT guys. A former sysadmin himself, he even made a rule for us. No work during the last hour of the day, only emergencies. We were spending that hour shooting each other in Quake 1. Our kind boss wasn't even disturbed by our wild screams, because he was doing it with us :) I don't claim this is a panacea for everybody, but it worked for us. We were always leaving the office very fresh, with a clear mind and in a good mood. A dose of adrenaline makes wonders, you know...

5

Usually I'll either go for a ride (Jamis Diablo):

bike photo

or wrench on my car (87 Honda Civic Si w/ '89 Acura Integra motor swap):

alt text

alt text

5

Since the answers are already quite good, I'll just add a quick list of what helps me:

  1. Hot shower or bath
  2. Mindless video games
  3. Taking a walk or drive to just let my mind work through things
  4. Work out/exercise
  5. Talk to a friend or coworker
  6. Meditate (depends how worked up my mind is)
  7. Sex (when I'm so lucky)
  8. Drink (in moderation of course)

It all depends on the situation and personal preference, sadly. I wouldn't mind if there was a cure-all for an overloaded mind :-)

4

Meditation has really helped me in all areas of personal and professional life. It's all about focusing on something very cyclic and routine, such as the air touching the tips of your nostrils when breathing in and out. You practice "mindfulness", which is really another way of saying "distancing yourself from your anger, fear, frustration, happiness, sadness, ecstacy, and etc". You don't have to try to achieve all the spiritual aspects of meditation that are sought in Buddhism (such as ego loss); it can be simply a way to relax. Try this book out: Mindfulness in Plain English

4

running just running ......

3

A serious problem not only for full-time coders. I myself have bought an excavator which I use digging to clear my mind during weekends. Strangest hobby ever, works very well... ;)

(http://boonzaaijer.wordpress.com -- in Dutch)

In other words: find a totally un-computer-related hobby.

2

I don't think this problem is only related to work. Thoughts of anything you have done will always keep coming to your mind. You should not get worried about this that you can't keep your work off your mind. Simply enjoy whatever you do afterwork. If you enjoying what you doing then work related thoughts will not bother you. But if its giving you trouble then probably you need to find something else after work which you will enjoy. Once I go home I get time to play with my little daughter and all the stress just disappears. Gym and swimming also helps me and I love watching sports wo when I am busy in this my work is off the radar.

2

Watchin Scrubs and Family Guy!

...and Poker, Alcohol and Women

2

Swimming...

2

Well, relaxing is hard when you have excess of responsibilities...I do envy those that can live well with that...

In my case, I try to do sports (running, swimming) and then relax by cooking and listening to music (and, of course, enjoying lots of TV shows)

2

try yoga. It will relax you and refresh your mind so that it is ready for writing more code.

2

I have two children (3 and 1) and when I leave work I don't have a chance to think about work. Not sure it is relaxing though.

2

The mind, just like any other part of the body, can be trained to program or to relax. There are lots and lots of ways to do this. Here are some:

  • Educate yourself to stop thinking about the job the minute you go home. This is really really important
  • Don't work long hours unless it is really necessary. Also educate yourself on this. The stress and tiredness will eventually get you if you work too hard
  • Go do something which you really like
    • Like sports (which is easy to get going)
    • Martial arts are great, but it takes time
  • Meditation is also great, but it also takes time
  • Start doing psychoterapy with a professional
  • Find a nice girl
  • Anything cultural really (reading, dancing, music, cinema, theatre, etc). Maybe you'll discover a new passion

Just bear in mind, it is easier to learn a new language than to change the habits of the mind. Make sure you persevere, don't expect some things to change overnight.

2

My good friend Mary Jane. ;)

2
  • Swimming
  • jogging
  • simply walking
  • roller skating
  • healthy food
  • good sleep
  • no alcohol
  • talk to people
  • do something else (not on the PC )

You need oxygen, a lot of oxygen. Healthy food and good sleep. Forget about a regular alcohol dose - it eats from your brain's capacity much more than you would expect ... Talk to people ... be social ... Do not go too deep into the computer program world ... Even it is the most fascinating one ... You might get lost ...

2
  1. Beer
  2. Sex (I'm married to a very understanding spouse)
  3. Play with kids
  4. Yard work
  5. Walk
  6. Read
  7. Reality Television
2

Do SPORTS you geeks!

2

Riding a bike home (commuting) focuses your mind on staying alive and not getting hit by a car.

I have found nothing better than that.

2

Find the loooooongest way to get home from the office, and ride your motorbike thow it ;)

2

Chill music, definitely :)

2

Have a baby, who will then ensure that most of your spare time is profitably occupied so that work will be last thing on your mind.

This can backfire though if you use him/her as a sounding board when trying to explain difficult debugging issues (I am blessed with a son who will grin inanely whilst I try to explain a multithreading bug that's been bothering me).

2

Bike to work, or take up a multi-sport. Believe me, once you start training for a Triathlon you'll have a hard time thinking about much else outside work. But hey, that would be another thing to get obsessed about.

2

Learn an instrument...piano, for example. In a few years, when you're quite familiar with the instrument you've learned, start improvising. When you're improvising you enter in some state of mind where your rational/blocking controls are shut down. Well, any improvising activity would suffice, actually. :)

2

Catch up with all your favorite TV shows. I'm talking marathons. Nothing like 5 episodes of Futurama in a row to clear your mind.

Watched all the shows you like? Get more!

Also, I'm not a TiVo owner myself, but that should help out if you do have one. :)

2

I've tried both light and heavy exercise, and don't seem to get the same thing others do out of it for stress relief in the short run. In the long run, being in better shape better enables your body to deal with stress, so that's been a win.

When I was in my 20's, I was a hypersocial heavy drinker; I went from work to the bar, and probably talked to 100+ people I already knew in any given week.

Social exercise - a weekly volleyball session, or even a bowling league - is a pretty darn healthy combination.

These days, I do custom woodworking, with both traditional and power tools. Having something physical and vocational to do helps me focus quite a bit, lowers my stress level quite a bit, and is something fun that produces permanent, solid things.

2

Play Counter strike or any other online game :)

2

I took up gardening - simple manual work frees my mind. In the winter, odd as it may seem: more programming, but then on private projects

2

Cup of coffee and a game that requires your full attention (usually a multiplayer action game or a well hard retro console game).

I also have a rule that I don't do anything computer-related for at least an hour before bedtime, otherwise THAT will require clearing your mind :)

1

go to sleep, watch a movie, watch any sitcom comedy, take a walk in the park, play with your kids.. if you are a foodie, eat something you really love

1

Personally...

I prefer long(ish) commute. I used to drive 45 minutes to work, now I take a ferry back and forth. I could take the train that takes 20 minutes, but I'd rather sit in a boat for 45 minutes and unwind.

I think the key point in all the responses is that you need some sort of break between work and home. If it's 30 minutes in a car, that works. 30 minutes on a boat, that works. Get frantically home then do something (like exercise) for a bit, that works.

There does need to be a break of some sort I think.

1

Go kitesurfing. There's nothing better than an awesome sunset kite-session after work.

1

All of the good answers have a pretty common theme: diversify!

For me it's play guitar - I make it up as I play. That helps because it uses a different part of my brain to programmed. I don't know what your hobbies are, but try doing something completely opposite to your day-to-day job. A diverse mental portfolio has the same strength as a diverse stock portfolio, and leaves your options open should you ever become sick of being a programmer.

1

Try Binaural beats to relax, sometimes it mays work ! :p

1

I've had this discussion with my co-workers and honestly I don't have this problem. When I leave work, I also leave anything behind that is bothering me. It is a rare day when I even think about what I did that day at work after I leave.

1

About 20 minutes of F1 on my PS3 usually does the trick for me. I think it's because the game requires my full attention/concentration, which clears everything else out of my head.

Find an activity that you can start without warming up to it, stop whenever you want, requires your full attention, and has no lulls or lags in activity to break your concentration.

The same thing tends to work for starting work again, too.

1

I generally try to take a walk, and then play a run of Team Fortress 2 with friends. Generally, I find that trying to converse with the players as well as not get fragged tends to clear out my mind pretty fast.

1

Walk home. Yeah, walk. Use your feet. This might be not the best solution in USA, but in most European cities, this is quite acceptable solution, since the distaince between work and home usually is less than 10 kilometers. Walking distance of about 3 kilometers / 2 miles will be enough to clear your mind (the rest of the road home can be done with public transit).

1

Run for 30 minutes and lift weights; I recommend Slipknot for the drive home.

1

These might seem like two utterly different solutions, but let me recommend video games (particularly twitch-based first person shooters and sports games--you don't want to have to think much) and yoga.

1

I like to do something physical yet still involved in the creation or destruction of something. Even during school, I worked a summer/winter/spring break construction job which involved electric, plumbing, and demolition (GLEE), etc. Get yourself a hammer and some lumber.

Also, sometimes a good way to decompress is to program for fun/yourself. Coding for work and coding for fun are two completely different mindsets. But you have to be careful not to start working on code from work and making it fun... strange things start to happen.

1

The best is a bicycle ride home.

1

I moved to Hawaii last year and work remotely. Yesterday, for example, I walked with my wife down to the end of our street, jumped into the Pacific, and swam until sunset.

THEN I had the previously recommended beer.

1

Initially i used to get nightmares of the code...

but now i am playing new games, watching movies and listening to music on my iPod Touch.

1

As many other posters said, get some exercise! Even if it is just swimming laps (as many of us Arizonans do year round) or walking to the store rather than driving. Physical exertion is a great way to relieve mental exertion.

Additionally, let someone else do the thinking! Read a (preferably fiction) book, listen to some tunes, play a video game, do something to, "let the mind breathe," as my parents used to tell me.

Ultimately, do something enjoyable and not involving a computer or intense problem solving.

1

Pretty much anything which requires a bare minimum of concentration will do: Bicycling (not in a city!), wood chopping, sleeping.

Equally important is to remember which activities will not work: Fast-paced games, more programming, web browsing, reading.

1

Unfortunately for me, if I'm feeling down after work, I just drink until I can't feel feelings any more =[

1

I find anything that gets me away from the idiot box does the job, especially anything outside. I usually hit one of the many spots in my area that is off the beaten trail and just go exploring nature wise. Or go for a drive, with no destination, and see where the road takes me. Not only are these quite relaxing, but you find some neat stuff off the beaten trail (like old cars, abandoned theaters, marooned ships, etc...)

1

have you tried a FPS on the xbox or ps3? definitely helps clear the mind of daily "what-if's"

1

Talk to your best friend.Thats what I do.

1

I love cooking.And being an Indian its enough to keep you busy and refresh your mind while cooking the Indian food.

1

Do something physical, which requires focus, but no analytical thinking. Two examples that work for me: cooking, and boxing (Muay Thai, to be precise...). When an issue is on my mind, it's hard for me to let go, even when I want to. Chopping onions, or doing a routine, are a great way to fool your brain and force it to focus on something else, using a different set of neurons. Find the one that works for you!

1

I run. It doesn't matter how excited, angry, or [insert other emotional state] I am, running for an hour or more has a way of clearing my mind and let's me focus on what really matters.

And I don't just run at a leisurely pace, I run with intent. I run hard enough for the given amount of time that I collapse on the couch. After maybe 10 minutes of running hard, my brain seems to limit what I am able to concentrate on: my breathing, my footsteps, and the most important thing on my mind currently. I have enough focus to enjoy every deep breath, every footstep, and the clarity to think through my most important thought.

1

Go do some strenuous exercise. Then wolf down a pound of pasta an drink some water. Then read some non-sci-fi until you go to sleep.

1

Some years ago, I had similar problems. My doctor then suggested me to write down the ideas/thoughts that popped up during my free time. I have tried to follow this and it really helped me: I was then able to "forget" since my mind knew, that the idea was not lost, but saved until when I needed it.

Practically I do it by writing short emails to my office address.

1

Take the dog for a walk. This of course assumes that you have a dog! Dog's live in the moment, so watching them and walking with them can help you do the same.

1

I ride the two hours home on my motorcycle...

Certainly helps to clear the head of anything programming-related when you get a good clean, clear run down the highways!

1

Sit down and have your cat lie on your lap. Stroke the beast gently, and listen to the soothing purr. Any cat can show you the true meaning of quietness.

1

I agree with taking notes at the end of the day.

And one of the things that helps me clear my mind the most, is driving my car back home. I love it, specially in the summer with the right music playing in the background.

It's my instant stress reliever.

1

cycling at the limits :)

1

Drive home with the car stereo on very loud.

1

I love pipe smoking. Everything from visiting the local tobacconist, to having a favorite pipe, to the ritual of prepping a bowl. It takes patience and skill and it fosters contemplative relaxation...

But you'll have to have a saint for a spouse!

1
  • Drawing or painting something really helps
  • Sometimes, a small glass of wine keeps the brain working, depends on the mood, use with caution!
1

With more coding, naturally.

When I finish my day job, I go home and work on "my" project. I look forward to it all day and go into it refreshed, with all thought of "work coding" gone.

But, as I go bed, I am already looking forward to "work coding" next day, because being a away from it has generally given me some new insight.

Ymmv

1

Gardening (I have 500m2 to maintain), playing Wii (current favourite: NFS Nitro), Stackoverflowing (yes), walking with dogs (I have two and live nearby a "dog beach").

1

This is indeed just another (all be it specific) version of the 'get a hobby other than programming' answer, but here goes.

I recently started taking RC helicopter lessons. Flying such a beast is very demanding on your concentration. So much so, that it totally blocks anything else that might have been on your mind otherwise, so I find it works very well indeed. My simulator has become my friend in this regard. ;-)

1

Odd as it may sound I'm a Lego builder. Every so often I'll get a large Lego set and build parts of it after work. I find that it is 'mindless' thinking, you just make it look like it looks in the picture on the box. Just 30 to 40 minutes of that really relaxes me for some reason.

1

It's REALLY hard to do that when you get home and have your Mom, Dad, Sister/Brother OR Wife/Girlfriend ask you a million computer-related questions.

But you should really get yourself one of the following:

  • A girl (preferably one who's not into computer science)
  • A beer with friends
  • Friends to hang out
  • A console, or a computer game
1

My other hobbies help distract me from thinking about what needs to be done at work.

Crocheting is particularly useful because it's almost a mindless task. Just keep track of the rows. :) Although, I should be careful with the word "mindless" because it does require focus or else you'd be bound to mess up.

I don't know how you feel about crocheting, but I would suggest trying out some new hobby (not related to computers). :)

Another new hobby that retro gamers might like: geeky 8 bit perler bead work

1

If you have a girlfrend then do something together, like going outside, have fun, and forget about some hours of your job. This makes me relax, even in the hard days.

1

If I'm just leaving the office and I need a "quick hit", I go straight to the movies (saw Inception a few days ago... twice). At home, watching mixed-martial arts usually get me pumped up and in a completely different state of mind, even more so than watching T.V.

1

I watch The Simpsons; very funny, specially Homer

0

When I have been working on some problem, even when I am being quiet, I will sometimes be thinking about work, and this is healthy for me, as my subconscious will often find a solution I haven't considered.

This used to happen often when I would go to the movies, and I find that it still happens when mowing or driving home from work.

0

take a break :)

0

Train to play with your local comptetive ultimate frisbee club team.

0

Go for a run (or any strenuous excercise).

I agree with the reasons @Neil Kodner pointed out.

When you really push yourself with physical exercise, absolutely everything else seems to drain out of your mind.

The only thing you can think about is sucking in enough oxygen to not pass out (and the pain) ; )

It's oddly refreshing and energising.

I find excercise as beneficial for the mind as much as the body.

0

Even though I feel like going straight home to eat, shower, and pick up where I left off, I do one long 5mile run a week and work out at the gym 5 days a week. I never feel like doing it, but feel better afterwards. When I finally do sit back down in front of a computer I have more energy and can look at challenges with a fresh point of view.

0

Clearing the mind ...

I don't think it's bad to chew on things. It always takes 2-5 days for the best solution to a problem to occur to me. Spinning on problems is annoying, so ...

Exercise is essential, and a joy, if you have a sedentary intellectual job. Search around that information network for research on the mind and the importance of physical exercise. You need physical exercise to keep your brain healthy and cool off the stress. A little sweat can't be promoted loudly enough -- most people aren't getting enough exercise despite hearing this hundreds of time. How about putting it this way: You will produce better software faster and with more pleasure if you take off an hour early and exercise.

I bike to work. I work in a city and find it is the fastest commute as well as found time. With an small investmest in good gear (gloves, rain-gear, decent bike, etc) it is pleasant in any condition. My 30-45 minute bike commute totally clears the code-head - or gives me time to turn problems over in my head in a relaxed way.

0

Gaming, photography and sports ... after all the stress i just need to get out from time to time.

0

A well known problem and I don't think this question is misplaced here. If you can not switch off after work, you won't sleep that good, which affects the work next day!

At my initial time I hardly could sleep when I had to solve a tricky problem during work, especially if I already have a solution in mind, but couldn't try it out yet. Than I keep the solution in mind and search for improvements, because I don't know yet if it really works.

But since then I calmed down a bit. Mostly I work a bit longer until I tried it out, but if it does not work I need some distraction. Most effective are making sport outdoor, or just use the cross-trainer with a running TV, cooking, baking and the rest makes my fiancée :)

0

Walk from work to home, go to a gym, spend time with family, or devote a bit of time to your hobby (of course if you have one except programming :P)

0

Running, outside specifically... you cannot afford to run outside and not be aware of your surroundings (especially in the city).

I've yet been able to find a cure for dreaming about a challenging problem though....

0

Only two things can really get you mind of the code:

  1. Working out
  2. Liquor

Practice both regularly, and you will be GRAND!

0

I also struggle with this problem almost every day. Here are some of my recommendations how to win this fight :)

1) Do some sports, e.g. climbing is extraordinary good, because when you climb, you have to be fully concentrated on the path and don't have time/opportunity to think of the job. I also cycle to/from work, go to the mountains, swimm, make long distance running etc.

2) Find some friends who are not IT freaks. Talk with them about "normal" problems like broken car, children etc

3) Find a girlfriend/get married (except your girlfriend/wife is the same kind of freak as you are, that wouldn't help)

4) Have children/buy a pet

5) Buy a non-IT magazine, read a book, go to the movies/theater.

6) Go for a drink with couple of friend - I strongly recommend it at least twice in a month.

Good luck :)

0

Find interesting stuff that's not computer related. For me, that is music, working out, gardening, etc.

Things that are very unvirtual, I guess.

0

Spinning poi, staff :) It's not quite martial arts but it's good to just let your muscles talk to each other and let your mind drift for a while.

0

go out into the world like sit down on the grass and just do nothing and look around it does wonder's. i personally love going to the beach especially ones that are empty so you can only hear yourself thinking the wind and the water.

0

A blend of physical and mental activity is generally perfect.

You cannot think about work because you are required to think about something else. The physical activity will also help you relax and cool.

Suggestion : motorbike riding!

0

Take a class of some kind. I am 23 in my senior year and working full time. On the days I don't have class I find myself engaging the problem you described. Attending class really takes my mind somewhere else. I'll come into work the next day without having given a second thought to what I was working on for 15 hours.

0

I punch people in the face. Seriously that is the absolute best way to clear my mind. If anyone wants to join me visit http://www.fighthouse.com/muaythai.html

0

Applied tai chi chu'an . As earlier comments indicated: physical exercise, having to keep your mind on where you're moving various body parts, dealing with people punching or kicking at you, or simply keeping your balance -- they all have a tendency to push out other concerns.

0

Find a hobby. For me researching my family roots (genealogy) worked excellent because it could be done in front of a PC ! www.Geni.com Doing exercise is another way of get your head off the job. Hope you get the "cure" ;)

0

Fishing generally does it for me.

0

I put a lot of energy into an answer for a similiar question... It starts off with a little blurb about productivity, but I would give most of the same advice: Stackoverflow: How Do You Vent Stress As a Programmer?

0

I drink a few glasses of white, dry wine.

0

Problem 1: you say your job is not stressful yet later say your condition builds stress. If your job is not inherently stressful but you get stressed from its content, that's a red flag.

Problem 2: you don't like the intrusion of problem solving in your thought process after work hours. This is part of the fun, but it can only be so unless you find a way to operate your mind as a multi-threaded machine - that is, if you want a life and stay in this business. I too am constantly thinking about writing code and solving problems. I do it at my kids games, at the dinner table, watching TV, etc. It does not get in the way. I can recall being at a play and getting an idea that eventually grew to something big.

I'd say that if you stop fighting it you may learn to enjoy it and integrate it into the other parts of your life so it aint so stressful.

0

There are two things that keep me from having this issue, and it IS a major issue for a lot of programmers.

  • EXERCISE Your focus change 100% during a workout. You have focus on yourself and not your work. Plus it will do you good :)
  • Scheduale what your task for tomorrow are. Although you can remember it without doing so it allow you to completely change your focus.

I know both things are mentioned but they are mentioned along with many other things. These two things are the key to this question for me.

0

Plan some goals for your day at work and try to focus on completing them by the end of the day. Try to get organized so that you have a to-do list written down somewhere so that tasks don't accumulate in your head and make you think about them all the time.

When you get home, start doing something immediately like cooking, gardening etc. Anything not work-related.

0

I have to concur with a lot of responses here, that you need to get up and move around: playing a sport, riding a bike, etc. Myself, I just take a good half-hour walk around my neighborhood and it helps a lot.

I used to fire up Half-Life or Team Fortress to decompress (I still play them, but for other reasons), but just getting up and moving gets blood flowing to your brain and gets you thinking about other things. It does for me, at any rate.

0

One thing you need the longer you have a sedentary job - Exercise. You must exercise. Your stress is not related specfically to programming. My guess is that you'd be this way no matter what kind of job you had. Again, the first step, exercise.

Also, you must prioritize things. If after a while you continue to have massive stress, you need to decide if your life is worth the stress/project/job you have. I'm not saying quit. I'm saying your job shouldn't be so important that it kills you. There are other people that program that have learned to say no to certain things in their job. Perhaps you are deriving too much satisfaction from your job, which in the end, will fail you.

But I do believe when the newness wears off you will somewhat calm down. If you continue to not calm down you need to think about stress management, and again, this is not a programming only question. Many people feel this way about their jobs.

Although I don't have one and would starve if I did, there is something (good) to be said for manual labor jobs.

0

8-10 hours of coding? Lucky you. Most programmers are lucky to get 4-5 hours of programming done. The rest is spent in meetings, reading other peoples code, and various administrative tasks.

But getting picking up ones kids and making dinner for them tends to flush my head of any work-related thoughts.

0

Snacks, Singing, Sleep, Sports, S*x ;)

0

Do some physical exercise. I know it sounds too heavy for some people, and there's a lot of enemies of exercising, but there is no better way to clear your mind than having to do some muscular effort. In my case some swimming is the right choice. Just try it.

0

Halo 3 Multiplayer.

0

Start collecting frags, play Counter Strike 1.6 Multiplayer

0

There are good things you can do. such as open the cs 1.6 and take a AK47 to kill somebody online. Especially I like to join a server which allow team kill and I might headshoot a teammate who is aimming at enemy with AWP. That really make me happy and relaxed. After that I got energy for another coding day.

0

Music, or art or some other right brain activity.

0

Gaming usually does wonders for me and helps keep my mind off whatever problem I'm currently trying to solve. I usually play some mindless FPS where I don't have to concentrate too much. It doesn't always work though, sometimes I just have to finish a problem before doing something else.

0

Play ice hockey, basketball, or go to the gym. A really intense workout really helps take my mind to a different place. If it's a sport, it's a lot of fun, too. And you'll feel like superman/superwoman after. Group sports give you a chance to talk to people, too, and joke around, which is rewarding in so many ways.

But don't go home first. Bring your stuff to work with you. The second you get home, it will be 100 times harder to motivate yourself to leave. Go straight from work to the gym/rink/court/whatever!

0

Why not play mafiawars in facebook?

0

Sitting in my car for 2 hours to get home :(

0

Watch anime to stimulate my imagination as well as to relax. I also read books.

0

Go skateboarding.

Something about hurling yourself down stairs, getting "nutted" by rails, and landing sweet tricks clears my mind all to well.

0

1- Songs of Nusrat Fatah Ali Khan

2- Painting

0

One thing works for sure which clears my mind off 'programming' when i am about to finish is

think of more stressing issues like 'Health care', jobs moving abroad , recession or same.

but I won't recommend

hmm a poitive approach i take is work on next date, think about next pay day. browse my badges and points in my profile at stackoverflow.com (for the last day) or anything, anything but programming.

and finally all works if your job for the day was properly done, you are satisfied with your code / progress and you feel the day was well spent.

0

Simple Play Fifa09 or Fifa10

0

simple Play Fifa09 or Fifa10

-1

Watch a move, then come back after 8-10 hours :-)

-4

I think that is a good question, this would happen to most developers around the globe. if you willing to do, this will help you and your organization to work out quality product and less developer stress http://scrummethodology.com/

-9
  • Get a religion
  • Look for a purpose in your life