DEV Community

Cover image for Learning to code is a bit like going to the gym.
Yong S Choi
Yong S Choi

Posted on

Learning to code is a bit like going to the gym.

Rule 1: Trick Your Brain with the 20 Minute Rule

Learning to code is similar to regularly hitting the gym. Both tasks require consistency, and finding time for either can be challenging. To overcome this challenge, you can trick your brain using the "20-minute rule."

Understand that humans have an inherent inertia, which can be exploited to our advantage. If you convince yourself to engage in coding practice for just 20 minutes right after you arrive home, you may likely end up coding for an hour or more due to your brain's perception of the task's duration and effort.

Task-switching can be difficult, especially after a long day, which makes it even more important to start coding right away. You're more likely to give in to relaxation activities like watching TV if you sit down first. Thus, the moment you get home, committing to a brief period of coding can maximize your learning time.

Additionally, it's crucial to develop a habit. This typically requires performing the task daily for a month. To track this habit, draw a continuous line on a calendar for each day you successfully code. The psychological urge to maintain the continuity of the line can encourage you to stick to your daily coding practice, thus developing a habit.

Remember, the main goal is to trick your brain into starting the task and using the inertia to keep going, turning what initially felt like a chore into an enjoyable and fruitful exercise.

(Source: The App Brewery, www.appbrewery.com)

Top comments (0)