Over a million developers have joined DZone.

What Programming Language Should I Learn First?

A very common (loaded) question asked by people entering the software development field is: Which programming language should I learn first? Here's some insight.

· Agile Zone

Reduce testing time & get feedback faster through automation. Read the Benefits of Parallel Testing, brought to you in partnership with Sauce Labs.

Programming Language Learn First


This post is a chapter from my upcoming book The Complete Software Developer's Career Guide. I'm writing the book live on this site week-by-week. If you enter your favorite email address here, I'll send you the prior chapters and get you caught up — then send every new chapter as it comes out!

One of the most common questions I get from new programmers starting out in the field of software development is, "Which programming language should I learn?"

For some aspiring developers, this question ends up being a stumbling block they never get over.

I've coached plenty of developers who were always second-guessing themselves or changing their minds and kept jumping from programming language to programming language, always worrying about making the wrong decision.

If you've stressed over which programming language you should be learning, this chapter is for you.

First, I'm going to dispel some of that doubt; then I'll give you some real practical considerations for choosing your first programming language to learn.

The Actual Language Doesn't Matter All That Much

What Programming Language Should I Learn First?


Yes, you read that right.

What language you learn doesn't actually matter nearly as much as you might think it does.

There are several reasons I make this statement, but one of the main ones is because so many programming languages, at their core, are very similar.

Yes, the syntax is different. Yes, programming languages may look different. They may even have completely different sets of features.

However, at their core, all programming languages share more than you might first suspect.

Almost all programming languages will have basic constructs for branching, looping, and calling methods or procedures and a way to organize code at a high level.

There are even many programming languages that are so similar that if you know one language, you almost already know the other.

C# and Java are pretty good examples. JavaScript is very similar to either of those.

Learning your first programming language is always the most difficult. Once you learn a programming language, though, learning a second one is easier. After you know two or more programming languages, each additional programming language is exponentially easier to learn.

If you don't even know one programming language well — or at all — it might be difficult to believe these statements, but I've learned at least 10 different programming languages over the course of my career, and I can guarantee you that the first and second ones were by far the most difficult.

Not only are programming languages more similar than you might think, but you'll also easily be able to switch to a different programming language and learn it later on.

That means even if you learn one programming language and decide it's not the right one, or you get a job where you'd be using a different programming language, it's not a big deal. You'll already have done the hard work of learning your first programming language.

You'll also probably find that many developer jobs — especially at big companies like Microsoft or Google — don't require that you know a specific programming language.

I've even had plenty of interviews where I was asked to solve a programming problem in whatever language I felt most comfortable doing it in. There were no constraints, no one specific language that I absolutely needed to know.

Considerations for Picking a Programming Language

Pick A Programming Language

Therefore, I really don't think it matters all that much what programming language you decide to learn first, but if you are still having some trouble making a decision, I'm going to give you a few things to consider.

Job Prospects and Future

I'd say, for most of you, the most important thing to consider is what jobs a particular programming language is likely to help you get and what the future of that language is.

Now, for most popular programming languages, at any given time there are going to be plenty of jobs available.

Different programming languages may rise or fall in popularity, but if you are concerned with job availability, you might want to consider one of the main, popular programming languages.

At the time of writing this book, I'd say those are:

  • C#
  • Java
  • Python
  • Ruby
  • JavaScript
  • C++
  • PHP

There is no shortage of jobs for developers who program in one of these languages.

That said, depending on where you live in the world, you may need to be a bit more selective if you aren't willing to relocate.

For example, if you live in some small town in Arkansas and there is only one technology company and that technology company does everything in Java, I suggest you learn you some Java.

I would imagine for most people this won't be the case, but if it is you, then I guess your decision is pretty easy.

Freelancing


If you are willing to relocate or you are planning on doing freelance programming, you could probably specialize in a more eccentric and less widely used language and do pretty well by being an expert in an area where there are few experts.

But, if you are just starting out, I'd try to stick to something a bit more mainstream.

Another consideration to take into account, along with job prospects, is what the future is likely to hold for the programming language you are considering.

At the time of writing this book, Objective-C would probably not be a good choice of a language to get started in, simply because most iOS developers are switching to Swift, and Apple is heavily investing in the Swift programming language.

If you've already been programming in Objective-C, I wouldn't worry; there will still be plenty of jobs and legacy Objective-C applications to maintain. It just might not be the best choice for the future.

Of course, none of us have a crystal ball, so it's pretty difficult to predict which languages are going to be popular and which ones aren't.

A while back I predicted the death of JavaScript. That didn't exactly happen.

I just went to a conference where one of the speakers was a co-inventor of Objective-C, which first came into being in the early 1980s.

The speaker, Tom Love, wrote a book in which he basically stated that the JavaScript language was dead. At the time of writing this book, it's now one of the top five most-used programming languages in the world. (I've heard it claimed to be number three.)

The point is, you never know what is going to happen.

Ruby took years before it became popular.

JavaScript is arguably one of the worst-designed languages ever and was originally used for making little pop-ups or alert boxes on web pages; now it's an extremely popular language.

So don't try and guess the future, unless you do have a crystal ball. In which case, forget programming. Wall Street is where you need to be.

Technology That You Are Interested In

