73

One trend I see in the awesome developers I've met, is that they devote inordinate amounts of time to coding at the expense of (usually) their health. Personally, I also find it hard to motivate myself to keep healthy.

Every now and again, I meet a fantastic coder who has it clocked; they are up to date with the latest dev news, have time to read about good programming practices, and to finish it off, have happy wives/husbands and families.

How do you guys/gals manage it in the short 24 hours a day that we all have?

Related:

Finding the time to program in your spare time?

53 accepted

My only secret is to maximize the time I have available. Your time is incredibly scarce. Don't waste it playing with things. Get what you need, read the buzz, keep the sites like this to a minimum and spend your actual day at work writing the best quality code you can.

I have made it a priority to spend time with my wife and kids. You have to schedule it just like everything else. If you don't state it as a priority you will let it slip. "Just one more bug test" quickly turns into a very late night. Take the time off, go play with kids and wife - THEN look at the bug. The bug will be there, I promise. The wife and kids will be asleep by the time you have it solved.

Besides, there is a lot of research to suggest going and doing a totally different task (like play) can free your subconcious to solve the issue. Coming back at the problem later with fresh eyes will often reward you with something you were missing before.

That is the biggest difference between me now and 15 years ago. Back then I would spend entire weekends trying to solve some complex problem just because I could. Now I spend the time with my family and let the cool problems be solved in much shorter time frames, or by working with a group.

Yes, you can sometimes solve the problem much faster by sharing it with another coder. Even if they are just a sounding board, getting someone listen to you ramble can be helpful.

Get your priorities right. Code is one of those activities that will expand to take all the available time if you let it. Do the fun stuff (eat dessert first) and I then find it easier to work on the hard stuff.

30

This isn't really about being married as it is about time management. Being married is just providing you an excuse to, what might have been, poor time management before. The only difference is that, before, because you had no other responsibilities, you could goof off and not get much done and THEN get to programming and still accomplish a lot.

What you have to decide is what are you doing that is unimportant (are you spending an hour watching TV a night - is that worth it?), what is necessary (taking care of your wife and family is, in my opinion, more important as you made the decision to get married), and what you want to do (program/develop in your spare time). Say 'no' to those unimportant things, and then dish out your time to the others, respectively.

29

Everyone knows what you have to do to keep your life in balance: Eat healthy, sleep long enough, keep social contacts, don't work long hours, exercise... The trick is cheating yourself into actually doing these things.

