How to Program for 24 Hours Straight

Photo by Morgan Housel on Unsplash

Writing software takes a lot of focus, and unfortunately we can’t just snap our fingers and be instantly in the zone. It takes time, but there are a bunch of things we can do to help that along. This is a list of things that I’ve found over the years that really help to put me in a flow state.

  1. Get a long music playlist that is specific to programming. Music can be a very good way to get you into a mindset. Much in the same way a song can give you nostalgia, by reserving a set of songs for programming you can trigger a way of thinking just by turning on a playlist.

I’ve used these methods many times with much success. The goal is always to enter a sort of meditative state. If you have someone who wants to start a conversation with you, shoo them away. If your phone is vibrating from notifications so much that it registers on local Richter scales, turn it off. Make it clear both to other people and yourself that you are not to be disturbed or distracted. Humans have a limited amount of willpower, and the less energy you spend on combating distractions will be more energy you have to focus on writing software.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store