What is "Dark Matter Time"?
In order to get to the dark matter portion of this metaphor we need to start with matter.
Matter is any substance that has mass and takes up space by having volume. - Wikipedia
In software development, I compare matter to the time we spend working on a given development task. This time includes work like writing code, testing the code, deploying, company/team meetings, and project planning. This work is all top of mind when thinking about the time it takes to complete a task.
In a perfect world, we would be able to track and confidently estimate the amount of time a given task takes because the work required is similar to the work required to complete previous tasks. In reality, estimating work is hard and never exact. Why is that?
Estimation is difficult for a multitude of reasons that are unique to individuals and teams, but I think one of the ubiquitous reasons for this is that there is time in our daily work that is difficult to account for. This is where dark matter comes in.
Dark matter is a hypothetical form of matter thought to account for approximately 85% of the matter in the universe. Dark matter is called "dark" because it does not appear to interact with the electromagnetic field, which means it does not absorb, reflect, or emit electromagnetic radiation and is, therefore, difficult to detect. - Wikipedia
So how does dark matter relate to the time in a software engineer's day? I like to think of dark matter time as the time spent on work that is required, but not apparent. This includes things like context shifting, waiting for answers to questions, researching alternate solutions, and communicating with teammates and stakeholders.
In the same way, that dark matter is difficult to detect and quantify in the real world, so too is "dark matter time" in the software development world. Dark matter time is always present in our work, but not consistent across tasks or even across engineers. In my experience learning to detect and manage this time effectively is a key piece to growing as an engineer.
Managing Dark Matter Time
We know "dark matter time" exists and we know that it is hard to predict, so what practices, habits, or tools do we have at our disposal to manage it?
Step 1: Detect dark matter time. I've mentioned previously that dark matter time is hard to predict, but we can normally detect it when it is just about upon us. In my experience being able to detect these periods of time when the work "feels like it's done" can reduce ambiguity because I feel prepared for it.
Step 2: Develop a plan. This step may sound a little formal, but in reality, a plan doesn't need to be a written list or tracked. A plan can be as simple as forming some thoughts around what to do next given the task at hand. Some examples of this might be shoring up a PR by doing some self-review or spending a little extra time learning about a language/framework/technology feature that is relevant to the work you've done or are doing.
In some cases, this may be looking for the next task to work on, but I often try to avoid making that my default choice because moving on before a previous task is done can often lead to overly painful context switching.
Step 3: Execute. This final step is simple. Once we've decided how we are going to manage this time that we may not have planned for, we can confidently go about executing.
At the end of the day, some of this comes down to time management, but I think even the most prudent of timekeepers can fall prey to the unpredictability of dark matter time. For this reason, I find it helpful to be prepared and make use of that time to the extent that I can.