Maneesh Sethi said he felt embarrassed after calculating that he wasted around 19 hours every week looking at social media websites such as Facebook and Reddit when he should have been working.
He discovered that by employing someone to slap him, his work rate quadrupled.
Sethi, from San Francisco, placed an advert on classifieds website Craigslist to recruit someone who would be willing to slap him if he strayed to any social media websites.
He blamed his lack of productivity on the fact he has no direct authority figure at work to stop him using these sites.
Sethi said: "When I have a boss, or someone of authority watching me, I always get my work done. How can I simulate the authority figure?"
He wrote on his blog that humans are not sociable and not designed to be live or work alone: "Now that the average worker's job is to sit in front of a computer, often with no supervision, it's no surprise that we are only productive three days each week."
After wasting so much of his time at work Sethi said: "I figured, 'This is stupid, why am I wasting this time doing nothing?'
"Nothing makes me more embarrassed than seeing the amount of hours I spend wasted on Reddit and Facebook.
"Naturally, I believe that an authority figure should have real authority... So I went on Craigslist, put up an advertisement, and waited to see if anyone would bite."
20 people responded to his advert.
Sethi added that it wasn't just about getting slapped when he is looking at social media websites - it was about having someone there to monitor him: "Having someone in on the game is the most powerful part of the game."
> Man's bigamy discovered through Facebook 'People You May Know' section
> Man launches Facebook campaign to rename hometown 'Smallville'