Skip to content(if available)orjump to list(if available)

Developer's block

Developer's block

52 comments

·August 23, 2025

Martin_Silenus

Sleep. Best side task for your brain.

How many times has this happened to me?

You struggle with a feature or a bug, you think about it, you weigh the pros and cons for hours... because you don't want to start something that will set you back. You're tired, but you don't want to go to sleep until you've at least made a decision for tomorrow.

Go to sleep. Now.

Then you wake up knowing immediately what to do. You hardly believe it, because it was so hard to find before you sleep. And you do it. And it works. And you know that sleep was the key.

esperent

Also exercise.

Sleep restores you. Exercise is the spark.

binaryturtle

I just take a hot bath… best ideas happen in the bathtub for me.

drebz

I once solved a customers problem, and understood the problem of my broken washing machine during one short shower before going to bed. Best shower ever.

spongeb00b

Douglas Adams was a big proponent of baths to help his writing

snarf21

I design board games and almost all of my ideas come while walking or driving. Sometimes we just need to give our brain a minimal task to occupy it and then we can more easily get into flow. This is also the same result of the Ballmer Peak / 1 Beer Buzz method. [https://xkcd.com/323/]

CalRobert

If only my kids would let me..

oldmandev

I agree that sleep and exercise are key.

Some have pain and/or insomnia waking them up at night with the inability to get back to sleep quickly or at all, and some have pain/injuries that make exercise less fun.

Telling us to sleep and exercise is like telling homeless and starving people to get off the streets, find a job, eat a good dinner, and buy a house. It sounds nice, and we’ll do our best, but the world you live in is different, and you don’t understand.

shakna

True, but as someone with a pain condition... Most throwaway suggestions won't help out. People always try to help, but rarely can. That's fine. Take the kindness, discard the advice.

But because I've struggled with this thing for decades, I probably do have enough tools to find my own way. And if I've run out, it means I'm about to burnout and need to find a way to restore ASAP.

aswanson

Facts. I don't do the late hours on code anymore either. Rest is essential.

KronisLV

> A new project and it’s going to be your best ever

A good defense against this is borrowing stuff from your prior projects, alongside eventually creating templates for the most common stuff.

For example, in new side projects I start, I can borrow the web server (ingress) configuration from the prior ones, same for CI pipelines and a large part of the previous Dockerfiles, sometimes even entire services with all of the annoying setup and configuration stuff already done.

Plus, this way, you have a more or less working baseline and further iteration is entirely up to you - and if you do want to improve things a bunch, then the next time your template will be even better and you'll be able to backport whatever you think everything should have to your other projects as well.

Going with the simplest solutions along the way helps: Bash scripts for triggering builds, CI configuration just calling those, using Docker or similar containers for the environments and builds, your ingress just being Nginx/Caddy/Apache2/..., using PostgreSQL or SQLite and specialized stuff like Redis/Valkey, RabbitMQ, MinIO and so on instead of reinventing the wheel.

Sometimes it's also useful to write utility scripts and even small tools to help with the projects, I bet developers that have been around for decades and are way better than I am have a lot of that stuff, alongside a healthy helping of dotfiles for existing tools to get in the zone while doing the dev work. Although it can also be helpful to go the YAGNI route and customize things as little as possible, like a stock IDE install, not even bothering with the color themes or keybinds or a plethora of plugins - just install and go.

glynnormington

Fair point. I often copy stuff across from one project to the next. But this point is most relevant when I'm using another language etc. for the first time and I'm tempted to try to retrofit all my previous best practices.

For example, I used to work on a mainframe product that dumped the address space to disk on a crash. Then it was possible to build all sorts of fancy tooling to analyse the dump. When I moved to a different platform, without those kinds of dumps, it was tempting to try to reinvent all this stuff, but it would have been a massive time sink (and would have failed too).

mattmanser

I tried this for a bit 5/10 years ago, but I've never found this to work very well. I guess I relarely start significant greenfield, non-trivial, projects. Maybe every 3 years or so.

By which time beat practice has completely changed and everything you setup is out of date.

And that's backend, it's much worse for frontend where even 6 months later your 'perfect' template is out of date.

ChrisMarshallNY

> Release early, release often

I’m big on this.

I find it efficacious to have an integrated product going as soon as possible, even if it’s a field of stubs.

It’s my experience that I almost never know what the end product will look like, no matter how much upfront planning time I devote, so being able to test and iterate the whole system, as soon as possible, is pretty vital.

It’s also one reason that I like to use test harnesses a lot[0].

[0] https://littlegreenviper.com/testing-harness-vs-unit/

supersparrow

If I’ve had a break, gone for a walk, left it overnight, worked on something else simple for a bit and tried the other usual ‘fixes’ and am still stuck then I find ‘just do it’ really helps me. I find if I just write some code even slightly related to the goal, even if it’s complete garbage that gets deleted later, then I get unstuck. Although unfortunately even getting to that point takes a couple of days sometimes. We can’t always perform immediately on demand.

wilkystyle

I definitely resonate with this. Getting to the point where you can just write and try things can be a little tough sometimes, but some of my best work has been done the second time around (i.e. the first pass was just doing whatever hacky, exploratory code I needed to do in order to get the feel and shape of the thing, and then the second pass was doing it for real once I had figured it out)

tomrod

Of all the uses of LLMs, this is the most useful to me. Being able to force a minor draft that I can begin tweaking to overcome dev or writers block.

BinaryIgor

Besides mentioned by others walks and sleep I found meditation to be really helpful; you often can get the benefits, ideas-generation-wise, of a full-night sleep doing solid 30-minute session. There are other benefits of meditating too :)

