Earning to Give: Programming Language Choice

By Ben_West🔸 @ 2015-04-05T15:45 (+5)

Several people have asked me recently about what language they should learn first. This article is intended to be a single point of reference for all those conversations, as well as sparking input from other people who know about the subject.

My answer is usually:

  1. Salary differences between languages are small enough that you should care more about other aspects of the process (e.g. if the boot camp makes guarantees about you getting a job) more than the specific language, but
  2. Front-end (developing things that the user sees) pays less than backend
  3. Keep standard 80,000 Hours advice in mind, like that it's better to explore many options in the beginning of your career than optimize for just one

More Detail

Below is a table of programming language popularity (taken from TIOBE) along with data from two salary surveys. You can see that the variance within one language across the different surveys is about the same as the difference across languages within one survey (119 vs. 131/76), which indicates that geographic factors, company size/type, years of experience etc. are probably more of a concern than the specific language. This fits with my anecdotal experience.

The argument for backend development is mostly due to oversupply of front-end developers: there are a lot of graphic designers, artists etc. who learn a little bit of HTML and JavaScript so that they can get a job doing front-end. There’s also some evidence that backend developers get paid more.

The second programming language you learn will be vastly easier than the first, and most developers will switch between languages throughout their career, so you should not feel that this first choice is locking you in.

I've bolded the ones which are most commonly taught as a "first language".

Popularity Rank Programming Language Relative popularity Average salary (Compass survey) (in $thousands) Average salary (Quartz survey) (in $thousands)
1 C 16.64% 100 90
2 Java 15.58% 90 95
3 Objective-C 6.69%   108
4 C++ 6.64% 110 94
5 C# 4.92% 92 89
6 PHP 4.00% 76  
7 JavaScript 3.63% 78 91
8 Python 2.61% 102 101
9 Visual Basic .NET 2.33%    
10 Visual Basic 1.95%   86
11 F# 1.51%    
12 Perl 1.33%   82
13 Delphi/Object Pascal 1.15%    
14 Transact-SQL 1.15% 80 86
15 Pascal 1.09%    
16 ABAP 1.08%    
17 PL/SQL 1.03% 80 86
18 Ruby 1.03% 90 109
19 MATLAB 1.00%    
20 R 0.95%   90

undefined @ 2015-04-05T16:23 (+5)

I'd like to add some more information to this.

  1. As mentioned, front-end coders are in less demand and are paid less. There's a very good reason for this... it is MUCH easier to learn. It's best to pick up design ability as well as coding ability if you want to earn-to-give through front-end.

  2. Some of the last languages on the list are for data science programming. While there's crossover applicability of these to regular programming, they are, for the most part, easier to learn and with some great salaries themselves. There's also great demand for data scientists. So don't dismiss R because it's 20th most popular... that also means that there isn't enough supply, and it has the benefit of being relatively easy to learn.

  3. I recommend looking at the momentum of languages as well. One example of positive momentum is Javascript; a number of JS-based frameworks are becoming popular, and it is becoming more and more used for front-end, back-end, and all other aspects of web dev. Python is one that's becoming learned initially more because of its versatility; it's used for web dev as well as data science.

undefined @ 2015-04-07T09:55 (+4)

Matt Gibb sent around the following on the 80k alumni list, and said I could pass it on - thought people reading this post might be interested: "A couple of people have asked for recommendations on the quickest way to learn. I have a limited perspective, but I have spent the last 8 years developing, have attended one bootcamp (Insight Data Science), which was per unit time the single most valuable educational experience I have ever had, and I have been able to visit many of the top bootcamps in the Bay: HackReactor, AppAcademy, Hackbright, Makersquare etc. I know many of the founders personally and/or have taken investment from them. Anyway, here's my 2 cents that I believe will be helpful, based on what I have seen work. Take it with a hefty pinch of salt.

After the above:

I have found codeschool.com really helpful, but I know there are many other great resources out there which I haven't played with.

I would recommend going to a (well-regarded) bootcamp over self study, because you will make progress at about 3 times the rate for a few reasons:

For example to automatically test a batch of solar cells on performance, match supply and demand on the electricity grid, help a doctor find a tumor in an MRI image, process a lot of money traffic. These things do not typically happen on a consumer website.

Learning to code will allow you to do all these things. Coincidentally, part of my PhD was in in image segmentation/registration, I am building a real-time Dutch auction now to drive down costs for students, and the solutions/skills required are much closer to web dev than you might think. Don't worry just get started :)"

undefined @ 2015-04-07T04:18 (+4)

Some additional factors people may want to consider:

1.) How enjoyable it is to program in that language, since you'll probably be doing it a lot. (Programming in Java is generally not fun.)

2.) How good the resources are for learning that language. (Ruby seems to be the best on this metric.)

