5 ways to screw your sleep as a Developer

“It’s a badge of honor to be a workaholic. But I don’t want to die at my desk”

- A developer

Developers are very passionate about their work, so they often find themselves working on projects late into the night.

Image source

To be a programmer is a noble profession. To be a good programmer is even nobler. I’m not talking about how many lines of code you can write in an hour, or how many bugs you can fix in a day, or how much time you spend on Stack Overflow. I’m talking about the impact your work has on the world around you and your ability to solve complex problems with simple solutions.

As a developer and a product owner, I have realized that it is very important to have a proper sleep while you code.

a. Doesn't follow good standards: Problems are meant to arise in development if good standards are not followed.

But what does good standards have to do with sleep?

Well, a lot. When you write shit code it reflects in your personal life. I will give you an example from my personal life. Back in 2017 when I started my career as a data scientist. I was moved away by the tremendous speed of every developer. Since it was a startup, everything was expected to be delivered ASAP. During the initial month, I was busy learning, I wasn't able to serve any deadlines.

Due to less experience in development, I was not able to write production-level code. I followed my own standard called “Make the code working”. It doesn't really make sense.

If you don't have good standards, code is meant to fail several times. We then sit to debug the code and make it work “anyhow”.
With my experience in development, I have seen developers write “hacky” code which thereby leads to more fixes, which there leads to more hours of codes, which there leads to more stress and less sleep.

When devs follow no standards it takes more time to debug the code.
Here is a great article on how important standards are in programming: link.

b. Using 3rd party API blindly: I wish development was that simple. We see memes of copy-paste from open source but little do we understand the use case. We simply copy-paste or directly use the 3rd party API.

Note: This doesnt refer to API’s from well reputed organizations.

It is not really a good practice using a 3rd party API “workarounds” in your production. In case you have it, start thinking of an alternative. We never know when the 3rd party stops working or their company shuts down.

Now, this doesn't mean that if we should not use 3rd party APIs. It is fine in the nascent stage of a startup, but as the startup grows it's a good idea to think of an alternative.

Example: In one of my startups we used a 3rd party API to crawl the websites. One morning that website came down, we later came to know that the startup was shut down. Users went crazy as most of the things were not working. We had to immediately find some other way to fix that issue.

c. Not understanding the business value: Generally it's the team lead/managers to make sure that the expectation is set. Expectations mean setting clear goals and designs.

Without understanding the business value it's really very hard to build anything. Understanding the business aspects of development helps developers build things faster and with a clear vision.

Apart from that more importantly it helps developers understand the use case and build the code accordingly. Taking various use cases into consideration helps users build code accordingly thereby handling more exceptions.

If use cases are not considered then it becomes hard to handle the exception thereby more errors leading to more stress and less sleep.

d. No time management: Problems start when we don't have control over our time. Time is something which is very costly so it must be spent wisely. Developers generally lack this habit. Especially this WFH has made the work of time management more difficult.

Image Source

There should define boundaries that separate work and personal life. Without that, it makes life a pretty mess.

e. Working on 10 things together: Devs tends to work on 10 different things together without completing one properly. This thereby results in too much pressure. Patience is the key, yet most of us lack this. Though is the duty of both developers and team leaders to make sure that devs don't do multiple tasks at once.

A study from the American Journal of Preventive Medicine found that more than 10% of the world’s population is suffering from insufficient sleep. This lack of sleep has been linked to a variety of health issues, including diabetes, obesity, and depression. In addition to these common consequences, there are also specific effects on developers: Developers who suffer from sleep deprivation have lower job performance and higher rates of mental errors in their work. They also produce fewer lines of code in a given time period than those who get adequate restful sleep.

Poor sleep can reduce your life expectancy. It has been shown that a person’s health is inversely proportional to the amount of sleep they get.

Apart from that depression and anxiety are two mental health disorders that can be caused by lack of sleep. This is because a lack of sleep can lead to the release of certain hormones that cause people to feel more anxious or depressed.

Here is a link to how important sleep is: Click here

Avoid screens an hour before bed and have a routine that lets you be ready to sleep at night.

Explore new things, life is much more than a cubicle. Travel, meet new people, spend time with family.

Hustle when you need to, but make sure that you hustle in the right way.

One more thing if the above doesn't help to get sleep then consult a mental health practitioner..hehe.

Well, that was all from the side. If you have made it to the end, don't be shy to hit the like button.

Comment your views. Would love to know your views.

Let's get in touch on LinkedIn:

Product Owner @ Quantamix Solution, Full Stack developer, Graph Database