Live data from Hacker News

Everything that's wrong with Java in a single class

plus.google.com

11–20 of 159 posts

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

#11
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 not about naming. This class actually does what its name says. That's the best part. The methods and their JavaDoc descriptions are pretty hilarious as well.

And it's not about the language per se. (You can write clean, simple code in Java, but you would have to write it pretty much from scratch.) It's about Java culture, which encourages this kind of stuff.

And yes, I had been a Java programmer for many years. I used to like the language at some point. But several integration projects made me like its culture less and less.

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

#12
post #9
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.

This isn't a verbose naming convention. The name is actually quite succinct in describing what this encompasses. And that's precisely the issue.

But let's be clear - this class isn't a part of the core library that developers would use everyday.

It's a part of a third-party open-source library that implements a "dependency injection container". It's a pretty abstract concept to begin with - of course it's going to need to do high-level, head-in-the-clouds-type stuff that on first glance you think you would never need.

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

#13
If anything, that's an indictment of the Spring framework, which you certainly don't need to write Java. For instance, there are over 500,000 Java apps in Google Play market, and I'm pretty confident most of them don't use Spring.

Now if you wanted to criticize Spring and cargo-cult enterprise Java development, I think that's reasonable.

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

#14
post #8
post #6

Earlier quoted context omitted.

I think it speaks more to the community than the language (and arguably there is also no such thing as a community). After years of consulting I can't remember how many times I've walked into an Enterprise Java Shop(TM) to find TemporalSystemLoadOrganizers, IntransitPredeterminedApplicationUtilitySources, MetaphysicalManipulatitiveQuantityDisorderRecognizers only to find out that at the end of the day these abstract-…

Right, it's not the fact that you can name things poorly in any language, it's that non-descriptive, overly verbose word-jumble vomit is built and presented seriously and without irony as common practice.

Either it's the people who write Java, or something intrinsic in the design of the language itself that drives people to write code in this extremely verbose way. I've always leaned towards the latter...

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

#15
The thing is, it's not Java's fault. You can write good Java code. It can be small, and easy, and nice. The problem is the word Enterprise and the abusive abstractions that seem to come along for the ride.

Also, many of the abstractions start as good ideas, but they soon become a hammer and everything else becomes an AbstractNailFactoryInterfaceManagerProxy.

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

#16
As others have pointed out, this really should be titled "Everything that's wrong with Java culture ..."

For a more technically critical look at Java the language, I recently stumbled on this video while watching a Scala talk Martin Odersky recommended in the first few sessions of his new Coursera class... http://www.youtube.com/watch?v=hcY8cYfAEwU

It's pretty meaty, although it looks only at Java 1.0. Many of the criticisms aren't things I would have necessarily thought of first, and it gave me something to think about in terms of what my own priorities are. (For instance, the lack of first-class functions and closures gets no mention at all)

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

#17
You'll find this all the time in enterprise software, but not elsewhere from my experience.

This is a result of people reading their design patterns book and thinking they've mastered the world, but in reality it's just papering over the cracks of the deficiencies of Java.

I suspect once Java 8 comes out stuff like this will slowly disappear from the radar.

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

#20
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 add a point of flexibility here."

Obviously, people should be held responsible for building unnecessary abstraction layers like that. They waste time and are often wrongly abstracted, so when you do need to go in to refactor, you end up having to fight the pre-existing "what if" abstraction.

[1] http://c2.com/cgi/wiki?SecondSystemEffect

Post reply on HN