DEV Community

Cover image for How crucial is 'sleep' when it comes to programming?
Uvindu Harshana
Uvindu Harshana

Posted on

How crucial is 'sleep' when it comes to programming?

Top comments (11)

Collapse
 
funbeedev profile image
Fum

Sleep is a great debugging tool. Stuck on a problem all night? Go to sleep, wake up the next day refreshed and tackle the problem again. You'll find it much easier to solve the problem or at least see things in a different light that will eventually lead you to solving the problem!

Collapse
 
uvinduharshana profile image
Uvindu Harshana

yeah. 💯% true

Collapse
 
1e4_ profile image
Ian

As with any profession it's needed. The less sleep you get the more mistakes are made

Collapse
 
alphavader profile image
KB

Studies say beside doing sport and eat healthy/clean... Sleeping and having a good sleep (very important), enough sleep but not too much (around 8 hours) is the TOP and Healthiest method to be productive and live a good live.

Collapse
 
dewilofficial profile image
Dennis W.

Having not enough sleep will make your productivity suffer more than the extra time could make up for. Sleep is an absolute requirement for your brain to work.

Collapse
 
tqbit profile image
tq-bit • Edited

I wouldn't say it's just crucual for programming. The less you sleep, the more sleep debt you build up.

Besides, sleeping helps your brain to process memories, given it has the opportunity to rest (enter the REM phase of sleep)*. If you do your thinking after hitting the sheets, try and keep a diary of sorts to get them out of your head. For myself, it also helped to move the phone and tv out of the bedroom. Turns out scrolling memes is rather counterproductice in the evening / morning.

Collapse
 
alainvanhout profile image
Alain Van Hout

It's right up there, at the top of the list, alongside food, breathable air, and possibly a computer.

Collapse
 
kalashin1 profile image
Kinanee Samson

Sleep keeps you fresh and keeps your creativity up

Collapse
 
cyrilcabo profile image
Cyril Cabo

Very. Personally, I cannot work properly if I lack even just an hour of sleep. Though, I can easily pull an all-nighter, it isn't just worth it, because that would mean I won't be able to work the next day.

Apart from sleep, short-breaks in between your work hours are very important too! Quick breaks, in my opinion, greatly increases your productivity.

Collapse
 
jessecalton profile image
Jesse Calton

If I'm tired, or haven't fully woken up, my productivity will tank. I need my 8 hours of sleep + some light exercise in the morning to get the blood flowing.

Also, hopefully you work for a company that respects your work/life balance and doesn't look at rest as a "reward" as opposed to the requirement every healthy body needs.

Collapse
 
uvinduharshana profile image
Uvindu Harshana

thanks for the reply.