Live data from Hacker News

Everything that's wrong with Java in a single class

plus.google.com

131–140 of 159 posts

Re: Everything that's wrong with Java in a single class

#131
post #32

My favorite joke in that vein is "I had a problem and thought to use Java - now I have a ProblemFactory"

More likely just one implementation of IProblemFactory.

Given that's a .NET naming convention and not what is encouraged by Oracle, I think that unlikely.

Re: Everything that's wrong with Java in a single class

#132
post #76

Earlier quoted context omitted.

Really? Obviously no single class is that ridiculous (hence the title of the linked article ). But that nonsense is pervasive in Java, and largely driven by the standard libraries (less so the core stuff as the more peripheral layers). I specifically remembering Swing being introduced with all the MFC goodness and noticing that they'd defined and implemented a "Model" class to track state for ... a button.

You won't find anywhere near this level of abstraction in the standard library, at least not that I am aware. The Java culture is understandably implicated by this though, because Spring is not some niche framework being perpetrated in some fringe corner of the Java-verse. It is very much the mainstream of Enterprise Java. Of course there are lots of Java developers outside of that set who are doing great work. And a…

Last I checked, the standard library wasn't trying to implement an IoC container. Your comment is actually fairly amusing, given that Spring was developed originally as an answer to the overly abstract mess that was the original version of Enterprise JavaBeans.

Interestingly, things like @Inject came after Spring, and were inspired by Spring and a number of other containers.

Re: Everything that's wrong with Java in a single class

#135

Earlier quoted context omitted.

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

Oh totally. I'm enjoying believing that this commit was part of a patch submitted with the explanation: "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.

Yeah, that would be amusing if it was accurate. Only that's not what it does. It is actually a way of extending the bean creation part of the framework that produces singleton scoped proxy objects.

I'm curious: what would you name that class?

Re: Everything that's wrong with Java in a single class

#137
post #22

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…

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.

Seriously? That's fucking hilarious.

Only if you isolate it from all context. Within the context of how Spring is built and works, it's all perfectly reasonable. As cletus said above, if someone is going to slag Java, they should really pick something to pick on that is actually deserving.

Re: Everything that's wrong with Java in a single class

#138

Earlier quoted context omitted.

Frameworks are not applications. By their nature they are more abstract. Don't judge the code as if it was something it's not.

Totally. I've worked on some frameworks, and I get that things get hairy supporting some really crazy general and re-useable concepts. I'm not even saying Spring is shitty, or Java is shitty or anything. I don't really care... but don't you dare tell me that class isn't hilarious, because it is.

I don't really care... but don't you dare tell me that class isn't hilarious, because it is.

I don't see anything hilarious about it.

Re: Everything that's wrong with Java in a single class

#139
post #67
post #22

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 title should have been "Everything that is wrong with Spring ... ". Then it would not have been especially accurate, but more accurate. I like Java better than I like Spring. Spring made a framework out of an idea, but not all ideas should be packaged. Ideas can also be embraced. Dependency injection is an idea that should be embraced, but not as a packaged solution. It is a pattern, not a a software project.

It is a pattern, not a a software project.

So you'd rather see every project that wants to use DI, roll their own DI implementation?

Re: Everything that's wrong with Java in a single class

#140
post #109
post #22

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…

> Java logging is a clusterfuck Care to explain? Logback is easy to configure and extremely efficient > 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; If you are still using Maven it's your problem. Switch to Gradle and your life will be much better. > No lambdas yet; True…

> Care to explain? Logback is easy to configure and extremely efficient

Logback != "java logging". "Java logging" is some messy combination of JDK logging, Logback, Log4j, Commons Logging, SLF4J, some cruft that fell out of Avalon or Fortress or whatever it was, etc. And then you try to use a library that uses Commons logging alongside another library that uses log4j directly, alongside your code, which really wants to use SLF4J... or you deploy your code, which uses log4j, into JBoss, which configures it's own hacked version of logj4 before your code loads, and you run into needing to figure out RepositorySelectors...

You'd be better off reading from Ludvig Prinn's De Vermis Mysteriis, Friedrich von Junzt's Unaussprechlichen Kulten and the Necronomicon. Ia! Ia! Cthulhu fhtagn! Ph'nglui Mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!

Post reply on HN