DEV Community

Cover image for How to take breaks while coding

How to take breaks while coding

Karan on August 17, 2018

I felt the need to write this post is to expand my reply on Brenda's post of "distractions while taking break". It is also a topic in the the book ...
Collapse
 
tamouse profile image
Tamara Temple

After a lifetime of coding, staring at screens, and being in my head, this is all excellent advice, and fits well with my experience. The need to get away from a screen, stare into the distance, and be out of the stream of information is hugely important.

Collapse
 
kritulrathod profile image
Kritz Rathod

Looking forward to your book. Interesting title.

Collapse
 
karan profile image
Karan

Hi Kritz,

Thanks! Its already available to download and read. You can get it from here - leanpub.com/selfdebug/

Collapse
 
blaine91787 profile image
Blaine Harris

Don't get me wrong, I agree 100% with everything you've written. To follow it up with a link to an ebook though? 🤔 😉

Thread Thread
 
nathantreid profile image
Nathan Reid

I had that thought as well, but once I considered that the book is optionally free and is related to the topic at hand, it makes sense to me that the author chose to include a link.

Collapse
 
emkographics profile image
Emko

Call me weird but there is nothing sweeter than snapping out of the flow right when you reach its highest climax during a coding session. That to me is the best time to take a break, right when you dont want to. I'll then hop out of the chair, walk around, and reflect on what i wrote, how i wrote it, and ways to make it better. I also do this when im stuck. By the time i get back to my desk, all hyped and ready to jump back into my element, i have already mentally precompiled my code and forsaw loopholes in my logic so i have a better idea what to do next. Someone also told me that for every hour you sit, you should stand for 10 min. And for every hour you stand, you should sit for 10 min.

Collapse
 
sparxmith profile image
Eric J. Falgout • Edited

That's very interesting. I utilize the opposite strategy, wherein I take breaks by playing games that very immersive. I find that returning to Flow is much faster than when I go for a walk or read (whether book or social media). For example, 20 to 30 minutes of PUBG Mobile and I'm ready to Flow for another 90 minutes (assuming no other distractions).

And then my 1 hour drive of total solitude breaks me out of the Coding Trance, allowing me to be my best Self for my wife and children.

It's very surprising to me that breaking immersion increases your effectiveness.

Collapse
 
dhruvdutt profile image
Dhruvdutt Jadhav

Interesting. What are your thoughts on the 20-20-20 rule?

Collapse
 
karan profile image
Karan

The 20-20-20 rule seems hard to follow practically - especially when you are lost in the code and are thinking about the problem intensely.

The problem I generally see with all these "rules" is that they do not accommodate natural human behaviour or the rhythms of the workplace. So even though they seem simple to follow - it actually requires a lot of effort and hinders the person. They are too rigid.

Collapse
 
jfrankcarr profile image
Frank Carr

My main break of the day is at lunch when I go out to the parking lot and play guitar for a little while (weather permitting).

Collapse
 
aidanharding profile image
Aidan Harding

As with everything, the answer is tea. Make a cup of tea, and sit outside if you can.

It brings its own timing with it: You have to wait for the kettle to boil, and the tea to brew. When you've finished drinking, then it's time to get back to work.

Collapse
 
ash1eyish profile image
Ashley Maria

GREAT advice! I'm off to read your book. I like how you look at the structured "rules" of productivity and offer up the negatives no one talks about.