The hardest part about learning programming is often just the process of deciding which language to learn first. When making this decision, it’s good to first know what each of the languages is like, what its applications are, and why you might want to learn it over other languages. Yesterday, I read a great article by Cecily Carver about things she wished people had told her when she was learning to code. Definitely worth the read. It got me thinking about the problem of “Not knowing what you don’t know”, which was my problem when I started out.
Hopefully this will help you get a better picture of what you don’t know. We’ll go from the origins of code to modern and future languages.
Assembly Language - Ancient Egyptian
Assembly language is machine language, every single line directly corresponds to a 32 digit binary command that tells the processor which wires to give power and which to turn off. It’s much like learning how to read hieroglyphics, since it is extremely different from the way people talk or think:
addi $a0, $a0, -1 jal function1 move $s0, $v0 move $s1, $v1 lw $a0, 0($sp) addi $sp, $sp, 4 lw $ra, 0($sp) addi $sp, $sp, 4
That’s just a few lines from a 150-line procedure for calculating Fibonacci numbers. I wrote it a few months ago, and I can’t even tell you what it means.
Why learn it
I’m pretty sure there are still a few people who use assembly to program drivers - the programs that allow hardware to interface with your computer. There are also a few game developers that occasionally dip their toes into assembly. The advantage of learning assembly is that you will have a very in-depth grasp of how a computer thinks and behaves.
Only attempt learning assembly if you are already confident with other programming languages and are curious about the way the hardware thinks. If you are ready to take it on (and have masochistic tendencies), you can look into these free books on Assembly. Good luck.
C/C++ - Latin
One level above assembly language is C and C++. You can think of C++ as “C with bonus features and behind the scenes content”. They both operate very close to the machine level, and most heavy-duty software applications, including the inner workings of Node.js, the Chrome browser, operating systems, and high-powered PC video games are written in C or C++. All languages later in this article are eventually turned into C by some sort of compiler or virtual machine.
There are programmers out there who believe you aren’t a real programmer unless you know C pointers. I personally find this approach very damaging to the community; you should never let someone tell you that you aren’t a “real” programmer.
Why learn it
Java - French
Java is a very well structured language, with very formal conventions and strict adherence to those rules. My coworker once described Java as a gun with lots of safeties. It has conventions and rules in place to prevent you from shooting yourself in the foot, but I sometimes find the structure is a bit stifling. Java has been around for a long time, and it still remains one of the most used server-side languages, although its old age sometimes makes it the punchline to a programmer joke about outdated languages.
Why learn it
Since Java has a very structured approach, it can be useful for beginner developers to start with Java, learn the conventions, and carry those best practices over to other languages. Java is used to develop Android, so if you want to be building apps to one day ship to the Google Play store, Java would be very good to learn. Twitter’s backend uses Scala, a very popular derivative of Java, so the language is definitely a good foundation to a lot of companies. Java was actually my first language (but I’m pretty happy I don’t need to go back anytime soon).
Treehouse offers a paid course on Android development, as well as a number of raw Java courses. You can also read through this online book on Java basics, or look at all of these other free books. I personally first learned programming by Oracle’s Java tutorial. I would recommend you don’t do that, it’s not fun at all.
Why learn it
PHP - German
PHP has the unfortunate reputation of being a very ugly language to people who don’t use it often. Even the name itself is upsetting. PHP stands for “PHP Hypertext Preprocessor”. Yeah, the name is in the definition, it just keeps going on in an infinite loop. Now you understand the frustration.
Why learn it
As bad as PHP’s rep is, it is part of many of the most successful websites in the world. Wordpress, the most popular content management system in the world, uses PHP. Facebook is built on PHP. If you want to be making web sites or applications that utilize great big databases, PHP may be the way for you to go, but not until you know HTML first.
Ruby - Japanese
Ruby fans often describe Ruby as the most elegant of all programming languages. There are no ugly curly braces, everything is an object, and very powerful programs can be executed in a few Haiku-like lines. Some of my programming heroes are big ruby fans, including my past two bosses. I have used Ruby for class projects with the great framework Ruby on Rails.
Why learn it
If you want to become an in-demand web developer and hone your craft in a language that is tailor made for excellent programmers, that is what Ruby can offer you. Github, the social network for developers, is built with Ruby. That being said, I’ve often found the Ruby community to not be as open and accepting of beginner programmers as Node.js. The Ruby learning path is very much based on learning eloquent code, and the language can be unforgiving to beginners. Also, many Ruby tools do not work well on the Windows operating system, so if you want to be serious, you should have a Mac or Linux machine.
Python - English
Python is widely regarded as the most English-like language of all of the programming languages. The syntax flows like a sentence, and just about anyone could figure out what a Python program is saying. Take a look at the almost-English 7 line function for Fibonacci numbers:
def fib(n): a, b = 0, 1 while a < n: print(a, end=' ') a, b = b, a+b print() fib(1000) 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
The language’s name comes from “Monty Python’s Flying Circus”, and has a number of Monty Python hidden jokes. Python is a great general purpose language with a great community and tons of learning resources.
Why learn it
Python has a very wide application, and is used very frequently in the world of finance, physics simulation, web data transfer protocol, and operating system interfaces. If I were to recommend someone to start learning how to code today, I would probably recommend Python.
The best place to start is the Python FAQ, which has great explanations of the language and programming in general. If you learn well from books, check out these free Python books. Also check out the Python tutorial.
Bonus: LISP family - Khoisan Languages
Do you remember seeing a clip on National Geographic of African tribes speaking in a clicking language? And it sounded nothing like any other language you heard before?
Yeah, that’s the LISP family in programming.
Clojure, Scheme, and their cousin Haskell are all functional programming languages, and behave fundamentally differently from typical programming languages like C and Java. I personally find them very beautiful, and will be trying out ClojureScript in the near future.
All in all, no matter if you are a hard-core C programmer, a casual Pythonista, or even a LISPer, all programmers have one thing in common: They all love to learn, and spend their lives dedicated to lifelong learning.
I hope I did not ruffle anyone’s feathers too badly in my descriptions of these languages from my limited experience. If you have any recommendations for other reading sources or corrections to my descriptions, please let me know in the comments below or on Twitter @thejakepruitt.