How to pick a programming language

You’re just starting out. You want to learn how to program and become a developer, and you’re trying to pick a language.

But the problem is: there are so many of them and everyone has an opinion.

“Pick Javascript—it’s the best and most popular language.”

“Learning Javascript is a mistake. You should learn a backend language.”

“Pick Ruby, it’s easy to learn and understand.”

“Ruby is dead. Choose Python.”

“Don’t waste your time with those: learn a real programming language like C or C++.”

How to choose a language

I understand the anxiety around it. This is something you’re going to be (or have been) investing a lot of time and effort into, and you want to make a good and intelligent choice.

I’ll tell you the best way to pick a language: just pick one.

Really, it’s that simple. Just pick a language—any old one.

“But how can this be?”, you ask. Surely we can do better than just picking something randomly—surely these languages have tradeoffs and conditions that would make one better than the other? And the answer is: you’re right. There are differences and tradeoffs to consider here, but when you are first starting out none of those reasons matter*.

(*I will discuss some caveats at the end, but go with me here.)

Music

To me, learning to become a developer and learning to program is very similar to learning how to play a musical instrument.

If you don’t play a musical instrument, no worries, let me explain what I mean.

Say you wanted to play in a band and I walked up to you and said, “just pick an instrument—any instrument,” and you pick the trumpet (this is a marching band—not a cool rock band). You spend the next year or so learning the trumpet, and over the course of that time you learn how to play the trumpet, but you also learn a few other skills.

You learn the names of the notes and how to read rhythms and rests in a piece of music. You learn about dynamics (the volume you play at), tempo (the speed you play at), and the articulation of different notes (short and crisp vs smooth and melodic).

And of course, you learn how to play the trumpet: how to make sound come out of the instrument, and how to maneuver the valves that change the length of the trumpet’s tubing—thus changing the pitch of that sound.

trumpet == javascript

Now let’s say that learning to play the trumpet is like learning Javascript. You’ve learned how to program in Javascript, and maybe also spent some time in a job programming and working as a developer. Hooray! A worthy achievement.

But after a year or so, you find that you just don’t like working with Javascript. You find that you don’t enjoy working with the user interface of an application, and you don’t particularly enjoy implementing the functionality that an app has or dealing with user interactions. Don’t fear, all is not lost!

Or perhaps there’s something shiny and interesting catching your eye—like all of that backend stuff you’ve overheard your coworkers talking about—data, systems, integrations, and APIs.

It’s not that hard to switch

Good news: it’s not that hard to switch! You see, your trumpet (Javascript) belongs to a family of instruments: brass instruments. The instruments may differ, but they all share the same common characteristics: they’re made of brass or metal (duh), they require breath to make sound, they have a similarly-shaped mouthpiece, and they have a system or way to manipulate the length of the tubing to change the pitch (valves, slides, etc).

The gap between moving from your trumpet, Javascript, to say, a French horn (or as we horn players call it: just “horn”), Ruby, is really not that big. Of course there will be differences, and of course you’ll have new things to learn and practice, but the fundamentals remain the same. The music you read still uses the same notes. The time signatures, tempos, and note articulations still use the same symbols and meanings.

You see, you’ve gained one very valuable skill: an understanding of how music is written and performed.

The music of programming

Back to programming languages, the syntax between two languages will be a little different, sure, but you’ll find they’re really not that far apart. Take for example the difference between a function in Javascript and a function (also called a “method”) in Ruby:

// Javascript
function addFive(x) {
  return x + 5;
}

# Ruby
def add_five(x)
  x + 5
end

Different name, different flavor, but still a chicken, eh?

(Ok but seriously, they look very similar right?)

And even though the syntax and features of a language differ, you’ve learned some extremely valuable base skills: the fundamentals of programming.

If you transferred from trumpet to horn, all of your ability to read and understand music would be directly applicable. In programming terms, by learning Javascript you’ve learned about variables, loops, conditional logic (if/else), functions, and more. Those concepts transfer directly to the majority of all programming languages. Yes the syntax is a little different, but you’ve already learned the hard part: how to think about, write, and structure programs.

So again: just pick one.

I hope that this takes the pressure off of which programming language to pick. Over your career you will probably pick up 3-4 languages or more, and each one you learn will be easier than the last. You might start in frontend work, migrate to backend work—or vice versa. You could start making webapps, and then move to make mobile apps, or hardware-y internet-of-things type projects.

