Best languages to learn for work…

Posted on Posted in Uncategorized

So what languages are best for finding work?

In my previous post I went over some of the best languages to start learning development with. Python and jQuery aren't just for learning programming, they're both very useful in a large variety of situations. However there aren't too many software development firms that rely exclusively on Python or jQuery. So what languages are the most popular among people hiring software development?

Based on my own personal experience in the software industry and without doing some official poll I'd say those languages are C# and Java for Desktops (and possibly C# for WebApps as well but those generally use a wider variety of languages). Interestingly the Dice Insights poll for employers actually puts Python and C / C++ above C#, though at that point I suspect you're going to be doing embedded systems development instead of desktop applications. 

C# and Java are both fairly easy to learn (less so than Python, but more so than C) and with the various tools available it's simple to become rapidly productive with them and therefore employable. If required to choose I'd go with C#, it's more flexible, has simpler and more straightforward grammar with fewer surprises and there are more tools available of generally more reliable quality.

I'm sure that anyone who's interested in learning more will rapidly find out by themselves, but it's probably worth giving a general overview of the languages and their benefits. C# is somewhat of an interpreted language like Python, that means that it's run inside another application instead of directly inside the "metal" of the computer. This means that it's theoretically slower than pure C, but as it's "strongly typed" (more on this later) it's faster than Python. I should take pains to point out that in practice C# will probably be faster than C. C needs to be compiled for the hardware that's going to run it, and it's very low level which means that it runs at the speed of the metal running it, but that also means that if you want any optimizations to take advantage of special hardware features, you'll have to implement those yourself. C# on the other hand comes with various optimizations inside the virtual machine running it, when the code is executed, the VM will choose the appropriate matching low level instructions on the fly. This means that on machines that have new features (like SSE)(SSE hasn't been "new" for decades, but work with me) C# will run the SSE low level code, on machines that don't, it won't. It can also more easily take advantage of different operating system improvements without specifically having to be told. So in practice C can be faster but among other things the C# code will be translated into the equivalent of compiled C on first run, so the only real performance difference is from hand-tuned optimizations.

The point of all that is that you shouldn't worry about speed when choosing between C# and C and pick based on other language characteristics. C# is a language developed and supported by Microsoft, Windows comes with a built-in interpreter for it (the .NET framework) and Microsoft also builds the tools for writing, testing and compiling C# (Visual Studio). With "Xamarin" you can even use it to build Smartphone apps (but if you want to build for iOS you'll still need a Mac). It can also be used to build websites with IIS and ASP.NET (never do this). C# doesn't have any real downsides so it's a very solid choice for software development.

Java is essentially exactly like C#, but with more downsides. It's currently developed and supported by Oracle and it hasn't seemed like Oracle has really been putting a lot of thought into it lately. Java has fewer libraries available and fewer libraries built in, the grammar is slightly more complex and there are more annoyances in the language that require additional care to work around when developing with it. Most importantly though, the interpreter is far more tricky to use efficiently than C# due to how it allocates memory to itself. It's easy to waste memory pointlessly or to run out suddenly (or both). Java can be used for websites with Apache / Spring and Android smartphones / tablets use this as their main programming language for apps. Although you can use C# if you are willing to learn Xamarin.

There is only one real advantage to Java in that it can be used on all operating systems with only some changes to the code. C#'s main interpreter .NET is Windows only and doesn't exist on Linux or OSX. If you want to have a really cross-platform C# application that runs on all systems from the same code base you will need to build against Mono or GTK+. Even then the icons and drawing won't look completely at home in OSX, but that's something that is also unavoidable with a Java application.

It might seem that I'm repeatedly criticizing Java here, but that's because I am. Choosing a language poorly to start with doesn't stop you from completing your project, but it does mean that as the project goes on you're spending progressively more time writing code around language issues instead of writing code to accomplish business requirements. That's why I generally choose languages that are easy to work with like C#, PHP, Python depending on the specific goal of each contract. It allows you to not only get a quick start, but to maintain a good rate of speed as the project progresses instead of getting bogged down. It also helps when the language has a good set of libraries to draw from, as you will be able to slot in advanced features quickly instead of being forced to develop your own (probably lower quality solution) from scratch during the project.

So I've said all that, and Java is still #1 on Dice. Why is that? Honestly after spending a solid period of my life writing Java as a line developer for a development company, I still don't know. My advice is to learn C# first and transition to Java later if it's that or starve.