Set up a rule at work: Make half the day alone time. — A successful alone time period means letting go of communication addiction. During alone time, give up instant messengers, phone calls, and meetings. Avoid any email thread that’s going to require an immediate response. Just shut up and get to work.
When we were working on our own startup, back in the 90s, I evolved another trick for partitioning the day. I used to program from dinner till about 3 am every day, because at night no one could interrupt me. Then I’d sleep till about 11 am, and come in and work until dinner on what I called “business stuff.” I never thought of it in these terms, but in effect I had two workdays each day, one on the manager’s schedule and one on the maker’s.
Human Task Switches Considered Harmful
Programming is the kind of task where you have to keep a lot of things in your head at once. The more things you remember at once, the more productive you are at programming. A programmer coding at full throttle is keeping zillions of things in their head at once: everything from names of variables, data structures, important APIs, the names of utility functions that they wrote and call a lot, even the name of the subdirectory where they store their source code. If you send that programmer to Crete for a three week vacation, they will forget it all. The human brain seems to move it out of short-term RAM and swaps it out onto a backup tape where it takes forever to retrieve.
In fact, the real lesson from all this is that you should never let people work on more than one thing at once. Make sure they know what it is.
It’s not the excuse but the reason that I prefer working in my apartment (or Starbucks) rather than lab, where all kinds of weird situations would come up at any time… Anyway, the takeaway points are: I should pay more attention on my schedule, both for the long term and short term, to maximize the productivity; concentrate on one project (language, research topic) at a given period; extract the most out of it, celebrate, and then dive into another work.