Why Java?

There are a wide variety of programming languages you might learn, so why learn Java?

People often become very strong advocates for languages they like: the language Python has an almost cult-like following at the moment, but you'll also find strong communities wedded to the joys of Fortran (especially amongst older scientists and those trained by them), C++, MATLAB, and Ruby, along with a host of more obscure languages. Equally, those who work in specific areas will often try to convince you to learn languages useful for one particular area: the .Net languages (for Windows), PHP or Perl (for web servers), or Javascript (for webpages -- and which isn't a type of Java).

Given all this, why Java?

We've chosen Java for this course for the following reasons:

1) First off, all the latest reports from the job market are that Java is still by far and away the most popular of the modern languages asked for in job market, after the (much harder to learn) C-languages (TIOBE Programming Community Index -- ignore the headline and concentrate on the figures! See also links at: Measuring programming language popularity). This is because it is a) widely used in industry; b) the language of choice in Android and a short leap from the Objective-C used in iPads etc. c) the reasons below.

2) Secondly, part of the reason for this is that it is quite possible to become a fair programmer in, for example, Python, without actually picking up much of the understanding necessary to become a proper programmer (by which we mean someone who can walk into a new and complicated situation controlled by another language, and pick up both quickly). Becoming a programmer in some languages can easily be about becoming a programmer of that language, rather than a programmer more generally. One reason Java is popular in job descriptions is it shows you have high level skills and you know enough about programming languages to pick up any other language with (relative) ease. If you learn Java, you'll probably find most other languages a breeze(!). This includes the C-family of languages like C++, which Java is essentially a more bomb-proof version of.

3) Thirdly, actually, the best language to learn if you want something on the rise is Javascript. It has the edge on Python as a scripting language across the board because it is built into web browsers and Windows 8. Now Javascript isn't Java, but the basics are similar, and so learning Java will definitely make it a hop-skip-and-jump to picking up Javascript. Javascript is the only real option of any sense for programs which run within a web browser, whatever is used on the web server (and most would use something like PHP).

In short, the reasons we teach Java are: 1) still asked for by employers an order of magnitude more than other languages like Python; 2) it'll teach you all the things you need to know to learn any popular modern language; 3) this includes Javascript.

On the other side, there are good reasons for learning other languages. Python is a delightful language which makes simple scripting and data/text processing jobs very easy; Fortran has a vast store of robust mathematical toolkits behind it; and C++ is the go-to language for lots of commercial work (along with assembly languages). Equally, there are many things which Java could do better (for example, the way that basic data is dealt with in newer languages like the .Net languages, is better).

Overall, though, Java represents a language that is at a high enough level that you can build robust and professional scientific software from it, while still being simple enough to use that you won't spend too much time gibbering under your desk. Learning it will also teach you a great deal about how computers work and give you a very solid foundation for picking up any other computer language.