Live data from Hacker News

Java Developers

nsainsbury.svbtle.com

21–30 of 321 posts

Re: Java Developers

#21
post #5

There is a lot of Cargo Cult programming going on among Java developers. Why using a simple constructor when you can use the factory design pattern? Or why directly instantiating a logger using the "new" statement and the right arguments, when you can also configure it using xml files? Making use of design patterns and frameworks is professional, after all, isn't?

Hard coded logger instantiation in a library is anti-pattern. Whoever is using your library usually has his own opinions on how much of your stuff he wants in logs.

Re: Java Developers

#22

> The OO craze has a part to play in this madness as well. More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit. Once real systems (like UI frameworks) are written with FP, we can compare apples to apples. Until then...wtf? OO actually works well for scaling complexity, much better than toy immutable functions do. > Even today you’ll still find a strong b…

There seems to be an implication in your comment that people aren't using FP to write "big serious programs". Is that really what you are implying?

Re: Java Developers

#23
post #22

> The OO craze has a part to play in this madness as well. More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit. Once real systems (like UI frameworks) are written with FP, we can compare apples to apples. Until then...wtf? OO actually works well for scaling complexity, much better than toy immutable functions do. > Even today you’ll still find a strong b…

There seems to be an implication in your comment that people aren't using FP to write "big serious programs". Is that really what you are implying?

In that domain, yes! How many UI frameworks are functional (beyond I think...Om?)?

Re: Java Developers

#24

A lot of these bloated patterns that got popular in the Java world have shorter, simpler alternatives when programming in a functional style. You often don't need multiple child classes to implement a template method if you can just pass a function to the constructor. You don't need a BananaFactory if you can just inject a createBanana function. Remarkably many Gang of Four design patterns are unneeded once you can p…

I don't think Android supports Java 8, though.

I thought there was some work to support Lambdas in ART?

Re: Java Developers

#25

I disagree with this, as a part time Java developer (I do C# most of the time). The points I disagree with: 1. OO is bad . Every paradigm is bad if you misuse it. If you build deep abstractions then you will hang yourself regardless. Some very elegant and simple designs can emerge from OO code, but only if you think about the problems first. The majority of pain consists of forgetting to do that step. There is no mag…

Some of the complaints about the over-formal language is a matter of taste, perhaps, but it does grate and is not a new complaint (see also: the Kingdom of Nouns rant). However Java developers are learning (or migrating to Scala/Groovy/Clojure). And there is hope -- the Play framework, for example, is an example of Java done right (imho). Spring 4 is moving in the right direction.

The Java variety of the Play Framework is indeed pretty decent. Last time I worked with it however, it had to some really hacky stuff to work around deficiencies in Java (7).

Re: Java Developers

#26
Java can be really glad that there is Google with Android. Otherwise this language would be a strong enterprise focused language with very bad reputation on the end user side.

Re: Java Developers

#27
I've been using Java for about 15 years and largely agree with the article. The verbosity of the Java language is definitely part of the problem, although that aspect is downplayed in his blog post. I agree with the author about the culture. Java programmers in general seem to be on some sort of design pattern frenzy, especially in the better known frameworks. It doesn't matter if you're writing a fancy framework or writing a trivial app to process a file, chances are you're going to see layer upon layer of over-engineering.

I switched to Scala a couple of years back and have never been happier. Only part of the improvement is due to the language the other part is not having to deal with Spring, builder patterns, and madness like AbstractSingletonProxyFactoryBean [1]. My impression has been that the typical Scala developer has had lots of Java exposure and has learned from their experiences.

[1] http://docs.spring.io/spring/docs/2.5.x/api/org/springframew...

Re: Java Developers

#28
Can't agree more.

The problem is not the language itself, rather who uses and whats the culture associated with it.

Java is mostly used in the enterprises, where unfortunately thest "architects" exists. Architects are nothing but people have grown out of the roles and in a way of organization recognizing the peoples talent. Most of the times the Architects are redundant.

Most of the cases use of Java is nothing but writing your business logic into the Java code.

Unfortunately, architect to justify himself would try to engineer a solution, which never needed engineering itself. and down you go in the rabbit-hole of oops and abstraction.

Unfortunately it will be pretty hard for Java to shake up this image.

Re: Java Developers

#29

> The OO craze has a part to play in this madness as well. More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit. Once real systems (like UI frameworks) are written with FP, we can compare apples to apples. Until then...wtf? OO actually works well for scaling complexity, much better than toy immutable functions do. > Even today you’ll still find a strong b…

Actually there are "real systems" being written in FP e.g. Clojure @ SoundCloud.

They just aren't architected the same way. Instead of a monolithic WAR you end up with a series of micro services. FP is actually more suited than OO for micro services since it naturally forces developers down the "do one thing well" approach.

So I would stop with the "OO is what real people use" nonsense if I were you. Because languages like Scala and Clojure are rapidly taking over from Java in the enterprise space and you may find yourself on the wrong side of history.

Re: Java Developers

#30
The real problem is developers not understanding Object Oriented programming. Many developers write procedural style in Java or any other OO language. So you get God classes, methods that are hundreds or thousands of lines long etc - I'm sure we've all seen those horror shows. It's just a lack of education coupled with a culture where there is no strive for technical excellence.

You need high quality developers in Java, just as you do in any other language.

It seems like the article's beef is with OO programming, not Java per se.

Post reply on HN