How Java Changed Programming Forever
snydeq writes: With Java hitting its 20th anniversary this week, Elliotte Rusty Harold discusses how the language changed the art and business of programming, turning on a generation of coders. Infoworld reports: "Java's core strength was that it was built to be a practical tool for getting work done. It popularized good ideas from earlier languages by repackaging them in a format that was familiar to the average C coder, though (unlike C++ and Objective-C) Java was not a strict superset of C. Indeed it was precisely this willingness to not only add but also remove features that made Java so much simpler and easier to learn than other object-oriented C descendants."
Why does it feel like Oracle is advertising Java with these stories...
Maybe it's the applications. As you note, we have proved, time and time again, that in contrived scenarios Java code can meet or even beat the performance of so-called "performant" languages like C, C++, Lisp, VB6, or JavaScript. And when presented with such evidence, most sane, open-minded opponents will hang their heads in shame and promise never again to spread such slander.
...but then, they fire up Eclipse, or NetBeans, or Guiffy, or enable the Java support in their browser, or try to run an app on their favorite feature phone. And they wait for it to become responsive...
...and wait...
...and wait...
...and wait...
...and wait...
...and...
...what did I promise never to do again? Sorry, must have dozed off...
"I decided I could write something better than everything out there in two weeks. And I was right." - Linus Torvalds
20 Years of write once and test everywhere! And now thanks to Android there are over 18000 distict Andoid platforms to test on too!! http://thenextweb.com/mobile/2...
What you call 'fragmentation' I call 'variety'. And since Android app crash rates are actually lower than iOS ones (ie a platform with much lower 'fragmentation') then it clearly isn't the problem that you think it is...
On a slightly more serious sidenote, it's easy to see Java's popularity dropping, since Google seems to be dumping java for high performance javascript/dart development, as they have already been announcing for Android.
http://arstechnica.com/civis/v...
Linus has actually stated it in a way that is frequently seen as toxic. But, while C++ is one of my favourite programming languages, certain language features tend indeed to "rotten" people's brains, just like pre-GIT CVS+derivatives did to source control habits. And I find that Java is actually the perfect representative of that nowadays, not C++ (and even Linus is now commiting patches in C++) I don't know what you guys people but when I have to traverse a tree of 10 folders, and files have 10 lines and exist only for a single abstraction's sake, I kinda feel OOP, though a powerful tool, has been overused. When everything has to be an object just for a paradigm's sake, things can get kinda distorted. One of the greatest programming innovations is, in my opinion, MVC (or even MVVC stuff like Angular) is one of the greatest things that have been getting popular lately. By separating logic from models and views people are encouraged not to create stupid abstractions and use procedural programming where it is adequate and avoid performance losses.
(proof that torvalds actually uses C++ if anyone hasn't seen that: https://github.com/torvalds/su...)
"I decided I could write something better than everything out there in two weeks. And I was right." - Linus Torvalds
I don't have any philosophical issues with Java, but the "simplicity" of it has led to software vendors thinking they can hire simple people to write mission-critical software, with terrible results.
At work, we have several pieces of server software written in Java, and they are just awful. The RSA server, an auth server from Cisco, and others. They crash when the wind blows the wrong way. They bloat and need to be restarted every few months. One executable starts multiple network services on multiple ports. They rely on using dozens of threads with dozens of queues, and there is no way to inspect them. Logs show high volumes of Java call traces and error messages, even when the software is running fine. Sometimes components just stop working, we call the vendor, and the vendor instructs us to restart and/or reboot.
With the RSA server, we had a massive outage one time because an admin kicked off a few reports. It turns out the reports hung a few threads, and took down the service for the whole enterprise.
The Cisco server has the same problems: dozens (hundreds?) of threads with dozens of queues, and the synchronization among the threads just doesn't work 10-20% of the time.
It's not just these servers. In a previous role, we had some Java middleware that translated DIAMETER RADIUS in a service provider setting, and that was it. That software blew up every month or two, and we had to fail the service open for all our customers.
Terrible, flaky, unreliable software. Again, I think it's probably not the language, it's the shitty, shitty programmers.
But, hey, it's job security for me!
According to Joel, Java isn't hard enough to weed out mediocre programmers in college. (Great programmers can use any language well.)
If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
And then, they try to fire up Microsoft Visual Studio, and they wait even more, and they realize that their perception bubble isn't reality.
Indeed, I've been using Eclipse as a daily driver for a decade. Current startup time for a new workspace is on the order of 10 seconds, VisualStudio is almost identical.
XML is a known as a key material required to create SMD: Software of Mass Destruction
Type erasure, on the other hand, is pure evil - to me, it's the representation of what happens when a pragmatic language ends up into the hands of computer scientists.
By the way, in Java all lists have the get() method with no exceptions (this includes Lists, HashMaps, Vectors) and all collections have the iterator() method with no exceptions. The At() method doesn't exist.
No language is inherently good or evil in and of itself (save for PHP, which is evil incarnate.)
It is simply a tool for expressing logic. A means of structuring data.
Some are elegant for certain classes of problems, some are abused to fit problem sets they aren't suited for.
The sole benefit of Java to me is it's portability for core logic, even though I know that once you're dealing with user interfaces and heavy duty multi-threading, there are "write once, test everywhere" problems with the language.
Java isn't even predictable on my Linux box. It randomly crashes for no apparent reason while running code that has run cleanly thousands upon thousands of times in the past. Yet after years and years of successful runs of my pet project (http://msscodefactory.sourceforge.net/), I had Java 7 on Ubuntu crash a couple weeks ago during a run. The compiler itself crashes on a regular basis; several times per week.
As to why all the Java articles lately? Oracle's "Java World" conference is coming up, so it's time to beat the drums, sacrifice the sheep, and burn the entrails on the altar of the language. The high priests are out in droves preaching the gospel.
I do not fail; I succeed at finding out what does not work.
Latency and unpredictability of garbage collection is a severe problem for any UI, and even web/database backends. Your Cassandra node can run fine for a week and then fragment its heap and go into 20 second stop the world GC, causing user requests to time out. Silly things like allocating large byte arrays and dolling out offsets and length for individual uses are done to avoid big GC pauses. It still doesn't always work, because there are a lot of VM versions and user access patterns shift over time.
For all that, memory leaks are no less common than in C++ and non-memory resource leaks are horrendous. In C++, your object's destructor is cleanly called when the object is deleted or goes out of scope. That will take care of also calling destructors on anything encapsulated, which can then close files and unregister listeners. In Java, the while 100MB object hierarchy will be still consuming heap because some leaf node's close method was not called and it's a button click listener with an indirect link back to root.
A grown up language can support stack based and encapsulated object instances that don't have to be GCed and have predictable destruction time. Large and provably acyclical objects like bitmaps can also be reference counting. In practice, GC pauses are no better than crashes, so in real life even unsafe explicit delete makes sense in many cases.
Java is fully open-sourced and the most open-sourced programming language I know. OpenJDK is the same source code Oracle uses for its JDK. It's easy to download and compile all Java executables. Here is a guide and a Youtube video detailing how to build the JDK.
Java is defined and updated by the JSR process, which resembles RFCs. And also by the JEP process which tells you exactly what's being built into Java and when. You can also use their bugtrackers and mailing lists to track Oracle engineers' work.
I've learnt a ton just by tracking those lists.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW