Live data from Hacker News

Stop hating Java

andrzejonsoftware.blogspot.com

151–158 of 158 posts

Re: Stop hating Java

#151
I am not in the mood to defend Java, but I would like to give a tip to people who keep mentioning J2EE: J2EE is from a bygone era; learn to say Java EE 6, which is better (although JPA 2 is really the only part I like) and take J2EE out of your vocabularies. Discussing J2EE kind-of makes it sound like your knowledge is out of date.

Also, Scala and Clojure are wonderful languages so I don't understand some of the negative comments about them.

Re: Stop hating Java

#152

dammit its a tool, whats the big fuss about. People can act so juvenile some times.

I'm with you. We all have our preferences. Use whatever tools makes you feel more productive. Ideally all of your code should be language agnostic. An algorithm is an algorithm in any language. While developing programs I've found that coding itself takes the least amount of time, is figuring out the algorithms, overall architecture, and debugging that takes most of the time. The coding part is the easy part.

I do agree that Java has some junk in it, but you don't have to use it. I'm sure I could say the same thing about any language though. I still prefer Java though.

Re: Stop hating Java

#153
post #86

We seem to have a rather short institutional memory. It wasn't that long ago (Java's only as old as Ruby) that Java was new and hailed as a savior from C++ and C. Java was widely seen as a great language, or at least a language that presented a great improvement over the existing mainstream languages. It gave GC to the masses for the first time. It delivered standard-sized primitives, an (almost) everything's-an-obje…

> Java has a lot of issues, but in the grand scheme of things, it's a pretty good language. Definitely not. Especially not in this day and age. Java has a pretty good language, java has a good ecosystem, java has a passable standard library, but in 2011 java is a crummy language.

dammit fingers. Java has a pretty good runtime.

Re: Stop hating Java

#154

dammit its a tool, whats the big fuss about. People can act so juvenile some times.

I'm with you. We all have our preferences. Use whatever tools makes you feel more productive. Ideally all of your code should be language agnostic. An algorithm is an algorithm in any language. While developing programs I've found that coding itself takes the least amount of time, is figuring out the algorithms, overall architecture, and debugging that takes most of the time. The coding part is the easy part. I do ag…

It is not easy to avoid the nasty pieces of "factory factory" patterns if the people who you have to work with think it is a great idea. The problem is not peculiar to Java. I spend most of my C# time stepping through OPF (other people's factories) before hitting the code that actually performs some work.

Re: Stop hating Java

#155

Earlier quoted context omitted.

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

You are right. The GoF only promoted bloated code. Who in their right mind would use patterns like the Observer, the Adapter, or the Visitor? Not sure if you know the history, but the authors of the book really only collected the patterns that they had seen around them in Smalltalk and C++ code. They wrote a catalog so we could all refer to the same name instead of using different names for the same concept. They ide…

No sarcasm necessary.

I am pretty convinced that GoF did not expect how popular their book may become. Looking back, it is always easier to judge.

Looking back, with no offense to GoF, what happened can be understood. GoF did a great work for all these "I badly need to sell something new and hot to all these saturated development shops" guys. Read the pattern book once, teach it a hundred times for 2000$ a person. Great stuff.

Now, of course it is due to the single developer to use patterns or not. But the average developer is - well average. Using a pattern is much easier than to understand, when to use and when not to use.

I indeed should have been more precise in my statement: our code got bloated and unmaintainable because there are pattern all over. This is not GoFs fault, it is the fault of all the developers who just read the book and want to apply everything instantly, everywhere. It is also the fault of the community, who did not recognize at once, that pattern should be used only, if they solve a problem that is hard to solve without patterns.

Re: Stop hating Java

#156

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.

I can't speak for others, but I hated it. The people I know who liked it were the ones who were scared of JS because they didn't know it very well. The problem with GWT is that if you want to do anything semi-complicated you end up needing to write native JS anyway. So you end up with an ugly cludge of an app written in two different languages and cobbled together with a JNI-like mechanism. I also had a ton of troubl…

Regarding the debugging features, I think things have gotten a lot better. Debugging is done in Eclipse and you're debugging java, not javascript (if that wasn't clear to some). It honestly works really well. I think there are also quite a few benefits other than type-safety. Easy implementation of asynchronous calls that serialize Java objects is one example.

GWT does have its drawbacks, but we do a lot of complex work in it with very minimal native javascript and support a site with hundreds of thousands of active users.

Re: Stop hating Java

#157
post #128

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.

I still can't believe GWT is not an April Fools joke, and I'm stunned that anyone ever took it seriously.

Please elaborate. So many people on HN love their newest language of choice and overlook frameworks like this because it isn't as sexy. As I mentioned in my previous comment, we have a pretty large site by most standards and are happy with GWT.

Re: Stop hating Java

#158
post #127

Earlier quoted context omitted.

I have maintained Java apps running on FreeBSD servers, it was a nightmare. And don't even dream of doing that in OpenBSD (which IMHO is the sanest BSD and even nix around).

What kinds of problems did you run into? I've deployed onto primarily Solaris and various flavors of Linux with no problems, but don't have much experience with *BSD... though I've generally assumed it would be a similar experience.

Problems like having to patch and build your own Java runtime because (if you are lucky and there is a working one) because Sun made it illegal to distribute modified Java distributions that had not passed the test-kit, and everyone should know that Sun/Oracle do not give access to the test-kit to anyone that doesn't pay them a ton of $$$.
Post reply on HN