This is actually not a bad idea, considering that pretty much everyone uses distributed version control now. Set the timer for an hour, commit commit commit, push, read hackernews, repeat. :)
More difficult would be allowing access to programming documentation on the web while rejecting time-wasting web sites. One idea is to reject any web page that has changed in the last 24 hours on the theory that the time-wasting sites are constantly changing (are topical) whereas the sites you need to do your work are not. (I do not know if it possible programatically to determine when a page last changed.)