Habits…
I’m sure that you already heard about habits but, do you really know the importance and how they can be helpful in your life? Have you ever sat down and thought about your own habits?
Well, I did not. I never thought about that until I read the book “The Power of Habits” by Charles Duhigg. If you haven’t read it yet, please do it, it’s a great book.
Whilst reading it I understood that I’m a person that likes having a routine set: I try to have some routine in my life. This allows me to avoid uncertainty. But I also notice, that I have some habits in my life but I never really thought about that and how having it can be advantageous in life.
Firstly, let's define what habits are and how they work:
All our life, so far as it has definite form, is but a mass of habits
William James
A habit is a simple action loop that consists of a cue, a routine, and a reward:
💡 Cue: Trigger that tells the brain to go into “automatic mode”
Routine: Activity, mentally or emotionally
Reward: Helps the brain to understand if this circle should be remembered
Habits help our brain to be more efficient because it goes into “automatic mode”. The main advantage of this is to allow our brain to focus on important things. A study made at Duke University shows that most of the decisions we make daily are not the result of our decisions but our habits.
It’s always possible to create new habits. Unfortunately, our brains can’t distinguish good from bad habits. We cannot get rid of a bad habit but, we can replace this bad habit with a good one if we understand how it works.
Now, we can move on to our main topic here:
How have habits improved my daily life as a developer?
With the knowledge gained from the book, I tried to analyze my habits. I noticed that I already had some and I could create new ones:
Habit: Code review when I start working every day
Sometimes I was too exhausted to do a code review at the end of the day or a teammate requested me to do it while I was focused on another task.
To improve this, I decided that my first task of the day would be doing a code review.
With time, this became a habit. This brought me some advantages:
- The quality of the review improves a lot because the brain it’s more fresher at the start of the day
- can help the other teammates and dispatch some work
- I am able to focus better on my tasks and the probability of being interrupted is lower
Habit: Testing in a respective environment before sending to QA
I also knew that I could improve other behaviors to help other members and me to have a better day: sometimes QA has some “basic” problems with tickets that were being sent to test that could be avoided. For example, the feature is not in the environment yet. It’s really painful for them.
So I started to do a quick test in every respective environment before sending it to QA. And guys, believe me, helps a lot! Starting doing this I noticed that:
- This improves QA and other teammates’ life
- It makes you rethink your approach
- If I find something, it’s quicker to fix
Habit: Review code before commit
Do you ever commit a console.log
or a dump
? OPS, I did and it’s normal.
(Yes, I know we have linters for that but it’s an example of unwanted code).
It annoyed me to have threads to remove it. To try to fix this, I started to review all the code I made before commit it. Doing that helps me to:
- Some unwanted codes are caught early
- Rethink all logic that was made, especially if I do the review the next day or after a break
- Habit: Workout
Being a developer can be stressful and it’s a very sedentary job. I don’t have enough fingers in my hands to count how many times I did not have the energy at the end of the day to go to the gym.
I started to go to the gym before work. Doing exercise helps me to relax and it’s good for my health, and for my mood!
I have other habits but these were the chosen ones!
Having habits has improved my daily routine and has allowed me to be more efficient. Creating a new habit can be challenging, but it's worth it. So, take some time to reflect on your own habits and see if there are any areas where you can improve. You might be surprised at how much this can be helpful in your life.
Top comments (0)