Hacker News new | ask | show | jobs
by Tloewald 5132 days ago
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.

4 comments

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.

> It's hard to find any language that has better online documentation than Java.

I don't see how http://docs.oracle.com/javase/6/docs/api/ this is better documentation than http://docs.python.org/library/random.html or http://perldoc.perl.org/perlretut.html

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:

http://docs.oracle.com/javase/tutorial/java/index.html

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,

http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/doc-fi...

Personally I think having both a tutorial and browsable API documentation is preferable to dealing with unstructured prose for everything.

> 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.

I'd compare your python link to http://docs.oracle.com/javase/6/docs/api/java/util/Random.ht... rather than the doc root.
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)

s/good reasons/unsurprising reasons/
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.
It does fit my particular case. The languages I like the most and even use the most, I haven't bought any books about them.

Languages I despise, like Java and Javascript, I have bought the most books. I guess I wanted a streamlined experience to make it easier to swallow.

That's a rationalization, if I ever saw one.

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".