There are a people saying a lot of different things about which programming language you should learn first. But they don’t give an impression of a language being a tool, but being a must. You should understand that programming languages are tools, and now, as cloud computing is just getting bigger and bigger, you will probably use multiple languages. But they are tools for the job. Some are for user interface, some for user experience and communication with server, some are for design, others for logic, others for manipulating and storing data, etc. And one language can be used for multiple purposes, for example, JavaScript is now used for client (browser, and mobile), server, etc. But that doesn’t mean that it’s a perfect language for the job. Every language has pros and cons, as Bjarne Stroustrup - founder of C++ - said:
There are only two kinds of languages: the ones people complain about and the ones nobody uses.
This means that all languages have cons, so people complain about it. I enjoy programming in Java and GoLang the most, but sometimes they make simple things complicated.
I am programming professionally for about a year and a half now, and I’ve learned new languages that were just for
specific tasks, even that they were probably not the best choice. I’ve done something in Groovy, a script, that creates some
database tables, reads some data from .txt and .xlsx files, puts it in a database, and that’s it. It took me a couple of
days, first to get a hang of Groovy, then reading the input, and the simplest one was to insert to database. But even
Groovy wasn’t probably a language that does that kind of job the best. Next, I’ve made some scripts that reads an .xlsx
file and outputs JSON data (JSON is just some format, don’t pay attention to that), and I chose Python for the job, and
made the script and tested it, all in about three hours. That’s a bit better, but again, there is always another - simpler -
solution to the problem. Anyway, the point is that languages have cons. But they have pros, for example, I’m more likely
to use a new programming language if it’s statically typed (instead of dynamically). Simply because I’m sure that
something is of the same type all the time, and because the code is mostly self-documented, at least if you name stuff
as you should (for example, don’t name variable x
if it’s supposed to store age, just name it age
). There are more
reasons I would go with a statically typed language, but these are some preferences I like about them. But that doesn’t
mean I don’t use dynamically typed languages.
Choosing your first programming language to learn
It’s a daunting task. Since you probably think that learning one programming language first (for example Python), that you’re stuck with that for the rest of your life. Well, you’re not. For me, first programming language I’ve learned at faculty is C. It was hard language to learn, I barely got seven out of ten for final grade. Next semester, I had only SQL, which was beneficial in learning next language - Java - but not necessary. So, from time to time, I was learning Java at home, while waiting for the next semester to start the class that was teaching Java. But I was awful at it too, couldn’t do anything useful. But then, two classes into Java, it clicked. I’ve understand most important concept of Object Oriented Programming (OOP) - for those of you wondering, it was about classes and objects, the relationship between them. Anyway from there, I continued learning just Java, but having classes on other programming languages - Python, Lisp, C#, JavaScript, HTML and CSS (which are not technically a programming languages), etc. But I had strong fundamentals from Java, so learning everything else came with almost no resistance to me. You will see, as you learn your first programming language, and start learning second one, that they are similar. They both have variables, declarations, if/else blocks, loops, functions/methods, classes and objects, etc. So, don’t hesitate and pick one. My suggestion is to go with some statically typed programming language, if you enjoy working on Windows, go with C# or Java. For everybody else, I always suggest Java.
I won’t give you a list of languages I suggest, because, again, everything has pros and cons. I just suggest that you go with some popular, statically typed language. Again, Java is a great choice. Once you learn Java, almost any language will be easy to learn. You can take a look at most used ten or twenty programming languages and pick one.
How much does it take to learn your first programming language
One more thing that most of beginners think is that learning a programming language will take you years. This isn’t the case. We’re all different. Somebody can learn their first language in a month or so, some might take a year. It depends on a lot of factors. For me, learning most of the basic stuff in Java took about two to three months I think. But before my first job, I learned Java almost every day, I knew functional programming on faculty before everybody else did, and I learned it in Java, but all that was because I liked it so much that I wanted to learn everything Java had to offer. Of course, that was impossible. I still don’t know a lot of things in Java, and I don’t have to know them (yet).
If you ask me, for the first job, I guess you will need at least year to year and a half of learning (probably on your own, or at faculty/university). This depends on multiple factors, but the biggest of them being company that invites you to an interview. Some won’t ask you for algorithms and data structures, others will. I always found that a hard topic, and have yet to learn it on some deeper level.
The problem with learning anything new is that you probably don’t know the scope of the subject. I remember I had to learn something and thought it would take me about a month to learn it - for those of you wondering, it was about generics in Java. I think I got a hang of most of the stuff in about thirty minutes. That’s because I didn’t know the scope, so I thought it would take me a lot longer to learn it.
Math and programming
In past three years I’ve been doing programming, only math related problems were at my faculty. In real life, depending on the field you’re in, you’ll need more or less math, but in field I am, and for the tasks I’ve been doing, I did no math. Of course, there are companies that need somebody who has good grasp of math. And while I’m on a topic of math, I suck at it. But now, I see that some topics are so easy in math, because I can write that in some programming language as a function, that it makes me wonder if people are teaching math correctly. My point being that math can be understood by anyone, but we all need different perspectives (which teachers usually don’t provide) to make it click in our heads. Of course, this is generalisation, there are some great teachers out there, but there are probably more of those who suck - maybe I’m being one of them in this post or even the whole blog, you be the judge.
What makes a language good in my opinion
Having to use a language that is awesome, but has bad tooling and small community, well, I probably wouldn’t use it. For example, I held two seminars about IntelliJ IDEA - that is one of tools that you write the code in - which was based on 42 IntelliJ IDEA Tips and Tricks. I did that because I wanted to show to my faculty colleagues, besides other people, that a great tool will make programming much easier and more enjoyable. The only drawback of IntelliJ that is free (Community edition) is limited in features, and you have to pay on monthly or yearly basis to get everything out of it, but it’s worth every penny if you ask me. I just couldn’t go back to Eclipse nor NetBeans. They do the work well, but IntelliJ is much better tool for Java developers. But a good IDE (Integrated Development Environment - IntelliJ being one of them) is one of the tools that are important, there are some other tools that matter to me more and more as I gain more experience. First of all, how well is it supported in the command line? Can I start my program easily, I don’t want to write a lot to get it going. Sure IDE can do that, but IDE takes resources (RAM, processor, time to start), I just want to start something real fast, see something and exit. Some other stuff to take into consideration is on what operating systems will it run on. I’m developing on MacOS, but use Ubuntu LTS as a server, I want to “Write once, run anywhere” - WORA - the slogan for Java language created by Sun Microsystems. This way I don’t worry if my code runs on somebody who has Windows, Mac or Linux, I just want that person to start the app and use it. These are just some things to take into consideration, maybe you want to write just Windows desktop apps, you’ll be good with C#, don’t have to worry about other operating systems.
Being on topic of tooling - I know I didn’t like Lisp that much since it had crappy environment to run in, but that’s an old language, no wondering it has old tools. Maybe I just didn’t know what to look for then, and there are great tools. Who knows.
Just start learning
Don’t bang your head against the wall trying to figure out which language you want to learn first. Pick one and stick with it for about six months. My suggestion to you is to make a project in a language, some simple information system. That way you will learn the most, by solving problems - which is the point of the project. You will have some trouble on why something doesn’t work, trying to figure out, and once resolved, you will understand the language and everything much more clearly.
Projects to me were necessary to continue learning. They give you a challenge. Besides, what’s the point of learning something if you don’t use it. Same as if you were to buy something and you don’t use it. One is waste of time and energy to learn, other is waste of time (to get the money), energy (to, again, get the money) and money itself.
The biggest mistake
I see few mistakes people make when learning to program. Biggest of them being jumping from language to language. They start with Python, then after three weeks move to C#, then let’s try C++, then Java, oh that Clojure looks fun, etc. But this way you won’t progress in anything, you won’t know one language good enough, and you won’t know how to do anything with those languages that you tried to learn. So just learn one language.
Why you want to learn a programming language
A lot of people want to learn programming because it is paid nicely. But what if you don’t want to do that, since you have a career that you like, or you have free time to kill to do something fun. In that case, you might not want to learn Java, since it takes a lot of time to learn and apply it. You might start with Python, since you can learn enough to use it fairly quickly. For example, you want to do a simple project on Raspberry Pi, you don’t want to spend six months to learn a programming language to program LED diodes to light up and shut off on some pattern for New Year. You want to learn and do it in few hours or days. Well, Python to the rescue.
This is why you should know why you want to learn programming. To do what you love, to get paid, to make a project, have a hobby? It’s your choice.
Don’t listen what people are saying…for now
You will always encounter people that will discourage you, be it about programming language you choose, programming in general, or anything else. I suggest that you say “Thank you for telling me your opinion.” and leave it at that. Don’t stop learning, making projects and making progress. Don’t let them get to you. Just continue what you’ve started. Even if you meet some professional programmer, what do you know what he knows? He may be “religious” about a language or some technology - something like me about Java, but I’m flexible, I know that languages are tools, and I pick the tool for the job, but most of the jobs I do with Java. So don’t listen to us, just continue what you’re doing. In about six months to a year into learning, when you grasp a hold of a language, when you have some experience, talk to people, learn something else if you want. But for first six months, just pick a language and go with it (I don’t know how many times I’m going to write/say that).
Key takeaways
Start with one language and learn it well!
Programming languages are tools, you should master one tool well first.
Every language has pros and cons, none of them are perfect, but they are tools to get the job done - hammer and saw are tools for different jobs, so are languages.
Make a project (for example mini information system - users can login, do something, read/write, exit), and/or make a lot of small projects (make a basic calculator for example).
Conclusion
This is post is something that I wrote in two days, not researching that much, just doing things from my head. Of course, this isn’t everything about what programming language you should learn, but just a set of my thoughts about the topic. There is probably a lot more, but I think that wrote the most important stuff so you can progress faster. I hope it helps, and wish you the best in your journey on to becoming a programmer (as a professional or as a hobbyist).