Victor Hugo locked away all his coats so he couldn’t go outside, in order to force him to stay inside and finish The Hunchback of Notre Dame. The story has been exaggerated over the years, but the heart of it is true.
By the summer of 1830, Victor Hugo was facing an impossible deadline. Twelve months earlier, the famous French author had made an agreement with his publisher that he would write a new book titled, The Hunchback of Notre Dame.
Instead of writing the book, Hugo spent the next year pursuing other projects, entertaining guests, and delaying his work on the text. Hugo’s publisher had become frustrated by his repeated procrastination and responded by setting a formidable deadline. The publisher demanded that Hugo finish the book by February of 1831—less than 6 months away.
Hugo developed a plan to beat his procrastination. He collected all of his clothes, removed them from his chambers, and locked them away. He was left with nothing to wear except a large shawl. Lacking any suitable clothing to go outdoors, Hugo was no longer tempted to leave the house and get distracted. Staying inside and writing was his only option. (Source)
We find that this is a bit exaggerated, at least according to translations available of Hugo’s wife’s biography of him. Here is what she actually says:
He could now hope for no further delay; he must be punctual to the hour. He bought a bottle of ink and a coarse knit garment of grey woolen which enveloped him from neck to toe, put his coats under key so that he should have no temptation to go out, and entered into his romance as into a prison. He was very melancholy.
From that time he left his desk only to eat and sleep. His only re-creation was an hour of conversation after dinner with some friends who came to see him, and to whom he read at times the pages which he. had written during the day. He read the chapter entitled Les Cloches to M. Pierre Leroux, who thought that sort of literature entirely superfluous.
After the first chapters he became more cheerful ; his creation took possession of him ; he felt neither fatigue, nor the cold of winter, which’ had come ; in December he worked with open windows.
He left his bear-skin but once. On the morning of the 20th of December, the Prince de Crean came and offered to take him to the trial of the Ministers of Charles X. He went, was present at the trial, and saw the tumult which assailed it.
During the night of the 7th of January, a brilliant light made him suddenly look towards his window, which was always open : it was an aurora borealis.
On the 14th of January, the book was finished. The bottle of ink which be had bought on the first day was also finished ; he had come at the same time to the last line and the last drop; this led him for a moment-to think of changing the title of his romance to : ” What there is in a bottle of ink.” Some years afterwards he related this before Alphonse Karr, who thought the title charming, and asked him for it as he had done nothing with it. M. Alphonse Karr published under that collective name several romances, among others that master-piece of spirit and emotion, Genevieve. (Source)
Evgeny Morozov does something like this with his wifi card to increase productivity.