Hopefully, you all know how to do long division (if you don’t, then look it up). So lets say you have this long division problem in front of you:
this one is pretty easy right? (or maybe not if you are not so good at math, but most people should be able to follow along). The reason this is fairly simple is there are only a few steps that need to be taken to solve the problem. Also it doesn’t get harder as the number gets bigger because the steps that you take are the same each time. In fact, you could start solving this problem, walk away from it for a day, and come back right where you were and continue solving the problem right?
Now lets look at this problem:
Sure, it looks harder at first, but it’s pretty much the same thing. You just iterate (aka repeat) the steps you already know over and over until you get to the answer.
Now imagine that you presented with the problem on the left, but you are told that you can not write anything down, you have to do it all in your head. The reason i’m asking you this is, programming is not a repetitive task, and in order to solve 1 single problem there are often many many steps. Also, you can’t really put any code down until you have figured out the solution (well you could, but you would waste a lot of time trying to make broken code work). you kinda have to have an end-to-end solution (in your head) before you even start solving the problem (to the coders out there, i’m not talking about an entire application. i’m talking about a function/method perhaps).
Ok so now imagine you are trying to solve this really big long division problem in your head and you are remembering the remaining numbers as you go from left to right and then someone comes and asks you a question that is completely unrelated to what you are doing.
It doesn’t matter that it only took you 1 minute to answer their question. At that time you were 10 minutes into solving the problem in your head and now you’ve forgotten where you were and have to start all over again.
This is what it is like when people constantly interrupt programmers, except (at least in my case) It usually takes me anywhere from 15 to 30 minutes to get back on track. In fact there have been many 8 hour days where i figure i only got a good hours worth of work in due to all of the interruptions.
Also, the time it takes to recover from an interruption is proportional to the difficulty of the problem you are trying to solve at the moment. For example, if i’m just making a form on a website your interruption may only delay me 10 minutes, but if i’m trying to decide the architecture of a whole new application, you’d better leave me alone for at least 4 hours because thats how much you are going to delay me if you interrupt.
“Silence” is not the right way to put it. I rather often have earbuds in blasting Knife Party or KMFDM or something else rather far from silence. The key is to avoid distraction, which often involves some level of consistency in the background noise level, whether that be consistently quiet or consistently loud. Additionally, the background noise has to be something fairly easy to tune out. Without the earbuds, I’m sitting far too close to the configuration management guys, who are almost always talking. They seem to spend forty times the time talking to each other about how Jenkins works as opposed to actually using it for anything. It’s very hard to ignore human conversation.
This isn’t just a programmer thing.
I have ADHD. I don’t know how it works for others, but for me it means that I have two modes: “hypofocus” or “hyperfocus.” Hypofocus is the stereotypical Attention Deficit… Ooh, Shiny! state, while Hyperfocus means that I am completely and 100% immersed in what I am doing, and suddenly it’s 4:00 AM and I’ve accidentally made a tricorne out of duct tape, or read an entire book.
With books (or hats), an interruption is annoying, but it only takes me a few minutes to get back into where I was, maybe rereading the page or something. Once I get rolling again, it’s fine.
Coding (or plotting a book) is an activity that, by nature, requires a mode of pseudo-hyperfocus to pull off effectively, even for non-ADHD people. Unlike book reading, you can’t put it down and pick it back up whenever you want. Dallas Caley’s Long Division Example works pretty well.
Coding is like building a house of cards, but in your mind. If you have to take your mind elsewhere and then come back, it’s gonna fall.
On the other hand, I don’t think every programmer prefers absolute silence. I enjoy listening to music for example.