It was a quiet Sunday morning, and in a relaxed and optimistic mood I sat down on the couch with a mug of hot black tea and some papers and a pencil, thinking I could grab a few minutes for some hard copy editing of a piece I had written.

Then my son Gabe started shooting nerf darts at my head.

This ever happen to you? My sons seem to have built-in radar that tells them when I’m trying to steal some time for myself and do something other than cater to their every whim and desire. This is their cue to pop out of nowhere and shoot nerf darts at me. If you are a writer and a parent as I am—actually, if you run any home-based business or telecommute—it is unavoidable that there will be times when you must work when the children are home with you.

How do you get your work done when the li’l darlings are running around fighting and screaming and raising a wild rumpus? Here are some strategies and approaches that worked for me when our children were young:

Work while they sleep. Before they get up in the morning, after they go to bed, during naptime (that is, if they’re very young and still napping). Getting up early works best for me because I’m fresh and write better in the morning than at the end of the day. But you may be someone who comes on strong after dark. In any case, the house becomes amazingly quiet when the noisemakers aren’t making noise.

Expect interruptions. Plugging your kids into an iPad or any electronics certainly buys valuable time, especially if the crunch is on and you’ve got a tight deadline or simply need some space alone. But even with these miraculous electronic babysitters, my sons still find ways to interrupt me. I am perpetually stopping to do something for them—fix a snack for them or clean up the plate they’ve broken while they were trying to fix their own snacks. Once I’m done dealing with whatever crisis they’ve created, I go back to work.

Go easy on yourself. Working at either end of the day, and in small blocks of time during the day while being interrupted, you simply cannot get the same amount of work done than if you had the full day to yourself. A job that might take a day or two in a nine-to-five schedule might take a week or more. I try to keep that in mind when I set deadlines for myself or agree to a deadline with a client.

Have a Plan B. Sometimes I start the day with a work plan in mind. My sons may have a different plan in mind, however, forcing me to be nimble-footed. After Gabe appeared with his nerf gun my editing ended and I switched over to roughing out a blog.

Strike a balance between work and play. Some days I work hard in the morning when the boys are plugged into electronics, then take the afternoon off and spend it with them. If you give fully of yourself when you’re with your children and they’ve gotten a good dose of you, they’re often willing to release you for a little while so you can be in another part of the house alone. (No guarantees, of course. Nothing works for long or all the time with small children.)

Fit your kids into your work life. Many an afternoon I have spent sitting on a park bench reading or editing while my sons have played. I have often taken my sons on research trips to museums and other places. And they often came up with questions that I didn’t think to ask because they look at things from a different perspective than I do.

If you have more of a fictional bent, see your children and family life as the raw stuff for your novel. What can be perceived as a negative—all the demands that children make and how they distract you from your work—becomes a positive. Spending time with them does not detract from your writing but instead enriches it.

But even if you manage to find ways to grab time for yourself with the rugrats constantly underfoot, you will need at some point to work in a sustained manner on your writing. The kids must go to school or daycare or your spouse or the grandparents must take them on the weekends to give you longer stretches of time alone. Being a writer does not just require a room of your own, as Virginia Woolf so famously said. A writer also needs uninterrupted time in which to work and think. Go to that room regularly, get that time, and then when you emerge you can embrace your family and children, nerf guns and all.

Kevin L. Nelson’s The Everything Father to Be Book, is in its third edition and has sold more than 175,000 copies.