The world’s leading publication for data science, AI, and ML professionals.

Overcoming Developer’s Block

There are ways to handle developer's block. Read on to learn how I do it.

If you’re a developer, have you ever suffered from developer’s block? If not, good for you. But believe me, the time will come for you, sooner or (hopefully ) later. And when it comes, your skills will cease being important, as you won’t be using them anymore; they will be as useless as a bag of gold on a deserted island.

There are many ways to handle developer’s block, but I will tell you about one that works for me.


Developer’s block (or programmer’s block) is a phenomenon that occurs when a programmer experiences difficulty coming up with new ideas or solutions to problems. In the crudest version, writing the next line of code is close to impossible.

It is similar to writer’s block, where a writer struggles to generate new ideas or content. Conditions this may be caused by a variety of factors, such as tiredness, lack of sleep or motivation, difficulty understanding a problem – or last but not least, Burnout.

In fact, it’s more often than not that burnout leads to such a block. You sit in front of your computer and try to do something, but the only thing you can think of is that you will not do it. For whatever reason, it doesn’t matter what it is – you simply cannot do it and will not do it. Period.

This can be a frustrating and demotivating experience, as it can hinder a programmer’s ability to complete tasks and meet deadlines. There are some typical things you can do, such as

  • taking breaks
  • discussing the problem you work on with a colleague
  • breaking a task into small pieces and working on them one by one
  • using your free time to escape and forget about programming – you can also do this for a few minutes of time during work
  • breathing exercises, mindfulness and other relaxation techniques

You can read about more such methods here:

How to overcome Coder’s Block

Make Your Way Out Of Developer’s Block


Honestly, I believe these methods can help prevent developer’s block, but they are less effective in fully overcoming it. A real block is something you cannot cure simply by talking to a colleague or taking a short break. An extended break (like a month ) might work, but it’s a risky idea, as it’s quite possible that upon returning to work, the burnout will be worse than before.

Real developer’s block is something you cannot finish by talking to a colleague or taking a short break.

I’ve been there more than once, as both a scientist and a data scientist working in a business setting. As the latter, I never took long breaks; 11 days was the longest. What I can say is that a one-week break helps me forget about coding, regain my power, and rest – but it does not make my return to coding easier, not at all. The first day after such a break only proves that I still have developer’s block to overcome.

So, these methods work for me only as prevention. This doesn’t mean that none of them would work for you – you have to try for yourself. Many people say they work, so maybe they do, at least for some? Ah, how I envy them!

What would you do when you’ve already crossed the line and hit that developer’s block, and you have neither the desire nor the strength to write yet another function or class – or even just another line of code?

Here’s what works for me.

Timeblocking

You can read about timeblocking, for instance, here:

Timeblocking – Wikipedia

Simply put, it’s a technique for personal time management in which you divide a period of time (in our case, a working day) into smaller periods, and during these periods you perform small tasks.

This doesn’t make much of an impression, does it? But if you do it the right way – the right way for you – it really can do wonders, as for me it works even in bad moments when I think I have no more strength to do anything more than get up from the computer and turn it off.

It doesn’t make much of an impression, does it? But if you do it the right way – the right way for you – it really can do wonders.

Timeblocking how-to

This is how I do it:

  • I set up a timer for a period of time, like 15 or 20 minutes. Let’s call it a focus period.
  • During this focus period, I fully focus on a task I’m working on. I do not split the task I’m working on to smaller tasks, and I do not create a small task that would suit the length of this very period. I just focus on the task I’m working on.
  • Focusing on the task means Deep Work. So, no emails, no Internet unrelated to the task, no coffee breaks – not even to make coffee. (See more below.)
  • I work until the period ends, but I don’t check the time; that’s why you need to use a timer. I don’t think about time, just fully focus on work.
  • When time runs out, I put work aside, unless I have something really small to finish – for example, a line of code or a sentence to finish, things like that. I try not to extend the time by another 5 or 10 minutes – when I do it without problems, it usually means that my block is close to negligible or that I can lengthen the focus period.
  • I take a break. This can be a break from work, but it doesn’t have to. I can answer an email, make a call, do stuff that does not require deep work. If I take a non-work break, I try to make it relatively short, like 5 or 10 minutes. But if it’s work-related, it can be as long as I need, unless the task I focus on is of higher priority.
  • When you’re ready to return to deep work, start another focus period.

