Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

51–60 of 327 posts

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#51
post #44
post #25

Earlier quoted context omitted.

I'm fairly certain Java and C++ have comparable speeds, and I think in someways Java's faster.

Java is not as fast or faster than C(++). The assertion always makes me cringe. I won't say Java is slow(though the startup time is annoying for some tasks), as it does perform better than many languages. But how does it make sense to you that a platform written in C can produce results faster than C is capable of?

What language do you think your favorite C compiler is written in?

Now compare that C compiler to the jvm compiler, which has the benefit of using detailed information about the exact system configuration and other runtime behaviours during its compilation phases.

Which one has the advantage?

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#52
post #35
post #26

Earlier quoted context omitted.

I would venture to say, with no facts or figures mind you, that if you were to evaluate the number of lines of code dedicated to kernel programming to that of applications running applications on the Internet, that the resultant figure would be so small for kernel code that it would look like kernel development doesn't even exist. Saying that developers who use Java are poor quality is also an awful thing to say. Yes…

What about java makes it better for high performance / complexity code? I never said there isn't a lot of java code, or that it doesn't work, my assertion is that java is not the hands down choice for high complexity / performance work. If you've got a bunch of mediocre programmers who can't be trusted to make + add things together then sure java is a great choice.

It's a natural fit for enterprise programming where time to implement is usually key and logic is endlessly extended to accommodate whatever new business requirements emerge after the last round was deployed. And robustness is valued more highly than raw performance. Use Java - pay for twice the servers and get ten times the uptime? Done.

That means that days or weeks spent hunting your latest memory corruption issue makes C a non-option for these applications.

As for mediocre programmers - sure, and a large bunch of mediocre programmers scales, whereas a small team of star programmers doesn't. Someone has to tweak the UI. Someone has to implement all that tedious persistence logic. You need star programmers for that? No.

I'm excited to see if Go intrudes on this field, but it's a big field and Go's just starting out.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#53
post #15
post #4

Well what do they teach in schools? When I was attaining my degree during the end of the last century, Java (and XML) was being trumpeted as the saving grace for all soon to be software professionals. We were all in love OO programming and this scratched us right where C++ left an itch. Oh Java Beans and Servlets, how we loved thee. It’ll take decades before all the code created by those who came right before me and…

I just started university and it's still all Java. I found out one university in my country (Germany) teaches Scheme in their introductory course, but sadly I had already enrolled at a different one at that time. The high school CS curriculum here is also basically an introduction to Java.

Such a shame.

I know why they do it: Java is the closest we have to an "industry standard" programming language. But, given the high failure rate in computer programming teaching (c.f. the FizzBuzz test) there's no excuse for putting beginners on such a steep learning curve.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#54
post #14

Earlier quoted context omitted.

Care to elaborate? Here's the 12 GB of memory... http://www.datastax.com/docs/1.0/operations/tuning As far as the language is concerned... What problem of high performance & complexity apps does Java 7 solve that C++11 doesn't?

Automatic memory management...? "Just use Boost" is not a viable strategy when it adds so much complexity in and of itself. I'm not defending Java, but it's helpful to know what the limits of each tool are.

Automatic memory management (especially with a garbage collector) is antithetical to high performance. I like the JVM (for Scala, mostly; Java-the-language can go screw), but there is nothing there really remotely close to C++ and C, and the garbage collector is a very large part of why.. Rust might horn in on C++'s bailiwick, but until then, it's gonna be a while.

I strongly disagree that Boost really adds "so much complexity"--and, by the way, shared_ptr and friends are in C++11, and by extension within the standard library. So you don't even need this, unless your goal is to target extremely old platforms. But honestly, if you seriously need shared_ptr, your code design is probably just Not Very Good.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#55

I primarily use java in my day job, and although there's a lot not to like about it, some standard complaints are somewhat overblown. For example, nothing really forces you to use long variable/method names, but even if you do, a modern IDE -- I use IntelliJ -- with auto-completion makes these fairly painless. It's not like you have to type every letter of "SomeClass.veryLongMethodName()" -- rather, you type "SomeCla…

> I'm not particularly persuaded to the "you have to type a lot" complaints.