In the end, the most important thing is to just get started. Just start learning—just start exposing yourself and familiarizing yourself with the tech world and programming in general.

*Caveats

I want to mention a couple caveats for the people like me who read this and still think, “ok, cool, but seriously what’s the best one to pick? Surely we can get a little closer to the mark out of the gate?”

So to those people: here are a few pointers.

Pick a language that facilitates the type of work you want to do

This seems fairly obvious, but, for example, if you want to make webapps: pick a language that will let you write webapps. There’s nothing wrong with learning C or C++, but if you want to write webapps (and if you’re just starting out that’s what I recommend) pick a language that will let you do that. That means if you’re wanting to make webapps, any of these things would be fine to choose: Ruby, Python, Javascript, PHP, C#/.NET, etc.

If your goal is to become a full-time developer as soon as possible, pick a language that is strong in the community where you live. There’s a couple ways you can do this.

One of the best ways is to talk to a recruiter in your area and ask them what types of jobs they usually see. I’ll talk more about recruiting in the future, but using a recruiter is usually free for you—the person looking for a job. Recruiters are typically paid by companies to help fill job openings, so they usually offer this service free to you. They will help coordinate things like interviews, salary negotiation, and send you job openings that they think your skill and experience fits. Because the recruiters are dealing with the companies in the local area, they will usually know what types of jobs routinely come available. This makes them a very valuable connection to have.

Now I love Ruby, and it was one of the first languages I picked up myself, but at least as of this writing, Ruby is not the predominant language most companies in my location use. I hope this changes in the future, but if I were starting over again today, and I was looking for my first job, I would pick something many companies in my location are using. There’s obviously going to be more job opportunities.

Meetups

Another good way to tell what languages and frameworks are popular is to go to meetups in your city. If you want to get into development, you should definitely be attending as many of these meetups as you can, but you should be able to get a good idea of the popularity of a language based on the attendance of the meetup, and by talking to the people there and seeing where they work. If you come to the local OKC Ruby meetup, you’ll find that most of us don’t use Ruby full-time at our work, or like in my case, work remotely for companies that use Ruby. Also, this another great place to meet people and recruiters to help you land your first job.

I’ve already picked a language, and now I’m not so sure.

Maybe you’ve already spent some time investing in learning a language, and you think that maybe you chose the wrong one. I hope that after you’ve read all of this you’ll realize that there is no wrong choice! As along as you’re working in a language that lets you do the type of work you want to do (i.e., the “Pick a language in the type of work you want to do” section above), you’re doing fine. If that’s not true, it may be worth switching and coming back to that language later on.

HTML and CSS

If you want to make webapps (which again I highly suggest for those just starting out), you will likely need to learn HTML and CSS. So in reality, you will be learning HTML, CSS, and <X> at the same time—where <X> is some web language (Javascript, Ruby, Python, Javascript, PHP, C#/.NET, etc—again use the tips above).

One word of advice: I see a lot of new programmers begin learning HTML and CSS, love it, and stay too long trying to perfect and master them. If you want to become employed as soon as possible as a web developer, you need to know HTML and CSS—however, don’t spend too much time trying to master these two things (first of all, you won’t master them quickly, and secondly, you don’t have enough experience to know how to master these things, and you can waste effort or form bad habits).

The point is, keep pressing on. I will definitely talk more about this, but you need to be learning, learning, learning—constantly discovering and working in new concepts and things you haven’t seen before. Don’t spend 6 months focusing solely on HTML—it’s important yes, but there’s a lot more you need to learn. Become functional in HTML/CSS, and put the heavy effort into the web development programming language you choose.

Opinions, opinions everywhere.

Keep in mind, all of this is my opinion. I have one story, and one journey of how I got into software development. I have one employment history, and one perspective. You will not have to go very far to find someone who completely disagrees and offers contradictory advice to all of this. And the thing is, they could be right. Or, we could both be right.

The only thing I will say to that is this: no matter what, just make sure you’re doing something. The old adage “you can steer a moving ship” rings true here. Get the boat in the water, and get moving. You’ll find the way.

So that’s the rub of how to pick a language. My wish for you would be to just jump in if you’re sitting on the sidelines, and to keep the course if you’re already moving. It’ll take time, and it’ll take hard work, but you will get there.

If you’ve already picked a language and you’re ready to get going, here’s what to do for your first projects.

Best of luck to you and feel free to reach out to me on twitter (@johnmosesman) if you have any questions on this or any other topic around development.

John