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.

Conclusion

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?

Owen

7 Responses to “The Distracted Programmer”

  1. Even though I dont have kids yet, I am often in a similar situation where I get distracted a lots. Distraction and Procrastination are my 2 worst enemies in my productivity.

    At least for you part of this is family related and its very important to take this time that is priceless with your new born son. You have a very good opportunity to see your son grow up, which is often not the case in modern life where both parents works.

    But the other distraction like I mentioned in my own blog this week are really hurting and they are always not easy to control. Especially with the web and other social network its too easy to click an innocent link and be suck in for a few hours by drilling down links.

    One thing I found that start to help me more focus once I am in front of the computer is to use Spaces and open my application in Full Screen, since I will only be seeing one apps at a time (can be Xcode, Inskcape, etc…) then my eyes wont be distracted with another windows in the background.

    Still looking for a good technique for time management tough, I will probably try to use the Pomodoro Technique which let you do work in burst of 25 minutes with single tasks. It seems your 30 minutes approach is probably similar to what this technique suggest. If you find other interesting technique do share them.

    Thanks and hope you can find the right balance between on your project and spending time with your family.

  2. Steve says:

    Great post Owen, and thanks for linking my post in a similar vein; I”m glad you liked it!

    I don’t know whether it’s just my perception of things because of my recent experience, but it seems I see more technical people blogging about how to better balance their job/passion with their personal lives these days. That’s a very good thing, because I definitely wish I’d paid more attention earlier in life!

  3. Scott says:

    Great post Owen.

    Your item #6 is key. Family should be first. Too many of us men rely on our work for our identity and our family is neglected as a result. Yes, we should thoroughly enjoy our work, but our work is just a means for feeding, clothing and sheltering our families.

    I was looking forward to your session at 360iDev Austin, but when I heard you were staying home because a newborn in your home, my first thought was “Great choice. There’s a man whose priorities are in order!”

    Thanks for the tips!

  4. Turt99 says:

    I’m a father of twin 3.5 year old boys. I don’t work from home but I try to work on my own game project at home when I have a chance.

    I find that the best way to get into programming is to pick something really small to tackle. Something you feel you already know the answer too, that way you’ll get that feeling of accomplishment which I find really gets me “In the Zone” quickly.

  5. Kent Fonager says:

    Hi Owen

    Great article … as a father of two 15 months old twin-girls and running my own software company, I know how you’re feeling.

    Family IS number one, no doubt about it. But after that, comes my passion for my job/company. I have an office outside of my house and until the girls started in daycare, I never really succeeded in working some days at home … because … even though how much work i wanted to do, it was, for me personally, almost impossible not to react when you heard the girls laugh, cry etc …

    So the solution for me, was to work in a “tight schedule”, making sure I had time with the girls. Mening, when daddy was home and the girls awake, no work was done.

    And that actually worked quite well and i feel I’m a balanced father/worker :-)

    Take care,
    Kent Fonager, Denmark

  6. Having had mine almost 12 years ago, I realize that this is one thing that never changes. Undistracted work time. It’s also something I’ve never had, and luckily as an artist, I’m right brained enough to kind of creatively sneak in time for the art, but in no way shape or form in the same manner that I did before. Things got wayyyy out of place in the process of my son growing up. BUT

    I learned a new word the other day, and it’s taken over my brain. I heard one of those dessert chefs on tv use it, and had to go look it up. He said that someone competitive would turn down his oven and set his mes en plas on fire. huh? So off to dictionary I went, and It is when a chef walks into his kitchen, everything he needs for that night’s work is there and ready. I realized that mine was either nonexistent or just totally messed up. Then I realized my son’s was too, OMG what was I teaching him? There’s a peace that can be only had by mes en plas. You’ll find this out soon, but I wanted to warn you that it is coming, and forewarned is forearmed, or at least foreorganized. haha.

    Mes en plas, a head-slappin omg moment for me.

  7. Dad says:

    Great stuff. Congratulations on your son!

    I went back to work half time when my son (the Geek of Geek And Dad) turned 2 months old. I also work from home. Your point about communication being key is 100% right on. I can’t be interrupted when programming, so what we did is have scheduled times when I’d give my wife 30 minute breaks (3 per working day). Other than those times, she wasn’t to interrupt me unless it was nearly an emergency.

    For her, just knowing that she was getting a break at scheduled times made it much easier for her to deal with the unhappy baby who wouldn’t sleep or stop crying (the first year was quite tough (undiagnosed reflux) until that scheduled time. Then she’d go take a walk (to get away from the sound of him crying), or I’d take a walk with baby Geek and she’d take a nap. Or she’d do whatever she hadn’t been able to do with him in her arms.

    Before we did this we definitely had the problem of, “hey, could you hold him for a minute while I {whatever}?” interruptions causing me painful distraction and friction between us. It’s really easy for the primary care provider to feel like the work-at-home person is *there*, so *of course* they can take a short break *right now* so I can XYZ. Communication is the key to avoiding this friction.

    Oh, I also had a pair of those bright yellow foam earplugs in my pocket and put them in when I needed to work because the crying baby made it too hard to concentrate! :-)

Leave a Reply