What language should I learn?

Programming languages are tools used to solve problems, not problems themselves that need to be solved. And so learning to use them should be approached in the same way you would learn to use any other tool. Which is to say: it depends on what you're trying to build.

What language should I learn?

I'm often asked this question by people who are just starting out learning to write software. And the short answer is that it doesn't matter very much. Of course the more complete answer is that you're approaching this problem in the wrong way. Programming languages are tools used to solve problems, not problems themselves that need to be solved. And so learning to use them should be approached in the same way you would learn to use any other tool. Which is to say: as needed to solve other problems.

To apply some metaphors, compare programming to carpentry. You wouldn't go about learning carpentry by asking which power tool you should learn. You would instead try to make a table, and learn some basic wood working techniques in support of that goal. And yes, you would learn how to use saws and drills as part of that. But you would have the structure of a specific goal that will guide your learning. And the same is true with software. You should have some software that you're trying to build, and learn the languages and frameworks and etc that you encounter while trying to do that. It doesn't matter very much which specific language you start with, just like it doesn't matter very much if you learn to use power saws before or after hand saws.

So instead of worrying about languages right now, lets worry about applications. Do you have something in mind already that you want to build? If yes, great! If no, then let me suggest some things. I understand that you want to learn to write software for a more general purpose, probably because you think it's a job you could enjoy (or at least tolerate while making good money). But, what area of software development interests you? What is it that you want to make?

GUI applications

These are the kind of apps that you use on your PC, phone, or the web in your day-to-day life. In particular, it's the part that displays information for you, and that you interact with directly. Think of weather apps, todo lists, note taking, and exercise trackers. GUIs are also an important part of bigger applications like say, Facebook or Twitter, but those are big services as opposed to self-contained applications. This is your first app, remember? Let's set realistic goals. If this is the kind of thing that interests you, then I would suggest starting with a Javascript framework. Unless you would really rather make native mobile apps, in which case you should choose a mobile framework instead. On the web side, you should look into React, Angular, and Vue. Vue is my personal favorite in that bunch. Or if you're going for mobile, then consider Xamarin or React Native. I personally prefer Xamarin, but React Native is trendier. If you really don't think you'll want to have versions for multiple platforms, then it's also worth considering the Android or iOS SDKs directly.

Backend applications

These are the kind of apps that run on servers (or just in the background on regular PCs) and process/move/transform/store data. These could be things like Twitter bots, chat services, or blogging platforms. When choosing a language for these apps, you should decide how ambitious you're feeling. If you want to just quickly make something small and move on when you're done, then I suggest a dynamically-typed interpreted language. Either Python or NodeJS. These are more forgiving of working in an exploratory way. If you want to build up and run your application at large scale and for the long term, then you should consider a statically-typed compiled language. Either C# or Java. These will give better performance in case that matters, and provide structure and developer features which encourage best practices to make your application more maintainable as time goes on. Honestly, if you're just starting out with learning any kind of programming, you should give up on the idea that the first app you make will be worth keeping. Choose a dynamic language and explore your application's domain while you learn basic logic and software patterns. Then consider a static language for the 2nd iteration.

Something more specialized

These apps also generally run on servers, but do something more complex with data than just move it in and out of databases. These apps do things like image or audio processing, statistical analysis, or natural language processing. You should know that these are hard problems. Are you sure you want to start here? Ok, if you're sure. ¯\_(ツ)_/¯ In that case, the language you choose is actually secondary to the libraries and frameworks you're working with. Really, the best thing for you to do is to buy a guide book, and follow the book's advice. But there's a pretty good chance that their advice will be Python. And if it's not, then it will probably be Matlab, R, C#, or Java. It depends on what specifically you're doing, and also the guide book's author's background. If you want this learning experience to translate to a more broadly marketable skill set, then I would suggest choosing a book that recommends Python, C# or Java.

So, to sum up: what language should you learn is the wrong question to ask. The right question is: what do you want to build? Feel free to use the examples I listed as inspiration if you don't have something specific in mind. And also feel free to ignore me. I tried to recommend languages that will facilitate building the kind of app you're setting out to build, but that's all. There are tons of reasons to choose one language over another. If you have a friend who's a professional Ruby developer, then you should probably consider Ruby because that friend could be a great learning resource. Plus, I'm not the boss of you. I made plenty of mistakes; that's part of the process. Go make your own mistakes. Just do it in pursuit of a concrete goal, not something nebulous like "learning Python".

Cover photo by unsplash-logoJ. Kelly Brito