logo
Navigate back to the homepage

Code and Detachment

Kamlesh Chandnani
July 14th, 2020 · 3 min read

All of us love writing code because it’s such a beautiful thing that help us convert our ideas into reality. We get into it so much that we kind of get attached and build a relationship with our code.

We get Dopamine Hits whenever we see our ideas come to life with just mere code. But sometimes we don’t get these dopamine hits and that’s where it starts becoming complicated.

Let’s think about some moments when we don’t get these dopamine hits because we get attached with our code.

  • We indulge ourselves in writing too much of code that we feel saturated after one point. Probably?
  • We put self-imposed expectations for our brain and when we fail to meet them we feel low and pissed.
  • We want to sail multiple boats in parallel. Working on one project and thinking about another, then jumping onto that because of anxiety and FOMO and then don’t excel there and again come back to the first one. The loop continues.
  • We often stretch ourselves too much in writing code that we often forget to take proper rest and then it leads to burnout.
  • We get attached to our code that if someone tries to change it we feel anxious and uncomfortable.
  • We get attached to our code that we can’t let ourselves out of it to move on to other stuff.

I’m sure most of us can relate to these events and their frequency of occurrences in our day to day life.

Now the reality is whatever I mentioned above is not rocket science and all of us are aware about all these things but still we struggle with most of the things above. Why? Because knowingly and unknowingly our brains have been trained to work like this.

While reading Deep Work all the things the author mentions for working deeply involve some sort of activities/exercise to train our brain. The author also mentions that our brain won’t adapt to the new set of activities overnight because it’s not normal for our brains. But keep on practicing and don’t give up it’ll become the new normal.

Relating to the same theory below are some possible ways(that I think) to train our brain to overcome all the issues that are caused because of our attachment with the code.

What could be some possible ways to get detached with the code?


1. Take breaks - Breaks are necessary
  • Take small breaks when you’re working on something and not able to figure out a solution just get out of that zone take a small break, come back and start fresh.
  • Take breaks immediately after you release something and completely disconnect yourself from everything. This will help your brain to relax and recover.
  • Take random unplanned breaks sometime to get yourself out of the routine.
2. One thing at a time
  • We humans often tend to juggle between multiple things at the same time and then we are not able to produce the same quality we had planned for. So hold on and focus on one thing at a time.
3. Be okay with things which are not normal
  • Don’t attach yourself with the code because in the end it’s volatile.
  • Don’t get anxious when someone touches your piece of code maybe they have a different perspective and if not maybe you can share why you’re not comfortable to accept the change they have proposed.
  • Don’t get attached too much with one project/code. Figure out what you want to work on next and just move on else you might get stuck and feel trapped.

Wrap up 📝

Train your brain to go against your normal flow/routine, take breaks short or big, do one thing at a time, try to be okay with things which are not normal. Our brains are adamant to adapt the change but believe me don’t give up and that will become the new normal.

P.S: These are things that I’ve realized or discovered personally as a developer and it is not a checklist and it might/might not work the same way for you.


If you have some techniques that you have found while working on Design Systems then you can write it to me or you can DM me on Twitter. I would love to hear them!

If you like this then don’t forget to
🐤 Share
🔔 Subscribe
➡️ Follow me on Twitter

Join the Newsletter

Subscribe to get the latest write-ups about my learnings from JavaScript, React, Design Systems and Life

No spam, pinky promise!

More articles from Kamlesh Chandnani

API Driven Development for Building Components

A technique to build components with consumers in mind

June 30th, 2020 · 4 min read

Versioning JavaScript Apps

Strategies around how to version JavaScript applications

May 26th, 2020 · 7 min read
Link to https://github.com/kamleshchandnaniLink to https://twitter.com/@_kamlesh_Link to https://www.youtube.com/playlist?list=PLpATFO7gaFGgwZRziAoScNoAUyyR_irFMLink to https://linkedin.com/in/kamleshchandnani