Which Programming Language Should I Choose?

In this article, we’ll cover some good reasons why you would want to learn to program (even if your position doesn’t have ‘software’ or ‘developer’ in the title).

Then, we’ll discuss the questions you should be asking when it comes down to choosing your first language and actually getting started.

Finally, I’ll tell you which languages I would learn, in which order, if I were starting over again today.

What is Programming?

It used to be that programming was just a thing that a small percentage of geeks did. Other geeks would just chat about their favorite topics with people on the other side of the world on Bulletin-Board Systems (BBS), or explore telephone and IP networks, or do lots of other things that didn’t involve programming.

However, in the last 20 years, programming has become so powerful and so easy to get into that even non-IT people can benefit tremendously from learning it. For example, Microsoft Excel (and its LibreOffice companion) is essentially a fairly complex programming environment that non-tech people use every day to do calculations that would have taken a team of people in the past.

The people using Excel don’t realize that they’re programming, but that doesn’t really matter. The foundations are the same whether it’s a spreadsheet, a Ruby on Rails application, or an operating system written in C and assembly.

 

Why Learn Programming?

Because in the modern world, programming makes anyone working with information more efficient. I’ve been a landscaper, flooring salesman, soldier, massage therapist, and several other things before finally using my computer hobby to get some decent pay. Believe it or not, almost all of these ‘nontechnical’ businesses are things that can still benefit massively from a bit of programming:

  • scheduling clients
  • isolating and tracking productivity of individual landscapers as they rotate through different properties
  • tracking which sales pitches and discounts have the biggest impact on sales
  • sending appointment reminders and follow-up e-mails
  • etc.

These are all small, nontechnical businesses (except for the army), and just a bit of programming can add tens of thousands of dollars of value every year to each one. Even better, all of the examples above are not technically difficult to implement and require no math except for arithmetic (except for the productivity-tracking software, which could benefit from a bit of statistics/Bayes’ rule).

 

…but I’m an IT Guy, not a Landscaper

All the more reason for you to become competent with the practical basics of building useful stuff by programming.

Ten years ago, it was still possible to be a system administrator who didn’t know how to program. “That’s all right — we’ll get you to learn some Bash once you start,” they’d say, and you’d be hired. Then you’d ‘maintain’ a few Bash scripts that didn’t do a whole lot and never needed much maintaining, and everything would be fine.

Now, it’s unrealistic to expect any kind of IT career (with the possible exception of networking and network security) without a firm grasp of programming basics. Even managers tend to make horrible beginner mistakes when running their projects and teams, if they don’t have any practical coding experience.

As a sysadmin, you need to know how to program. As a DevOps person, tester, malware researcher, SRE, you need to know how to program. As an IT manager, you need to learn how to program.

If you don’t know how to program, you’ll be a junior Windows support tech for the rest of your life, regardless of your actual job title.

 

People Get Emotional Over This Stuff

OK, so you’ve decided to learn how to write code. Now it’s time to choose your first language. Careful! If you’ve never seen a programming language battle, you’re about to. Just watch:

  • Ruby vs. Python
  • PHP vs. Perl
  • Java vs. Javascript (kidding, kidding)
  • everything vs. Java

Now that I’ve typed those words, I have ensured that within minutes, a gaggle of Internet warriors will show up here and try to fight it out in the comments. And why shouldn’t they?

Just thinking about typing any of those “x vs y” phrases into Google is enough to suddenly land you in a twelve-thousand-page forum thread where otherwise rational human beings and fellow software engineers act like a bunch of rabid dogs.

This section is my humble attempt to tell you a bit more about how to think about choosing a programming language. In the process of doing that, perhaps you’ll see a language that speaks to you. This is the language you should start with. That said, let’s start the show!

I recently responded to a someone asking this very same question, and said something along the lines of

Choosing a language is actually much bigger than just ‘choosing a language’ —  be aware that you’re (usually) choosing a LANGUAGE, a DEVELOPMENT ENVIRONMENT, and a SOFTWARE ECOSYSTEM all at once.

 

Doing it Wrong

Most people try to choose a language the way they would choose a car. They compare features. “This one is faster than that other one,” they say, thinking that this implicitly matters. “I need a statically typed language to catch errors before I even run my code.” Wrong again.

 

The Best Programming Language for a Barfight

A long time ago, I was involved in several martial-art-related activities. I was interested in ‘reality-based’ martial arts, and figured that this narrowed the field down enough that you could eventually pick a ‘best’ reality-based martial art. Years later, a much more skilled fighter gave me my moment of enlightenment when I asked him about this.

The question of ‘which is the best art’ is not actually a real question. It’s incomplete,” he said. That question, as it turns out, is missing the most important part.

“The answer to that question is always the best art for what?” Which art you choose depends on the demands of the environment that you expect to be fighting in. It depends on the types of threats and opponents you’re likely to face. It depends on the state you’re likely to be in. It depends on the weapons and armor you have. Are you fighting a drunk with a knife and a bad attitude, or a professional who shows up with an F-16 fighter jet and three of his closest friends? Are you likely to have backup? Is the opponent?

This line of questioning is similar to what you should be doing for programming languages.

