As much as those “de-motivation” posters are tired and cliche, I really think this one just about sums it up for me:

I am an expert procrastinator. I procrastinate a lot: sometimes to the point of masochism. Luckily I’m also a pretty darn responsible fellow, and coming through in the end is something I’m pretty good at. I spend a lot of time wondering how I can tweak myself into “the zone” even in the face of distractions, Reddit, and Lost. Nothing on Facebook has ever dramatically changed the outcome of my software development, but I often compulsively refresh it just in case someone might have responded to someone else’s status update. It’s silly, but we all do it to some degree or another.
I personally enjoy and benefit a lot from pair programming. It’s not something I get to do all of the time, but a solid pairing session with a good developer gets me results. I love sharing tricks, and discussing code before it’s written. However, there might be more to it than that.
Hampton and I started to speculate that we work best if someone is just there, keeping you on your toes. Someone to chastise you if you check Facebook, even if they don’t know the first thing about programming. We joked about hiring people to just sit there and watch us code. I laughed!
Well, I’m not laughing any more. I tried it, and it worked.
Soft Pairing
I invited a developer friend to come and sit beside me as I worked. He had his laptop, and I asked him to just do what he’d normally do; we were explicitly not working on the same thing. Occasionally something would be discussed, or we’d share a laugh… but for the most part the experiment was untarnished by anything resembling classic pair programming.
During this time, I felt alert and focused. My productivity was about as high as it ever is, and for some reason his presence didn’t bother me. My junk science theory here is that it was the commitment to be doing this thing, putting in the effort to show up — it makes it feel real to your brain. Facebook is captivating when you’re alone, but feels like an embarrassment when someone else is there.
Your mileage will vary, but this “soft pairing” works well for me. I’m no longer thinking that hiring someone at minimum wage to just sit and watch me is a joke; it might well be an amazing investment. Alternatively, you could invite a developer friend to come over, or your partner that never sees you might enjoy reading a book. Hard to say! They have to really get the part about concentration, and it’s possible that your lover quietly chuckling and flipping pages might drive you bonkers.
Maybe this is like having a gym buddy? You agree to meet at a time and go, even if once you’re there, you’re doing completely different things. It’s the statement of intention which compels us not to succumb to distraction.