I’d like to answer this one with a larger part of what doesn’t make me productive. I mean, I need a few things to be productive, and I usually have to add a lot of other things to fight against the things that put that productivity at risk!
What do I need to be productive:
If I don’t have those ingredients, then I won’t be really productive. Then when I manage to get those pre-requisites.... other things will come in my way and will reduce my productivity. Let’s have a look at those and the counter-measures I take.
Noise
I am very easily distracted by the human voice, and chitchat or meetings in the open space are something I really hate and fight on an everyday basis. I regularly remind people about the Library Rules (if you haven’t read Basecamp policies around open-office spaces, I believe this is a must-read for any open-office engineering team: Signal versus Noise blog: Library Rules: How to make an open office plan work ). This also means I invested in good noise-cancelling headphones, and usually listen to instrumental music (OST, jazz, neo-classical) to cover the ambient noise... some music with a not-too-slow and not-too-fast tempo and which is always instrumental! (I keep the fast-paced musical for urgent debugging, production issues, .... it’s draining but for short periods of time it helps me being fully aware)
interruptions
This one is interesting because I have to manage conflictual goals. As a lead developer, I have to design and code stuff, which requires me to be able to focus. And at the same time, I must be available to help and answer the team’s questions. I try to set a rule: whenever there’s a question, unless it’s super urgent and high-priority, please let me know about it in Slack (e.g. «Hey, I have a question for you when you have 5min» (or ten, or 30.... depending on the problem) Most of the time I’ll be able to set expectations and finish the task at hand before to switch, but at least to a proper context switching (e.g. 5 minutes later I am either ready to switch or ask if it’s ok to wait for 30 min. This flow is not ideal, but it’s much more efficient than just random interruptions at any time of the day. If people have suggestions, I’d love to read about how people deal with this.
Noise and interruptions are different forms of distractions, and my phone is set up so that only phone calls (and I only get very few) are displayed on the lock screen. My lock screen shows almost 0 notifications (no email, facebook, linkedin, whatsapp, what have you). Our on-call solution (OpsGenie) and phone calls are the only things displayed on the lock screen. And it’s always in silent mode (obviously... although some people in the open-space still have sound turned on on their phone.... don’t get me started on this ;-)
All the points above are about the situation.
Then there are some pre-requisites. I don’t need a lot of sleep, but I take care to always have enough sleep. (that wasn’t true a few years ago ;-) Sleep deprivation is a major source of judgment impairment. And because judgment impairment is a bad situation to be when you develop software, or even worse when you’re working on a production issue. And if your judgment is impaired, you are unable to realize it, so you’re screwed! All that to say that having enough sleep is important! (And sleep is only one of the many sources of judgment impairment.... some might want to explore the Ballmer Peak ! ;-) )
There are probably many other details I don’t remember right now, but all based on contextual conditions. I believe that what I described above covers 95% of the situations which make me productive or not, and I wish I’d be able to achieve this every day, that would already be a great start! (Did I say I hate open-space offices?)