I hate this kind of post. It's the tech equivalent of "You're a stupidhead". If you want to criticize Java then at least make some meaningful points. Just off the top of my head: - Java logging is a clusterfuck - Something as simple as wanting symbolic links in a Maven build requires a third party plugin, last updated in 2007 (maven-junction-plugin) that requires something no longer in the central repo; - No lambdas…
The class combines no less than 6 concepts / design patterns: - Abstract - Singleton - Proxy - Factory - Bean - Interceptors It's not just a long name. The class makes sense in the context of this framework. The core problem (as others here point out) is that the Java flavor of OOP makes writing this sort of code idiomatic. On the upside, you feel really smart once you grok all these concepts simultaneously. After a…
Everything that's wrong with Java in a single class
61–70 of 159 posts
Re: Everything that's wrong with Java in a single class
#62Earlier quoted context omitted.
In his defense, I don't think the long class name is the problem he's pointing out.. it's the over-patterned, over-generalized nature of something that barely does anything. The class's description is "Convenient proxy factory bean superclass for proxy factory beans that create only singletons." Seriously? That's fucking hilarious.
Frameworks are not applications. By their nature they are more abstract. Don't judge the code as if it was something it's not.
Re: Everything that's wrong with Java in a single class
#63Earlier quoted context omitted.
In his defense, I don't think the long class name is the problem he's pointing out.. it's the over-patterned, over-generalized nature of something that barely does anything. The class's description is "Convenient proxy factory bean superclass for proxy factory beans that create only singletons." Seriously? That's fucking hilarious.
My favorite part is that the first word is "convenient." At the point that you need this class, absolutely nothing about the situation could possibly be considered "convenient."
"Added a new superclass because you wouldn't believe how hard it was to to create beans that create beans that create only singletons!"
Turtles all the way down.
Re: Everything that's wrong with Java in a single class
#64> "it's not java's fault" (from multiple comments) languages have opinions. Java is designed around the principle of "everything should be a class" which makes everyone's first instinct to have lots of mutable instances with lots of mutable member variables. Turns out this leads to shitty code in the large. Compare to Clojure, which supports mostly all the same features as Java, but emphasizes them differently. You c…
Clojure functions are Java classes. It's not much different from using a Java functional libs. Except that Java will probably be faster as Clojure still doesn't do primitives and stuff (not sure about that one, may be it already does) You can do all the functional stuff in Java, Clojure is doing exactly that. It will be more verbose, but once you learn the ropes it just looks different, it is not different.
it was a method i extracted from some old code somewhere else while i fixed a bug in it. the functional programmer in me sees opportunities to generalize (and prevent future bugs here), so i try to refactor it into a defaultdict and a higher order function, using guava. 20 minutes later I still don't have working code, i revert, curse the gods because this is a 30 second refactor even in python let alone clojure, and move on, i don't have time for this shit.
its not about it looking different. it doesn't matter that closures and objects are turing equivalent. its a syntax problem.writing functional java code has too much friction and is not worth it.
this is not even getting into how any hardcore functional code needs persistent data structures to be fast, which means a) you need to write your code against a 3rd party collections library instead of JDK provided implementations, and b) any interop with 3rd party code will now imply a conversion (copy) at the boundary.
Re: Everything that's wrong with Java in a single class
#65I hate this kind of post. It's the tech equivalent of "You're a stupidhead". If you want to criticize Java then at least make some meaningful points. Just off the top of my head: - Java logging is a clusterfuck - Something as simple as wanting symbolic links in a Maven build requires a third party plugin, last updated in 2007 (maven-junction-plugin) that requires something no longer in the central repo; - No lambdas…
In his defense, I don't think the long class name is the problem he's pointing out.. it's the over-patterned, over-generalized nature of something that barely does anything. The class's description is "Convenient proxy factory bean superclass for proxy factory beans that create only singletons." Seriously? That's fucking hilarious.
Re: Everything that's wrong with Java in a single class
#66The carryovers from C, and resulting insane behavior when mixed with Java's usual syntax are pretty hilarious, too. public int[] what()[] { return new int[0][0]; }
I've been coding in Java since it came out in 1995 and I never did that, didn't know you could or why you would want to. So what's your point? Java, C, C++, even C# are readable by average people like me. LISP, Haskell, Ruby, Scala, Smalltalk all look like they were written by aliens. If you really want to see something funny look at JavaScript code which combines integers and strings. Things that Java would complain…
Java, C++ and whatnot are imperative languages, of course the syntax is gonna be different to declarative languages such as Haskell or Lisp. They're also only alien at first; once you get used to a declarative syntax you never want to write imperative code again. It would be like going back to monochrome after experiencing color monitors.
We have some programmers at work who can't think outside the C++/Java/C# box. They also tend to be the worst programmers even after decades of experience.
Re: Everything that's wrong with Java in a single class
#67I hate this kind of post. It's the tech equivalent of "You're a stupidhead". If you want to criticize Java then at least make some meaningful points. Just off the top of my head: - Java logging is a clusterfuck - Something as simple as wanting symbolic links in a Maven build requires a third party plugin, last updated in 2007 (maven-junction-plugin) that requires something no longer in the central repo; - No lambdas…
Re: Everything that's wrong with Java in a single class
#68Earlier quoted context omitted.
What does that have anything to do with Java? It's the framework's problem.
Way, way, way too narrow. The Java standard library design and "framework meta-pattern" is what's being mocked here. It's java-the-community that we are laughing at via the straightforward label "Java". The fact that java-the-syntax or java-the-runtime can be used to code or deploy good software isn't really the point.
Re: Everything that's wrong with Java in a single class
#69Re: Everything that's wrong with Java in a single class
#70Earlier quoted context omitted.
Hey now. I find Javadocs to be among the easiest to read formats of all the different documentation styles. Right up there with Python's standard one (or whatever tool python's default library as well as numpy and scipy use), maybe even better.
Python's is far superior to Javadocs. JavaDocs is one of the earliest (popular) standard tools for documentation, so I'll give it that, but it suffers a number of problems - problems which are partly relics of the Java language, but that's no excuse. JavaDocs is too focused on documenting classes, rather than documenting functionality (Python docs, by contrast, focus on modules, which are themselves arbitrary chunks…