4 ms·
The only way to think about Java and not go insane is to forget about pretty much the entire built-in standard library and instead go use the extremely solid 3r
by mseebach 13y ago
The only way to think about Java and not go insane is to forget about pretty much the entire built-in standard library and instead go use the extremely solid 3rd party libraries. If I don't have JodaTime, Apache Commons and Google Guava on my classpath, I feel like my hands are tied.
- saw-lau 13y agoThat's one of the main reasons I enjoy programming in C#/.NET. The fact that there are, as far as I'm concerned, a solid set of de facto libraries without having to hunt around for third-party ones somehow makes me feel warm and fuzzy.
- bane 13y agoThanks for the recommendations. I've been pretty happy with the little bit of Commons that I've been touching. Haven't tried Guava out yet...on the list.
- barrkel 13y agoGuava is decent enough (though not complete enough for my tastes), and should be much much better when lambdas are available.
- twic 13y agoI think that's a bit strong. There are bits of the standard library that are fine - collections, concurrency, and anything else designed by Doug Lea. I even get on fine with IO and most of networking. Sure, Guava adds a lot of really nice stuff to collections, but it adds rather than replaces. Then there are bits which should be avoided at all costs. Date and time is one. All the GUI libraries are another. HTTP via URLConnection isn't terrible, but people mostly use Apache HttpClient instead. NIO is a mixed bag, with some really good bits, and some complexity whose necessity escapes me (particularly since it can be hidden by XNIO without losing anything). It is a real shame that there is this patchiness. I would love to claim that all the rough code is from the pre-1.2 era, but i would be lying. Particularly if you look beyond the JDK and into the enterprise libraries, there have been some real shitshows given official imprimatur (i remember Java Advanced Imaging being particularly horrifying).
- skyebook 13y agoJAI was real bad.. JMF (Java Media Framework) was another one, which for a while had the unfortunate distinction of being the only reliable way of playing video on top of being poorly documented and turning into abandonware.
- coldtea 13y agoWith the exception of JodaTime, which is quite well designed, most of the third party libraries you mention or absolute shit. Apache Commons in particular is worse than ammateur hour work. And while the quality of the standard SDK varies, most of it is very good, and there are stuff that's solid gold in there, like Nio and Concurrency libs.
- ceautery 13y agoI've had good luck with Apache Commons. What specifically do you find objectionable about it? Also, you really shouldn't just drop "x sucks" into a conversation without backing it up with something reasonable. Or was this a well-crafted troll comment?
- coldtea 13y agoWell, regarding the "x sucks", I was responding to someone who advised people to "forget about pretty much the entire built-in standard library" lest you want to go insane. As for the Apache Commons, well where to start? It's been several years since I last dealed with them, on my Java days, but there were lots of issues. From the general overboard AbstractFactoryProxyFactorytis and overall OO fails (real example: DoubleListIteratorListIterator), to useless utility classes that replicate already existing SDK capabilities, to the lack of generics support for the collections (for a looooong time, don't know if they fixed this now) -- oh, and them not being compatible with Java collection interfaces either --, to lack of thread safety, to string output libraries blisfully unaware of the existance of encodings, and a whole lot more besides.
- agumonkey 13y agoFunny how in languages like python or clojure, the bazaar library eco system can be a fuzzy moving target daunting to control, while Java stdlib is on the other side of things, but too far, Guava, Apache Commons, Joda could have been made standard but it's not.