Connecting an SPI TFT Touchscreen to Your Arduino
23rd October 2020Basic Animation on Your SPI TFT Touchscreen and Arduino
30th November 2020The Best Computer Language for Beginners
The Best Language for Learning to Code
People often ask what is the best language for beginners to learn to code with? If you ask a range of programmers you’ll get a number of different answers. Everyone has their favourites. Everyone will comment on the advantages and disadvantages of one programming language over another. This can leave you confused and overwhelmed. There just doesn’t seem to be a clear choice.
My approach in selecting a language is much simpler.
The best language you can use to learn how to program is the one that you can use right now. You’ve got the language, the development software, the tutorials, the videos and the computer to run it on so you can start NOW.
All Computer Languages Work the Same
People with a bit of programming knowledge always get tied up in comparing the fine details between programming languages. As a beginner these will have very little impact on your learning.
Every computer language uses the same core principles and programming structures as every other language. Whether you’re working in Python, C++, JavaScript, PHP, Java, C#, Lua, or anything else you’ll still have to learn about variables and data storage, program flow, looping, expressions, functions and objects and classes. Each language will have slight differences in how they implement each of these structures, but the theory and knowledge you need to use them is identical. In fact once you’ve learned to code in one language it’s very easy to swap to another language.
For example if we look at how different languages make decisions…
Python:
if a > b:
print(“A is bigger than B”)
C#:
if (a > b) {
printf(“A is bigger than B”);
}
PHP:
if (a > b) {
echo “A is bigger than B”;
}
Every language makes use of the if statement, an expression that compares two variables, and a conditional block of code that is executed if the expression evaluates to true. The only difference is in the language syntax – the layout and punctuation used by each language.
What’s Really Important When Learning to Code
The single most important part of learning to code is to start and to keep going. If you manage this you will learn to code. If you don’t you won’t. This is irrespective of whatever language you choose. The only way to learn to code is to code.
That’s why it’s important to use a language that you have full access to. If you have to buy the language, buy some development software or upgrade your computer you instantly put a barrier to learning. If you haven’t got good teaching material to lead you through all the stages of coding again, you’ll find it hard to keep your motivation as you get stuck trying to figure out what to do.
These days getting hold of the language and development software is almost always free and easy. There are lots of good tutorials and programming courses available online (please check out my own programming courses) so it’s really down to you to get started and to put the effort in.
All Programmers Have an Opinion
As I felt the start all programmers have an opinion on what languages you should use as a beginner. I’m no exception to the rule. However, instead of extolling the virtues of one language I would say there are a few you should try to avoid. Not because these languages are bad, or not of any use, just because they are slightly harder for beginners to learn the basics with.
Assembly Language
Assembly language allows you to talk directly to your microprocessor, the brain inside your computer. It’s a fantastic way to learn how computers really work but it’s definitely not beginner friendly. Even simple if statements like the previous examples have to be built using registers and monitoring status bits rather than having nice, simple program statements.
Block Scripting Languages
By block scripting languages I mean systems such as Scratch where you code by connecting a series of programming blocks together and then filling in parameters. These tools are fantastic for younger children and they do still teach all the basic concepts and structures that you need to learn to code. But you will eventually have to transition to a code based language. My advice is to start with program code if you can.
Where to Start
So far I haven’t really narrowed down your choice. Most of this article is really saying to just get started but I understand that without much knowledge it’s hard to just pick a single language. So here are my recommendations.
Python
If you’re studying computer science at school in the UK, or pretty much anywhere else, you’ll almost certainly be using Python. This is a great language for beginners that is also very popular amongst professional programmers. If you don’t have a preference for a particular language this is the one I would go for, and not just because I’ve produced a programming course in Python!
Learn Python by Coding Games – Udemy.com
It’s a modern language continually being developed. You can get professional level development tools for free and there are limitless number of language extensions covering all aspects of coding that you might want to develop into.
JavaScript
JavaScript was initially designed to be used in web browsers but has broken out of that mould and can now be used in areas such as mobile applications and server side programming. It’s a great introduction into the whole C based programming languages and again is very easily accessible and well supported.
Lua
Lua isn’t such a widely used language and I only include it here is that the language used by TIC80. This is a great games programming environment which lets you build games very quickly and easily, all from within one simple application (no need for separate graphics and sound editing). Again is not so much that we are using Lua, it’s more that with this system you’ll have so much fun coding that you’ll want to learn more and more. I’ve produced a number of games programming courses using TIC 80 that are available for free on YouTube. Check them out to see what I mean.
Get Started Now
Whatever language you choose just get started. The sooner you get started the sooner you’ll be writing fantastic applications.