The Distracted Programmer

On Friday I jokingly posted on twitter that I was going to write my #iDevBlogADay post on “How to code with a baby in your arms”. A whole bunch of people responded saying they’d love to see a post on “The Distracted Programmer”, so here I sit typing.

With a baby born over five weeks ago, I took several weeks off work entirely. But about two weeks ago I started trying to get back into doing little bits of work. Working from home with a baby in the house is proving to be quite difficult, but I’ve already learned a few things that are helping me get at least some work done. Just keep in mind, I’m still new to this. I don’t pretend to have all the answers, just some tips that work for me.

1) Start Small

When I first decided to start coding again, I set a goal of writing one hour of code per day. The first few days I failed miserably. I’m glad I hadn’t decided to work full days or I might have been very discouraged. However, after a few days I found I was able to get even up to two hours of work done, just in 20 minute increments. My main point here is don’t expect too much from yourself at first. Getting used to having a baby is a huge change, trying to work at the same time is a massive challenge. Accept that it’s going to be hard and don’t beat yourself up if you’re not working full days right away.

2) Learn to Work in Small Increments

If you haven’t read this excellent article called “The Interruptable Programmer“, do so now. All of his tips apply to working at home with a baby in the house. I’ll wait. Done? Good. The biggest take-away there is that you need to get used to working in small chunks. Always be aware of what you’re working on. Make notes about what needs to happen next. If you need to stop coding because the baby starts screaming, jot down something quick about what you were doing; put it right in the code if you have to. Personally, I bought a little Mac app called ShoveBox that allows you to take very quick notes just by pressing a key combination on your keyboard.

If you’re a programmer who likes to really dig deep into code and do marathon coding sessions (like I used to), this is going to be a huge adjustment, but it’s a necessary one. If the choice is between coding 30 minutes at a time and not coding at all, I’m going to try to code 30 minutes at a time.

3) Staying Motivated

One of the most difficult things for me over the last couple of weeks has been staying motivated when I can only code in short bursts. It’s easy to get side tracked. It’s really easy to get distracted with reading blogs posts [cough] after each break in coding. This will kill your time. You need to find ways to keep motivated and keep working. I’ve completely stopped reading RSS feeds during the last two weeks. It means I’m not as aware of what’s going on in the world of gaming, but I’ve got a contract to deliver on, so that takes priority. I try to limit my time on twitter when I’m starting a work chunk. I limit what links I click on to avoid being distracted.

The goal is to get right back in where you left off after you’ve been away from the computer for a chunk of time. This will help you stay motivated. Avoid the distractions, and you’ll find a new flow.

4) Talk to Your Partner

This is the most important point. Seriously. Make sure you do this.

If you’re a single parent, you’re amazing. I honestly don’t know how people do it on their own. A baby is a huge amount of work, even spread over two people. Single parents, I’m in awe of you.

But, if you’ve got a partner who is also at home (on maternity or paternity leave, or as a stay-at-home mom or dad), talk to them. Make sure they’re on board with you going back to work. You will need their support. You will need them to look after the baby while you’re at work. You will need them to understand that you’re going to need some time to code/design/draw/create. At the same time, make sure they understand that you’re not disappearing. If the baby won’t stop screaming and they need a break, let them know it’s OK to interrupt you and ask you for help. But also make sure they’re OK with you shouldering them with more responsibility while you’re working. As the baby gets older, and you establish more of a routine, hopefully you’ll be able to spend more time working each day.

Having an amazing wife who understands all of this has made it much easier to get back to working. I’m still only working half-days, but without her support I wouldn’t be doing even that.

5) Working With the Baby

There are times when I need to look after the baby and do work. If (and this is a big if) the baby is in the right mood, sometimes he’ll let me put him into a baby carrier and he’ll happily sleep while I sit and do some coding. It doesn’t always work, and it’s not ideal, but it is a way to look after the baby and do some work at the same time.

6) Family Comes First

Yes, I’m talking about working with a baby in the home, but the final thing I wanted to say is to remember that your baby and your family come first. If your partner needs you, be there for them. If the baby needs you, look after him/her. Yes, we need to get work done, but work isn’t everything.


Working at home with a baby in the house is possible, but it is very challenging. The thing I keep reminding myself is that it’s an amazing opportunity most people don’t get. Most people don’t get to go back to work yet still see their child grow up before their eyes. We’re very lucky that we get to do this. Don’t take it for granted. Enjoy it.

What about you? As a mom or dad programmer/designer/artist/creator, what are your tips for working from home?