Here are a few tricks which help me:

  • Treat exercise as a game. I use Nike+ and Wii Fit to cheat me into looking at exercising as a game I play, trying to achieve better scores. Nike+ has the added advantage that you can make your numbers public, so you know that people know when you slack off. Wii Fit is nice because it shows you a graph of your weight, which helps you immediately identify when you're gaining weight. Something else I do is listen to audiobooks only when I'm exercising, so if I want to know how a story continues, I have to go for a run
  • Have an ergonomic work place. This is part of exercising. Make sure you sit correctly; get a good chair. Find a way to work while standing. Take regular breaks: go outside for a few minutes each hour.
  • Have a landline. Nowadays, tons of people don't have landlines, they only have cell phones. I've had only a cell phone for about 5 years, and I've found that it discourages people from calling you, hurting your social life. In the few months since I've gotten a landline, I've literally had more random calls from friends than in the five years I've had only a cell phone. This really helps get my mind of work, and encourages me to go out, go to parties, or invite friends over.
  • Avoid interruptions when working. Programming is an activity you do while "in the flow." Every interruption costs you at least half an hour of "getting back into the flow" time, thus making it harder for you to finish stuff, thus encouraging overtime. I've heard of software companies with a "no interruption day", which is one day each week when people won't ask each other questions, thus allowing developers to have at least one day per week where they get things done. You can also encourage people to ask questions by mail, and then only check mail manually.
  • Have a productive work place. Get a second screen. Get the OS you like. Get a good keyboard and mouse. Install the software you like working with.
  • Work from home. This may not be possible for everyone, and it may not work for everyone, but if you can, at least try it. It cuts down on interruptions like nothing else. Even if you have a family it's easier to teach them not to interrupt you while you're working than to teach your coworkers. Also, it allows you to work when you're actually ready to work. I typically find that I'm more alert in the morning, so I tend to work early hours and spend the afternoon doing something other than work. It also allows you to exercise when you feel like it, rather than before or after work hours.
  • Don't mix life with your work. If you work from home, have a "work room" with a "work computer." Don't do work on your personal computer, and don't do personal stuff on your work computer. Don't give your employer your cell phone number; if he needs to reach you at all times, he should get you a work cell phone. Don't think about work when you're not working, but as soon as you sit in front of your "work computer," concentrate on the task at hand.
  • Don't work 100%. You're a developer. You probably earn enough that you can afford to work less than 100%, so why not do it? Even cutting down only 20% gives you one additional day each week to spend with your family, or to work out, or to just go for a walk and enjoy yourself.
  • Have your own projects. I've found that only programming "for work" eventually takes the joy out of programming. If you're working on a big enterprise Java app, why not play around with Ruby at home? If you're working on a huge C# application, why not play around with Objective-C at your Mac at home? You'll learn a lot, you'll discover the fun in programming again, and maybe you'll even write the next million-selling iPhone app :-)
  • Schedule your sleeping. I put all of my social activity in my calendar, but sleeping is the most important. Not only should you be reminded by an alarm clock to get up in the morning, you should have reminders telling you to go to bed. Simply staying up and working on something is far too easy, and it'll kill you eventually. It's enormously important to get your body to learn when to sleep and when to get up, and this doesn't happen if you don't sleep regularly each day. Yes, I would even encourage people not to sleep in on sundays. If you sleep enough during the week, you won't need to anyways, and if you'll keep a regular sleeping schedule, you'll eventually wake up automatically each day.
  • Catch enough sleep. You probably don't sleep enough; also, coffee is not a valid replacement for sleep. Not sleeping enough will start affecting your mental capacity relatively quickly, which makes it harder to get work done, which forces you to work longer, which takes away sleep time, and so on.
  • Cook your own food. Eating healthy is easy to say and hard to do. Most restaurant food is crap, so why not cook your own? It's not hard, and it allows you to control what exactly it is that you eat. You can cook the food the way you like it. Also, cooking is fun. It's an engineering activity; you're basically an interpreter for the cookbook bytecode, but you can improve that program if you find bugs. Also, your friends will love you if you become a good cook.
  • Use something like GTD. GTD or similar task management systems allow you to get stuff out of your mind. By scheduling everything, you don't have to think about chores which allows you to concentrate on the task at hand.
  • Don't think that you owe your employer anything. You work there because you want to, not because you're forced to. Your employer needs you more than you need him. Do the best job that you can, but don't let your work become your life.

These are a few of the things that come to mind. I do all of these, and in my experience, they really help tremendously. Hope this helps!

15

All I can say is, just wait until you have children. ;)

10

Get a laptop, work as you watch movies or tv with your wife at night. Honestly having a wife, having kids, having anything shouldn't be an excuse for not being able to learn and develop yourself.

I finish work, I spend a few hours with my family, and then the kids go to bed and we have down time. During that down time I choose to program. Enjoy the time with your wife, don't feel like you should be working, but remember there is time after that.

If you love doing something you'll find the time. I have twins babies at home and I still actively learn and progress at a pace as fast as before.

I've always thought that people who say once you get married, or have kids, your life is over, is just an excuse. Of course it's all about them, but your life is not over. You can choose to stay where you are comfortably or you can choose to excel from there. The same applies to having a wife but it's even easier than having a wife + kids.

Is it hard? Yes, but the hard things in life are hard for a reason... so that not everyone does them.

I should also mention that communication is key in a relationship. If you feel troubled that you don't have the time to advance yourself, then talk to your wife. Work something out together.

10

Make a compromise with your wife: Tuesday and Thursday evenings and Saturday early mornings are for yourself: this could be programming, reading, etc.