Wherever you are in your programming journey, make sure you understand the for what part of your programming language choice. Here are some examples of possible answers to “I need a language for,” along with some possible language choices:

  • …learning how to program (Python)
  • …writing a medium-sized web application in my free time, hoping to make a startup out of it (Python, Ruby, PHP)
  • …getting the skills I need for a remote development job (Ruby, Javascript)
  • …scripting repetitive admin tasks on the Unix machines at work (bash)
  • …writing a mobile app (Objective C, Java)
  • …work, at my huge boring soul-destroying company (Java)
  • …deal with some legacy code (Fortran)
  • …be a Database administrator (SQL)
  • …working on real-time systems that need insane performance guarantees (C, C++)
  • …splitting a growing startup’s web application into microservices (Go)
  • …having fun learning cool stuff (Clojure, F#, Rust, Nim, thousands of others)

These are just a few examples to get you started. There is no “correct” answer for everyone, and probably several good choices for yourself.

 

Language vs. Environment vs. Ecosystem

When you decide to really learn a language, you’re not just committing to memorizing a bunch of syntax, or understanding how a language deals with this syntax and represents data internally, or becoming comfortable with its performance characteristics. It’s more than that.

The language you choose is important, of course. Some languages make it very easy to get started, and to learn good software development habits: Ruby and Python come to mind.

Some make it easy to write robust distributed systems (Go, Scala, etc.).

Some make it easy to learn functional programming (Haskell, Clojure/Scheme/Lisp, etc.).

Others makes it easy to have many variably-skilled programmers all working simultaneously on a large project (Java, Go).

A few make it easy to get a job as a junior developer (Java, PHP, Ruby).

 

It’s all about what you’re planning on doing with the language. It’s the “for what” that no one wants to talk about.

I personally find the experience of programming in Java to be similar to the experience of being randomly and repeatedly slapped in the face by a psychotic chimpanzee. It’s time-consuming and frustrating. It can feel humiliating. But I don’t hesitate to admit that there are some very good reasons for using it, given the right situation.

 

The Language Environment

When you work with a programming language, you also commit to getting comfortable with its environment. The build tools. The packaging tools. The compiler or the interpreter. The profiler. The concurrency model and how it behaves with your specific application architecture. The debugger. The versioning scheme. The upgrade process. How libraries are managed. A million little things, all of which add up to an enormous percentage of your experience.

 

The Ecosystem

There’s also the ecosystem; a deeper level on the turtle-chain of abstraction. The ecosystem is the software libraries and the community around the gooey center of a language and its environment.

Ruby and PHP have ecosystems that are really good for web development. Python’s ecosystem really lends itself to web development, machine learning, statistics, natural language processing, web scraping, and prototyping. Java’s ecosystem is great if you want to make sure that your project survives developers leaving the company, or bad developers, or huge growth (or all three, which is often the case when you use Java).

The communities of these languages all make them excellent for newcomers who want to learn software development.

 

Questions to Ask

Here’s a list to get you started when you’re choosing a programming language:

  1. What types of projects am I (or would I enjoy) working on? What languages do those projects use? Why?
  2. What type of development do I want to do? Web application programming? Mobile app development? Real-time financial systems? Infrastructure automation? Decentralized, encrypted peer-to-peer applications? Operating systems? Bioinformatics?
  3. Which skills or domain knowledge can I combine with software development to make a super-potent value-creating combination? What types of companies are doing this? What are they building? Which languages do they use?
  4. Which programming languages have lots of job openings in my area?
  5. What is the community like for this programming language? Are they super-experienced, no-nonsense, cutting-edge trendsetters? Are they newbie-friendly and established? Do they tend to specialize in one niche?

 

Which Languages, in Which Order?

Okay, fine. You came to hear specific language recommendations, so here they are, in the order I think it makes sense to learn them.

  1. First, learn Python. It’s a great start for programming, and gives you a huge amount of projects that you can do/read/try as a beginner.
  2. Then, learn a Lisp (Scheme is great for learning, Clojure is great for work). Lisp will give you good instincts and habits, and free your mind a bit.
  3. Then, learn Google’s Go programming language. It will be an interesting change, and will teach you a lot more about how computers work.
  4. Once you’re more curious about how computers work, go ahead and learn C and x86 Assembly. Even if you don’t use them on projects, you’ll understand what other languages are doing under the hood, and what tradeoffs are being made. You’ll also be aware of the performance implications of what you’re doing, which is occasionally useful. You could consider learning C++ instead of C, because it will make reading CompSci books (algorithms, graphics, etc.) easier. C is really good for learning operating systems, though.

At that point you’ll have a really nice grounding in how things actually work. You can probably do it in 2-5 years, while picking up other languages on the side as required.

 

…but I don’t have two years of free time!

The previous section described the order I recommend for learning about software development and computer science. If you’ve got bills to pay, it makes sense to change this a bit to optimize for getting a job as soon as possible, and follow a progression like this:

  1. Python (maybe Ruby…depending on your interests and local job market). I recommend Python because it gives you the most options besides Web Development, should you want to try other areas of software development. If you learn Python really thoroughly, you’ll be able to go a very long time before needing to change languages.
  2. A web framework. I like Flask, but maybe Django if you’re into that kind of thing. If you’re using Ruby, Rails is the only real option if you want to make money.
  3. Javascript (+ HTML + CSS). Congratulations, you’re a full-stack web developer now, and can command a 30% higher salary. Besides that, you can now also build an entire web application by yourself, which is useful for side projects and eventual million-dollar acquisition.
  4. If you’re not coming from the Sysadmin angle already, you’ll need to make sure you have a really firm grasp of Linux and Unix at this point. Feel free to use my Sysadmin Basics playlist on YouTube as a jumping-off point :-). A solid understanding of Linux will mean another 30% boost to your salary, and make you stop wasting huge amounts of time and money on “managed” infrastructure for your personal projects.
  5. Learn the basics of SQL and database administration. This is part of the sysadmin skills in point #4, but I’m mentioning it here just to be clear.

At this point you can hold down all kinds of jobs that will pay the bills while you continue to learn.

 

Conclusion

That’s it! If you’re not programming yet, learn Python and get started solving real problems and building little tools and games for yourself. At this point, it really doesn’t matter what your job title is – if you’ve been curious enough to read to this point, it’s almost certain that learning to write code will add value to your life.

Have fun!

 

1 reply

Comments are closed.