Coding in Flow logoGet my free React Best Practices mini course
← Blog

How I Teach Myself Coding

Sep 10, 2024 by Florian

Featured image

People often ask me in my YouTube comments and in DMs how I learn new coding concepts. How I take new libraries and teach myself not only how to use them, but also how to incorporate them into a larger project without creating a mess.

Being able to teach yourself new things is important as a programmer and in this post, I want to show you how I do it.

Table of Contents

1. Build projects slightly outside of your current skill level

The best way to learn coding is by building full projects. Sure, you can study a library or feature in isolation, but in the real world, we need to assemble these parts into a functioning whole.

What kind of project you build doesn't matter much. It can be a clone of an existing app or your own unique idea. The crucial part is that the project is slightly beyond your current skill level.

Let's say, for instance, that you're completely new to programming. Then it doesn't make sense to try to build a full-blown social media website, because that's way too difficult and will overwhelm and frustrate you. A beginner can build something like a to-do list app instead. But if you already built a few full-stack projects, a social media app might be a good next step.

Pick projects that will teach you something new. Never implemented infinite scrolling? Or client-side file uploads? Or optimistic updates? Build an app that uses these features!

2. (How to) study documentation and other projects

When you want to figure out how to implement a certain library or framework feature, the documentation should always be the first place you look. Not ChatGPT, not Google, not Discord. The docs are the instructions manual carefully written to explain something as succinctly as possible (at least if the docs are halfway decent).

But documentation focuses on specific features, they don't teach you how to build the project as a whole. How to connect different features and make sure your codebase doesn't turn into a mess. This is where you should study other projects on GitHub.

First, build your project by yourself as best as you can. Then compare it with other projects and see if you can adopt some of the architecture. But do that only if it makes sense to you. Not every open-source project contains good code and not all design decisions make sense for every project.

For instance, I just built a full-stack e-commerce website with Next.js and Wix (tutorial will be on YouTube soon). I looked up different open-source Next.js e-commerce projects with and without Wix integration and compared them with my own code. But instead of just copying everything they did, I only adopted the changes that made sense to me. For example, some of these projects only used server-side rendering, but I'm using server-side and client-side rendering, so I couldn't just copy their whole project structure.

Your project should be a combination of the best parts of every project you studied.

A Next.js + Wix GitHub repo

How to work through foreign code

I know that reading through large foreign codebases can be difficult. You jump between different functions and files and quickly lose overview. Something I like to do is clone the repository, look at a certain feature or file, see if I can adopt something in there to my own project, and then delete that file (from the cloned repo). This way, the deleted part is out of sight and the project shrinks until I'm completely done with it. This reduces the feelings of overwhelm and gives me a sense of progress.

3. When things get tedious, do just a little bit every day

Staying motivated while learning to code is really hard, I know that. Even though it might look like I'm super productive, I actually waste whole days just procrastinating whenever I'm preparing a large YouTube tutorial. Sometimes that's really frustrating.

You don't need to code or study for 8 hours every day. That's not realistic. But try to make it a habit to work on your project for at least 1-2 hours every day. If you consistently give your brain new input, you will be surprised by how fast you can improve. But the key is to do a little bit every day.

One thing I figured out recently is that I can't allow myself any entertainment when I'm trying to be productive. Sites like YouTube, TikTok (or P...Hub) are so good at triggering dopamine that it's almost impossible not to waste a lot of time there. That's why I don't allow myself these indulgences until the end of the day. Instead, when I need a break, I keep my work open on my desktop and just lean back and relax for a few minutes. This way, the chances that I accidentally waste away my whole day are greatly diminished.

4. Deploy, rinse, and repeat

Don't keep your project halfway finished. Don't put off implementing features that you find difficult. Go all the way and complete the project. Then deploy it to a server and make sure it works in production.

Then, pat yourself on the back. By building a project outside of your comfort zone, you grew as a developer. And what's even cooler is that in the future, you can look back at your repository whenever you need a reminder of how to do something. You're basically building a second brain on GitHub.

Then, come up with a new project idea, again slightly harder than what you're currently comfortable with. Keep doing that and you will keep becoming a better and better dev. The learning never really stops because technologies constantly evolve. But it will become easier for you to adapt to new changes the more experienced you are. And experience comes down to the hours you invest.


I hope you liked this little guide. This is exactly how I teach myself programming and how I build my tutorials for YouTube. It's not always easy. Behind every video you see is a month-long experimentation phase with lots of frustrating moments. But that's part of the process.

I mentioned my upcoming Next.js Wix project earlier. Keep an eye open on my YouTube channel as it will be out soon!

Florian

Tip: I send regular high-quality web development content to my free email newsletter. It's a great way to improve your skills and stay ahead of the curve.

Subscribe Now

Check out these other posts: