Live data from Hacker News

Stop hating Java

andrzejonsoftware.blogspot.com

91–100 of 158 posts

Re: Stop hating Java

#91
First, let me point out that once again we are comparing Java - a runtime, a language platform and an entire ecosystem comprising many frameworks - with Rails, a specific web framework designed with a specific philosophy (opinionated defaults that work in 90% of cases, YAGNI, etc.) for a specific range of uses ("rapidly prototyping a small-to-moderately sized web site").

So just because Rails developers hate something doesn't mean it's generally evil. It might just be wrong for Rails. Many things are; otherwise Rails would have no texture. Saying no to things is what design is about.

Now let's talk about hate. Everyone hates something. There is nothing wrong with hating things. Hate is just personal taste turned up to eleven. You should strive to hate politely and with grace, to realize that other people love the things you hate and are nonetheless human, and probably even smart. And you should strive to remember that there's an important difference between the things you hate and things that objectively suck. Java, for example, does not suck. Not always. Lots of work has gone into it. Lots of Java-based tools are essential. There are big classes of problem for which Java is currently the best solution.

Nonetheless, I hate Java. It is a handy mental shortcut, one that has yet to lead me astray. My belief is that the problems for which Java-the-language is the solution are problems I don't want to work on, and that I don't have enough time in my life to address the problems I do want to work on, so I should simply develop a Java allergy that kicks in whenever I see the generics syntax and that causes my eyes to water until I flee towards fresh air. It works well.

(What's sad is when you find yourself hating something that is smack-dab in the middle of a set of problems that you want to work on. Hello, PHP! This requires a much richer set of coping techniques than simple allergic avoidance.)

(And, of course, Java is not just a language, and JRuby appears, from the outside, to be awesome, and my curiosity about Clojure is rising, so I may soon temper my simple hatred of Java into a rich melange of love and hate. The stuff of which novels are born, really.)

Re: Stop hating Java

#92
What's the general consensus in the HN community regarding GWT? We're pretty happy with it and I think it has a lot of advantages over other frameworks.

Re: Stop hating Java

#93
post #67

Another reason to stop hating on Java is that in a lot of cities, it would be a fool's errand to assemble another kind of dev team. Like Ruby? Great. Good luck building a team in Omaha. Skills go where the jobs are: http://www.indeed.com/jobs?q=ruby&l=Omaha%2C+NE = 11 jobs http://www.indeed.com/jobs?q=j2ee&l=Omaha%2C+NE = 101 jobs Bottom line: if you expect to hire developers, in most places, you'll want a language w…

Unless you have horrable retention issues highering someone who does not know the language your using is not that big of an issue. Taking a C# ASP.NET developer > Ruby on rails is faster than bringing a Java developer who knows nothing about the web into a large Spring/Struts project.

Re: Stop hating Java

#94
post #58

Java as a language is decent. It's boring. It is stagnant. I expect very little of it. Java EE is an atrocity and it is just an over-enginnered pile of garbage. Try play framework. I just finished a webapp in play and the whole experience has been awesome. IntelliJ + Play + MongoDB is AWESOME. I haven't messed with the Scala version, but I can imagine that Scala + Play is even more interesting. Either way, Java EE/EJ…

Play! Scala is really, really, really cool. The major downside--drink if you're expecting this one, folks--is the recompile time. Building an app is just so bleeping slow. But writing it? Very nice, aside from the somewhat iffy SQL layer. (I'm not a huge ORM fan, and the process of actually writing SQL through Anorm can be problematic.)

Have you tried jrebel to cut your compile time? It might ease some of that pain.

Re: Stop hating Java

#95
post #58

Earlier quoted context omitted.

Play! Scala is really, really, really cool. The major downside--drink if you're expecting this one, folks--is the recompile time. Building an app is just so bleeping slow. But writing it? Very nice, aside from the somewhat iffy SQL layer. (I'm not a huge ORM fan, and the process of actually writing SQL through Anorm can be problematic.)

Have you tried jrebel to cut your compile time? It might ease some of that pain.

JRebel isn't applicable to Play - Play (both when running Java and Scala) hosts its own compiler. In dev mode, when you change a .java or .scala file, it recompiles it and reloads it on the fly.

Which is why Play is freaking awesome--well, one of the reasons.

Re: Stop hating Java

#96
post #58

Earlier quoted context omitted.

Play! Scala is really, really, really cool. The major downside--drink if you're expecting this one, folks--is the recompile time. Building an app is just so bleeping slow. But writing it? Very nice, aside from the somewhat iffy SQL layer. (I'm not a huge ORM fan, and the process of actually writing SQL through Anorm can be problematic.)

For our app, we went straight up MongoDB driver. We didn't mess with an ORM at all. We still have our objects that end up mapping to Mongo, just not using a 3rd party lib. It's actually a really clean and enjoyable experience.

Huh, didn't think of that. I'll have to try it. Thanks a lot.

Re: Stop hating Java

#97

I think a lot of the Java hate is because of the architecture astronauts who hijacked the language in the last decade - J2EE/EJB, the GoF, FactoryFactoryFactory shit and so on. I remember seeing the earlier versions of the servlet API and it was very elegant and well designed; unfortunately once the astronauts were through with it writing Java web apps became such a form of mental torture (Struts, anyone?) that even…

... architecture astronauts who hijacked the language in the last decade - J2EE/EJB, the GoF ... Thank you for writing this. When I first read the GoF Design Pattern Book I thought "this is the reason, why the code in my project is bloated, unmaintainable and shitty".

I've worked in shops where GoF ruled. Everything was a factory, even the things that /weren't/ factories were being /called/ factories, and there were zillions of singletons peppering the landscape.

"You've got a singleton class with a single method and no members . . . why don't you make this thing a function?"

"Uh, it wouldn't be a pattern then, would it. Um, would it?"

And the XML. Oh, dear Lord. I have a doctor's slip now stating that I am allergic to XML and that's the reason I'm breaking out in hives, whooping for air and leaving the room.

I sometimes wonder what would have happened to the software industry if the entries in GoF had been written in a different order. Would we see a plague of Visitors and Observers?

Re: Stop hating Java

#98
I have a question...

The article states:

... Whenever you needed a pluggable system in your code you had to abstract away some concepts in order to make it work. Ruby lets us do it much easier and that’s cool. ...

Can someone give a concrete example of this?

Re: Stop hating Java

#99
“If you drop static methods, then welcome to Java and its billions of useless factories.”

And if you use them everywhere, then welcome to Rails, where to service more than 1 request at a time you actually have to run multiple instances of the whole app behind a balancer.

Re: Stop hating Java

#100
Job search in New York City on Dice.com: Java - 2698 Ruby - 204

Even within the Ruby jobs, the majority have a Java requirement within them as well.

Been hearing Ruby aficionados for like a decade, but sorry, it just hasn't penetrated.

Post reply on HN