How to Learn Programming Faster: Three Rules and Sleep

People often ask me how I manage to learn so many technologies and still remember them. Reading the comments, I noticed a pattern: many people learn programming in ways that are more likely to kill their motivation than to bring results. It's not that programming is too hard or that you need a phenomenal memory. It's about the methods.
Over the years of learning programming I've found a few approaches that really speed up progress. They aren't tied to code: I apply them to English, to sports, to online security. Below are three rules for learning programming faster, plus a bonus I myself neglected for a long time.
Rule 1. Know why you're learning
When I was in college, about 90% of the students didn't understand why they needed programming or how they would use it. In chats I met people who learned C++ just to be able to say they knew C++. Not Python, not C#, not JavaScript — for no particular reason.
There's nothing wrong with C++. The problem is that knowledge without application is useless. You might as well learn a language that was spoken two thousand years ago: you can brag about it, but there's nowhere to use it.
From the very beginning I had a clear goal: write desktop applications, automate routine work, and later build programs for clients and earn money from it. So every new topic felt like a new skill. Figured out files — that means I can process files both in my own utilities and in client projects.
Before you start learning, decide what you want to do: mobile apps, websites, desktop software, automation, data analysis. The answer determines which language and which technologies you actually need.
Rule 2. Cut everything unnecessary
My main mistake was learning everything in sight. Libraries and frameworks I didn't even understand the purpose of — and I never used about 70% of them again. If I had read Greg McKeown's book "Essentialism: The Disciplined Pursuit of Less" earlier, I would have saved a lot of time.
The idea is simple: learn only what you need right now or will need very soon. There's no need to learn Jenkins "just in case". If you're not sure a technology will be useful in the coming months, cross it off the list and spend the time on what you need today.
The exception: use your motivation
There's an important caveat. When you're interested in a topic, you learn it many times faster. So here's what I do: say I need Docker right now but can't be bothered to learn it, while I'm hugely motivated to learn git, even though I'll only need it in a couple of months. Then I ride the wave of interest and level up git hard, while studying Docker little by little on the side.
I realized this with books. For a long time I read self-improvement books until I got so tired of the topic that I was squeezing out 10 pages a day. I switched topics — and started reading over a hundred pages a day, until that one got old too. Same with formats: tired of books — I switch to courses or videos; tired of courses — back to books.
Rule 3. Apply it right away
The fastest way to lock in knowledge is to use it immediately. When I studied material, I applied it right away in my own programs and in client work. The same principle works for foreign languages: progress is faster when you start working and communicating in the language instead of endlessly repeating theory. That's why I don't like the "years of theory first, then practice" approach.
Many people think it's enough to read a few books, and one day enlightenment will come and they'll be able to write their own project from scratch. It doesn't work that way. Start building a project even if you barely know programming, and learn what you need along the way. Books and courses should supplement practice, not replace it.
| Passive | Active |
|---|---|
| Lessons playing in the background | Writing code along with the lesson |
| Finish the book, then try | Try each chapter right away |
| Look at other people's projects | Build your own project and learn from its problems |
| Reread your notes | Write short notes in your own words and discuss the material |
Knowledge sticks only with your active participation: short notes in your own words, discussing what you've learned, applying it. You can read endlessly about how to walk properly, but you'll only learn by starting to walk.
Bonus: sleep
When I was in college, I slept 2–4 hours a night: I worked, studied and wanted to become a programmer as fast as possible. It seemed like I had more time that way. In reality that time was of little use.
Research shows that during sleep the brain consolidates what you learned during the day, and sleep deprivation hurts both memory and the ability to learn the next day. In a study of MIT students, sleep quality, duration and consistency were associated with academic performance: those who slept worse and less regularly had lower grades. I noticed the same in myself and in people I know.
Now I sleep 8 hours and progress faster than I did back then. Ideally, go to bed before 11 p.m., sleep about 8 hours and wake up at the same time every day.
Putting it all together
- Define your goal: what you want to build and why.
- Make a list of technologies for that goal and cross out everything you won't need in the coming months.
- Ride waves of interest: if you're drawn to a useful topic, learn it now.
- Start a project right away and pull in theory as its tasks require.
- Get enough sleep — it's a free learning accelerator.
If you're learning Python and want a clear path — from OOP basics to metaclasses, SOLID and design patterns, with homework and reviews — take a look at my Python OOP course. And how to speed up the learning process itself with AI and spaced repetition is covered in how to use AI for learning and NotebookLM + Anki.
Sources
- My video on learning programming faster on YouTube
- Okano et al., 2019: sleep and student academic performance
- Walker et al., 2002: sleep and skill consolidation
- Greg McKeown, "Essentialism: The Disciplined Pursuit of Less"