Dieser Blogpost ist auch auf Deutsch verfügbar
TL;DR
- Deep work requires uninterrupted thinking – AI helps best as a sparring partner
- Routine tasks can be parallelized with agentic programming, as long as one task remains the priority
- Code reviews demand full attention, with AI running in parallel to provide additional feedback
Despite the irritating hype, AI can be used to increase our productivity as software developers. However, one question that we have all considered is what to do with our time while the AI is working on a task we have set for it.
AI can help us accomplish tasks in a shorter amount of time, but for a non-trivial task it will often take several minutes to complete. What do we do during those minutes while we are waiting?
It all depends on what kind of task we are actually working on.
Deep Work Mode
For deep work tasks, it is highly unlikely that AI will help you achieve a quicker result, because the time it takes to solve these problems is primarily influenced by the amount of time that you can invest in thinking the problem deeply in an uninterrupted environment.
Here, we aren’t primarily concerned with a quick result, we are concerned with a quality result. That said, it is very helpful to set a timebox because the amount of time that we have can act as a forcing function to help us prioritize, cut scope, and figure out what really matters.
This is the thesis of hammock driven development — the idea that we really need the time and space to think through a problem to help figure out how to best solve it.
For some, this might be going on a walk or staring blankly out of a window. For kinesthetic learners like me, it often means sketching ideas out on a piece of paper, or beginning to code and then having to backtrack and rework everything 40 times.
AI can still be helpful here — but more as a sparring partner as you think through ideas, or perhaps in creating quick prototypes that you will end up throwing away.
Suffice it to say: if we are working on problems that require deep work, we aren’t concerned about filling up any “free time” while the AI is working, because “free time” doesn’t exist for this type of task. We also really need to guard against trying to multitask, because this forces context switching, which can be detrimental and extremely frustrating.
Two Task Mode
Sometimes, however, we have a larger task where we generally know exactly what needs to get done. I generally implement these tasks using the navigator pattern, making the decisions and directing the AI to implement the feature in larger chunks of works. Once we have given our AI a set of instructions, however, we often find ourselves automatically switching focus and wanting to think about something else. It is this intrinsic motivation to look for a different task which signals to me that I may be able to try to multitask and get another task done at the same time.
Instead of getting a coffee and twiddling my thumbs, I can instead find another smaller task with clear parameters, spend a few minutes writing, or watch a video or tutorial to keep up to date with what is going on in the world of tech. I also like to try to time larger AI coding tasks for right before a meeting, if possible, so that I have some code waiting for me when I switch back into software development mode.
Practically, I have adopted the practice of using Git worktrees to enable me to have multiple versions of a branch checked out on my computer at the same time, without having to switch between them. This allows me have multiple terminal windows open, each with an agent working on a particular branch.
The key with this working mode is that neither task I am working on is fully engaging my brain, and there is a clear priority to the tasks: the main task is more important than peripheral tasks and if a step in the main task requires my full attention, I will naturally drop attention to anything else – and that is fine. Those tasks can wait.
I also want to reiterate the importance of letting my intrinsic motivation be the guiding factor. Some days require a little bit of self-care. After a few months of shipping code to meet a deadline, our brains may need a period of recovery where not having to switch context frequently is absolutely needed in order for us to recover and find the energy to move back into shipping mode.
This is normal. This is human.
During these phases of life, we can still use AI to support us and automate some of our tasks, but we can take those down times while the AI is crunching its numbers to get a coffee, take a deep breath, and give our brain the time to recover from a job well done.
Review Mode
Code reviews are more important than ever, especially now that AI is generating so much of our code. We can help speed up the process by keeping the scope of our work small, but reviews really require our full attention.
Here AI can still be helpful: I usually check out the branch that I am reviewing into its own worktree and then start multiple agents in parallel to have them check the code for me. I will use both Codex and Claude Code. My prompt isn’t complicated. I usually only ask “can you perform a code review of this branch compared to main?”
Theoretically, I could probably draft a much more complicated prompt instructing the model about explicit things they need to watch out for. But in practice, I already intend to perform all those steps myself, so I find the unguided responses from an AI to be most interesting: the things I might not have considered checking myself.
I find it very valuable to perform code reviews with multiple different models. They almost always find different things, and I find AI particularly good at reviewing code which might have issues with concurrency, because that is difficult for me personally to reason about.
Once my agents have started their code review in the background, I switch my full attention to my code review, seeing if I can spot any inconsistencies or errors. I’m one of those people who usually comments a lot – asking lots of questions to make sure I’ve understood it correctly and making comments about stylistic preferences that the recipient is welcome to take or leave.
Unicorn mode
Since the advent of agentic programming, I think there have only been one or two times where I was able to successfully juggle more than two tasks at any given time, and usually it was during a phase where I wanted to test the limits of agentic programming and see how much was really possible in a short frame of time. My intrinsic motivation was high and I took the context switches in stride.
In my experience, I only ever managed to really perform a maximum of three tasks at a given time, and usually at least one of those was pretty much relegated to the back burner so I probably only had the impression that I was working on three tasks at a given time.
For this reason, I have named this “more than two task”-mode the “Unicorn mode”. A wonderful idea, which doesn’t actually exist.
Conclusion
Getting the most out of AI usually requires being very strategic about when and how to integrate it into your work mode. When we are doing software development tasks, we have always switched between different modes of working: deep work, code reviews, and routine work. In each of these instances, we can use AI in different ways to assist us in the goal we are trying to achieve: quality software that fulfils the business requirements of the domain.