If Java Is Dying, It Sure Looks Awfully Healthy 577
Hugh Pickens DOT Com writes "Andrew Binstock writes at Dr. Dobb's that a recurring prejudice in the forums where the cool kids hang out is against Java, often described as verbose and fading in popularity but Binstock sees little supporting evidence of Java being in some kind of long-term decline. While it is true that Java certainly can be verbose, several scripting languages have sprung up which are purpose-designed to spare developers from long syntactical passages to communicate a simple action, including NetRexx, Groovy, and Scala. As far as Java's popularity goes, normally, when technologies start their ultimate decline, tradeshows are the first to reflect the disintegrating community. But the recent JavaOne show was clearly larger and better attended than it has been in either of the last two years and vendors on the exhibiting floor were unanimous in saying that traffic, leads, and inquiries were up significantly over last year. Technically, the language continues to advance says Binstock. Java 8, expected in March, will add closures (that is, lambda expressions) that will reduce code, diminish the need for anonymous inner classes, and facilitate functional-like coding. Greater modularity which will be complete in Java 9 (due in 2016) will help efficient management of artifacts, as will several enhancements that simplify syntax in that release. 'When you add in the Android ecosystem, whose native development language is Java, it becomes very difficult to see how a language so widely used in so many areas — server, Web, desktop, mobile devices — is in some kind of decline,' concludes Binstock. 'What I'm seeing is a language that is under constant refinement and development, with a large and very active community, which enjoys a platform that is widely used for new languages. None of this looks to me like a language in decline.'"
Re:Wake me up... (Score:5, Insightful)
Wake me up when netcraft confirms it. Until then it's not dying.
Scala is a scripting language? (Score:3, Insightful)
If in fact it is dying... (Score:1, Insightful)
Java won't die. (Score:5, Insightful)
The reason Java is still alive and well is not because it's a good language. It's not because Oracle does a good job patching security faults with it. It's not because it may be able to run most of it's code on any given OS that can run its VM.
The reason Java is still alive and well is because it is the OO language most schools, universities and colleges teach in their CS classes.
Which Java? (Score:5, Insightful)
The JVM or the language?
Re:Wake me up... (Score:4, Insightful)
Re:Java won't die. (Score:4, Insightful)
Uh huh. Maybe you're not old enough to remember PASCAL? Which was the overwhelming favorite of colleges and schools back in the late 80s and early 90s?
Re:Android, Objective-C and Tiobe Index (Score:5, Insightful)
I don't think Java and Rails, Python, etc actually compete much. They're very different technologies.
Rails and Python are great when you don't have significant technical skills and just need to slap some shit together and throw in on a web server.
Java is better in areas where you need high performance and scalability, but it's also much more costly to do anything with it.
If there's such a market.. why the Ask toolbar?? (Score:5, Insightful)
It definitely doesn't help that the JRE installer tries to also install the Ask toolbar. Seriously? Even Microsoft doesn't try to install Bing with the .NET installers, and that's their own property they're desperately trying to push on everyone.
How am I supposed to take a platform seriously if the fundamental piece that has to be installed by all developers AND users to use it is doing the same sneaky things that half the crappy freeware on the internet is doing?
Just how much revenue does Oracle make from Ask anyway?
Java's problem isn't verbosity (Score:5, Insightful)
Re:Wake me up... (Score:5, Insightful)
You're not a real programmer if you can't adapt to the lack of unsigned variables.
Forget about being a "real programmer" and focus on being a "real developer.' There are functional requirements and then there are technical requirements. Functionally speaking, how important is it to have an unsigned data type rather than having the equivalent data type and enforcing a "no negative values" rule? I'm not sure I can think of any, aside from the case of being able to interpret unsigned data types for interoperability. But that says nothing about the need for the actual storage of that data.
I'm pretty sure that some respected Computer Scientist said something about premature optimization....... It's a good rule. Focus on meeting the functional requirements of the system you are developing, and then optimize where it makes sense. I don't think you are going to notice the lack of unsigned data types. But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
Re:Scripting / PowerShell (Score:4, Insightful)
The point was to list decent halfway-decent scripting languages.
Powershell is a batch file on steroids. It is good for automating system administration in a known environment, but not much else. While many Microsoft products do offer modules, there's still a lot of (especially older) ones that don't. Also, since much of the existing API is a direct port from Windows' internal structure, many of the designs are non-intuitive, like having IP addresses almost completely separate from NICs.
My biggest complain about PowerShell is what I now unaffectionately call "PHP syndrome": Extensible through modules, but there are no namespaces. As the system grows, the list of core commands grows as well, and there is no clear grouping available outside the documentation.
Yes, it is a nice enough replacement for the dozens of little VBScript files kicking around, because it offers easy access to WMI and .NET. Unfortunately, it also brings over a new "On Error Resume Next", in the form of silently continuing after each error.
Re:Google Chrome is killing java (Score:5, Insightful)
Java is a lot bigger than Java Applets.
Java Applets fucking suck and deserve to die.
Re:javas not dead! (Score:2, Insightful)
I only use two Java applications: Liferea (after google reader died) and Jitsi. When I start them, I can feel the sadness in my computer. They take ages to startup, but granted, after they've started they're just like any regular native application. Though Jitsi doesn't integrate well with gtk3, but overall it is pretty good.
You can't know this unless you purposefully don't want to count using web apps as "using an app". My understanding is the backend of much of the google stuff is written in Java, just as an obvious example.
Re:Wake me up... (Score:5, Insightful)
I'm pretty sure that some respected Computer Scientist said something about premature optimization
I think there is a balance to be struck, putting too much effort into optimising early on is a waste of time but that doesn't mean that languages that make inefficient soloutions easy and efficient soloutions painful are a good thing. Unsigned types are just one of many cases where java does this.
Unsigned types are a good thing for several reasons.
1: They are easier to bounds check. If you have an unsigned type you only have to worry about making sure it is not too large. If you only have a signed type then you either have to make sure all your bounds checks cover the negative case or be very careful not to accidently generate negative values.
2: They can store values twice as large. Sometimes that is the difference between fitting the number you want in one size of data element and being forced up to the next size (which is likely to double your memory requirements).
3: Some algorithms (particulally in crypto) are designed arround unsigned integers of a specific size.
4: the interoperability requirement you mention. Sometimes you have to work with another system where it has been decided by someone outside your project that say a 32-bit signed integer is sufficient.
Don't get me wrong all these things CAN be worked arround but those workarrounds mean lower efficiency AND more potential for mistakes.
P.S. Java does have an unsigned 16 bit integer type despite lacking unsigned 8 , 32 and 64 bit types. It calls that 16 bit unsigned type "char".
But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
Mixing languages adds extra complexity, especially with stuff like java. So IMO a good critera for a language is what range of "levels" it can cover without having to resort to mixing languages.
update nagging (Score:5, Insightful)
- the constant nagging from the java updater. (Although to be fair, the updater has been killed on any and all of my devices.)
- the braindead way of keeping old version of the jdk and jre around. Words can't describe how freaking lame this is. I only want one java directory, with one jre and one jdk in it. The new versions need to replace the old ones and provide backwards compatibility.
Re: Keep it up - you might just invent assembly... (Score:5, Insightful)
Re:Android, Objective-C and Tiobe Index (Score:5, Insightful)
Rails and Python are great when you don't have significant technical skills and just need to slap some shit together and throw in on a web server.
I've seen this from the other side. Java is a *great* language for the middle of the normal distribution. I'm not going to name the languages on the left side of the curve, because the point of this isn't to start a flame war, but if you have a large number of averagely competent programmers, then Java lets you (as architect/manager/etc.) have those programmers be productive for you, produce code that can be read in the future by the same segment of the population, and be reasonably sure the language will prevent them from making hidden catastrophic mistakes. Also there are a large number of existing tools that let you scale their work out both in depth and in breadth.
The alpha geeks employing Ruby, Python, modern Perl, erlang, etc. are usually at the right side of the curve, doing very efficient, agile, but abstract and terse stuff that takes exceptional (not heroic, just unusual) sysadmin skills to get to work on a grand scale.
Due to the nature of the available talent pool, it's natural to see projects start with the advanced scripting languages among the startup crowd and then migrate to the Java environment over time. Twitter would be a good example of this.
Re:Wake me up... (Score:5, Insightful)
1: They are easier to bounds check. If you have an unsigned type you only have to worry about making sure it is not too large. If you only have a signed type then you either have to make sure all your bounds checks cover the negative case or be very careful not to accidently generate negative values.
So, what does your code do if an end-user passes -1 which would get stored in your unsigned value? And as a reminder, your argument is that you don't have to do bounds checking for the lower bound.
Re:Java's problem isn't verbosity (Score:5, Insightful)
Nothing but him bitching about how PHP sucks...
To be fair, it does.
Re:Java won't die. (Score:4, Insightful)
Nah, it caught on because you could do simple stuff simply without whacking away in C or C++ and that it was cross platform at a time when attempting to do cross platform development usually meant you had to shell out for proprietary pile of stuff which locked you in. Java was good for backends as well where you had a lot of horse power to apply to its programs. Java was also good for universities to use in teaching programming, not that it made for good teaching.
Sun had a marketing dept? What were they marketing?
Re:shipping java scientific software for 15 years (Score:5, Insightful)
Not just can be, it usually is faster. At least, once it's been JITed. We just ran some XML serialization/deserialization tests, and the java implementation was much faster than the C++ one...eventually. The first several hundred iterations it was slower, but after that the Just In Time compiler optimized it, and it easily won.
For long running computations, like scientific calculations for instance, Java is really good. The problem is we perceive how fast something is based on our wait time. Every time you boot a java applications it takes a long time for it to get started relative to a C++ applications. A quick command line java application might be orders of magnitude slower than a comparable C++ one. And that delay kind of permeates our intuitions about which is faster.
Re:Android, Objective-C and Tiobe Index (Score:5, Insightful)
Because it would be a dozen times more efford in programming hours, because it lacks the relevant libraries, because the amount of capable C++ programmers is very low, because C++ is a dying language in the enterprise environment, because C++ is not truely portable across platforms, because in the end when it comes down to performance the C++ implementation (which costed you 5 times the money and 2 times the time to develop) will be only 5% faster than the Java implememtation.
And all arguments above will kill you when you plan to maintain it for the next 15 years.
Re:Scala is a scripting language? (Score:4, Insightful)
Java only promised write once and run anywhere. Nowhere in that promise was write once, be able to read it later.
Oh, you can read it later. It's just so damn verbose that you'd better set aside a long time for reading it...
Re:Java already had closures (Score:5, Insightful)
That entirely misses the point. The conciseness is the entire point.
If I have a list of strings, and want to append ".txt" to each, using a for loop is just one more annoying piece of COBOLesque boilerplate.
fileNames = names.Map(n => n + ".txt");
That's what you want.
docFileNames = names.Where(n => n.StartsWith("Doc")).Map(n => n + ".txt");
You can understand what that does even though I just make up the methods. That's the damn point.
Re:javas not dead! (Score:5, Insightful)
have other java applications that are designed to explore the limits of slab allocation and heap return in memory
You remind me of far to many C programmers I've met (and projects I've been on).
"Look I've reinvented that difficult plumbing built into C++ - my language is just as good as C++!"
"Yeah. How much time did that take? How many nightmarish bugs did you overcome?"
"Lots. And a few."
"Time well spent then, I'm sure, and my best wishes that there's not one last plumbing bug that you'll find in the field".
Different tools for different jobs. C++ isn't the right tool for much, but nothing else comes close for jobs that actually need the cruft that clutters C++. Taking over memory allocation is a perfect example. (Checking an object every time it's dereferenced to make sure it hasn't been freed or worse, re-used is another - man that's a stupid problem to solve in Java or C#.)
Re:Android, Objective-C and Tiobe Index (Score:4, Insightful)
I agree that Rails / Python are definitely the more small scale / personal project side projects type solutions out there. Yes they can scale, but I'd argue that they're not good at it.
Java SUCKS for small scale. EE containers are heavy and require a good set of knowledge to even take crack at a reasonable site, but once that painful layer has been passed, adding more and more to the service becomes as trivial as the business domain requires. The extra leveraging from well architected services and API's makes working on larger scale Java systems a dream in comparison to others (Currently working on a Java Web/Services project single deplyment EAR that's over 3 million source lines BEFORE all the libraries and server container features that we're also leveraging).
I'd also argue that outside of hosting, you can easily get Java based web service tools/servers/etc.. for 0 dollars. You can't find much Java hosting in the zero dollar number (Redhat's cloud Jboss 7 or the non-standard Google appengine being a notable exceptions) which may be an issue to some enthusiasts who don't do their own hosting.
Re: Wake me up... (Score:4, Insightful)
ISO-8859-1
The one with those funny marks on the letters? Bah. ASCII. The eighth bit is just a spare. If you can't do it in English, then it isn't worth doing.
Re:javas not dead! (Score:4, Insightful)
Different people may look differently, but for me, all that means that Java is suboptimal for games or other heavily performance-oriented stuff, and this is the only kind of software I enjoy programming. Making performance-insensitive backends full of "business logic" is for someone who is in the software industry for money only...
Re:Java already had closures (Score:5, Insightful)
I find the following easier to know whats going on:
I don't understand that. I do understand:
Arraylist docFileNames = new Arraylist();
for (String name:names)
docFileNames.add(name+".txt");