Live data from Hacker News

Everything that's wrong with Java in a single class

plus.google.com

151–159 of 159 posts

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

#151
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…

>> No lambdas yet;

> True, but if you really need them use Groovy or Scala. Groovy 2.0 is almost as fast as Java and Scala is fun.

> Groovy, Scala and the favorite kid on the block, Clojure

Java's upcoming lambdas will have lazily-evaluated results from its map, filter, reduce, etc lambdas. Both Scala and Clojure already have their lambdas/functions return lazily-evaluated results, but certainly not Groovy, neither version 1.x nor the just-released version 2.0.4. Groovy's closures only return strictly-evaluated results.

In fact, 2.0.4 was released only 2 weeks after 2.0.2 to fix "some important issues with generics with the stub generator, as well as several related to the static type checking and static compilation features". (Version 2.0.3 was skipped because "it was mistakenly built with JDK 6 instead of JDK 7".) It may be "almost as fast as Java and Scala" but it certainly isn't fun or production-ready.

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

#152
post #106

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.

It reminds me: "Why I Hate Frameworks" http://discuss.joelonsoftware.com/default.asp?joel.3.219431

Hah. I'm not saying Spring is a good framework, I don't know it that well. But try building an app without any framework at all. Getting frameworks right is hard - they need to be abstract enough to be flexible, but not so abstract that you end up with a "general-purpose tool-building factory factory factory" when you want the framework to give you a hammer.

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

#153
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…

Just out of curiosity, why do you think checked exceptions are bad?

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

#154

Earlier quoted context omitted.

I can assure you I wouldn't name that class. But honestly, I'm kidding around. I'm not arguing the class is silly, or poorly named. I bet it's perfectly named. I'm not arguing the author did a bad thing here, I'm sure he or she did something awesome. All I'm saying is that the context that makes writing that class description necessary is totally hilarious. Let's just agree on that. It doesn't mean Java sucks or Spri…

The context makes it entirely appropriate. A FactoryBean allows you to construct complex objects, or construct objects Spring can't easily create itself (e.g. JndiFactoryBean). A ProxyFactoryBean builds Spring AOP proxy beans. As it turns out, there was no need for the class as it has been deprecated. However, providing an abstract singleton scoped proxy factory bean is indeed convenient. If there was a need for a fa…

For the record, I spent 10-12 years coding Java (the last 4 or so w/ Spring). Lots of OOP, lots of pattern based enterprisey big boy stuff. I definitely have a solid (but atrophying) understanding of the concepts. I get that they're the right way to do big Java apps. But Java makes implementing them fucking laborious. Back when that was all I knew, it seemed elegant and I was used to the scaffolding.. but the truth is that in a number of other languages the same patterns require so much less scaffolding and even thought, that we don't even notice them. They're a given.

I give my users vastly more value-per-line-of-code now than I ever did writing Java.

That said, I have nothing against Java or folks that enjoy doing it... but even when it was a language that I was knee deep in and stoked on, I was able to laugh at some of the shark-jumping complexity of these cartesian products of patterns that would arise.

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

#155

Earlier quoted context omitted.

If I wrote that it would have been downvoted to - points range by now.

I'm a swell guy, that's why I don't get as much hate (?)

My comment was about the content or lack thereof of your comment. It wasn't personal. So do down votes indicate people hate people on Hacker News? I don't hate anyone. Is it an attempt at humor to suggest I'm hated? If anyone hates I feel sorry for them, I hate no one.

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

#156

Earlier quoted context omitted.

The context makes it entirely appropriate. A FactoryBean allows you to construct complex objects, or construct objects Spring can't easily create itself (e.g. JndiFactoryBean). A ProxyFactoryBean builds Spring AOP proxy beans. As it turns out, there was no need for the class as it has been deprecated. However, providing an abstract singleton scoped proxy factory bean is indeed convenient. If there was a need for a fa…

For the record, I spent 10-12 years coding Java (the last 4 or so w/ Spring). Lots of OOP, lots of pattern based enterprisey big boy stuff. I definitely have a solid (but atrophying) understanding of the concepts. I get that they're the right way to do big Java apps. But Java makes implementing them fucking laborious. Back when that was all I knew, it seemed elegant and I was used to the scaffolding.. but the truth i…

That's sort of the point of the class in question: use it derive your own class an you've extended the Spring framework...

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

#157

Earlier quoted context omitted.

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.

Indeed, the class isn't hilarious. Perhaps the class name initially boggles the mind, but when you learn what it does not only does it make sense, but you probably would be hard pressed to find a better name!

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

#158
post #4

I'm not sure how one framework developer's naming choice (a framework which by the way, needs to do some pretty meta things in regards to creating factories for other factories, and which is using the term "singleton" to mean something different than usual) is a criticism of an entire language. You can come up with ugly names for classes in any language.

It's the remnants of the late 90's early 2000's software development overengineering disease, so aptly captured in the mess that was J2EE. Similar to "nobody got fired for buying IBM", the mindset was that "nobody got fired for building layers of abstraction just in case." It's the culmination of the second system effect.[1] Without a pervasive unit testing culture, the big enterprise answer to "what if" is "let's ad…

That argument works well for application code, not so well for frameworks as you can never be 100% sure how it will be used.

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

#159

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

Given that Spring is mostly used via annotations or config files, yes this is indeed useful. It helps to know what you are criticising before you show your ignorance. A factory bean is a class that creates factories. You'll almost never need to create your own as you normally use the ones Spring provide for you. And with annotations, you'll likely never even notice them. A proxy factory bean is used for Aspect Orient…

Stop it! You're killing me! I can't breathe!
Post reply on HN