Live data from Hacker News

Hate Java? You’re fighting the wrong battle.

javacodegeeks.com

41–50 of 186 posts

Re: Hate Java? You’re fighting the wrong battle.

#41
I always had the impression that people that say they 'hate Java', usually don't hate "Java: the language". Most people that dislike programming in Java have a negative sentiment because of:

- the usage of XML (or now: annotations) to configure all of the tiny parameters that nobody really cares about

- a class hierarchy in which you have to jump to 20 levels of inheritance to get to where you want to go

- that a lot of Java developers aren't able to compile their application outside of Eclipse

- that people build in "flexibility" in form of factory methods but at the same time only have the factory only build the same thing over and over again

- that setting up java projects is usually an unpleasant experience with way to much work if you only want the basic functionality because there are no sane defaults

- that there is no proper package management for libraries (similar to something like 'gems' in Ruby)

- that all of the concepts that the language is missing was 'patched' in using reflection, injection and annotations

- that the language just seems stuck (for how long did the Java community talk about Lambdas by now?)

- that most Java libraries don't seem to be able to provide a simple example (compare to ruby, examples on the front page: nokogiri.org, sinatrarb.com)

Re: Hate Java? You’re fighting the wrong battle.

#43

I'm going to cite Steve Pavlina here: http://www.stevepavlina.com/blog/2005/07/how-to-get-from-a-7... Some snippets: A 7 seems very close to a 9 or 10, but often a 7 is a local maximum — you can’t get any higher by continuing to follow the same path that got you to that 7 in the first place. A 7 is pretty good. At this level you feel generally content. It’s OK, fine, acceptable, satisfactory. What you’ll find when yo…

I'm reminded of the first time I tried out Ruby on Rails. I had done some PHP, Perl, C, and Java programming before that. I had worked on some medium sized projects, but in general anything larger than a few dozen files got so complicated it was hard to keep track of.

Then I saw what a really good OO design was like. I learned what real separation of concerns and encapsulation could do. It was an epiphany that the programming I was doing wasn't nearly as good as I thought it was, despite everyone around me being proud of it.

I quit that job do my best not to look back.

Re: Hate Java? You’re fighting the wrong battle.

#44

I'm going to cite Steve Pavlina here: http://www.stevepavlina.com/blog/2005/07/how-to-get-from-a-7... Some snippets: A 7 seems very close to a 9 or 10, but often a 7 is a local maximum — you can’t get any higher by continuing to follow the same path that got you to that 7 in the first place. A 7 is pretty good. At this level you feel generally content. It’s OK, fine, acceptable, satisfactory. What you’ll find when yo…

... and yet Steve Pavlina was a Windows developer. Do we have to quote cult leaders on Hacker News? Steve Pavlina is the guy who writes blog posts about winning blackjack through ESP. His wife is a professional psychic. He sells magic CDs for hundreds of dollars that will give you psychic powers when you listen to them in bed. There's no credibility to be found here.

I'd rather we consider what's being said rather than who is saying it.

Re: Hate Java? You’re fighting the wrong battle.

#45

Java is the default language in the best selling phone platform, Android. For that reason alone it will remain relevant for a long time. I know Android can run other JVM languages, but until the platform becomes stabilized (meaning most big security holes are filled, new non-trivial features are rare) there won't be a push to make non-Java languages a first class citizen.

You are eliding the difference between selling a lot of devices and selling a lot of apps. I notice this ecosystem over here that's running on Objective-C that's doing a very good job of selling apps and directing money towards developers.

Android is certainly going to help Java remain relevant, but this is another example of how it isn't highly compatible with the entrepreneurial mindset. The Android app ecosystem isn't as good at rewarding independent app developers as the iOS app ecosystem is. So people who, in entrepreneurial fashion, want to be judged by the market, will probably make iOS apps because that's where the money is. I argue that that'll produce a 'brain drain' away from Java - Java will be the language a day job makes you use, and something else will be the language you use for projects that you care about.

The projects that people care about, in the long run, are far higher-quality code than the projects that they only do for a paycheck.

Re: Hate Java? You’re fighting the wrong battle.

#46
post #32
post #8

So, which battle are Java haters fighting? Java is mostly-ubiquitous and is "good enough" for a number of common tasks, and has good enough structure for mediocre programmers working on important-but-uninteresting problems. As a result (and the blog author says this), there is enough hate-worthy Java code there, just as there used to be enough hate-worthy C and C++ code around, and there probably is enough hate-worth…

I definitely agree with your sentiment. If you're working on your own personal projects/startup, most of the time you aren't gonna choose Java, but another language whether it be Python, Ruby, etc. But if you're in a corporation, you don't have the flexibility and freedom to choose what you want to work for. This association of corporate life with Java contributes to people's hatred of using Java. I bet if corporatio…

> This association of corporate life with Java contributes to people's hatred of using Java.

This association happens because the wrong people are defining which technologies will be used. When a manager makes manager-ish decisions, Java is what you get. Or Windows and .NET.

> I bet if corporations started using Python, more and more people would hate Python

Won't happen because

a) Python is actually good b) The same people who make manager-ish decisions won't pick Python.

> When I actually used Java in one of my first personal projects,

I too had a more optimistic opinion of Java when I started playing with it. But then I remembered how it felt to program with Smalltalk (I learned OOP with it, later played with Actor on Windows). Then I met Python, and Zope and realized web development doesn't need to suck.

The company I work for maintains several Java applications and a couple PHP and Django ones. The difference of productivity from the Java projects and the Django ones is absolutely shocking.

Re: Hate Java? You’re fighting the wrong battle.

#48
post #31

Blub programmer telling why you should program in Blub.

Almost everyone is a Blub programmer, including pg who coined the term: The interesting thing about Blub programmers is that they do not know they are Blub programmers.

Indeed. Python is my Blub; it's just so darn easy and it has enough functional capabilities that I haven't yet felt compelled to throw out everything I know and start with Haskell or Clojure.

Re: Hate Java? You’re fighting the wrong battle.

#49
Maybe it's not surprising that a mainframe programmer completely fails to understand the debate.

His list of four reasons people hate Java completely misses the point. The real reasons people hate Java are something like this:

1. It's verbose, providing lots of unnecessary opportunities to add bugs, and because it's verbose, reading code written in it is slow, so modifying it is slow. These are constant-factor problems, though, not order-of-growth problems.

2. It's early-bound in some important ways, so you're faced with a constant dilemma between adding even more verbosity, making the code harder to modify, and losing flexibility, making the code harder to modify.

3. Although it's quite CPU-efficient, it's very wasteful of memory. (You'd think a COBOL programmer would appreciate this.)

4. The tooling around the language imposes enormous overhead. The JVM takes a second-plus to start; Eclipse uses hundreds of megabytes of memory, if you can get it to work at all; you usually want to run your servlet container behind a reverse proxy; building and deploying a .war file is just orders of magnitude more pain than hitting "reload" after you update your PHP script.

There's another missing-the-point viewpoint shift here, too. This guy seems to think that the point of programming is to enable big businesses to continue to function, like bookkeeping, factory machinery maintenance, and executive team retreats at fancy hotels. Well, programming does do that. But it's also a medium of expression, and a competitive advantage for companies doing new things.

Bookkeeping relies on arithmetic, and factory machinery maintenance relies on paint, but that doesn't mean that Erdos and Picasso were "fighting the wrong battle" because they failed to apply their talents to helping out poor GM.

Post reply on HN