Other days you will be completely there; not thinking of what you need/want to do on your latest project (at least that's the idea: I still think of what I want to do while commuting ;))

Another thing I wanted to add: set your priorities when you are working on your hobbies. Don't screw around reading blogs or forums unless they help you accomplish your goals.

7

Finding an employer who truly respects work/life balance was key for me. I recently changed jobs and am AMAZED at how much more flexibility I have.

Being able to turn your switch from programmer to family during your commute can be hard, but I tend to nail it most of the time. My long commute helps with that.

6

We refractor and optimize our lives when new lines of code/life is checked in.

6

If your job only provides you with an income and doesn't provide you with education or the chance to do things you feel are important, you will have a hard time finding fulfillment by squeezing things in at the end of the work day. So now you have learned what kind of job you want. Work towards achieving that. And since the best job, the most learning, and the most amazing contributions to a better world would be just ashes in your mouth if she and the dog weren't with you, make sure you find time for her while you're improving yourself and finding the path to that job.

6

Communicate, work with her, communicate, work through it.... I've been married and programming for 20 years. It can be done. If it's part of you you'll find a way to make it happen. Just keep your priorities in front of you. Way too many people put the ME before the WE in marriage. It says in scripture that the two become one flesh.

ST

5

This one can go either way, but I find that working from home really helps me balance things. I can take lunch and spend it with my 2-year-old, spend the time I would be commuting making dinner instead, etc. Some people find it hurts their balance, since it becomes so much easier to work more hours instead, and it's definitely easier to goof off too, though, so it takes some discipline.

Finding an employer that really does respect your "off" time and allow you scheduling flexibility is also key, as others have noted. It's hard enough when you're not in a tug-of-war with your management.

5

I run my own small software company, and my major solution to the time issue was to build an office beside the house. No commute = more work time and more family time. Health wise, I try and get a run in most lunch times but it can be a challenge, and also try and play as much as possible with my kids outdoors. Kids love to play, and it can be great exercise for everyone involved. Having a young family, i.e. babies and toddlers, can be way more demanding than slightly older kids (mine are 5 and 9 now), so my advice to any one with the very young'uns is to go with the flow as things just keep getting better as they get older.

As I get older, I get much more jealous of own time, and the value I derive from it. I want to spend it with my wife and kids, or my friends, or even by myself, doing things I enjoy. For me, it's a matter of staying focussed enough to keep doing stuff I enjoying doing rather than vegetating when I'm not working. Healthy is also about keeping on having fun and enjoying life, smug as it may well sound. This takes effort.

4

I rediscovered my ADD (having had it pretty acutely as an adolescent) in my mid 30s. Learning about it as an adult, I uncovered the fact that context switching is just more expensive for someone with ADD. It explained the long nights solving obscure technical problems. Not because they were necessarily on my priority list, but because I didn't know how to stop. I was also less than confident in my ability to restore the mental context when I came back to my problem. I've since spent time developing my ability to context switch and various mental and external tools to maintain state. This allows me to balance more processes and get some decent satisfaction in my parenting, exercise, relationships, work, church, etc.

3

Get involved in some kind of exercise activity that is fun to do. For years I was a gym rat, but I found myself having a hard time going because it stopped being fun me me.

I picked up tennis again and it seemed to bring balance back into my life. I have been meetng new people an more importantly I spend hours exercising and it doesn't feel like I'm exercising.

Ultimately, finding something that you enjoy as much an writing code that doesn't seem like work seems to be the best way to go.

2

Beer...The cause of, and solution to, all of life's problems.

-- Homer Simpson

2

I often find exercise boring, as do many other programmers/developers.

To overcome this I subscribe to some good technical podcasts and load them onto an mp3 player.

Now I find I have been able to walk for over an hour while getting up to date with latest technical/development topics. It just amazes me how the time flies and how healthy I feel after doing this.

If you have a wife/partner/kids, you can either walk with them and talk, or if you run out of things to say there is nothing wrong with both listening to podcasts/music. It's still exercise.

2

I found this great quotation by Bruce Lee, which helps me create more time for the things I choose to make important:

"It's not the daily increase, but daily decrease.
Hack away at the unessential"

The last line equally applies to programming too ;o)

2

