DEV Community

Toby Wilkins
Toby Wilkins

Posted on

Coding, and the feature break loop

During the current COVID19 crisis, I have been working on a side project to keep myself occupied. I’m building a web application, and using it as a medium to teach myself some new coding technologies. If you are interested, these are ReactJS, Express and Docker-compose. It’s going to be a helpful tool for note taking, and building a second brain.

Whilst working on this project, I noticed an interesting phenomenon. I was getting myself into a bad coding practice that was impacting the joy of my work. It would increase my procrastination and decrease my productivity.

Let me explain.

I would wake up, and get all excited to start working on the app. I would sit down, and get stuck into a new part of the application that needed creating. I would sink in to the productive and joyful state of ‘flow’, something that i’m sure most software developers can emphasise with. Once I completed the feature, I would get hit by a rush of positive endorphins, as the feedback loop of completing the goal would hit me.

All sounds great so far, but this is where the negative habits started to creep in. After this wave of positive emotions hit me from seeing the results of my handy work, I wouldn’t want to stop. I would look at the next feature that I wanted to create, and get stuck in. I would carry on. Inevitably, I would soon come up against a coding problem or issue that would need overcoming.

By this time, I would have been working for a few hours. My brain would be at saturation point, no longer in its optimal state to identify and fix a complicated or confusing coding issue. After frustratingly bashing away at the keyboard trying to fix this, I would eventually realise this. I would step away from the keyboard a defeated man, vowing to return once I was in a better headspace.

Every software developer will emphasise with this. Coding is a series of loops. You start with a goal in mind, work on it then hit an issue or problem. You then spend lots of time trying to understand why it doesn’t work, before realising why and finally fixing it. Rinse repeat for the lifetime of the project. That is coding. This is excruciating for new people trying to learn software development. it still happens to experienced coders, it’s just that the loops happen quicker and less often.

At this point, a broken application and a challenging problem awaits for you on your return. Now it’s no longer as exciting to get started. You fear a strenuous and difficult problem to overcome. When you do finally overcome your procrastination to get stuck back into it, you may very well fix the problem. Fantastic, the positive endorphins are back! Riding the same wave as before, you get stuck into the next feature and Bam. You guessed it, another coding brick wall to overcome. Rinse repeat.

This is the phenomenon that I have discovered. For better a term, I’m calling it the “feature break loop”. You start your coding session with a problem to solve, and you step away from your session with a problem to solve. its demoralising and hard work.

There is a solution to this dilemma. Once you have completed that new and exciting feature of your coding project, step away from the keyboard. Don’t give in to the urge of carrying on. Instead, break away on a mental high. If you do this, it will be much easier for you to return to your project the next time. Instead of a difficult issue to overcome, you will have an exciting new part of your application to get started on.

I’d like to say I have completely eliminated the ‘feature break’ loop from my life. I haven’t. I still catch myself getting stuck in it. But, after understanding the situation, I’m able to avoid it more often. This in turn makes me more productive in the whole, and enjoy the experience more.

If you emphasise with this at all, or have any tips for staying sane and productive in your coding I would love to head from you,

Top comments (0)