3.) What the companies that use each language are like. (My guess is few SF start-ups are programming in .NET these days.)

undefined @ 2015-04-07T02:16 (+4)

As someone currently in the process of learning programming here are a few thoughts on my attempt at learning two of the bolded languages, Java and Ruby:

I'm currently working through The Odin Project, which has a backend focus on Ruby, and I'd highly recommend it. I'd also recommend Peter's guide to TOP which I've found very useful which includes some time estimates, some additional resources and some things to learn after you complete TOP. Perhaps the biggest plus to TOP for me is giving projects of the correct difficulty at the correct time so that they are challenging but doable. Another of the biggest benefits of TOP is the sheer scope of the resources already collected for you. Also Ruby is far more intuitive than Java.

Before starting TOP I started learning programming by attempting to learn Java on my own without much structure. However, going on my own I'd often spend time attempting to track down a good explanation for topics. There was also the issue of not knowing what was a logical path to take to learning and I think I took some major false steps. The resource I found most beneficial during that time were probably the free courses at Cave of Programming which covered a wide range of topics but had the huge downside of being somewhat dated video tutorials. Other than that I didn't find lots of free resources to help learning Java but there are some pretty cheap stuff on Udemy and a subscription to Lynda could be a good investment as well.

Of course, a huge caveat, I am a sample size of one who had no experience at all with programming before starting with Java. People with different backgrounds may have very different experiences.

undefined @ 2015-05-15T18:15 (+1)

Epicodus put their entire Ruby/Rails program online for free here. I don't know enough to judge the quality, but it might be useful.

undefined @ 2015-04-07T15:05 (+1)

Regarding the topic of how to learn, I am not such a fan of the online courses relative to simply reading a book or website which lists all a language's syntax, or a long list of functions. If that's enough for you to grasp it, it's certainly faster. Many of the main websites for languages contain these lists.

undefined @ 2015-04-07T14:17 (+3)

This is all going to be purely anecdotal, of course (and note that I am not in a tech hub or even any city, to my great unhappiness): I started out with Ruby, and I feel like I came in during "peak Rails". Trying to find another Rails job is extremely challenging because of the huge glut of beginner-intermediate Rails developers, and it has gone mainstream enough that it's not really a useful signal of whether it's an employer that's worth your time. I think Ruby's future is basically that of Java. Actually, I'm slightly more optimistic about Java.

If I were starting all over from scratch today, AND if I had a friend or mentor that could help me with questions when I was stuck, I'd go straight for Clojure. The Clojure community is still very small, but really excited about newcomers. The reason I mention the necessity of some kind of mentor is that Clojure, as opposed to Ruby or Javascript, still has so many beginner pains that it really helps to have someone steer you in the right direction (Clojure errors are notoriously unhelpful and it doesn't just work "out of the box" like Rails does). The Clojure groups are all small enough that you can join in and not be lost, but there seems to be vastly more Clojure dev positions than people to fill them. These aren't jobs you'll find listed on StackOverflow or LinkedIn - they're passed around through word of mouth. But if you are a respectful community member, people seem overwhelmingly happy to help you. (Note that I haven't been able to land one of these Clojure jobs yet, but I imagine a more talented programmer than me would be able to do so quite quickly.)

I imagine there are other languages like Clojure, that are small but full of opportunity. I'm just not part of them, so I can't comment on what's there. Scala seems like it might be similar.

Take this with a grain of salt, as I don't have access to any sort of real-life programming community. This has just been my experience with my interactions online. As others have said, bootcamps are an appealing option if that's something that's available to you.

undefined @ 2015-04-12T20:49 (+2)

Less Wrong thread. I still advocate learning Python; it's an OK or good choice for almost anything you'd want to program, and I think its simplicity and readability mean that it will give you the best conceptual foundation out of anything out there. I listed a bunch of resources on learning Python in this post. They're a bit deeper and more conceptual than the resources you'll see on learning Ruby, which is a good thing because it will differentiate you from all the Ruby web development types and give you the opportunity of becoming a backend developer, which has higher salaries and barriers to entry (and is a better fit for someone who has more of a traditional math/engineering mind since it's less forgiving of mistakes and has more challenging mathy engineering problems). If you're sure frontend web development is all you want to do or you have some cool frontend thing you're inspired to make, I guess JavaScript is fine.

undefined @ 2015-04-13T00:59 (+1)

I have also found Python to be very useful. I learned through Udacity's Intro to Computer Science course, which was really user friendly.

undefined @ 2015-04-07T15:07 (+2)

What's the definition of frontend and backend here, which is relevant to earning-to-give potential? If you're writing database-driven Ruby or PHP code which generates HTML, are you a frontend or backend developer in this sense?