What should be the introductory programming language


Every programmer was new to software development at some point. Some are self taught, others were mentored, and some went to college/university for a few years. But one question you will see every developer answer differently is: what is the best language to introduce someone to software development with?

You will never get anyone to agree on it because developers are human and prioritize different aspects of programming languages. Some decide on a certain language because it's easiest to build stuff with, some choose another because the platform that uses said language is in high demand, some choose a different language because while it's harder to use, it can be a solid foundation to learn on. Others choose a language because it's what they're most familiar with and their personal biases and years of experience get the best of them.

So in this article, I will talk about a few languages that I feel are best to start out with. I can't recommend a single language because I don't know what motivates you, so instead, I will offer a few suggestions and explain why I think they would be a good candidate as a first programming language.

Python

Python is a great programming language for someone who wants to create. The straight forward nature of python is fantastic for a beginner as learning how to program is already a fairly challenging thing in itself. Having a language that is willing to work with the developer as opposed to fighting them can go a long way. Plus, there are many free materials online you can use to learn it and books as well.

It is widely used in industry because it's so nice and easy to throw things together with quickly; this is why I said it's a great language for creators. You can build a simple server in 3 short lines of code vs the crazy ritual you would have to perform in C or even C# or Java to achieve the same thing. And if something isn't included in the language, you can bet someone out there has made a library for it.

Another benefit to learning Python is that it's virtually ubiquitous in the data science department. Machine learning is basically all python; yes, there are lower level frameworks, but they typically have a Python wrapper to make using them easier. You have really established libraries like Pandas, Numpy, SciPy and matplotlib at your disposal as well for analyzing big data.

The downside I see of learning Python first is that it's almost too simple. Because it's such a batteries-included language, a beginner won't be able to appreciate and learn about the intricate cogs and gears behind the simplicity. Concepts like threading and multiprocessing might be skipped over entirely because they're not easy concepts.

JavaScript

JavaScript is THE language of the web and I would recommend it to anyone who wants to specifically be a web developer. In web development, there is a programming language monopoly; all client-side programming shall be done in JavaScript. There are other languages technically out there, but in the end, they all get transpiled into JavaScript. At the time of writing, it's been the assembly language of the website for over the past 20 years.

Because of how universal JavaScript is on the web, it's broken out into desktop applications with electron and node webkit, server-side applications with NodeJS and I've even seen some cases where some embedded boards use JavaScript as their programming environment. If you learn JavaScript, you might be surprised with how far knowing it might actually take you.

The language itself is known for having a really limited standard library. This is why it has massive collections of libraries freely available to use. When you run into something you really need, often yarn or npm has a package available. Unfortunately, dependencies often have their own dependencies and you can get a massive tree of files you need to download that can become literally hundreds of megabytes to gigabytes in size for a single project.

C

C is a programming language I would recommend to someone who wants a foundation to build on. It's a very barebones programming language that's hard to get anything complicated done with. It has error messages that may scare and confuse new developers and often times can crash and be a very frustrating experience. However, the fundamentals of this language are present in pretty much every other language. You also don't need to learn things like object oriented design upfront either because C is a simple procedural language.

Knowing C also opens up some valuable tools in friendlier languages. Often, these languages will have something called interop where you can call functions defined in C. C is often significantly faster than the friendlier languages, so you can call on C code when you need that extra performance. In particular, C and Python are a very strong combination to know.

I'm a bit bias here because C opened my eyes to the world of software development. Before learning C, I had learned a bunch of other languages and they all felt like toys to me. I wanted to get tossed into the deep end, but the books on Python and JavaScript would never satisfy my craving. C is where I finally started understanding how programming worked.

Conclusion

I have purposefully avoided a few 'religious' topics, such as interpreted vs compiled, and dynamic typing vs static typing. This was entirely intentional as to someone learning their first language, these choices really don't matter. The same goes for whitespace text significance; I understand this may be abhorred by some, but again, to a beginner, it doesn't matter.

As experienced developers, we need to avoid our personal biases and try to guide new developers in the way that's best for them. And while yes, I think that learning C this day and age is still a very important thing to do, I concede that there is value in learning friendlier languages first. In fact, I recommend something quite contrary to my preferences.

I think the most important thing above all else is to get the learner passionate about programming. Exposing them to something like C, C++, C#, Java or Rust first is a huge missed opportunity. The first language they learn should be something they want to learn and use. This probably isn't going to be the languages that tell them that they're doing it wrong at every opportunity.

My first programming language was actually a proprietary scripting language made for a game implemented in VB6. To work with it, you had to use a textbox with no line numbers in one file and if there was a small error anywhere, the whole thing broke with no error messages. Did I become a good programmer with it? No. Was it a good language? Heck no! But it gave me inspiration to create fun things for my guests. And writing those silly little scripts of mine gave me the passion to keep learning, long after the game itself had died.