A couple of weeks ago, I was at PyCon India – the 10th edition, the 8th PyCon I was attending. It was great to see so many enthusiastic young developers, attending their first PyCon. With each year, as the event gets bigger, you see more and more of them. Lot of curiosity, and enthusiasm to become better programmers.

The conference had a whole bunch of talks, catering to people with varied interests, at different stages in their career – war stories, tips and tricks, helpful advice on getting started with a library or tool, thoughts on the community culture, etc. With each passing year, there are more and more proposals for talks, and a lot of good talks have to be left out due to constraints on the number of talks that the conference can accommodate.

Having said that, I’d have liked to see a talk on self-care tips for developers – advice on staying sane and productive in the long run. It is quite common for programmers to get burnt-out. I’m sure there are some useful lessons to be shared by everyone who has been programming professionally for a while – ranging from about a couple of years to many decades!

In a hallway conversation, Noufal was telling some of us about the Okinawa martial art lessons he’s been taking - it was inspiring to see how seriously he takes the lessons. A lot of programmers that I know, who have been programming for a while, have other interests that they pursue quite seriously, to take time off from programming. It would be nice to have someone speak about mental health and self care in a talk, rather than hope that people pick it up in hallway conversations. Explicit is better than implicit.

I was considering doing a lightning talk on this, but I didn’t get in touch with the organizers early enough to get a slot. So, here’s a blog post.

Disclaimer: Not all of these are things I’m good at doing consistently, but they are things that have at some point helped me. This post is also a way for me to write down things that I (or others) can come back to whenever necessary.

Take breaks

We are often so engrossed in getting something to work, that we lose track of time – slumping in our chairs for hours on end, forgetting to eat, hydrate or move around.

Our bodies weren’t made for this – we were built to move around. Also, stepping away from the problem for a bit, after wrestling with it for a while, brings a fresh perspective and new ideas.

You could use a tool like workrave to remind you to take regular breaks and stretch. Or use a Pomodoro timer. Another trick is to drink keep drinking water regularly, so you are forced to get up and take a piss, every once in a while.

Hydrate, Eat and Sleep

Being dehydrated can make one feel tired and sleepy, making it hard to focus well. Same goes for being hungry and sleep-deprived. Not having enough glucose in your blood has been shown to cause people to make bad decisions.

Mental work uses up a lot of energy, even if we seem to be just sitting around all day, and not expending much more energy than sleeping. It is important to feel good physically to work effectively.

You could have a bottle of water next to you, that you frequently drink from and keep re-filling at breaks. Don’t skip on your lunch to use that extra half an hour being productive. Keeping some snack accessible for you to eat towards the end of the day, when you are tired, helps. Use a sleep tracker or just roughly track sleep each night manually. Make sure you are getting enough of it.

Invest in a good set-up

We spend around half of our waking time at work - over a life time, that’s a lot of time! Sitting in a bad posture, or doing a only-slightly-uncomfortable action over and over, can easily grow into bigger problems in the long run.

You deserve good quality equipment, that “fits” you well. Get yourself a good keyboard and mouse, an external monitor, or whatever it is that you think will make your body thank you. If you end-up working a lot from your home office, invest in a good chair and a table.

Sunlight & Exercise

Being locked up in our office buildings all day doesn’t help with how much exposure we get to the sun. Not getting enough sunlight regularly can effect us both mentally and physically. Same goes for exercise. Getting some exercise everyday has been shown to have significant mental and physical health benefits.

You can start playing a sport, if hitting the gym or doing something alone seems like a chore. Playing a team sport helps even more since there are other people you are accountable to. Try to get some sunlight every morning, even if it is just standing out in the sun, while you drink your coffee.

Take Vacations

Switch off completely, and give your body and mind the rest they deserve. The break not only lets you rejuvenate physically, but also gives your brain the time to synthesize all the inputs it has, and come back with surprising ideas or solutions to problems that have been troubling you for a while.

The importance of taking a break is often forgotten, when we have so much to do. Honestly, I’m not very good at taking regular vacations, myself.

But, having a fixed time every year to take a vacation is something that I’ve seen working. For example, 2 weeks around your birthday every year, you can decide to take a vacation.

Do other things

We get into the game because we are really excited by the things we can build by flipping bits. We get so obsessed with it, that we lose ourselves in it, oblivious to the world outside. All the people we hangout with are people very similar to us.

Often, we are building stuff for people very unlike us. It’s very helpful to see the world from a different perspective than ours. Also, there is only so much we can express through code. There is a whole lot of us that can be expressed in other ways.

Pick up a team sport, do improv/stand-up, draw or paint, write, learn a martial art, join a cross fit gym – anything that you find interesting, other than writing code. Hangout with people who do very different things everyday than what you do. Their completely different perspective at life will make you a better programmer and a better person.

Avoid distractions

The internet can be so distracting! But, as developers, we tend to be constantly connected, leaving ourselves vulnerable to all this distraction. All these distractions can lead to very expensive context switches.

I’ve found getting into, and working in flow-states to be enormously satisfying. What I’m actually working on, doesn’t matter very much when I’m to deeply focus on something I want to be doing.

Creating an environment for yourself, where its easy to get into these states, is totally worth it. I’ve found using Pomodoros to be quite helpful, when I’m feeling distracted. Shutting off the Internet, or using a tool like get-shit-done helps with stopping myself from getting distracted by cat videos on the internet. Turning off all notifications on my phone and computer is another thing that is quite effective I also find it helpful to not be able to constantly have sight of the clock on my computer - so I work with all my windows full-screen. Leaving the phone in another room or in my bag works great, too. You can find a lot more tips on the internet, if these tricks aren’t up your alley.


If you see your team over-working themselves, and holding exhaustion as a badge of honour, please be the person to strike conversations around self care. Your team will thank you.

I’ve only listed down some of the things that I’ve found helpful. But, I hope this serves as a good starting point. Also, do take a look at selfcare.tech for more resources and advice.

Thanks Akilesh Mani and Shantanu Choudhary for reading drafts of this and giving helpful suggestions.