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...
While Objective C is. You insensitive programming clod.
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
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
"...turning on a generation of coders."
I'm glad to hear someone finally having the courage to admit this. Especially considering how widely it has been adopted as an instructional language and how many young people were betrayed by their institutions and communities at the very start of their programming careers.
But I'd also like to hear more from the many people who've risen above these challenges and gone on to become developers even so. It may be hard. It may be traumatic. But it's good to remember that it's possible to rise above it.
If you're trying to sell an app, it's your problem, not theirs.
Yeah. When I saw in which direction Java was going, I thought to me: "thanks, I've had COBOL once, Don't need a second serving"
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!
In contrast with other languages...
I find a better IDE for different and I was like, how about that, this makes it easier for me to write code for the language.
If back in the day where you had GWBasic
Ok
LIST
10 PRINT "HELLO"
20 GOTO 10
Ok
15 PRINT "WORLD"
Ok
LIST
10 PRINT "HELLO"
15 PRINT "WORLD"
20 GOTO 10
Ok
15 PRINT "WORLD!"
LIST
10 PRINT "HELLO"
15 PRINT "WORLD!"
20 GOTO 10
Ok
RUN
HELLO
WORLD!
HELLO
WORLD!
HELLO
WORLD!
HELLO
WORLD!
If we had that type of IDE today the program will fail miserably. However you take the same language and give it a new IDE then you could in theory make an Enterprise class application in GWBASIC.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
Sounds like your gripe is with Java the platform, not Java the language.
I am very small, utmostly microscopic.
>> One thing I'll never understand is how it practically requires an IDE to do anything non-trivial, in contrast to any other language.
Hate to break it to you, but if you don't need IDE for specific language. You need IDE for large project. Regardless of the language used.
I've tried to get into Java on multiple occasions. Each time, I get thrown back by the amount of boilerplate necessary, and by missing features.
- No operator overloading. As a result, every container type is accessed differently. Arrays use []. Lists use At(). Hashmaps use Get(). Matrices, vectors, and complex numbers are absurdly verbose, because I cannot overload addition and multiplication.
- Type erasure for generics. As a result, I cannot define different function overloads for func(List) and func(List).
- Lack of first class functions. As a result, callbacks required the absurdity of implementing the Callable interface. This has been improved recently with the addition of lambda statements.
- Lack of properties. As a result, I cannot expose anything as public, because I might want to add additional code at some point in the future. Therefore, I must have an explosion of getters/setters.
I like the idea of having a sandboxed virtual machine. I like the idea of having a single version of the bytecode that can run anywhere. I just can't stand the language.
Well, if you only have a nice academic abstraction in a book which is the language ... sure, that's awesome and all.
And then in the real world the platform, and its many variations, becomes an issue.
It's been years since I wrote in Java, but we'd get the regular updates of the platform, which may or may not have broken something. You'd get every vendor having their own JVM, or their extensions.
So you'd write a webapp for one platform and test it, and then someone would cram it into yet another proprietary variant which wasn't compatible. Which usually left the customer screeching that when you listed the platforms you supported, that it didn't work on the one they had which you'd never tested against.
And don't even get me stared on the shitware which Java wants to install now. Sorry, Oracle, but we don't give a fuck about your stupid Ashole.com toolbar.
So, yes, maybe in some perfect little bubble which doesn't depend on the platform Java is an awesome language. But in the real world, it seems like many things were a moving target, and that the platform gave you more sources of grief than the language.
I've lost count of the number of applications I've seen which the vendor basically says "we are compatible with this version of Java, and nothing else".
In that regards, as much as I like the actual language ... the platform can be a pain in the ass.
I don't know what it's like now (as I said, haven't directly used it in years). But there was a time when there was so much fragmentation as to make the "write once/run anywhere" a really bad joke.
Lost at C:>. Found at C.
But maybe I don't want a language that turns on 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.
In the years I've done Java development, the only times I've never had a problem building on Windows or OS X and deploying to Solaris or Linux was when someone used hard-coded paths or didn't make the program's deployment properly configurable for deployment to the target OS. Write once, run anywhere is more or less true with Java.
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
You need IDE for large project. Regardless of the language used.
The OP is still correct about Java. "Non-trivial" is not the same as "large project." Small applications can be written in Python, Ruby, Perl, and C without an IDE, but writing a small application without an IDE is really difficult task in Java (and C# or basically any other .NET language, fwiw - Java's not alone) due to the strong dependence on boilerplate code.
Further, you do *not* need an IDE for large projects regardless of language. I've seen a number of large projects (tens of thousands of lines of code) written in C and Ruby where more than half of the developers did NOT use an IDE. In fact, for the C projects on which I've worked recently (last 10 years, including those with tens of thousands of lines of source), the primary code editing tools used by the developers were exclusively text editors like nano and vim - there is no IDE during development.
I was struck by the statement that Java "changed the art and business of programming." While that's certainly true as a general statement, it hasn't been true for me personally. I've lived my recent adult programming life with a combination of C, C++, Python, and Matlab. I haven't so far had a need for Java because one of those languages does anything I need to do better than Java.
I've studied Java (and C#) a little, and have generally been interested and see some value there. But I have never actually had an explicit need for Java, so I never stuck with it long enough to become proficient in it. In particular, mastering Java's libraries is a daunting task. So, if I can live my life without it, I wonder how much worse off the rest of the world would be if it had never been invented?
Java's core strength was that it was built to be a practical tool for getting work done.
If only.
I have abandoned Java shortly after Java 2 SDK release precisely because it was NOT anywhere near being a "practical tool for getting work done." Later encounters over the years only reinforced my opinion.
As one Java developer described it, comparing Java to Python at task of using the proverbial "wheel" in your program. In Python, if you need the "wheel", you just "import wheel" and use it. Java too provides you with everything necessary: "import map.ore.iron", "import tools.pickaxe", "import fire.matches", plus a 3rd party class "recipe.smelt" and a measly 1-2K LOC - and voila! you have the "class Wheel" in Java too!
All hope abandon ye who enter here.
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.
The worst offender in the "custom JVM" variant was Microsoft and Visual J++. Which varied so much that Sun sued and won to stop them from peddling it.
Oracle was another big offender. IIRC they were hung up on Java 1.3 long after its corpse should have rotted away.
The big-name vendors are like that. They'll warrant their products for one specific platform because they don't want to deal with the cost of being more flexible, and often they'll even bundle their JVM of choice right in with their application.
Sun didn't jerk around minor releases, though. If a minor release change broke something it either had a bug in it or it had repaired a bug that someone else was exploiting in their applications. And, unfortunately, bug fixes are a major part of almost all language systems, so you cannot single out Java for that.
Java does port well. I spent years developing Java apps on 32-bit Windows machines to be deployed to 64-bit Sparc machines without any problems. But that's because I didn't get cute and attempt to exploit hardware or OS dependencies. It wasn't like it was that hard to do.
It sounds like your gripe is with a badly run project, organization and practices rather than a programming language.
I'll see your senator, and I'll raise you two judges.
Also, one of the main double-plus-good stuff in Java is concept of packages and jars. Anyone dealing with header files and libs (not to mention issues when libs are created by different compilers on different platforms) will know what I am talking about. If C++ in next iteration copy this concept and ditch header files, it will be greatest improvement in C++ ever.
839*929
Actually, Maven is the exact opposite of "let's download random code".
One of Maven's primary virtues is that it allows you to pull specific versions of the various products to produce a consistent result.
Unless, of course, some idiot substitutes "grab anything" for version numbers in the POM.
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.
That is disingenuous. You pay 99 dollars to test apps on your friends device.
Momento Mori
The absolute #1 contribution of Java: it has allowed colleges and universities to turn out a generation of coders who are incapable of dealing with pointers, explicit memory management, stack layout, static memory maps, etc., etc..
In other words: a crapload of people with "Computer Science" degrees who could not write an OS or even a trivial part, like the C library signal trampoline, to save their ass, because they are in this walled garden/protected environment where they are "safe" from having to actually deal with real hardware.
Ironically, all of their JVMs on which they are normally running this code are not written in Java, because it's not really practical to do that.
I have a Mac that is a couple of versions behind on the JRE because the updater is complete shit. It always fails. So, it means a complete uninstall and download/reinstall of the JRE and a bunch of other Java shit - according to the 'help' docs on Oracle's site. If it wasn't for my wife's employer using some scheduling software written in Java, I'd rip Java out for good.
I thought all those Silicon Valley people were supposed to be the best of the best? Or has Java development and maintenance been offshored by Oracle?
Most of the time the problems I see with Java are not that the JRE update failed, but that the JRE update was successful and now the underlying Java application doesn't work anymore. After all, when we develop an application, we test it on a certain version. If Automatic Updates automatically update your JVMs major version, which has happened in the past, then how can we guarantee it will work? I remember back when Java 7 was just coming out and was chock full of bugs, I kept getting calls from people whose application suddenly stopped working. Well, it was certified on Java 6, and they had allowed Automatic Updates to install Java 7, which the application was not tested on and which we weren't planning on testing on until certain bugs and vulnerabilities were patched. Automatic Updates should never be allowed in production. That includes Firefox and IE automatic updates as well.
If you are not allowed to question your government then the government has answered your question.
I have seen what you are talking about, but there is no reason why java programming should have to go hand in hand with utter dependence on third party libraries. Where I used to work, there were two programming departments. We both did Java, but the other department was dead set on spending days and weeks researching third party solutions for simple problems. Then they would spend trying to learn the interface. Then inevitably, if there was a problem, it always seemed to be in the third part code. Well, of course, if you need to add two plus two, and you download a Cray simulator library to accomplish this, then you have to instantiate the library, and seed it with the two numbers, and start the thread that does the calculation, then receive the even that it is done, then retrieve the data, well you see where this is going.
I am not in favor of reinventing the wheel, but if it is going to take less time for me to write something than to research third party solutions and figure out how to integrate to them, and I can control the code, then I will be reinventing that wheel rather than download the global transportation library so I can use their wheel.
If you are not allowed to question your government then the government has answered your question.
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
Would be funny if it where true, but Netbeans on my computer loads faster than Visual Studio. And both runs equally as fast.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
Its greatest achievement was to be a C-like language in which legions of mediocre corporate coders can work on the same codebase without hurting each other too badly. This lets you replace COBOL.
Then the whole bytecode on a virtual machine thing, which while it had been done before (UCSD Pascal), Java's VM really made practical. People complain about Java's slowness, but the VM is really quite speedy (and the sandboxing is amazing). You can write high frame rate FPSes in it (Quake!). It's usually bad coders and bad frameworks that cripple performance. And without the JVM we probably wouldn't have .NET, Mono, and the CIL. Certainly not as good - it really helps to have done a previous version.
I've seen a number of large projects (tens of thousands of lines of code)
This is a contradiction in itself.
10,000 lines even multiple of them, like 90,000 lines, is by no means "a large project".
The systems I work on usually have like 10,000 classes! no one bothers to count the lines though.
the primary code editing tools used by the developers were exclusively text editors like nano and vim - there is no IDE during development. ... we had this: vi(m) is better than an IDE talk a few days ago ... already.
That is their problem
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.