If you’re like most people, you probably didn’t start coding because you were genuinely passionate about it.
Maybe you got into it out of necessity, stumbled into it by chance, or felt pressured because everyone else was doing it.
Without any built-in motivation, coding can easily feel like a tough, tedious chore.
But have you ever wondered if coding could actually feel as fun and addictive as playing your favorite video games or scrolling through Instagram?
What if I told you there’s a way to make your brain want to code just as much as it craves games or social media?
For some context — in my coding career I’ve learned 9 programming languages, built over 40 coding projects, solved more than 1500 LeetCode problems, and cracked interviews at multiple big tech companies.
But I didn’t start out this way.
In fact, I was the opposite. Before starting my coding journey, I was a video game addict, spending hours playing games like FIFA and Need for Speed, and a chronic social media scroller.
So, how did I go from video games to becoming hooked to coding?
In this article, I’ll share 5 psychological hacks that helped me rewire my brain to genuinely enjoy coding. By applying these strategies, you can turn coding from a dreaded task into something you look forward to every day.
What Truly Motivates Us?
Before we jump into the “how,” let’s start with the “why” — why are some activities, like video games, so addictive, while others, like coding, can be hard to stay motivated for?
The answer lies in this single molecule in our brain called dopamine.
Dopamine is our brain’s “wanting” chemical. It’s what drives us to go after rewards and keeps us coming back for more.
When you win in a video game or get a like on social media, you get a quick burst of dopamine making them instantly rewarding.
But coding doesn’t always work that way, at least not in the beginning.
In coding, the rewards are often delayed.
Learning a new programming language or working through a coding project doesn’t always give you that quick dopamine hit.
But what if we could trick our brains to release dopamine more often while coding, making it feel as rewarding as gaming?
1. Streaks
Have you noticed how games and apps reward you for showing up every day?
This is called a streak, and it’s a powerful motivator.
On LeetCode, for example, every consecutive day you solve a problem contributes to your current streak.
This motivated me to solve at least one problem daily when I was preparing for my coding interviews.
It became a fun challenge to keep that streak alive.
You see the same thing on GitHub. Every time you push a change or contribute, you get a green dot, creating a visual record of your progress.
Those green dots make you want to code every day since you don’t want to break the streak.
Seeing your streak grow is satisfying and helps you stay committed.
But keeping a streak doesn’t mean you need to code for hours every day.
Sometimes, it’s just about showing up for 10–15 minutes, which is enough to keep the momentum going.
Over time, these small sessions add up, and coding becomes a habit.
You can create your own streak by marking days on a calendar or using a tracking app.
Each day you check off gives you releases dopamine, making you feel good and motivating you to continue your streak.
2. Make it easy
Make coding as easy as possible in the beginning.
Think about video games — they always start off easy.
That’s intentional. Early victories give you a taste of success, motivating you to keep going.
We’re more likely to stick with something if it feels easy.
When you’re new to coding, don’t jump into complex projects or algorithms right away.
Instead, start with small, achievable tasks.
Begin with small projects: a calculator app, a simple game, or a basic to-do list.
These may seem basic, but that’s the point! Completing these tasks gives you an instant dopamine hit — a little celebration in your brain.
If you’re on LeetCode, start with easy problems. Every solved problem is like a small win that releases dopamine and keeps you coming back.
This positive feedback loop helps you form a habit of coding everyday.
As you get comfortable with the easy stuff, start leveling up.
Just like in a game, you’re now ready for the next challenge.
This way, you’re challenging yourself just enough to improve without feeling overwhelmed.
It tricks your brain into thinking coding isn’t so hard and it’s something you want to keep doing.
3. Make it Fun
Next, make coding fun.
Most of us start learning to code to land that dream job or ace an interview.
But what if, just for a moment, you coded without worrying about the end result?
Think about when you play video games — you play because it’s fun, challenging, and maybe a bit competitive.
Coding can be the same way.
In the beginning, code without any pressure or expectation.
When I first started learning to code, it was with C language, and honestly, I found it dull and boring.
It felt like something I had to learn to get a good grade, not something I was excited to dive into.
But things changed when I picked up Python during my summer break. For the first time, I felt like I could actually create something.
After learning the basics, I started building little things — first a simple calculator app, then games like Pong and Tetris, and then full-stack applications.
I wasn’t thinking about grades, interviews, or jobs — just the excitement of creating something from scratch.
Over time, I realized that when I genuinely enjoyed what I was creating, I’d lose track of time and that’s when coding started to become more than just a skill. It became a passion.
So, how can you make coding enjoyable for yourself?
Start by picking projects that genuinely excite you.
These projects are easy enough to finish in a short time but engaging enough to keep you interested.
They’re just for fun, a chance to experiment and make mistakes without pressure.
When coding becomes fun, it shifts from something you have to do to something you want to do.
4. Checklist
Now, let’s talk about how you can gamify coding to reward yourself everyday.
The answer is to have a checklist of tasks and tick them off as you complete them.
In video games: each mission or level you complete gives you points, new abilities, or just the thrill of winning.
This reward triggers a dopamine release that keeps you playing.
Similarly, think of a checklist as a series of mini-missions.
Every time you cross an item off a checklist, it gives you a dopamine hit that helps you stay motivated motivated and keeps you coming back for more.
Now, creating a checklist for coding isn’t just about listing random tasks.
It’s about breaking down your big goals into byte sized tasks.
Decide what tasks are crucial to get started and prioritize them.
Identify 1–3 tasks to accomplish each day.
When learning something new, create a checklist of topics to cover. Go as granular as possible and add sub-topics as part of your checklist.
Lets say your big goal is to ‘Become a full-stack developer.’
That’s exciting, but it’s also overwhelming.
Instead, break it down into smaller steps like:
For each of the steps, go deeper and create a checklist of things you need to learn and build.
You can use AI tools like ChatGPT to generate these checklists with any level of granularity you need.
When you have a checklist in place, every day feels like a small victory.
Even if you don’t finish everything, you have a clear view of your achievements and what’s left.
Coding becomes something you want to come back to, just to see that checklist getting smaller.
You can use an app like Notion or a simple to-do list to create your checklist and track your progress.
5. Novelty
Alright, let’s talk about one of the most powerful, yet underrated, aspects of learning: novelty.
Our brains are wired to seek out new experiences.
Without variety, coding can start to feel repetitive, even boring.
I remember the first time I switched from Python to learning Java — it was like learning to ride a bike all over again.
Everything felt different, from the syntax to the approach to solving problems.
But that challenge was also what made it exciting.
One way to keep things interesting is by exploring different types of projects and technologies.
If you’ve been working on web development for a while, try something different — maybe build a game or experiment with AI models.
Each type of project brings its own set of challenges, tools, and skills, giving you that novelty boost.
And novelty isn’t just about what you learn — it’s also about how you learn.
Sometimes, the same topic presented in a new format can completely change how you feel about it.
If you’ve been learning through videos, experiment with hands-on projects or taking notes by hand.
Dopamine Detox
Now, let’s talk about something that might sound a bit uncomfortable — a dopamine detox.
The idea behind a dopamine detox is to reset your brain’s reward system by cutting back on high-dopamine activities like social media and gaming.
When you lower these instant rewards, your brain becomes more receptive to the dopamine that comes from productive activities, like solving a coding problem or completing a project.
Start by identifying the activities that give you those instant dopamine hits and can take time away from coding.
Try to avoid these high-dopamine activities early in the day. If you start your day with them, important tasks like coding can seem less appealing.
Instead, use these high-dopamine activities as rewards.
After you’ve completed good number of coding tasks, give yourself a few minutes on social media or watch a video.
By doing this, coding becomes the primary focus, and distractions become rewards instead of problems.
When you reward yourself, you’re telling your brain, “This is good, let’s do it again.”
So, celebrate your wins, even the small ones.
Finally, be kind to yourself. Not every day will go perfectly, and that’s completely okay.
There will be times when you encounter bugs that frustrate you, days where you’re feeling off or maybe moments where it feels like you’re not progressing as fast as you’d like.
The important thing is to get back up and keep going, even if it’s just a small step forward.
I know I’ve shared a lot of strategies in this article, and you don’t have to apply all of them.
Experiment, see what resonates with you, and adopt the ones that genuinely make coding more enjoyable and sustainable for you.
Hope you enjoyed reading this article.
If you found it valuable, hit a like ❤️ and consider subscribing for more such content every week.
If you have any questions or suggestions, leave a comment.
Checkout my Youtube channel for more in-depth content.
Follow me on LinkedIn and X to stay updated.
Checkout my GitHub repositories for free interview preparation resources.
I hope you have a lovely day!
See you soon,
Ashish
This is indeed my current journey! I’m replacing gaming with coding and now I even forget to game most of the days. Yet, I’m excited about the day with web development :) Thanks for sharing this. Helps to know the context behind my process.
These things are really working for me❤️