Anyone can learn to code. Like any skill, it just takes time and practice. That said, teaching oneself to code can be daunting. There are so many places one can start and an infinite number of paths from there.
This guide is a starting point for anyone interested in learning. It consists of tips and tricks for getting started, as well as the free resources that I used as I taught myself to code.
There are tons of languages and frameworks out there and it can be nerve-wracking to try and choose the right one. First, I think itâs helpful to know your options. Programming languages tend to be helpful for specific things, and most fall into one or more of these categories:
Here are a few questions that should help guide you to a good fit.
Choosing a language that helps you build a project you enjoy makes the experience of learning to code so much better. Youâll also find it easier to push through when youâre frustrated.
If your goal is a career change, I highly recommend searching for jobs you would enjoy at companies youâre interested in and see what qualifications are listed. Finding the commonalities among a few positions and starting there will save you a lot of guess-work.
Most people tend to find front-end development more intuitive and approachable when getting started. I would recommend starting with HTML, CSS, Javascript and React. Once you have learned the basics of those, I would add in Express and any of SQL/MySQL/PostgreSQL. This group of languages, or âtech-stackâ is fully accessible on any operating system and should be good enough to learn any skills necessary for a full project.
Here's a list of popular languages/libararies by category:
I would encourage you to find a rhythm that works for you and stick with it, taking blocks of time at least three days a week. I used to think that these needed to be huge blocks of time, but just an hour or so every few days is plenty - especially when starting out. Over time, you will be shocked at how your skill develops.
One tip here is to take some notes about what youâre doing/learning along the way. Then, when you finish for the day, just briefly review the notes from this session and your previous session. I have found this helps to keep knowledge fresh.
Tutorials can be valuable, but they have limits as well. For example, when I was learning Python, I followed a tutorial to build a basic blog on Youtube. After about 10 hours, I finished the tutorial and realized that I had a blog, but I did not know Python any better than I did when I started.
Exploration, on the other hand, forces you to learn the language and apply the fundamental concepts of the language in new situations. Through exploration, you learn when to use what youâve learned, which is much more helpful.
It may be slower, but I would encourage as much exploration as possible when learning. There are plenty of resources for project ideas below, but try to build the projects with as little instruction as possible. You will find that the concepts stick much better.
In my experience, using metaphors in the learning process speeds up the learning curve and improves comprehension. Ironically, this works even better if the metaphor is a bad one. Some metaphors that I have used in the past include: language (grammar/syntax), lego bricks, algebra, and Hot Wheels.
Essentially, the goal is to try to explain what you are learning within the context of another subject. For instance, the popular framework React utilizes reusable âcomponentsâ, which are comparable to Lego bricks. Within the paradigm of Lego bricks, these âcomponentsâ are stacked together to form more complex âcomponentsâ, etc.
The following websites have excellent resources for learning the basics of most popular languages. Each of these resources is free, although they may offer some additional exercises through paid access.
So you have learned the basics of a language, but where do you go from there? These resources offer ways to practice and improve your understanding of the language, including inspiration for projects and challenge problems.
Documentation, in this case, refers to the reference guides for languages, frameworks, and libraries that are put together by the people/teams who create or maintain the language. It is my opinion that documentation is the worst way to learn a language, especially for beginners. In most cases, itâs like trying to learn a human language by reading a dictionary. That said, dictionaries are essential as a reference for learning a language. In the same way, learning to use documentation can prove invaluable for learning a programming language.
You will certainly find that some documentation is better than others, but most documentation can be found with a quick Google search. As with a dictionary, I have found documentation to be most useful when you approach it with a specific question in mind. Just be sure that the documentation youâre reading matches the version of the language or framework you are using.
Most programming languages offer some form of printing, or logging information to the console. For instance, if you have a Javascript variable called exampleData, you can log/print that variable to the console to understand the data it contains. This can be helpful for troubleshooting because you can see what data is being passed, how that data is being transformed, or which code is being run.
That said, printing is not interactive in the sense that it either runs or it doesnât. There is not much information about why it was executed or not, nor can you access any information around your print command. Printing can be extremely useful, but it takes a while to learn what to print in order to get the information you need.
Debugging refers to the process of interrupting your code at specific points to learn more about the way it is functioning. It is one of the most helpful skills you can learn, especially early on, in the sense that it is more interactive than printing. When debugging, the code is stopped in the middle of its execution and you can walk through line by line to make sure you understand whatâs happening. For this reason, it saves a tremendous amount of time. I donât like to think about the amount of time I could have saved myself had I just learned to debug my code early on.
Google Chrome has excellent debugging tools built into the browser. If you are doing any web development work, I would highly encourage you to watch a video like this one to familiarize yourself with using Chrome developer tools. A 30-50 minute video could help save endless hours of trying to figure out whatâs going wrong.
If your code is not running in a web browser like Chrome, most code editors have built in debugging tools that are just as helpful. There are great guides on YouTube for setting up those tools in almost any code editor that you choose.
The terminal can be an intimidating place because, for most people, itâs a complete unknown. I donât think I used the terminal on any computer in the first twenty-four years of my life. That said, it is an essential part of learning to code. My advice for learning the terminal is to focus on specific skills. The most common skills that require the terminal are:
Your code editor is your most crucial tool for writing code. But why use one at all? Well, imagine writing an essay in the Notes app. You could do it, but tools like Google Docs or Microsoft Word offer ways to simplify the process dramatically. The same is true for code editors.
Most editors come with language-specific tools that help you write code in a particular language while checking your syntax. They also offer extensions to help you format and test your code. I would highly recommend taking some time to familiarize yourself with the IDE that you choose and to customize it in a way that helps your work-flow. Plus, they have some sick themes to customize your aesthetic đ„.