zabzonk

Perhaps switch languages/paradigms for a few days. If you are used to using "text-based" languages such as golang, python, c++ or java, try something like Smalltalk to freshen you up. Pharo https://pharo.org/ is a nice implementation.

hoistbypetard

I can feel this block, especially when I'm starting a new project.

Two things that help me:

* have a good boilerplate

* ship things that do nothing

i.e. I find it helps to start a project using my good boilerplate then set up builds and releases (so for web projects, put them online) so that the page doesn't look so blank anymore, and I can see my progress in "releases" even if they're just for me/others contributing.

skydhash

I kinda started programming on IDEs (Visual Studio, Eclipse, then Android Studio) and the templates they is kinda a nice way to get quickly started on some projects and not have to worry about configurations. These days, I prefer CLI tooling, so I copy things over from projects on GitHub.

Kovah

There's so much good advice in this article. My number one point that i learned the hard way during two decades of writing software: take breaks when your body tells you to. It's an absolute killer if you force yourself to work on your projects just because there's stuff on your to do list, new issues on Github, or whatever. Just stop working if you don't feel it.

vjerancrnjak

There’s no golden rule. For me, both work and learning out of curiosity is stress inducing activity. Nail biting, valsalva breathing, skin rashes etc.

I just grind through it and repeat the days.

I would do only aimless activities if I relied on the feels.

This kind of negative emotional investment seems to be the only thing that improves my abilities. If I’m learning through Anki or playing tunes on the piano, habit can stop after 6 months of regular daily practice.

But if I’m on the brink of stress rage frustration, somehow it persists .

mavamaarten

I feel like that's great advice for people working on their own side projects.

But... I'm employed? I mean surely it translates to "go on vacation" but it's pretty useless advice for days where you simply have to work and can't just... not?

mikodin

I don't think it needs to translate to "go on vacation". During my time being employed, this translated into getting up and stretching, taking a few minutes to look out the window, going for a short walk, taking an intentional breath, sitting and meditating for 15 minutes, actually eating lunch away from my computer, or not eating lunch and going for a quick run or doing yoga or going to the gym.

This can come forth in so many ways.

Moment by moment we can have an eye on our body and what it is asking for, I've found it to not only make me more productive, but also led to my baseline of stress to being way, way lower then everyone around me which is contagious in a positive way.

glynnormington

I take your point as I'm retired. But I had my previous working life squarely in mind when writing the post.

"Sustainable pace" helps, which in my case came down to 37 hour working weeks, not working at weekends, and taking all my vacation (and some extra when my employer let me buy it). I know this might sound like madness to Americans, but as a Brit employed mostly by American companies, it worked fine for me.

I found that taking plenty of breaks during the working day helped. Coffee breaks with colleagues, a decent lunch break (ideally including exercise), and plenty of tea breaks. So many times I've had a good idea or solved a problem during a break, so they are actually productive.

Then there's finding other useful things to do which aren't as taxing as the thing that's blocking you (e.g. the next large feature). Fixing bugs, writing docs, and doing preparatory investigations about the upcoming work are all productive ways to give yourself a bit of a mental break. (This was hardest when working in teams with continual short sprints or doing XP and pairing, but if I allowed myself to start to burn out, my productivity started to decline - essentially my brain was forcing me to take things a little more slowly in order to recover.)

kryptiskt

When faced with a big task and not knowing where and how to start, a trick I like is writing something crappy that is roughly a step in the right direction. For example, if you're building a web browser (huge monumental task), just load a page with your favorite http lib and display it, html tags and all. You know that none of that code will survive, but it's something that you can build on, and in due time you'll come around and replace it with the right design.

meander_water

Great advice all round.

> Take time with learning

But this one in particular stands out. We are being constantly pushed to ship code at faster and faster rates. AI has only hastened the process.

If you want to learn anything new you have to slow it down, push back against all the forces urging you to do more, ship more, make more money.

If you're using AI tools, do the opposite of what everyone else is doing. For every piece of generated code you accept, scrutinize every line, ask clarifying questions, ask for alternate implementations, ask what the tradeoffs are.

Just be curious.

This will be slow, but that's the point.

JimDabell

I’ve also found that LLMs are great for getting past developer’s block. “What next?” can overcome inertia quite easily.

ekidd

Yup, I don't use models to write serious code. But if my brain is totally blocked, perhaps after half day of meetings, I do sometimes take a smaller local model, explain a simple task to it, and let it try to implement to my specs. At this point I'm usually annoyed and engaged enough to get back in the zone.

If a human is available, 30 minutes of pairing works even better. There's just something about breaking tasks down and getting even simple feedback that makes it a good jumpstart.

petesergeant

That and I find it’s usually easier to start with a shitty first attempt that kind of works that you’re then refactoring