←back to thread

401 points Bogdanp | 2 comments | | HN request time: 0s | source
Show context
satisfice ◴[] No.45535297[source]
They are not the “best.” They are helpful.

I am tired of rudimentary docs that only have examples.

replies(2): >>45535362 #>>45537381 #
1. skinkestek ◴[] No.45537381[source]
Given the choice between massive, "complete" documentation with no examples and decent but incomplete docs with good examples, I’ll pick the second every time.

Why? Because if you don’t explain how to actually use something, all the fine-grained details are pointless.

Classic example: try looking up the Java docs around 2003–2005 to figure out how to display an image in a Swing application. Endless pages about Graphics2D and Image and double buffering and what not but not a single mention of the real solution:

Just put it in a JLabel.

replies(1): >>45541460 #
2. badsectoracula ◴[] No.45541460[source]
FWIW that stuff was put in the Java tutorial (not sure if this is still the case today). The "Visual Index to the Swing Components"[0] (a copy i found online from ~2003) shows JLabel with an image and the docs even begin with "With the JLabel class, you can display unselectable text and images.".

[0] https://fizyka.umk.pl/~jacek/docs/javatutorial/uiswing/compo...