Live data from Hacker News

Hate Java? You’re fighting the wrong battle.

javacodegeeks.com

161–170 of 186 posts

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

#161
post #80

Earlier quoted context omitted.

Java is so popular, easy to learn and use that there are tons of terrible frameworks and bad programmers in the community. Rebel against it all you want but in the hands of great developer you can get pretty amazing software written in Java like Hadoop, HBase, Lucene, Cassandra, etc. Java is the assembly language of the JVM and since most of the cooler new languages are on the JVM (and written in Java often) it will…

Bytecode is the assembly language of the JVM. Java is the Java of the JVM.

The differences between Java and its bytecode are pretty small. There are only a couple things that you can do in bytecode that you can't do in Java source and they are mostly irrelevant.

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

#162

Earlier quoted context omitted.

Java is so popular, easy to learn and use that there are tons of terrible frameworks and bad programmers in the community. Rebel against it all you want but in the hands of great developer you can get pretty amazing software written in Java like Hadoop, HBase, Lucene, Cassandra, etc. Java is the assembly language of the JVM and since most of the cooler new languages are on the JVM (and written in Java often) it will…

"As for your points in here. Most of them I can respond with "don't do that"." The problem is if you are writing Java, you are probably working with people who do do that.

Since we were talking about Java and not bad engineering management and poor design choices, I thought I would point out that programming in Java doesn't have to be like that. Perhaps I should call it Java!EE.

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

#163
post #94

Earlier quoted context omitted.

I've written a lot of code in F# and I have to agree that writing business software in a functional language has a little bit of a learning curve but once you figure out how it's done it's much easier.

please blog?

Hacking on rails these days, probably won't go back to F# for a while.

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

#164
post #95

Earlier quoted context omitted.

I never said all, I said most. Lucene, Hadoop and Cassandra are in the minority.

I doubt that Java open source projects are in the minority. GitHub [1] is far from a representative sample of the whole FOSS activity. [1] https://github.com/languages

That's funny, apparently I'm getting downvoted repeatedly for having the nerve to say that FOSS Java projects are not a minority. The irony is that I left Java behind for Python seven years and never looked back.

If I was taking this votes/points/karma thing seriously I would be rather pissed, now I'm just laughing at the rabid fanboyism.

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

#165
post #72

Earlier quoted context omitted.

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 pr…

What about the language you are using enforces real separation of concerns and encapsulation that Java doesn't have? Seems to me that those principals are not a quality of a language per se but of design principles that can be applied to any language (maybe some easier than others).

Presumably, Periodic was referring to Rails' emphatically opinionated framework, which (under the right circumstances) can shine a light on at least one approach to SoC that may, in turn, lead to a deeper understanding of the underlying principles.

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

#166
post #46
post #32

Earlier quoted context omitted.

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…

You really don't think Python is reaching the point where a manager type would be comfortable with it? It's mature, it has tons of libraries, it's used in all kinds of successful projects. I really don't know. It just doesn't seem anything like a high-risk choice to me.

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

#167

Earlier quoted context omitted.

In what way is Java more object oriented than Ruby? In Ruby, everything is an object. There's nothing like Java's glaringly out of place "primitive data types". Not to mention that late binding is one of the qualities Alan Kay listed as being central the the meaning of the concept "Object Oriented Programming".

In Ruby you can write in a functional style. Can't do that as easily in Java. Java enforces a more pure OO style.

I could be off-base, but your thinking seems to be, essentially, "More buzzwords can be applied to Ruby, while 'OO' is the only one that applies to Java, so Java must be more purely OO." This is not a very accurate view of the two languages.

Ruby's support for "functional" programming essentially comes down to its ability to encapsulate code in closure objects and the core libraries' pervasive support for these code-objects, called "blocks." But there's nothing about blocks that's anathema to OO. Ruby's blocks are ripped off wholesale from Smalltalk, one of the pioneering OO languages and the one that coined the term "object-oriented programming." Blocks are objects. You can send messages to them, store them in arrays, etc.

Ruby is very similar in general to Smalltalk, much more so than Java. It's also very different from a real functional language like OCaml or Haskell, and trying to write a program as though it were one is an exercise in frustration.

Here are some aspects of Ruby that are more strongly OO than Java:

• Classes are objects — they have methods and instance variables and can be used anywhere another object would be used.

• Due to classes being true objects, class methods can be overridden. In Java, class methods are pretty much just namespaced functions. There isn't even a self/this in Java's static methods. That is totally broken OO — Ruby does it right, Java does it wrong.

• Every type in a Ruby program is an object type. In Java, some types are objects and some aren't. For many types in Java, there are both object and primitive variants. I'm not commenting on whether this is good or bad, but having non-object types in your language is not pure OO.

I would be hard-pressed to come up with similar counterexamples that show Java to be more in line with OO principles than Ruby.

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

#168

Earlier quoted context omitted.

We're not quoting him because he's a cult leader. We're quoting him because it was a reasonably insightful blog post that is relevant to the topic. I, in fact, have no clue who Steve is, and found the posted link a valuable addition to the discussion. If you believe it was not so, I'd love to hear your reasons.

You found it valuable despite: 1. There being no evidence provided to support the claims. 2. The author being a well-known cultish demagogue willing to say anything to get your attention.

The author was saying something philosophical. It wasn't a question of correctness (philosophy isn't real enough to be judged so) but a question of well-spokenness. I found it a well-written peace which offered interesting insight. None of that requires evidence, and none of that depends on author intent. I had (and still have) no idea who the author is, and found it a good piece nonetheless.

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

#169
post #46

Earlier quoted context omitted.

> 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…

You really don't think Python is reaching the point where a manager type would be comfortable with it? It's mature, it has tons of libraries, it's used in all kinds of successful projects. I really don't know. It just doesn't seem anything like a high-risk choice to me.

No Python vendor will wine-and-dine the pointy-haired-manager, nor pay a trip to a conference.

Oracle will.

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

#170

Earlier quoted context omitted.

While I appreciate your experience, you basically are saying that it would be hellish because of two features. Haskell and/or OCaml have many incredible benefits, and many of them do not rely on laziness to work. Sure it allows you to write some incredibly elegant, generic solutions - but I don't think it is necessary to have it as the default. I think things like the record system could be fixed up with simply more…

Oh, I think that nearly all of the problems with Haskell could be fixed up if it had the resources of C++ or Java. The problem is that in getting those resources, it would create new problems that would end up looking a lot like the whining about C++ or Java. Java, as a language and a platform, is not fundamentally that bad. It was certainly done by very smart people with lots of experience. It sucks because it has s…

> The flip side of this is that if you suddenly use one more field in a tuple, way down the line in some unrelated portion of the code, you might trigger a very expensive computation. This is unacceptable in many large apps written by multiple people; you shouldn't have to worry that a tiny field reference can bloat the program's memory consumption by orders of magnitude.

No matter what language you use if you want to use the results you're going to pay the calculation/resource fee. All Haskell (via lazy calculation) is doing is giving you a speed increase when it can tell you aren't using certain results.

Post reply on HN