Categories
Blog Software Development

Choosing Your First Programming Language

Are You Ready?

Before you make the first steps in your first programming langauge, make sure that you have covered the articles to learn to think like a computer. Only with this background knowledge will you be able to use all the powers that a programming language gives to you. Remember: The programming language is just a tool. With that tool, you can make the computer do what you want it to do. So you need to be able to speak the langauge of the computer.

OK, ready? Let’s start.

Let Me Be Your First

My personal recommendation for your first programming language is: C.

This is just one letter, but the language behind it is a very powerful one.

C is a compiled, statically typed language.

It supports concepts like functions, has the basic data types and more complex data types like structures and arrays. It also allows direct access to memory via pointers.

There are not many more concepts that C supports, but this makes it an ideal choice for the first programming language. It allows you, but also enforces you, to program in a way very similar to how a computer works. This way you train your understanding of the computer.

C is not the most modern programming language. It has been around for decades. But this has a lot of advantages. All tools are very stable and available for free on all operating systems. There is a wide range of libraries to solve all kinds of problems with C.

More modern programming languages introduce concepts like object oriented programming or garbage collectors. These take over a lot of the responsibilites that you have to perform yourself when programming C. But if you learn C first, you will both appreciate these convienences more and you will understand at which costs they come.

The syntax of C inspired the syntax of many other programming languages, like C++, C# or Java. When you are familiar with C, you will learn these languages much more quickly.

Starting Out

To start with programming, find yourself a good book about C. A good book should both describe how to setup the toolchain and give you a lot of examples that you can type and run yourself. Choose a “beginners guide” as this is your first programming language. I recommend “C Programming Absolute Beginner’s Guide” by Greg Perry and Dean Miller.

If you search for books about C, you will also find the book “The C Programming Language” by Brian Kernighan and Dennis Ritchie, who are the creators of C! While this is an excellent book, it is not a beginners guide for programmers. But it is a very good reference once you have made your first steps in C.

When working through the book that you picked, try to type and run all the examples from the book yourself. Play around with the code. Try out something new. Does it do what you expect? Don’t give up, and don’t take shortcuts.

Practice, Practice, Practice

Once you are familiar with the programming language, start building small programs of your own. You have to practice a lot. Only with practice, you will learn both the syntax of the language and the mindset of a programmer by heart.

If you have an idea for a program that you would like to write, thats’s wonderful! Always start small, with the smallest feature that you can think of. Once you have it up and running, try to extend it. Don’t try to bite more than you can chew. It is better to start a small project and finish than a too ambitios one that you never finish. Each project that you finish gives you a boost and improves your motivation to learn more.

There are also many programming problems out there in the internet that you can try to solve to sharpen your skills. I especially liked Code Abbey, which lets you enter your code in the browser and checks for the correct result automatically.

The First, Not The Last

Maybe you are thinking: I have this special project in mind and for this project I need to learn JavaScript or Python or whatever programming language. Why should I learn C instead?

Don’t worry about this. Every professional programmer has to learn multiple programming languages. You have to keep learning new languages through all your professional life. And with each language you learn, your understanding of the computer grows and your programming skills become better, also in the languages you already know.

But with a firm understanding of C, you will be able to learn all other programming languages much more easily.

Now You Are Ready

Now that you are starting out as a professional programmer, I recommend that you learn C. Find yourself a good book and start hacking away. With enough practice in C, you will both have the mindset of a programmer and enough experience to learn every other programming language that you like. Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *