Series "How to choose a programming language"
- How to choose a programming language?
- How to actually choose a (first) programming language? Or how to ask the right questions?
- Google Pixel vs. iPhone 7 or how programming languages are being chosen in real life
How to actually choose a (first) programming language? Or how to ask the right questions?
That's obvious, there's no right answer to the question "What programming language should I learn first?". We can't even find the answer like 'any out of those three'. Such an answer doesn't exist not only right now, April 10th 2017, when it's 21.38 in Kiev, but also in the nearest (or not so nearest) future, such as next month, 6 months or a year.
But what we can find is some right questions that we can ask ourselves. If you really want to start a career as a programmer, they would be your first test. Are you ready to mull over these questions and research the sphere before you make up your mind?
If so - let's do that.
The author thinks (Can I avoid mentioning it before every sentence I write? Just imagine it's always there!- V.S.) that, from the very beginning, you should keep in mind that:
First of all, one language is not enough. Even if it's your first year of learning. You need at least some of the 'tailored' ones (HTML, CSS, SQL, YAML, JSON, XML, Markdown are all the examples of different syntaxes you will likely come across and have to read and with high probability even write). But not only them. A non-JS programmer will probably need to read a bit of JS, a JS-programmer will need to check implementation of the algorithm written in Python, a software engineer will figure out some script language
And if you're striving to be a Middle Developer, you'll have to master dozens of them. And on your way of being a professional you'll need to sort out the paradigms of some seriously terrific stuff.
Secondly, it's very unlikely that you're going to use only one language all your life. You probably won't use it even for a long period of time. Maybe, not even a month. On my first job in 2003 I was hired as a C++ algorithm engineer, but was also maintaining a PHP-website and writing an interface for our Excel VBA library (cringing). And that's pretty normal, that's what Juniors do.
But not only that - the company you are comfortable to work at might change their major language, you might be hired by someone else to work on your favourite topic, startup and enterprise culture might do a one-eighty - and WHAM! - you can't remember any constructions of such a carefully chosen 'first language'.
Thus, all in all, taking your choice too seriously is not a good idea, you're not choosing a wife or a house (they can also be changed, though, it just takes more effort). More sensible strategy is to start, give it a try and choose your own, than thinking about what to start with for many weeks/months/years.
Thirdly and lastly (and it follows from the first two), you often don't 'choose a language', but it chooses you. Should you truly get interested in what you're doing, choose it as an integral part of your life (and I appeal to such people only, not to those who hope to earn some money doing some 'part-time programming on Saturdays', they can't be helped), and you don't care about any of the recommendations. A challenging task and a prospective employer will turn up, the language that doesn't work for this task will disappear by itself and another one will emerge instead. Just stay tuned.
And if we've agreed on that, let's go on.
Listen up, here are the right questions!
Well, anyway, if a guy (or a girl) is thinking about his (or her) existence (which means that they are thinking about what language to master for starters), they can ask themselves about this:
What do you plan to learn for? That's a very important point and you need to ask this question in the first place. Would you like to get some extra tool for you main occupation (such as microbiology or accounting)? To have fun in your free time? To help your kid with the school stuff? Well, okay, here, on mkdev it is anticipated by default that you are going to work as a programmer (but we are happy to teach a microbiologist too. Have you heard that they love Ruby?).But let's see, are you absolutely confident about finding an IT job as soon as possible or do you just want to give it a shot and see if it's your cup of tea? If it's the latter, you might try dozens of languages and approaches or maybe not try anything, both are cool.
A related question: How much time do you have? It might be sensible to start with an academic approach (i.e. creating a list of several classical languages as Scheme, Haskell, Prolog, some commercial as Java, Ruby, JS and some hyped as Rust, Pony, Elixir), in case you don't have a strict deadline like 'I should have X dollars in a year'. And then the question 'What do I choose to write in?' will arise by itself. But if you want a 'real job as quick as possible', then ...
*Do you know the exact area you'd like to work in? * 'Only game development, everything else isn't rad', 'AI is something I've been dreaming about since my schoolyears', 'I dig hardware and want to program every sorts of robots and sensors' or even 'My friends are going to launch a Big Data series startup'. All of those are the great answers to the aforementioned question. But you're not under the strict obligation to have them. 'Show me all the offers, please' is a good one too. And even 'now I'm helping the accountant at my uncle's company, but I'm ready for something more fascinating' is all right as well.
Victor can help you make your first steps in programming, teach the basics and Ruby! Sign up
The next one: What would you actually like to do? It looks to you that it's the same question as the previous one? Well, it's not. Close your eyes and imagine you perfect working process. Would you like to be experimenting with an interface, so the user is happy without assuming how hard it was for you? To create a new particle collision algorithm for a game physics engine and then polish it for three years? To write lots of code real quick, integrating dozens of well-known components into a new startup idea, before someone does it for you? To come to grips with some difficult thing so it can work in a new environment? There are many alternatives and some of them are far from 'being just a programmer'. They are about being a DevOps, a UI-specialist or a data analyst. Try to spend at least 20 minutes on this kind of meditation, the result might be Very Surprising.
For instance (if we're still discussing the previous question), even if you're certain that you want to work in the game development, it might be not so easy to understand what exactly you want. Maybe you want to adjust new levels or work out physically accurate collision algorithms or create the game server which can handle a multitude of connections. All of those are variable areas for a self-education.
Only when you have answered (or put off the answer deliberately) all the aforementioned questions, it might be worth asking yourself such a utilitarian question as 'Which languages are being used actively nowadays?' (in the area, theme and environment that you like). And then choose three (yes, indeed!) to start mastering them in the nearest future.
You'll have to decide from what to choose on-the-spot, even though we have a short review on some popular today languages below.
Here the author recommends that you slow down and don't say a word for a while.
Can you hear that soft weird sound?
This is the sound of the answers that were listed below, becoming obsolete and rusted. If you're reading this article half a year after it's been written, the answers section might be outdated for now (provided that nothing disastrous has happened and absolutely everything is outdated by now). If you're reading it a year later, it's outdated profoundly. God only knows what'll happen in 5 years. Our sphere is changing every day, but oftentimes some things are stable long-term.
Well, on the whole, it's clear that you have to be careful while reading.
There is a subjective, short and incomplete top-15 list of modern programming languages hereafter (in alphabetic order).
The author added some number to each of them: this number means the amount of job positions on the main Ukrainian web-site for developers dou.ua, where the language is a least mentioned. Those numbers make no sense without context, but they can help to carry out an incomprehensive benchmarking study, using some post-Soviet or European country as an example, which will allow us to draw some vague conclusion.
NB: the idea is not only about 'choose the number which is larger'! The main idea is that any number of any language is not zero. And it's here, in the country, which, let's keep it real, is not so huge and rather deprived. That means that you will be able to find the job with the language listed with number 5, but you should love it desperately. If you have a goal like 'just coding for decent money', you'd better choose the one with the larger number, as it appears that they take anybody who's interested.
C (100? - well, it seems that the search engine screwed it up here) is the one and only programming ancestor, which is very much alive on top of that. It's still used for everything systems-related (excluding Rust and Go, about which I'll tell later), for programming of different microcontrollers and built-in devices, some drivers and drones of all kinds and all those mindblowing things. It's also a host language for integrating or accelerating other languages or libraries (when, for example, some scientific crap was originally written with Pyhon, then rewritten with C for speed's sake, then some Ruby, Julia or Haskell wrappings were added for this C-implementation... you know). To cut a long story short, it might be not so useful being your first language, but it's definitely a must-know. Moreover, it's always in progress and some modern specifications are great indeed.
C++ (144) is an obnoxious (according to some) or delightfully complicated (according to others) C's nephew. It's object-oriented, with metaprogramming capabilities, unnaturally complex and takes forever to compile... well, C++ is my programming first love. As far as one can judge, now it's used in the game and desktop system development and a little bit everywhere where C is okay, but also something more complex is needed (since GCC compiler is available on almost every OS and compiles both).
C# (414) is one of the several languages, where programmers
sold their souls to the devilare tightly connected to the Microsoft ecosystem (which, let's be honest, is impressively comprehensive, especially for developers). The field of use includes generally games and expensive and complex Enterprise software. As of today the language is pretty attractive and promising. As all other not so new and pragmatic general-purpose languages, it has a little bit of functional, lots of object-oriented programming, some metaprogramming stuff and some other things.
Clojure (6) is a sort of a magic programming unicorn, works in JVM (down below you can read about Java), a Lisp's successor and a functional language. Its dialect ClojureScript can be complied into JS (down below is why it is important). Clojure is used mostly in 'smart' startups and in the production in the Companies of the Very Great Importance. One may choose it only because of the Great Devotion (but it's really cool, actually).
Erlang+Elixir (5+10). Erlang is a language and a platform, which was widely used earlier for telecommunication apps and is used now for any high-load distributed ones. Elixir is the language which works on the same platform, but is more comprehensible than Erlang (but you have to know at least a little bit of 'father' language anyway, you'll see why down below in my thoughts on Java). It might seem a little bit 'elitist' nowadays, but it took roots in several fields (such as banking) and is extremely interesting.
Go (78) is as plain as day and effective, created by Google mostly for situations when you need some 'fast, dull and steady code'. All the creativity is stopped by its rough structure. But it's beyond words how effective it is, though.
Java (466) is special. It's a language and a platform (JVM) both. Funny and cool Clojure, mind-bending Scala and JRuby (the same Ruby, but for JVM) all work in JVM. And Java itself now is not an infamous 'limited language for corporate slaves', as it was called before. Every qualified programmer should be savvy about Java, as there is a vast number of powerful libraries and the platform is versatile. And Java is the only Android development language (with an asterisk, of course).
PHP (431) is an infamous web-invader. The modern specification almost got rid of its dreadful heritage and now it's a fairly decent object-oriented language. But the most part of the Internet infrastructure includes it for times' sake. If you're hired as a PHP programmer, you might either end up in a neat project with an Architecture and Tests, or in a support team of an ancient system with 2000 lines of unstructured if/else.
Python (303) was a Ruby 'rival' back in the days as it was a trend to use it for a web-development and startups. Nowadays it is used mostly to support complex and serious web-apps, which have grown from it, and further on for scientific/Big Data researches. And it even exceeds R occasionally (see below).
R (16) is a wannabe general-purpose language, but it's used by researchers and those who work with Big Data. Its syntax is somewhat infernal (because it's old), there are a lot of awesome packages written for it (and a bunch of different researches done using this language). So if you want to satisfy your curiosity, it might look like the best language in the world for you.
Ruby (124) was 'trendy' and 'hipsterish' just some years ago, but today is yet another mainstream language. It's wealthy and concise, even a little bit 'magical', but rather slow. Ruby is used for web-development mostly. Now it is a simple matter to fall in love with it or come to hate it instantly, as well as to find a job. Ruby is rated highly by administrators and testers, as it has some awesome tools for both.
Rust (3) is a newbie yet. It's fast and complex and is promised to replace C in the system programming. But for now it's more reasonable to learn it 'for the future use'.
Scala (60) is a 'smart little brother' on Java platform, complex and functional. All sorts of business analysts love it to bits, that's why its popularity is sky-rocketing now.
Swift / Objective-C (58+15) is the only choice if you have to deal with iOS development. We're talking mostly about Swift, of course, as Objective-C is now used only to support the old apps. It is just a decent modern language that can be compared to C# and Java, has no special features or any absurdness. It can be recommended as the first language just in case you are ready to work with Apple only, as its applicability is limited on purpose.
Well, something like that.
Some of the languages, such as Perl, are not on the list, because even though the developers are in-demand, the language itself has some weird status and I don't dare to recommend it as the first one. Another example is Lua, which is popular for short scripts for other systems (in games mostly), so taking it as a first language is rather unreasonable.
Erm, now I see. But what should I choose after all?
Well, take it all. (smiley face)
No kidding. The most rational plan is to decide which several ones are interesting enough for you at least to look at. That, of course, providing that you're going to spend much of your time working as a programmer and not just make some extra cash for half a year. You can follow the same principle as the designers do: 'from the closest ones', 'from the opposites' or 'from the complementary ones'.
Your aim, for starters, is to enjoy the process and make some progress. And you're the only one who can open the door to it and it'll take you more than one try apparently. That's the way it is.
Long story short...
In our sphere it is way more essential to ask right questions than to know the right answers already. The answers might change. The questions are needed daily. So be curious, learn a little bit of this and that, and examine the world.
It'll all come by one day.
We are telling how to become a better developer, how to maintain and effectively apply your skills. Job offers and exclusive promos for more than 8000 subscribers. Join us!