If you're not in a crunch time on a project, then it's "just" a matter of discipline to get your priorities straighten out - family, recreation, etc... But our job can, and often is, merciless when it comes to deadlines.

I personally try (and made it thus far) to reserve weekends exclusively for non-programming activities. During the week, well, is entirely different matter.

2

Sadly, time is scarce...

More sadly, people often forget how much scarce it is...

Saddest of all, there is always the choice to better use your time (and so much people do not understand/know this).

Your choices are your only way to "harvest back" time for yourself.

(Sorry now, I've to run away from my PC, the Grim Reaper is coming! :D)

Edit:

a link about social pressure to do more (vaguely related)

2

Multitask. Previously, I got two or three things done on my one hour commute (via train, tram) to work: travel, personal programming, and perhaps listening to a podcast. Now I travel by bike, getting forty minutes of exercise in each direction and 'listening' to a podcast.

2

Use the time for travel. I spend over one hour in my car each day to get to work and back. Thats lot of of time. Since I can't read during driving audio podcasts are a very good alternative. They keep me informed about the latest things. There are a lot of free podcasts on almost any field of interest. Audio books are fine too if you like them.

I also sleep less. My working hours are very bad since I really work 9 to 5. But getting up at 6 give me the chance to get things done before I go to work since sometimes I am not in the mood when I come home from work. Sleep less but still sleep enough.

I good calender software and good GTD software can be very helpful. I sometimes forget things or events so a constant digital reminder is just what I need.

Don't forget your friends. Twitter and emails are find but people really should meet from time to time.

Make a "No computer day". Each week for one day don't touch your hardware. Not even reading emails. do something completely none-electronic. Meet friends, read a book.

2

Get up early, I am married with two children. After work I start my second job of raising my children. So the only time I can carve out is in the morning while they are sleeping.

For weight training/fitness:
The most important part of working out is consistency. When do you have consistent time of your own? Mine is my lunch break. I work out during lunch, there is a gym a quick walk from my office. I do weight training and do not take a shower afterwards to save time. Do I smell, no, because weight training does not get me drenched in sweat. Also, I walk to work, three miles a day, that is my cardio.

Personal Interest Time:
Like I said, I have kids, that means Dora is on TV rather than History Channel, or I am playing hop-scotch instead of reading. To find personal interest time, I listen to Podcasts on my way into work. There are a swath of technology and programming podcasts that are excellent.

And the most important, Date Night:
A guy who is married for thirty years taught me that date night with the wife (and without the kids) is essential for marriage. Keep the fire going and make sure you take out your wife. When she is happy, you are happy.

2
  1. Delete your facebook account.

You will have loads of time leftover in the day.

2

I feel your pain, and will advise that the loss of "self-time" only gets amplified when you start having kids.

You have to make adjustments as you transition from a bachelor-developer into a family-man. I find inspiration in other successful developers with wifes.

As far as your interests in self-educating and spending time working on side projects, just because you're married doesn't mean you have to give that up. Work it out with your wife that you need X hours every T-TH (or whatever day(s) work) to work on your own stuff.

I've found with my wife & kids that works best. And the time that I'm not scheduled to work/study, then I devote it entirely to them.

Side note: I'd suggest kicking the sleep deprevation right away, that's a bad hole to start digging.

I hope that helps...

1

I find it hard to keep everything in balance. If someone has the answer, I'd be interested to see it, but I doubt there's a hard and fast rule. It most likely takes discipline and relies on us knowing when to stop one activity to start another. I think we all know how hard that can be when we're just one more change and compile away from making it work.

1

Sleep less. Seriously. (I do...)

Also, this might be generic lifestyle advice - but find a sport hobby that you enjoy and do it regularly. Besides improving your physical health, it's good to completely disconnect from a computed environnment every now and then.

1

One of my co-workers once has a very simple solution to this very problem: work from 7:30 to 4:30 every day, without exception. Go home and spend time with the wife and kid. Keep work and home completely separate (to the extent that we didn't know his wife was expecting!). He was also very moved by the book "Zen and the Art of Motorcycle Maintenance" and followed some of its philosophies.

I'm not saying that this approach is for everyone (I don't think it would work for me), but it certainly worked for him. In any case, good luck!

1

I am reluctant to admit it, but the most important factor is the expectations of the employeer and the boss. You can have all the good or bad habits in the world, but having a manager that is serious about your success on reasonable terms is the most important factor.

The second most important factor is having priorities and sticking to them. When you start a family, you have to make it a priority, and that is reflected in how you spend your time. Things inevitably have to change, and they will keep changing over time. You have to work hard to keep the priorities in control of the clock, and not the other way around.

This also means that you have to service the priorities in order. If family is most important, that means if you have a good boss for a while and now you have a bad boss, it is time to get a new job. You can't sit around and say: "My family is my number one priority even though my job used to be great but now it is eating into my home life." What that means is your job has become your first priority and your family is a nostalgic second.

1

I don't... :-(

I read about David Allen's "Getting Things Done", a book about an organizational method:

The Getting Things Done method rests on the principle that a person needs to move tasks out of the mind by recording them externally. That way, the mind is freed from the job of remembering everything that needs to be done, and can concentrate on actually performing those tasks. (from Wikipedia)

The same principles a developer should apply to his work seem to be the one s/he should apply to her/his life. With a little bit of discipline you can improve a lot the quality of your time, reducing the amount you waste.

Nevertheless it's really hard to mantain that kind of discipline - expecially when it comes to the kids (the boss, the customers, the colleagues ;-)

1

It is a challenge.

Make the most of the time you have. I no longer have time to read up or try out the latest technologies, but I use travelling time on the train to read magazine articles, so I can find out which things I need to focus on.

I try to put my family first, work second, and health third. But I use technology to motivate me to keep fit- I wear a heart rate monitor and run with Nike+, so I can record all the details of my runs, log them on websites, and analyse them. The geek in me really responds to that, and I get fitter as a result.

I think as you get older, you have to accept you are no longer the hot shot developer you may have been- you have different priorities. And that is fine.

So my overall advice is to look at your life, work out your priorities, and devote whatever time is appropriate to them.

1

I live & work in Florida, so my "solution" to combating stress and staying healthy is to run or bike to/from work as often as I can. Not always easy to get things to/from work, so that adds some extra fun to the puzzle. For example, I might drive in one day w/ extra clothes, run home (w/ camelbak for hydro, phone & ext HD), bike in the next day and drive home with everything. rinse, repeat.

If you have the means, I would consider giving it a try. The amount of stress you burn off and moments of clarity you can have are extra benefits. I probably solve one problem a trip. Granted these aren't always the be all, end all issues, but it's a great way to let the mind wander.

EDIT: If you're so inclined, using an iPod/iPhone this can be a great time to catch up on podcasts as well.

1

When she needs time to herself..take that time to do some programming

0

Time division multiplexing!!! :)

he he, just kidding. I am not really experienced in this, and had not thought it could be so serious. Thanks for bringing this up.... :)

0

Going along with all the people who say you have plenty of time for wife and programming outside work if you would just manage your time better, I bet you probably could squeeze time for a few kids or pets in there too. ;-)

0

Maybe it's time to use your skills towards quitting your day job? Like, at nights, rather than contributing to opensource projects, start building your home business. Your wife wouldn't object, since you're contributing to your family, and you're having fun, since you're doing what you love. Fast forward a year, you quit your day job, you've got some decent income that's growing, and you've got a lot of time for your family.

0

welcome to jail :D, but seriously you gotta find time for your passion

0

It's natural to feel a little oppressed by marriage because as a bachelor you had free rein to do whatever you want whenever you want. Now, it's all about compromise and time management, but the benefits usually outweigh the costs. If not, your marriage is not working out.

Find bits of time you want do things. If you commonly spend your lunch break alone, then spend it with lappy, instead, and work on that new idea of yours. Agree with the wife which days of the week are yours and her's. She needs personal time, too. Lastly, keep tabs on your social calendar so as not to book it too tight. Before you know it, that one last day you had free gets spent on someone's birthday party or impromptu happy hour and you lost your coding day.