The length of focus periods

The length of focus periods can vary during one day; it really doesn’t matter. For me, a proportionality rule works: the better I feel, the longer the periods. When I feel really bad, when I feel I will die if I write another line of code, I make a next focus period really short, like 10 minutes, sometimes only 5.

If you need to use so short periods, you’re probably burned out. It was a couple of years ago, and it wasn’t pleasant. I had to work anyway, no matter what, and this was actually when I came up with the method I’m describing in this article. Ever since, I have used much longer focus periods.

Nonetheless, even though 5 minutes is a really short period of time, for some tasks it can be enough to do some quality work. Besides, it’s better to code for 20 * 5 = 100 minutes than for 0 * 0 = 0 minutes, isn’t it?

When I feel well, I make it even 25 minutes – but never more. Depending on how I feel, I can use up to 12 focus periods of 25 minutes during an eight-hour working day. I’ve never been able to do more real deep work.

You may think: it’s just 12 * 25= 300 minutes of work while I should work for 8 * 60 = 480 minutes! Nah, that’s not how people work. Sometimes you may work for 450 minutes during 8 hours, but this is rare, very rare. You normally make a lot of breaks, need to do some work that does not call for deep focus. So, 300 minutes is not just enough – it’s a lot.

Deep work

Sometimes even two hours of deep work can be a lot, as deep work is something completely different from regular work. You can read about this in Cal Newport’s book:

Deep Work: Rules for Focused Success in a Distracted World – Cal Newport

If you cannot access this book, you can read about deep work also here:

Deep Work: The Complete Guide (Inc. a Step-by-Step Checklist)

It’s a fantastic concept, and when I had learned about it from a friend of mine, I immediately read Cal’s book. It helped me significantly increase the effectivity and quality of my work.

Timeblocking deep work is a little different from regular deep work, however. For instance, longer non-deep work breaks – or non-work breaks, for that matter – is something I invented for burnout timeblocking. When I feel exhausted, real deep work is beyond my abilities. But it’s possible to deep-work for 10, 15, sometimes even 20 minutes of deep work with a 15-minute break (for rest or other work).

Another exception that Cal would unlikely approve of is answering my phone when the call seems important. But when I do so, I either stop the timer or start the focus period from the beginning after the call.

Do remember, then, that the burnout-based deep work for timeblocking differs from regular deep work. You don’t have to follow the same rules. Maybe I will some day wrote more about deep work, but what matters for today – that is, for timeblocking as a tool for fighting developer’s block – is the approach to deep work described above.


Try it yourself. Maybe the timeblocking method combined with deep work will not work for you. Maybe something else will – in that case, please share it in comments. I don’t claim this method will work for anyone – but it works for me. It worked in really nasty situations, when I was so sick of work that I couldn’t even imagine myself working.

I hear you saying, "Are you insane?! Deep work when I can’t write even a line of code?!" I know how it sounds. Impossible. Unimaginable. Crazy. But please try first, and only then decide. Whatever you think of this method, it does work for me, even if regular coding seems out of the question. I don’t understand why and how this works. It’s beyond my imagination that I can be productive in such a condition of mind.

Impossible, unimaginable, crazy – yes. But possible.


Of course, you can use timeblocking for various activities, not only for coding. But we’re talking here about developer’s block, and I think it is deep work what makes timeblocking work in developer’s block. Deep work and your strength to block time for work.

I don’t use the method on a daily basis, although maybe I should. It works also when I feel very well, when I feel like working – it helps improve my coding efficiency.

Hence, if you suffer from developer’s block, maybe this method will help you overcome it. If you don’t, it still can help you improve the effectivity, efficiency and quality of your work. If you’re very sleepy today, try it, using short periods of time, like 10-minute ones. If you’re having trouble focusing on work today because of family issues or anything else, try it. Maybe it will work for you in one situation even though it doesn’t in another?

Timeblocking combined with deep work is not only efficient – it can also increase the comfort of your work and your satisfaction of it.

Timeblocking combined with deep work is not only efficient – it can also increase the comfort of your work and your satisfaction of it.


Thanks for reading. If you enjoyed this article, you may also enjoy other articles I wrote; you will see them here. And if you want to join Medium, please use my referral link below:

Join Medium with my referral link – Marcin Kozak


Related Articles