People just getting into the world of programming and code usually get stuck with a dilemma. What programming language should I learn first? That is a fair question.
Practically speaking, there is no good answer that covers every scenario. It is like asking what kind of car is the best to learn to drive with? Usually it’s whatever car is available right?
So, when it comes down to which programming language you should learn first, I’m not going to give you an easy answer. I’m going to ask a question.
What Do You Want To Be Able To Build?
When I was a kid, I wanted to make my own video games. That drove me to learn to code. At the time I had no idea how to do that, so I went to the Borders bookstore with my mom and bought Teach Yourself C in 21 Days.
Why C? I have no idea. At some point I thought that C was the language that “professional programmers” used, so I should learn that.
I had no mentor. This was like 1995 or so. I was eleven years old. And I had a 600 page book about C.
So, I did what anybody would do. I started reading the book and learning C! (Note, most people never do this. It was a poorly executed joke on my part.)
There I was, with this oversized book that taught me nothing about games, but enough about writing code that I could create text based programs. They were exciting. They could calculate things! They printed out my name!
It took years of fits and starts before I found Allegro, a graphics library that allowed me to create my own version of Pong in junior high.
Was C A Wise Choice??
Was C the best language for me to learn? Yes. It 100% was.
Why? Well I’m glad you asked!
C was the best language for me to learn because it ended up putting me on the path towards what I wanted to build - my own video games. Building things that made me excited put me on the path towards a real career in code.
And that is the whole point. If I didn’t have the excitement and energy around building stuff, I would have stopped. C was this bizarre gateway drug into code for me.
Ironically, I almost never write C code anymore. All my work is in Ruby and the Rails framework at my job. So, even though C was the first language, it isn’t where I live most days. And that is great.
I love what I do all day long and I wouldn’t get to do it if I hadn’t learned C.
A Handy Language Cheat Sheet
As for you in the year 2018, you should figure out what you want to create, and then figure out what works well to do that.
Here is a quick cheat sheet for that…
- Video games - Lua, C, C++, Python
- Desktop Applications - Java, C#, C++, Visual Basic
- Operating Systems - Assembly, C, C++
- Security Software/Hacking - Assembly, C
- Mobile Apps - Swift, Java, Objective-C
- Databases - C, C++, Java
Oh, and if there is some other cool language that you want to learn that isn’t on this list, just go learn it!
If you are motivated to build, then ignore any “good advice” or “best practices” and just build what you want to exist. Learn what you need along the way.
Now, go write some code!