Lo-fi for coding: a soundtrack for programming sessions

Lo-fi has become a fixture on programmers' screens. How to use it well across the different phases of writing software.
Illustration: lofi for coding

Ask a room of developers what they listen to while they work and lo-fi will come up again and again. Screenshots of code editors with a lo-fi stream in the corner have become almost a cliché, and “lofi for coding” is one of the most common ways people discover the genre. There are good reasons for that. Programming alternates between deep concentration and routine tasks, between reading and writing, between long stretches alone and interruptions from colleagues, and lo-fi happens to fit most of those moments. This guide explains why, how to use it across the different phases of software work, and when silence is the better tool.

Why programmers gravitate towards lo-fi

Programming is, in large part, a language task. You read code written by others, write your own, scan documentation, follow error messages and keep the structure of a system in your head. Those activities draw on many of the same mental resources as reading and writing prose. Music with intelligible lyrics competes for those resources: part of your attention follows the words whether you want it to or not.

Experimental research on reading supports that intuition. Studies of reading comprehension have repeatedly found that music with lyrics is more distracting than instrumental music, and a 2023 study using self-paced reading found that instrumental music did not lead to measurable distraction while lyrics did. We summarise these findings, with references, in our article on studying with music. Lo-fi is almost always instrumental, which removes the most obvious source of interference.

The second reason is predictability. Lo-fi tracks are built on loops that change slowly, at a steady tempo and an even volume. There are no big drops, no loud choruses, no sudden silences. That makes the music easy to tune out, which is exactly what you want while tracing a bug through five files.

The third reason is mood. Lo-fi’s warm, slightly nostalgic atmosphere makes long sessions feel less sterile. For many developers it has become a ritual: the stream goes on, the editor opens, work begins.

Match the music to the phase of work

Software work is not one activity, and the right soundtrack depends on what you are doing.

Design and problem-solving

When you are working out an architecture, modelling data or designing an algorithm, you are holding many pieces in your head at once. This is the phase that needs the most working memory, and many developers find any music a distraction here. If you do listen, choose the most minimal, ambient lo-fi you can find and keep it very quiet, or simply switch it off until the plan is clear.

Writing code

Once you know what to build, writing it is often the most fluent part of the work. Steady jazz lo-fi at low volume can help you settle into a rhythm and keep going. This is the phase where lo-fi is most at home: the loops provide a gentle sense of momentum without pulling your attention away from the editor.

Debugging

Debugging requires close reading of code, logs and stack traces, often line by line. Many developers prefer calmer, sparser music here, or silence for the hardest problems. A practical sign: if you find yourself reading the same function three times without taking it in, turn the music down or off.

Code review

Reviewing someone else’s code is reading in its purest form, often with careful attention to detail. Treat it like reading a dense document: instrumental music at low volume at most, silence for complex changes.

Routine tasks

Refactoring with automated tools, updating dependencies, fixing lint warnings, writing straightforward tests, tidying documentation: these tasks need attention but not deep concentration. Here a little more groove, chillhop or brighter jazz lo-fi, can keep the energy up and make the work pass more pleasantly.

Avoid the playlist trap

The most common way music hurts productivity is not the music itself but managing it: browsing for something new, skipping tracks, adjusting playlists, reading the name of every song. Each of these is a small interruption, and interruptions are expensive for programmers because rebuilding the mental model of a problem takes time.

The solution is to decide once. Choose a source that needs no management, such as a long live stream or a full catalogue on shuffle, and leave it alone for the whole session. The Mondolofi live stream was built for exactly that: jazz lo-fi around the clock, without presenters, adverts between tracks or abrupt changes of style.

Headphones, speakers and volume

In an office or a shared home, headphones do two jobs. They deliver the music and they signal to others that you are focused. Closed-back headphones at a low volume also mask distracting background conversations more effectively than turning music up. At home alone, a small speaker on the desk at low volume can feel more natural for long sessions and less tiring for the ears.

Whatever you use, keep the level low. A good rule is that you should still be able to hear someone say your name. Loud music is more distracting, more tiring and, over long periods, not kind to your hearing.

Structure sessions with music

Pairing music with timed work blocks works particularly well for programming. Start the music and a timer together, work until the timer ends, then stop the music and step away from the screen for a few minutes. After several blocks, take a longer break. The music becomes a signal for “focus time”, and the silence during breaks makes them feel like real breaks. We describe this method in detail in our guide to timed focus sessions.

Some teams take the idea further and share a soundtrack during focused working hours, or use the same stream for pair-programming sessions, so that the music marks time set aside for concentration.

Build a workspace that supports focus

Music is only one part of a good working environment. Light, a tidy desk, notifications turned off during focus blocks and a comfortable chair all matter at least as much. Our guide to the lo-fi desk brings these elements together, and our article on music for remote work covers routines for the whole working day.

Know when silence is better

Music is a tool, not a rule. Some days, some bugs and some people simply work better in silence, and there is no virtue in forcing a soundtrack onto a task that needs every bit of attention. The best routine adapts: music when it helps you start and keep going, silence when the problem demands it, and the freedom to switch between the two without a second thought.

For a ready-made soundtrack for long sessions, see our work and focus page.

Journal

Keep reading

All articles →