My favorite productivity trick for software development
Any software developer knows how hard it is sometimes to fight the urge to procrastinate. Instead of getting any work done, you end up spending hours trying to focus on work while thinking about everything but work, like watching YouTube videos, scrolling social media, or playing video games.
This is what I sometimes feel too while trying to get my work done. However, the good news is that I discovered a reliable and effective technique that helps me to keep focus and get a lot of work done. Today, I will share this technique with you.
Why we procrastinate
There are different reasons for feeling the urge to procrastinate, but one of the biggest reasons is that your subconscious mind believes that the task ahead is too large and it tries to make you save energy.
Despite being a relatively small organ based on its mass, the brain consumes a disproportionally large amount of energy. While most of us don’t live in an environment where food is scarce and energy is hard to replenish, our cavemen ancestors did. However, we haven’t evolved much since the era of the cavemen, so our body mostly works as if we still live in an environment with scarce resources.
To you, completing that piece of software before the deadline may be important. But to your brain, it looks like an unjustified waste of resources, so it will do everything it can to stop you.
Once you understand this problem, the solution becomes fairly obvious.
Splitting your tasks into microtasks
You might be familiar with the saying:
"How do you eat an elephant? One bite at a time."
This perfectly summarizes the technique that I am about to describe, which is breaking tasks into microtasks.
This idea isn't new. Many productivity experts have suggested avoiding procrastination by breaking down large projects into smaller, manageable parts.
For instance, if your goal is to become a full-stack developer with no prior programming experience, conventional wisdom might advise starting with front-end development before delving into other technologies. But mastering the front end alone can be a massive undertaking. You might still find yourself procrastinating or feeling overwhelmed.
This is where microtasks come into play. In the scenario mentioned, breaking down the overarching goal of learning the entire stack into smaller projects is a good start. But beyond that, each of these smaller projects can be further divided into numerous small, individual tasks.
Making each task as small as possible
Let's say your ultimate objective is to acquire specific programming skills. Your initial microtask could be as simple as spending a few minutes defining a precise learning outcome for the first step of the process.
For example, if you realize that trying to learn everything about HTML, CSS, and JavaScript at once is impractical, you might decide, after a brief brainstorming session, to start by attempting to replicate the layout of a particular webpage.
This could lead to a task list that looks like this:
Create a basic webpage with a title text.
Learn how to host it for browser access.
Apply font styles and colors to the title.
Add an image below the title.
Ensure proper alignment of the image.
Implement a navigation bar at the top.
Make the navigation bar items clickable.
Integrate a side panel.
Populate the main panel with text.
Ensure proper styling and alignment of the text.
Apply background styling.
Each of these tasks appears small and manageable.
While some of these tasks might be more complex, especially for a beginner, the key is to break them down into steps that subjectively feel small. They don't necessarily have to be objectively small. The idea is to outsmart your brain.
Giving 100% attention to a single task
However, breaking a project into small tasks isn't enough. You must fully concentrate on each task on your list.
The duration of each task shouldn't matter. Your sole focus should be on completing that one task. While you're at it, nothing else should exist in your world. And after completing a task, you can take a break if needed.
To your subconscious mind, it won't seem like a daunting undertaking. Regardless of how mundane or unpleasant the task might seem, it's just a small activity that you can easily accomplish.
While you might still feel the temptation to procrastinate, it'll likely be weaker compared to facing a large task with an unclear goal. The most challenging part of any worthwhile activity is getting started. However, starting is much easier when the target is small and well-defined.
An example of this approach from my own career
I've applied this principle in my own career with great success. Here's an example.
A project required me to develop a cross-platform app that could play audio on both Windows and Linux using .NET Core, the primary area of expertise for my team.
With no prior Linux experience and no knowledge of .NET Core's built-in audio capabilities, doubts crept in about achieving the task in a realistic timeframe. However, I chose to create a plan of action:
Compile a list of third-party libraries for cross-platform audio playback on .NET Core.
Evaluate each library's suitability for the project (each library evaluation was a separate task).
If no suitable libraries were found, create a new task list to build my own library.
This initial plan kept me engaged for a while. Unfortunately, the available audio libraries for .NET Core didn't meet the requirements—they were either expensive or relied on OS- and CPU-specific components.
So, I pivoted and created a new set of tasks:
Explore other free cross-platform technologies with built-in audio playback or reliable third-party libraries.
Investigate integration of this technology with .NET Core.
Implement the logic in my app.
Test the app on Windows.
Test the app on Linux.
This time, I discovered that audio playback could be achieved using Node.js with an NPM library called play-audio
. Node.js could be integrated with .NET Core using NodeServices
.
The solution was relatively straightforward to implement and met all requirements, despite looking like a near-impossible undertaking at the beginning. Despite this domain being completely new to me, I still managed to maintain focus and accomplish the goal within a relatively short time.
How microtasks help you to achieve the state of flow
Once you've started a challenging task, maintaining momentum becomes easier.
Completing several related tasks in succession can lead to the most productive mental state, which is known as “the state of flow”.
In this state, you won't even need to think about microtasks. You'll be so immersed in your work that procrastination won't cross your mind. Transitioning from one task to the next will happen naturally.
Typically, it takes at least 15 minutes of uninterrupted, focused work to enter a flow state. Not only is it highly productive, but it's also an enjoyable mental state.
Always keep this in mind. While microtasks are effective against procrastination, transitioning immediately to the next task after completing one maximizes the chance of entering a flow state.
Ultimately, microtasks are a means to an end to eliminate procrastination. They're helpful when your mind tends to wander. Once you've trained your mind to avoid procrastination, you can forget about microtasks and focus solely on maintaining the flow.
Pre-planning your microtasks to reduce friction
Through trial and error, I discovered a way to make the microtasks even more effective. And that is to compile the list of microtasks ahead of the work.
Doing it this way minimizes context switching. Planning your work and doing your work are done in separate sessions, so you don’t have to switch between these activities.
Pre-planning also eliminates friction. When you start your day with a pre-compiled list of things to do, you don’t have to think about your next step. You can just jump into it right away. This is why I, typically, do pre-planning for the next day at the end of my working day
Wrapping up
While this is my favorite productivity technique, it’s not the only one that I practice. There are other techniques too, ranging from well-known ones, such as Pomodoro, to more exotic ones, such as the Japanese technique of Shisa Kanko.
Combining these techniques makes you unstoppable. You can maintain focus for ours even if you previously struggled to maintain it for five minutes like it used to be the case for me.
If you are curious about the other techniques, I shared them in my book The Battle Hardened Developer.
Until next time!