I want to learn to code. Which coding language should I learn first?
If you’re thinking about learning to code, figuring out where to start can be pretty overwhelming. There are a seemingly endless number of coding resources out there, and a countless number of things to learn. One of the first questions that’s on many coding newcomers' minds is, “Which programming language should I learn first?”
The first thing to note is that there are different categories of languages. That is, different languages accomplish different sets of tasks. So your decision of which language to tackle first may depend on your goals of learning to code. If you want to build websites, you probably wouldn’t want to pick a language that specializes in statistical analysis.
Most people learning to code, though, have somewhat vaguer goals. That is, they simply want to explore what coding is like. Perhaps they are considering software development as a career, or want to know how coding can help improve their lives. Or maybe they just want to see what all the hype is about.
In this case, we feel that the best option is to start with as a "general-purpose" language. These languages can be used to create many types of software and will provide you with the best feel of what coding is like.
Here's the thing that may surprise you: Your choice of language isn’t as critical a decision as you might think. In actuality, once you learn one coding language, you can then easily pick up most other languages. It's not like choosing between learning Chinese or Russian, where learning one doesn't really help you to learn the other.
This is because learning to code is really not about learning a language. Rather, the primary skill you’re learning is how to talk to a computer. Learning a coding language's syntax is simply a natural byproduct of learning how to communicate with a computer.
So once you learn how to talk to a computer, you've learned the primary skill that can be used across all programming languages. The only thing that changes from language to language is their precise syntax, but their syntax is actually pretty similar to each other's. Thus, once you can work with one programming language, it's relatively simple to pick up another one.
Based on this, we recommend that people new to programming pick a general-purpose language that has an easier, more intuitive syntax. This way, you can avoid getting bogged down by the syntax while working on the harder, more important thing - the skill of talking to a computer.
We think that Ruby makes for a great first language. Just to give you a sense of what we mean by intuitive syntax versus unintuitive syntax, take the following sample code. Here is the Ruby code for printing “Hello!” ten times:
10.times do p “Hello!” end
Here’s how to do the same thing in Java:
public class HelloWorld { public static void main(String[] args) { for (int i = 0; i < 10; i++) { System.out.println("Hello!"); } } }
The real skill you need to focus on when writing this type of code is mastering the concept of a loop. It’s just that it’s syntactically much easier to write a loop in Ruby than it is in Java. So why muddle around with syntax when you can put the majority of your mental effort into the main learning task - learning to work with loops?
So, don't sweat too much about which language to learn. If you want to have the most pleasant possible learning experience, go with a general-purpose language with an easy syntax, like Ruby.
There are many great Ruby tutorials out there. And we have one too! Check it out here.
Get Expert Advice
The Actualize Blog is where you can get expert advice and insights for learning to code from our CEO, Jay Wengrow. Subscribe to the Actualize Blog and get notified each time we publish a new article.