Best Programming Language (and Tutorials) for Beginners
Which programming language to learn or which one to learn next is one of the eternal struggles of being a developer. For beginners there is a myriadic jungle of choices and every developer they know tells them something different.
The key to learning your first language or which language to recommend to beginners actually is not the language itself, but which path they're going to take. There is a lot of opinion on which language somebody should learn first, so here's mine.
Start with the basicsIf you want to learn programming, start with basic courses that work well for you. Pick a language that you can install without too much trouble on the computer you're currently using so you can practise on your own little projects apart from only courses.
If you have a very specific purpose that you want to learn programming for, like making your own WordPress theme the languages you should learn are:
- HTML & CSS (only markup, not programming)
- PHP (see the list of basics below)
- SQL (maybe)
Phew! That's four languages already! HTML is great to know in many situations, but it's only a markup language, it doesn't do anything.
Learning any programming language need to start with the basic things like:
- basic math in the language
- input/output by the user and how to work with it
- control flow (if/else)
- loops (for/foreach/while)
- arrays (also hashes/maps/slices)
- functions (also methods if part of a class)
- more complex structures (objects/structs/interfaces)
- classes (or libraries)
return. That will make the use of objects attractive to you.
No matter if you pick
- C (or C#/C++)
- (insert many more here)
You'll have to learn the basics and that's a good thing. These simple principles will remain throughout most programming languages.
Also I recommend you learn how to use the command line of your operating system, it'll be important to run your programs and to do other related things like using git or package managers.
What's a strongly typed language anyway?Strongly typed languages force you to state clearly what value a variable will have. If you have something like a program that keeps a count of a cash register, you'll need to tell the program that the
amountvariable will be some kind of number, not a line of text, also not any number. It should optimally be a floating point number that supports giving somebody
0.31Euros back without just rounding it down to
0Euros (that's the sort of things that makes customers very angry).
As these languages may seem pretty stupid at first, they actually are just more explicit. They require you to be very clear about what you're doing which can be agonizing at times, but it can be very good training to get that in from the start. Other languages just hide away from you that they do the same thing behind the scenes.
Don't learn a framework firstLearning a framework first can often be a mistake. If it gets you into coding, it's still good enough. It can be an obstacle for learning though, because the framework takes work away from you. It hides what it really does in order to be as convenient to you as possible.
Learning a framework is a little bit like learning to drive one type of car, but you optimally would like to be able to drive all cars that are street legal in your country.
What about the most popular languages?Yes, yes there are many languages that are very popular. Some are rising, some declining. It also depends on what you want to do. Also have a look at the Tiobe Index if you want some more statistical numbers.
Are you going to become a data scientist and you'll never write the frontend of a website? Maybe have a look at python or R.
Are you going to write Linux Kernel modules for a printer manufacturer? C would be a good pick.
I'm even more confused now. What should I learn?Anything! Just pick your first one and get going!
I have listed a couple of the most frequently used below with some thoughts on how beginner friendly they are or how much you learn from them.
The downside I see for beginners is that there are many different styles to write asynchronous code with callbacks, promises and async/await. It's hard to find consistent patterns for beginners, especially if you don't follow one learning resource. Projects you meet in the wild could also use a completely different style.
Go(lang)Spun out of Google, Go has received many high remarks for language quality, consistency and performance. It's a strongly typed language and actually there is not a ton of examples on how to do many things yet. It's of great educational value, so in my eyes a great first language if you hold on long enough.
The community is very helpful and the first great books that cover the basics are out.
Best Go Beginner Tutorials
- The Little Go Book (explained in detail, requires about no prior experience)
- Go By Example (often covers missing examples from standard packages)
PHPIf you want to get into WordPress, Drupal or any of the many other things built with PHP, I can't blame you. There are a lot of learning resources available, often in conjunction with (My)SQL which also teaches the use of relational databases.
It's very beginner friendly because MAMP/XAMPP are available for Windows and MacOS and require no command line skills to be up and running coding with PHP.
Drawbacks for beginners are that the usual PHP file or project is executed per request / page access when accessed through a webserver and not simply run on its own even though you can do that too.
Best Beginner PHP Tutorials
C# / .netCaution, we're entering Microsofts Enterprise domain. Even though they open source the language core and open source alternative compilers exist, the full potential is only unlocked with costly software licenses. May be great for learning with its type system, but I've never dug into it a lot apart from my teaching and debugging with students.
RubyMajor web projects still run Ruby on Rails like GitLab! It doesn't receive the same attention and it doesn't deliver the same performance, but the language syntax is beginner friendly and very easy to read.
It's a very nice beginner language and a ton of learning resources are available.