I’ve been asked this before; here’s AN answer:
here are my opinions of the various languages I know. please note: I do a lot of miscellaneous coding on the side, mostly game development, but my day job is as a web developer and manager, so a lot of my opinions come from a web development point of view.
you may have heard of “C-style languages”. these are languages that share a lot of syntax with C (and C++). C and C++ have been around for a long time, and have had an enormous impact on many languages that have come since. despite their age, these languages have not been left to languish and rot; they’ve been continuing to develop over the decades, and have many-many applications today.
C and C++ are “strongly-typed” languages. this means that you have to tell the language, explicitly, what kind of data you’re working with as you pass it around. “this is an integer”; “this is a string of characters”; etc. a lot of languages are strongly typed, and a lot aren’t (so-called “loosely”-typed); whether or not a language is strongly or loosely typed influences a lot about how you use the language, and each has pros and cons.
in my opinion, the strongest “secret” pro of a strongly-typed language is that it reduces programmer error, and increases the helpfulness of your IDE (Visual Studio, Eclipse, etc). if your IDE knows “this is an array of strings”, then it can give you a LOT of help when working on that piece of data in code, offering up inline drop-downs of available operations you can take on that data, etc.
one of the greatest weakness of a strongly-typed language that I encounter as a web developer is that JSON – one of the most-popular languages of the internet – is loosely-typed, and strongly-typed languages have a tough time dealing with loosely-typed data.
C# and Java
whether you think object-oriented programming is OBVIOUSLY better or worse than functional programming is a debate you can have with many people on the internet 😛 both are used, both are incredibly useful, and the two can be used together. you’ll learn a lot by learning both approaches. C# provides many methods which support functional programming, but it is best-suited to object-oriented programming. I’m less familiar with Java, but I assume the same is true for it as well.
(“what exactly ARE object-oriented programming and functional programming?” is a question I’m not prepared to answer here. maybe another time.)
C#, as a Microsoft product, is very popular in Microsoft-y parts of the world, but it’s found use in a other interesting places, including Unity (a popular 3D game-making IDE) where it is the preferred language.
if you’re interested in making Android apps, Java is the preferred language in that world. (Apple prefers “objective C”, which I know basically nothing about, so cannot comment on.)
finally: Java was designed from the start to be cross-platform in a time when cross-platform was harder to do! as a result of this easy cross-platformness, desktop applications and games are sometimes written in Java, including Open Office, and Minecraft. I also just learned, while writing this article, that parts of Twitter are written in Java! C# started Windows-only, but became cross-platform with Xamarin/MonoDevelop. (also worth noting: C, C++, and all the other languages on this list are also cross-platform.)
- do you want to make mobile apps? check out PhoneGap, and Ionic.
- do you want to make desktop apps? check out Electron.
- do you want to make games? check out Phaser, PixiJS, or maybe even Unity (although really, for Unity, you should be using C#).
- do you want to make websites? learn about MEAN stacks, SPAs (single-page applications), Angular, and React/Redux.
- do you need to maintain decade-old websites, or WordPress sites? learn jQuery, and look for a better job 😛 (how’s that for a hot take?)
most (all?) of these frameworks have excellent “getting started” guides on their websites which will lead you through creating your first project with them.
about three-quarters of all websites are running PHP, including Tumblr, Yahoo, Wikipedia, and Facebook (although it may be worth noting that Facebook engineers have said they’d love to get away from PHP).
to help learn PHP right, and since PHP’s main role today is for serving websites and web APIs, I’d recommend learning one of the popular web frameworks for PHP.
- for a traditional website, check out Symfony, Laravel, or maybe Drupal.
- for an API, there’s Symfony’s little brother Silex, Laravel’s little brother Lumen, and many other RESTful frameworks.
I would strongly recommend AGAINST learning PHP via an archaic framework such as WordPress or Media Wiki. these are incredibly popular websites you’ve probably heard about, but they are based on very old code that teach bad practices rife with security flaws and performance problems. you will honestly be doing yourself a disservice by learning PHP this way, not only by learning bad habits, but also by NOT learning the design patterns used by more-modern frameworks.
one of my weaknesses as a programmer is in not knowing Python. but I’ll tell you what I can.
Python, unlike everything else on this list, is NOT a C-style language. this isn’t a bad thing, and it does not mean that the language is lacking! all it means is that the syntax is one-of-a-kind. this might sound like it’ll make it harder to learn, or make what you learn in Python less-translatable to other languages, but I would argue that that’s not the case:
- you’re going to learn TONS of syntaxes, anyway. JSON, regular expressions, XML and HTML, CSS, MySQL and SQL… it’s not a problem. your brain is up to the task.
Others You May Have Heard Of
- Go. I know nothing about Go. I hear people have taken a liking to it recently? maybe google up some info yourself, and see what people are saying about it. (no relation to the ancient board game of the same name.)
- (My)SQL. SQL, and it’s variants, are languages that are used to talk to databases. you’re (almost?) never going to write a full program in SQL, but you MAY write bits of SQL as part of another program that talks to a database. it’s often preferable to use a third-party library to talk to a database, though (Dapper for C#, Doctrine or Eloquent for PHP…), so you can get by without knowing SQL. you will want to learn it eventually, but to start, I wouldn’t make it a priority, and instead focus on learning a bigger language while picking up SQL on the side.
- HTML & CSS. using a web framework like Symfony, or even a JS framework like Angular, doesn’t mean you won’t use HTML and CSS! if you program for the web (or even for the desktop with something like Electron), you WILL use them! you will have to learn them. fortunately, HTML and CSS are relatively easy to pick up. chances are, you already know a bit of HTML, and I’m willing to bet you’ve encountered hex-coded colors (ex: #FF9900).
- Ruby. people were going NUTS about Ruby for a hot minute. that minute has passed.
- JSP. it’s Java, so you might think it’s good, but it’s not. back when it was worth talking about, PHP was still better; today, JSP is old, and rarely used.
- ASP. I like Microsoft – I like their OS, and their gaming console – but they just CAN’T seem to get it right with web-based technologies. their most-popular internet browser was IE6. IIS is miles behind Apache and nginx. ASP has always sucked; they tried again with ASP.NET Core, and failed again. I don’t know why they can’t figure out the internet, recently, but they can’t.
- Visual Basic. it was slightly exciting in the late 90s/early 2000s. anyone still developing in Visual Basic today is probably doing weird, Access database stuff. you don’t want to be part of that world. there’s a better life for you.