How to Code: Teaching Yourself Computer Programming
In this guide, we will cover how you can teach yourself computer programming. Learning how to code is in essence the process of acquiring a new language and a new mindset. Programming has become hugely popular, its benefits are numerous, and the way to learn it is fairly straightforward.
To learn how to code, you first need a learning strategy. Below, I have listed a few things to consider before starting your journey.
Which programming language should I learn?
The first question you need to answer is which programming language you want to learn. Be as sure as you can that the language you choose fits your needs.
I want to create websites
If you are mainly interested in building websites, consider HTML and CSS (technically markup and style languages rather than programming languages) as the cornerstones of your web development education. The former lets you build the structure of a web page, while the latter lets you style the pages you have created. After that, you can move on to JavaScript and a server-side language such as PHP. These are among the most widely used languages on the web.
I want to create software
To create software, games and similar applications, C and C++ are a good starting point. They are widely used and will cover much of the basics and intermediate concepts of coding. Note that they are generally considered to have a steep learning curve. That said, learning C/C++ is worthwhile because so many computer games and desktop applications are built with these languages.

I want to create smartphone apps for iPhone or Android
If you are mainly focused on creating mobile apps for Android, you can begin by learning Java or Kotlin with Google's Android development tools. Java is also useful because it runs on virtually any operating system, although performance is typically not as good as with software written to run natively.
For iPhone apps and other Apple products, you will need to learn Swift (or the older Objective-C), the languages used to develop apps for Apple's iOS operating system. When deciding which platform to focus on, it may be wise to consider whether you intend to sell the app or release it as a free product (with or without ads).
Where to find resources to learn how to code
There are lots of free tutorials, guides and articles on the web that can teach you how to start coding. Search YouTube and you'll find lots of videos showing you how to code in your language of choice. Although video tutorials are very useful, they shouldn't be your only way of learning. There are some really useful textbooks (available online, in libraries and in bookstores) that cover an entire programming language from A to Z.
In short, to learn how to code, use these resources:
- Video tutorials
- Articles
- Textbooks
Each of these categories includes both free and paid resources. Whichever you choose, it is crucial that you actually work through the examples they provide. Programming is not something you learn just from a book; it is a continuous process of trial and error. This is how programmers get things done. A piece of code may not work immediately, but given enough tries, it tends to work out in the end.
It is also important not to give up too quickly. It takes time before you can develop complex applications, so keep at it. Every little step you take brings you closer to your goal.