One excellent consideration when picking a programming language is simply what technology you are interested in.

If you start with a technology, the programming language choice may be easier.

I know plenty of developers who are interested in developing Android apps because they love the technology.

For most of them, Java is going to make sense because that is the native language in which to develop Android applications. (Although, you could also develop Android applications in many other languages, like C#, Ruby, and even JavaScript.)

It definitely doesn't hurt to pick your first language based on what you are most  interested most because learning your first programming language can be difficult.

The more you are interested in and excited about what you are learning, the easier it will be to stick with it and get through the difficult parts of the learning curve.

I really wanted to develop an iOS application because I had just gotten an iPhone and I was excited about the technology.

That excitement made it much easier for me to learn Objective-C and build my first iOS app.

Had I not been excited about the technology, I probably wouldn't have made it very far.

Don't be afraid to pick a programming language based on what excites you or what you are interested in. Your enthusiasm can carry you through the rough patches in the learning process.

Difficulty Level

How To Learn Programming













Another major consideration would be difficulty level.

Some programming languages are just much more difficult to learn than others.

I usually don't recommend starting out by learning C++ because, in comparison to many other programming languages, C++ is rather difficult to learn.

C++ has you dealing with managing memory and pointers and quite a few other nasty constructs that can throw a beginner for a loop.

It's a great language — still one of my favorites — but not the easiest one to learn.

A language like C#, Lua, Python, Ruby, or PHP is going to be much easier starting out.

There are even beginner languages specifically tailored to learning programming, like Scratch or Basic.

I don't want to discourage your from learning a more difficult language like C++ if that is what you really want to do, but you should at least know what you are getting into and decide if you'd rather your first language be something easier.

Resources Available to You

You also might want to consider what resources are available to you for learning a programming language.

Some obscure programming language may not have as many books, online videos, or other resources available, which might make them more difficult to learn.

Other more popular programming languages may have plenty of tutorials online, bootcamps you can enroll in, and books and other resources you can utilize, so be sure to look into how many and what resources are available out there for you.

While this isn't as big of a concern today as it used to be since there are so many resources for beginners out there, it's still something to take into consideration.

You might also want to consider what resources are specifically available to you, like a computer or software.

A somewhat difficult to learn programming language may be an easier choice, simply because of how many interactive online tutorials there are.

Available Resources


You can learn JavaScript online through your web browser without installing anything on your computer.

A language like C++ will require downloading some tools and software, which might not be easy to do or as easily available.

For the final resource, I'd consider looking to the people you know.

Who can you turn to for help?

Is there someone that can answer your questions if you get stuck or help accelerate your learning?

I certainly wouldn't make resources the biggest consideration to take into account when choosing your first programming language, but it's still one you should contemplate.

Adaptability

Finally, let's talk about adaptability.

Different programming languages are going to be more adaptable to different situations and technologies.

For example, the C# programming language, at the time of writing this book, is one of the most adaptable thanks to companies like Microsoft and Xamarin (now part of Microsoft).

If you learn C#, you are not just constrained to Windows or web programming.

C# is available on just about every platform today, so it is highly adaptable.

You can use C# to write Linux and Mac applications, and you can even write Android and iOS applications, completely in C#.

Plenty of other programming languages are also highly adaptable.

For instance, Ruby has been ported to many different platforms and is used in quite a few areas of technology.

JavaScript is also highly adaptable. You can even use JavaScript to control Arduino boards and do robotics. (Check out my good friend Derick Bailey's article on how to do it.)

Other programming languages are not as adaptable.

If you learn R or Go, for example, you are going to be a bit more restricted to the technologies and platforms those languages were designed for.

More and more programming languages — especially popular ones — are being ported to more platforms and used in a variety of different technologies, but there are still some that are not as versatile.

So, if you think you might want to be a web developer today but do Android development tomorrow, or you want to get involved in a bunch of different platforms or technologies, you might want to consider how adaptable the language is you are trying to learn.

Some Final Thoughts on Picking a Programming Language

Become A Programmer


Even though I've given you some considerations to take into account when choosing your first programming language, I want to stress the point that the actual language is not all that important.

What is important is that you pick something and stick with it long enough to get through the learning curve required to gain proficiency.

Plenty of programmers who are just starting out get frustrated because they feel like they are just not getting it.

I'll talk about this more in the next chapter on “Learning Your First Programming Language."

Just hang on and stay the course, and you will gain proficiency. I promise.

It can be tempting to get bored, or think you are learning the wrong language, and so keep switching languages, but — trust me — that is not a good idea.

Finally, consider this. When I was first starting programming, knowing a language in-depth was one of the most important skills a programmer could have.

I would pour over C++ books and try to learn every intricacy of the language.

That is no longer as important a skill today.

Today's programming is done at a higher level. Programming today involves utilizing libraries and frameworks much more than language features.

Sure, it's important to know a programming language — and to be good at i t— but absolute mastery just isn't as valuable a skill as it was.

That is why I say don't worry so much about what language you learn first. Just make sure you do learn one and stick with it — at least for now.


The Agile Zone is brought to you in partnership with Sauce Labs. Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure.

Topics:
languages ,programming languages ,popular

Published at DZone with permission of John Sonmez, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}