There's probably a property of programming languages that connotes to the ratio of books needed to code written which Java scores highly in. That and the huge number of people forced to learn Java and buy books on it.
At the opposite end would be languages that are easier to work with, have incredibly good online documentation, and/or for which a book industry has not yet materialized.
It's hard to find any language that has better online documentation than Java.
Java as a language is dominant in universities (for debatable reasons) and in average-boring-industry shops and at high-scale shops, both for very good reasons. There's going to be a lot of books sold because of that.
Java docs are mostly a dump of class hierarchies with some comments documenting the functions. Python and Perl docs are written as user guides compared to Java api dumps.
In addition to the API documentation, there's the "Java Learning Trail", which is a set of step-by-step tutorials with numerous screenshots and tons of example code:
Additionally, if you actually page through the Java API documentation, many packages contain overviews describing rationale and how everything fits together- hardly a "dump of class hierarchies with some comments". For example,
> In addition to the API documentation, there's the "Java Learning Trail", which is a set of step-by-step tutorials with numerous screenshots and tons of example code:
If you are already a programmer, you will be able to complete this tutorial in less than 2 hours http://docs.python.org/tutorial/, and can start programming Python. Want to learn Perl? http://www.perltutorial.org/. This tutorial thing isn't something that is unique to java, and personally, I find the Perl and Python versions higher quality compared to Java's tutorial.
> Personally I think having both a tutorial and browsable API documentation is preferable to dealing with unstructured prose for everything.
Unstructured prose for everything? What are we talking about? How is http://docs.python.org/library/random.html (description, methods and usage, example code) unstructured prose? When it comes down to which doc is better, it comes down to personal preference. But Java has the best online documentation is far from the truth.
Fair enough. May be it's me but I find Python/Perl docs more intuitive. I find it difficult to figure out how to do something by reading Java docs.
Personal preferences aside, I would say Python/Perl docs are as good as, if not better, than the Java docs. Ruby's documentation is not as good, but rails documentation is very good http://guides.rubyonrails.org/ For C, we have the man pages(though archaic, they are pretty good). My point is I don't see how Java leads in terms of online documentation.
I was more saying that there's no lack of documentation than saying Java wins in a documentation-off with any other language. Seems to me the differences are mostly in style, they all include descriptions of each method on a given type and a description of intended usage. Java will typically only have sample code if the usage pattern is more complex than that of Random.
perfect reply,
definitely agree with the points stated...
For a scrappy startup, it may not mean much since it is verbose and idioms are a bit ugly-ish at first.
But as startups grow into real businesses, the developer productivity and maintainability versus performance makes Java one of the best options available today. JVM is really one good piece of software and against all the preconceptions, java is a really nice language to build large scale systems...
// been a java developer for around 10 years, and any other language i have used (a lot of them) disappointed me in one way (productivity) or another (performance)
Listings for Java programmers significantly outnumber those for any other language on all the job boards I've checked. I'm not persuaded that some other intangible is driving book sales.
Java has tons of documentation online, detailed API references, tutorials, etc. If there are many Java books, that's because of the demand for them and the language, not of some "mystic" BS quality the language has that needs more books.
For the same reason there are tons of Java jobs, many more than, say, Ruby jobs. It's not because "Java is more difficult and needs more programmers for the same task".
I find this statistics to be interesting because technically, outside Android, there's probably not too many new books about Java published by O'reilly unlike in the early 2000 when Java for the web and enterprise exploded.
On the flip side, Head First Design Patterns, Head First OOP, Head First Software Development are all using Java and the Head First series seems to replace the "For Dummies" series for beginner's book (don't get me wrong, I love Head First series because the series attempts to write book from a different angle and it does make sure you remember what you read, just like in the classroom).
Last but not least, O'reilly has the best selection of JavaScript books out there compare to other publisher.
Everything else is covered by the excellent online documentation, including the language and VM specification books: http://docs.oracle.com/javase/specs/
Java Puzzlers (http://www.javapuzzlers.com/) is a fun read that highlights many corner cases of the language and might be helpful for code reviews and debugging.
One obvious reason for this would be that colleges/universities very often teach Java as the main language and will usually encourage students to buy at least one or two books on the subject.
Another reason is that Java projects will often use some fairly heavy frameworks like hibernate, which can be great to work with if you really understand how they work. The best way to do this is to make sure you have the definitive book on your shelf as you are in for a world of pain if you just try to "wing it" like you would with PHP.
And also Java is very popular in large corporations (at least in my experience in the Financial Services sector). These companies have large staffs and lots of money. They'll send whole teams to training classes (which includes books).
While working for these large companies I thought the whole world was Java/Spring/Hibernate. Now that I work on my own (and have started spending more time on HN) I see there is a totally different picture for the startup/consulting world.
BTW, scanning GitHub to determine language popularity seems ridiculous to me. What percent of larger corporations use GitHub (less then 5% I would guess).
I don't think these results correlate at all to the popularity of a given programming language in use in the field.
For instance, pretty much ever since the language's ascendance to popularity, a visit to the bookstore will yield a veritable WALL of Java books, most of them bound for obsolescence within a year, or two, max. Sure, this happens with other programming languages too, but the constant churn of frameworks, libraries and infrastructure that happens in the Java world is a boon for book publishers.
Interesting trends, which likely match reality wrt the the decline of visual basic and perl, and the rise of python
http://radar.oreilly.com/upload/2012/03/Lang_allYears.jpg
It also shows the ruby market cooling off, which is consistent with recent stats for open source commit numbers.
At the opposite end would be languages that are easier to work with, have incredibly good online documentation, and/or for which a book industry has not yet materialized.