I haven't used Java in anger in a long time, but my beef was never that you had to type a lot, but that it was verbose. Verbosity impacts on typing, sure, and as you've said, IntelliJ makes typing it out painless.

The flip side of verbosity, though, is reading the code. There's no "hit tab" or "Cmd-J, fori, return" to increase comprehension speed. And reading tends to be far more common than writing.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#56
post #40

I primarily use java in my day job, and although there's a lot not to like about it, some standard complaints are somewhat overblown. For example, nothing really forces you to use long variable/method names, but even if you do, a modern IDE -- I use IntelliJ -- with auto-completion makes these fairly painless. It's not like you have to type every letter of "SomeClass.veryLongMethodName()" -- rather, you type "SomeCla…

> Similarly, I never type "for (int i = 0; i As someone who didn't realize this existed in Intellij, I think you may have just changed my life :)

Eclipse has something similar, which it calls "code templates." Features like these leave me wondering why "excessive typing" is often cited as a criticism of Java. As far as I can estimate on the fly, I type less than half of the characters that make up my Java code.

And as the article points out, for readability, verbosity is arguably a good thing. I sure believe it is, perhaps because I am more distracted by poor symbol selection and syntax than most programmers I know. Speaking of, I don't particularly like the C-lineage syntax, Java included. I don't like the braces and parentheses. I prefer a syntax with fewer symbols and more keywords. Crazy, I know.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#57
post #38
post #27

Earlier quoted context omitted.

C++ is a tool for language experts. If you can effectively apply that expertise it is extremely expressive and efficient. Java does have some unfortunate complexity, but I don't think it is in the same league. Java also includes a library that is more extensive in some areas than the vanilla standard C++ one. The JVM is also more robust to some types of programmer errors than any run time for C++ that I know of.

I'm not talking about how many features the language has, I'm talking about the endless amount of line noise that you need to accomplish simple tasks. Most of what the code does is hidden behind ceremony. Imagine Newtown writing out instructions on how to calculate gravity instead of just writing: F = G((m1 m2)/(r^2)) I really don't understand how a language that can't succinctly express calculus from 300 years ago w…

Languages like Matlab are best suited for expressing calculus. Why are you choosing a poor tool for the job?

Most Java programmers don't care about expressing calculus. They care about expressing interactions between web services, sql, and applying rules as the data flows through their modules. Or between user interface elements and service requests. It's all about moving data around, working on that data when you've got it, and triggering actions.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#58
post #25

Java may not be dying, but it does take off early on Fridays for golf. Java is not dying the same way Cobol was not dying 10 years ago. It has a lot of legs left but nobody is 'hoping' to use it, they are told to do so. Java is and always has been almost completely a corporate tool. Again, like Cobol, so the 'cool kids' are not going to give it much love. It's too slow to execute to compete with C++, its too slow to…

I'm fairly certain Java and C++ have comparable speeds, and I think in someways Java's faster.

Many painful minutes spent with slow-like-sloth-taking-a-shit Java desktop software lead me to believe that your statement isn't entirely true.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#59
post #44
post #25

Earlier quoted context omitted.

I'm fairly certain Java and C++ have comparable speeds, and I think in someways Java's faster.

Java is not as fast or faster than C(++). The assertion always makes me cringe. I won't say Java is slow(though the startup time is annoying for some tasks), as it does perform better than many languages. But how does it make sense to you that a platform written in C can produce results faster than C is capable of?

dkuntz2 said C++, not C.

But in any case, it's perfectly possible that a platform written in C could produce results faster, because it's not an interpreter but a compiler that translates the application directly to machine code, and which could benefit from optimizations not available ahead-of-time.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#60
I've run the Java Users' Group in Philadelphia for almost 14 years, and I specialized in Java recruiting between 1999-2010. I know a lot of Java pros.

Our meetings still get pretty strong attendance (80-120 per meeting), but I'm seeing far fewer new sign ups and the faces are much the same. There could be several reasons, but young engineers that I speak with rarely have any interest in Java work (though JVM is still popular).

Some members have taken to coming up to me and saying "Java is dying, you know?" at meetings. It will become harder and harder to find engineers to maintain the Java code as the first generation of Java pros start to move on to other languages or retire. Java needs some new blood and better PR to maintain interest from younger devs, and Android may be the best hope.

Post reply on HN