How to Choose a Programming Language
I’m going to tell you how to choose a programming language: don’t. Wait … what about all the high-paying tech jobs? Isn’t this the best time to be a programmer?
Many people are curious about code. Unfortunately, choosing a programming language can be a major hurdle, because people lack the information necessary to make a good decision. That’s why you shouldn’t start with a coding language.
I encourage you to think about what you want to accomplish with code. Be specific. Getting a good job isn’t precise enough. After all, is a job good, if it pays well, but you hate it? Code is everywhere, and that means you have many of options. Do you want to build mobile apps? Are you interested in the Arduino and Raspberry Pi? Are you a researcher who wants more command over your data? You can do a lot with code, and the opportunities continue to expand.
Once you consider what you want to study, build, and contribute, you can start thinking about which language to learn. There are always options, and there will still be confusion — more on that later. However, languages have strengths and weaknesses. Certain languages have been adopted more regularly in specific fields. By picking a project or goal, you have drastically narrowed the field of options.
To put it simply, you wouldn’t spend months brushing up on Mandarin before a trip to Germany. Sure, there may be a few people speaking Mandarin in parts of Germany, but you would be better off studying German. If you know the destination ahead of time, you’ll be working on the right stuff from the start.
But It Isn’t That Easy
I know I’m making it sound simple. It’s hard enough to decide what you want to do. Once you get a general idea, it can then become more confusing. Let’s say you want to build web apps. Great, now you Google the languages used to make web apps, and … you … you find a forum post that … OK … PHP seems popular … but Ruby also … well, this person with a TON of Twitter followers says … AHHHHH … FORGET IT!
So what do you do? You can keep refining your goal. Maybe there’s a specific company you want to work for. What are they using there? You might get a general idea from StackShare, which is a site that shows many companies’ tech stacks (the different pieces of technology that come together and form the service you use).
I suggest asking someone you trust. Go find someone in-person. Attend a Meetup and ask the people working in the field what they recommend. You’ll find that people are still much more willing to engage meaningfully offline. You can also ask follow-up questions — you know, have a conversation.
I also recommend dropping into the Treehouse Community. Even before I worked for Treehouse, I found the community to be a helpful place. The Treehouse teachers are active, and the community’s responses are beginner-friendly. The Internet can be a rough place, and we work to make sure the Treehouse Community remains approachable.
So, yes, research is your friend, but I don’t want to send you down another Google hole. So here is a list of general guidelines and information about some of the languages you will find in the wild.
My Oversimplified General Guidelines to Save You Some Googling
People often begin by learning HTML and CSS. Why? These two languages are essential for creating static web pages. HTML (Hypertext Markup Language) structures all the text, links, and other content you see on a website. CSS is the language that makes a web page look the way it does — color, layout, and other the visuals we call style.
Why not just start with HTML and CSS? You may not be interested in creating content for the Web. As I said earlier, you can do a lot with code, and the Web is just part of it. However, if you are interested making websites, definitely start with HTML and CSS.
Java can be used for anything from web applications to desktop and mobile apps. Java has a strong presence among large enterprise applications — think bank, hospital, and university software. It also powers Android apps, so it’s a good choice for those inclined toward mobile development.
Like Java, Objective-C can be used to write desktop software and mobile apps. However, Objective-C is essentially Apple territory. Until the recent release of the Swift programming language, Objective-C was the language for developing native iPhone and iPad apps. Many major apps are still written in Objective-C, and programmers for these apps are in high-demand. If you want to work on iPhone and iPad apps, it’s a good idea to learn Objective-C.
Apple released Swift in June, 2014 as a modern language for developing Mac, iPad, iPhone, Apple Watch, and Apple TV applications. If you want to enter the world of iOS, Swift is the language with which Apple intends to move forward. Yes, many apps are already written in Objective-C, but Swift is here to stay. If the Apple ecosystem lures you in, you’ll need some understanding of both Objective-C and Swift.
PHP is one of the most popular web languages. It runs massive sites such as Facebook and Etsy. WordPress and Drupal are both written in PHP, and those two platforms power a huge number of the sites online today. Because of its popularity, learning PHP will serve you well if you intend to code for the Web.
Python is a general-purpose language used for everything from server automation to data science. Python is a great language for beginners, because it is easy to read and understand. You can also do so many things with Python that it’s easy to stick with the language for quite a while before needing something else. Python finds itself at home both creating Web apps like Instagram and helping researchers make sense of their data.
Ruby is often associated with the Rails framework that helped popularize it. Used widely among web startups and big companies alike, Ruby and Rails jobs are pretty easy to come by. Ruby and Rails make it easy to transform an idea into a working application, and they have been used to bring us Twitter, GitHub, and Treehouse.
Fret not, unless you make guitars. Then fret away (sorry, I couldn’t resist). Choosing a programming language may still seem overwhelming. It shouldn’t. You can’t go wrong. As long as you choose a language that is regularly used in technology today, you’re winning. When you are starting out, the goal is to become solid in the basics, and the basics are pretty similar across almost all modern programming languages.
Choosing a programming language may still seem overwhelming. It shouldn’t. You can’t go wrong. As long as you choose a language that is regularly used in technology today, you’re winning.
Part of learning to code is learning a language’s syntax (its grammatical or structural rules). A much bigger part of learning to code, the part that takes longer and gives you more headaches, is learning to solve problems like a programmer. You can learn the grammatical structure of the English language pretty quickly; however, you won’t truly understand the language until you put that grammatical structure to use in a conversation. The same is true in programming. You want to learn the core concepts in order to solve problems. Doing this in one language is similar to doing it in another.
Because the core concepts are similar from language to language, I recommend sticking with whichever language you choose until your understanding of the core concepts is solid.
What I’ve Done
I am fascinated by just about anything and how that anything works. I like to play with electronics, I enjoy smashing a pick against guitar strings, I have fun making videos … you get the idea.
When I started learning to code, Treehouse didn’t exist. There were no tracks or paths to follow. I would just Google until my eyes burned like coals. Eventually, I started working with Drupal. Learning PHP became a necessity.
After some time with Drupal and PHP, I became bored and got interested in Python.
In short, I drifted from one project and language to another based on whatever seemed interesting at the moment. This approach scattered my efforts. I never felt confident with several core concepts in any language. I could hack together something simple, but I certainly wouldn’t have called myself a programmer.
What I Wish I had Done/What I Eventually Did
After being hired by Treehouse as a video producer, I wanted to continue my coding hobby (yep, I’m mostly a video guy). I made a choice: I was going to pick one language, Python, and give it as close to undivided attention as possible. I would build a few different projects using the language. I would seek help in truly understanding things when I didn’t get it. Do I wish I had taken this approach sooner? You bet.
I never really felt comfortable with Object Oriented Programming before focusing on the concept in the context of a single language. I still have hangups, and I get lost constantly, but I feel confident in asking questions. I feel closer to the answer. I know what to look for.
There are Still Sticking Points
No matter what you choose, it will be challenging at first—persevere. Recognize when a sticking point is caused by the simple fact that you’re learning something new. That is when you need to have a gut-check and push through the pain. That might mean taking a few days away to process all the new information, but don’t give up.
All that said, don’t forget the first point–do your best to pick a project that interests you. If you just don’t care about your project, you may want to find a new one. Your early projects should excite you. It’s not a job yet. You’re in control, so have fun. You’ll learn more that way.
Your early projects should excite you. It’s not a job yet. You’re in control, so have fun. You’ll learn more that way.
What works for me is focusing on something until I can use it to solve a problem — something I’m interested in tackling. Don’t stress. Great resources such as Treehouse exist today. You can sample quite a few coding languages right in your web browser without installing anything. It’s a wonderful time to learn how to code. Lastly, don’t worry if you dislike the language you picked, because you haven’t wasted any time. Pick up, dust off, and … on to the next one.
Good luck in your coding journey.