How I would learn to code (if I could start over)
I've been a programmer for over 8 years now, and looking back, there are definitely some things I wish I had done differently.
Getting started
Pick a language and stick with it. I recommend starting with JavaScript, HTML & CSS since it's versatile and widely used. Don't try to master or understand multiple languages at once, focus on one and get good at it.
The 3 technologies listed above are the trinity of the web and nowadays also used to build software outside of the browser, making you not only a web developer but an actual software developer (which sounds a lot cooler if you ask me) if you master these. Good examples of companies that use these technologies are Discord, Visual Studio Code, Microsoft Teams, Notion and the list goes on.
Tutorial Hell
Avoid tutorial hell. I know it's tempting to watch every single Youtube coding tutorial out there (I've been there..), but trust me, it's not worth it. Instead, focus on a few high-quality resources and practice what you learn. Examples of high-quality (free) resources are:
Complete course(s) on youtube teaching the fundamentals of a programming language.
Projects you can follow along with on youtube, teaching you to build a fully working piece of software that could actually be used in real life.
Anything less than that is usually not worth (binge) watching. The reason for this is that learning only a few key principles of a language or framework won’t give you the actual confidence to go to the the next step, which is experimenting with what you know so far.
A quick note: The core reason for watching and following along with these videos is not to actually teach you the fundamentals, but more to give you a taste of what's coming. You will most likely forget 90% of what you've seen in the videos.
Start building (This is where the magic happens)
Before you jump into building projects, make sure you have a solid understanding of the basics. Things like conditional statements, loops, variables, and functions are essential building blocks for any project.
"Every expert was once a beginner, and every master was once a disaster." - Robin Sharma
It's okay to not know everything yet to build whatever it is you want to build, since a lot of this will start to make sense once you have to use it to build something.
It's like attempting to fly a plane without the knowledge to do so, but the only difference here is that you'll make it out alive to tell the tale. 🤷🏾 🛩️💥
The key here is to start with something small. A great project to start with is a to-do list app. It's simple enough to build, but it'll teach you important concepts like CRUD operations (create, read, update, delete). Plus, it's a useful tool that you can actually use in your everyday life. What's important to know here is that what you're about to build shouldn't (and probably won't) be perfect in any way. This step is meant to learn you to get creative and to learn to solve problems you might not have faced before. This is the only case where it's okay to watch short sequences of youtube videos on specific topics, things you might need, to build your project. Sites like StackOverflow are also really helpful.
From here on it actually gets easier! Now that you understand the core concepts of programming (conditional statements, variables, functions, etc) and also know how to perform CRUD operations (create, read, update, delete) you can actually build anything you want. Let me share some fun projects you could start.
A glorified to-do list (minimal Twitter clone).
Tweeting (create)
Timeline (read)
Updating a tweet because of a typo (update)
Deleting a tweet (delete)
Another glorified todo list (Creating your own blog)
Creating a blog post (create)
Homepage with a list of blog posts (read)
Updating a blog post (update)
Deleting a blog post (delete)
You get the point, now imagine doing this for years. You'll find a million ways to approach different types of situations, making you more and more agile. You start to learn new principles like Clean Code Architecture and Atomic design or practice what you preach: DRY (Don't Repeat Yourself). It only gets better over time, and that's when you start to shine as a software developer.
If you're past this point, you will also understand why it might be helpful to learn a framework on top of the technologies you used so far, but that's a topic for another post!
So remember, learning to code is an ongoing process. Don't get discouraged if you run into roadblocks or feel like you're not making progress fast enough. Keep practicing and building projects, and you'll get there.
Lastly, I know a lot of people say that you should learn data structures and algorithms early on, but honestly, you don't need to worry about that just yet. Focus on the basics and building projects, and you can always learn more advanced concepts later on as I did.
That's it! Those are my tips on how I would learn to code if I were to start over. I hope this was helpful, and if you have any questions, feel free to leave a comment.