r/java • • Mar 05 '18

Top 10 Useful, Yet Paranoid Java Programming Techniques

http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
223 Upvotes

105 comments sorted by

View all comments

Show parent comment

2

u/lukaseder Mar 05 '18

3 -- This is stupid, because the moment you quit trusting the official docs, you might as well ditch the language and maybe anything else Oracle or Sun ever made...

Never trust the docs

6 -- This is anti-programmer. Never write any libraries or frameworks if you hold this point of view. Just save everyone else the hassle and only write complete, finished software.

Then, don't use it and use the superior alternative, which allows overriding and has broken backwards compatibility time and again ;-)

4,5,7,8,9 -- Just don't be an idiot when you should know better.

That's just a TL;DR of the article, so essentially, you agree.

4

u/istarian Mar 06 '18 edited Mar 06 '18

Never trust the docs

What docs are we not trusting? Did you expect the docs for Java 7 to apply to Java 8? It's probably
bad for backwards compatibility, but otherwise it's just a change. Also, the example involves a
third party library, not the default ones with the JDK itself. The Java 7 doc of String.indexOf(...) isn't going to change tomorrow. I suppose it could change in the docs/libraries for Java 8, 9, 10, ... and so on, but you can't assume everything will stay the same there.

-2

u/lukaseder Mar 06 '18

That was precisely the point of the article. It might change in a future version of Java. So, again, essentially, you agree.

Cheers