8 Ways For A Programmer To Stay Sane

Being a web programmer is hard work. Long hours, coupled with the fact that we're presented with nothing but problems, can make our job unbearable. Not to mention deadlines and unreasonable customers. Oh, and the fact that we're all casualties of the never-ending browser wars.

So why do we do what we do? We love programming. We love creating functional, virtual worlds where people can get information, post pictures, and meet people. We love taking a given set of rules and bending them to their limits. We love that we can post a collection of code that can some day be a money-making powerhouse like Facebook or Digg.

With all of the rewards that come from being a programmer, the job can still be overwhelming. Dealing with the stress that our job creates is an important skill. I've compiled a list of ways for you, as a programmer, to keep your sanity.

Know When To Step Away

Programmers, in general, are obsessive, detailed-oriented people. We don't like admitting defeat and we tend to not step away when we are frustrated. The best thing to do when you've spent a long period of time working on one problem is to step away. Clear your mind. Take a walk. Come back to your desk when you've cooled down.

Go Out For Lunch...

I used eat lunch at my computer every day -- I'd check out my favorite websites and send a few personal emails. Once more and more customers knew me, I'd get inundated with phone call after phone call during lunch and soon I didn't have ANY time during the day to myself. Don't let your lunch hour become another hour of work! Get away from your desk for lunch!

...But Eat Healthy

A healthy body is a healthy mind. It's much easier to grab a quick donut or candy bar when at the desk, but take a quick break and eat something healthy. Try a small salad, a granola bar, or good old peanut butter and jelly sandwich. Eating poorly can make a person feel weighed down or even depressed (I tell my coworkers that my self-esteem is low when I eat at McDonald's). I suggest eating a healthy sub sandwich -- it will fill you up, give you the nutrients you need, and not make you feel tired or ill.

Ignore Your Home Computer

After a frustrating day at work, stay off of your home computer -- your personal programming can wait another day. Your personal programming could become more frustrating than your work problems, and that's not what you need. Let it go for the night.

Get Another Non-Tech Hobby / Exercise

Having passions other than computer-related hobbies is ideal. Performing physical activities is even better, as it will help you stay in shape. Too often I hear other programmers speak about nothing but computer-related topics -- get out of the programming world once in a while! Find another hobby! Learn how to cook. Start playing chess. Do puzzles. Play soccer.

Spend Time With Friends

Friends are generally low maintenance and have interests other than computer-related topics. Schedule a weekend event with your friends. Get together for a barbecue, go to a movie, play video games, go to the football game, or have a night out on the town. Instant messaging your buddies doesn't count!

Take Your Vacation

When things get tough at work, don't be afraid to use your vacation -- it could save you from outright quitting when work is overbearing. You don't have to go on an exotic vacation or a cruise; hell, stay home if you want. The point of the vacation is to focus on not working.

Know If Programming Isn't Right For You

If you're losing your mind on a consistent basis and your job is affecting your family, health, or sanity, it may be time to stop. There are other jobs out there -- maybe you'd be better off with another career. Just know that programming isn't everything and you don't have to suffer because of your job.

Dealing with the stress of programming is a very important skill. How do you deal with stress at work?