Slashdot Mirror


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."

41 of 382 comments (clear)

  1. Plant? by Anonymous Coward · · Score: 5, Interesting

    Why does it feel like Oracle is advertising Java with these stories...

    1. Re:Plant? by jellomizer · · Score: 4, Interesting

      Well Oracle killing off Java was one of the biggest fear after it acquired Sun Microsystems. MySql was open sourced so it could fork like it had. VirtualBox we more or less kinda allowed it to die. Star err Open err LibreOffice had forked so many times that people probably forgot the Sun Acquired it as StarWriter. The Sun Servers Sparc based were declining in popularity.

      But Java was the important thing we couldn't let die. And it isn't open source so the community couldn't steal it away from oracle.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Plant? by Pi1grim · · Score: 5, Insightful

      >> Because Chrome is turning Java off and they're trying to make sure other browsers don't follow suit.

      >> Seriously, I see no NEED for Java any more. I probably have more Silverlight things I like to use than I do Java, and neither are vital any more.

      It must so wonderfull to live in a world limited by your browser window. Wonder how it's like. Have you ever wondered what do the servers run? You know, the same servers that show you all sorts of pages? Banks, Twitter, Amazon, eBay, LinkedIn hundreds of other high load sites and countless numbers of proprietary in-house internal systems? Let me give you a hint: definitely not silverlight.

      >> Java is dead

      You need to grab a phone at tell all those sites above I mentioned, also, while you're at it, don't forget IBM and Oracle, they'll have a blast.

    3. Re:Plant? by peppepz · · Score: 5, Informative

      The JDK had already been released under the GPL by Sun before the Oracle acquisition.

    4. Re:Plant? by peppepz · · Score: 5, Insightful

      Java != Java applets.

    5. Re:Plant? by wonkey_monkey · · Score: 5, Funny

      Pah. Next you'll be telling me it's got nothing to do with Javascript.

      --
      systemd is Roko's Basilisk.
    6. Re:Plant? by bws111 · · Score: 4, Informative

      I take it you never heard of Android? Or enterprise software?

    7. Re:Plant? by Xest · · Score: 3, Insightful

      You seem to be declaring Java dead, because Java applets are uncommon, and that Java desktop applications are uncommon. Both these things are true, but it still only tells an incredibly small picture.

      Java is still massively strong on mobile, in embedded devices, and for server side applications.

      There are a lot of phones, routers, ATMs, websites, and so forth still using Java rather heavily. It's a very long way from dead, it's still used at least in part to run key elements of some of the largest sites on the web - eBay, Amazon, Google for example as well as being a big deal in nearly all the world's banks and financial institutes. It does well in the academic world, and in the medical world, from doctors surgeries to big pharma.

      I hate Oracle, but I'm afraid as much as I'd like to see it, they wont be going away any time soon - there's a lot of money in providing to those sorts of companies.

    8. Re:Plant? by DickBreath · · Score: 5, Informative

      VirtualBox keeps getting updated regularly. A new VirtualBox 5 is in beta even as version 4 upgrades come out regularly.

      --

      I'll see your senator, and I'll raise you two judges.
    9. Re:Plant? by DickBreath · · Score: 3, Insightful

      You seriously have no clue what Java is used for nor how huge its ecosystem is. For years and to this very day Java is always shifting between the number one and number two spots of most widely used programming languages. The amount of enterprise software written in Java is so large that Java may never go away. There are certain things that Java is very good at, which is why it is used. It's not perfect for everything. If there were one perfect language, everyone would already be using it.

      --

      I'll see your senator, and I'll raise you two judges.
    10. Re:Plant? by allcoolnameswheretak · · Score: 5, Insightful

      Java is certainly not dead. If you're a software engineer, my gut feeling is that 70% of job offers involve Java programming. Java is widespread in the enterprise as well as open source frameworks and platforms.

      But parent is right in the fact that Java in the browser is practically dead. Some office environments still require Java for entperise applications, but practically all ordinary users don't need Java in the browser.

      It's a little ironic, since Java on the web was one of Java's main, original use cases. Now Java applets are niche and fading out, whereas Java is pretty much rampant everywhere else.

    11. Re:Plant? by gstoddart · · Score: 5, Informative

      VirtualBox we more or less kinda allowed it to die

      Ummm ... what the hell are you talking about? I use it daily, I get updates for it regularly, and it's anything but dead.

      VirtualBox is alive and well.

      --
      Lost at C:>. Found at C.
    12. Re:Plant? by jblues · · Score: 3, Informative

      And slow, Java is slow as molasses in the depths of a winter snow storm. But there it is, still being used, and a lot, in the corporate world.

      Slow compared to what? Java can be as fast or even faster than C++. The JIT compiler can make optimizations that a C++ compiled program cannot because it can query the machine, and make optimizations based on platform, CPU cache size, etc. Also heap allocation is very efficient, and it does things like removing methods with empty bodies.

      Carefully optimized C++ will blow away Java, but its one of the faster languages around.

      --
      If it acquires resources on instantiation like a duck, then its a shared_ptr<Duck>
    13. Re:Plant? by NostalgiaForInfinity · · Score: 4, Interesting

      Java can be as fast or even faster than C++.

      Java is great on microbenchmarks, and it's a great demonstration that languages could provide high performance and still be safe at the same time. Unfortunately, writing larger systems that perform well in Java is quite hard: you can write fast inner loops, but if you try to use abstractions anywhere, usually things get really slow. Java's garbage collector is also quite good, but unfortunately, the standard libraries force interfaces on you that result in the generation of vast amounts of garbage, so that effect is negated as well.

      Although superficially pretty similar, .NET actually fixes many of those problems. And with LLVM, more languages like that are appearing.

    14. Re:Plant? by nmb3000 · · Score: 3, Interesting

      JavaScript itself is not kludgy at all

      That's going a bit far. Javascript definitely has some kludge in the corners and along the basebords. The wallpaper also needs to go.

      Not many lanaguage need a book called "the good parts" (great book, by the way). Or, a little more tongue-in-cheek....

      --
      "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
      /)
  2. C++ is not a strict superset of C by aglider · · Score: 3, Informative

    While Objective C is. You insensitive programming clod.

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
  3. I don't know why people still say Java is slow... by etinin · · Score: 5, Funny

    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
  4. Re:20 Years by Anonymous Coward · · Score: 3, Insightful

    If you're trying to sell an app, it's your problem, not theirs.

  5. The COBOL of the 2000s by Anonymous Coward · · Score: 3, Insightful

    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"

    1. Re:The COBOL of the 2000s by Anonymous Coward · · Score: 3, Funny

      it puts food in my pantry and a spring in my step.

      Check out the J EE 6, it has a new DI model that's supposed to be better than spring's.

  6. Re:20 Years by jareth-0205 · · Score: 4, Insightful

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

  7. Re:I don't know why people still say Java is slow. by etinin · · Score: 4, Insightful

    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
  8. language is OK, programmers are terrible by Anonymous Coward · · Score: 5, Insightful

    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!

    1. Re:language is OK, programmers are terrible by DickBreath · · Score: 4, Informative

      Don't blame Java for that. It is the fault of many managers. They want cheap, interchangeable droids to build their applications. Run them hard, burn them out, throw them away like a used spark plug. They're cheap to replace. So those managers want a language all these droids understand. So not only do you get experts, but hoards of below average drones who's main skill is interviewing and taking certification exams. (aka 'certified idiots')

      Any programming language could have stumbled into that phenomena. It just happened to be Java. That doesn't make Java itself bad. If anything, the huge community of wealthy enterprise Java users has benefited the Java ecosystem tremendously.

      The platform itself has its major strengths. For just one example, in 2012, Twitter switched from Ruby to Java because Java could scale. You need major scalability when you handle a billion tweets per day and must route each of them to many destinations and platforms. It doesn't matter how much cpu / memory the platform uses, it matters that you can scale it linearly by just adding more boxes. Java already has a lot of ecosystem and infrastructure that enables that kind of scalability. You can google for twitter's 2012 switch from Ruby to Java, and they also have (last time I looked a year or so ago) a lengthy YouTube video presentation discussing the benefits of the change after the fact.

      --

      I'll see your senator, and I'll raise you two judges.
    2. Re:language is OK, programmers are terrible by steelfood · · Score: 3, Insightful

      Any programming language could have stumbled into that phenomena. It just happened to be Java.

      If you threw a bunch of shitty programmers at something simple but low-level like C or complicated but high level like Haskell, these same programmers would turn out software that would completely fail to work. Java, by protecting the programmer from the internals of a system (memory management, pointer vs. value etc.), yet still being simple to write in, lowered the bar significantly for entry into programming as a profession. Anybody can write in Java because it's procedural and easy to think in, and most of the heavy lifting is done for them and it's a matter of stringing together the right libraries.

      You're right that it could've been another language besides Java, but said language would've had to have had the same intrinsic qualities as Java. I guess it could be worse and the defacto industry standard language could've gone to C#.

      It's both good and bad. As programmers, it makes our day-to-day job of writing and maintaining software easier. It also makes being a programmer easier, which is bad because shitty programmers will turn out shitty software, and will do it for cheap. It devalues our profession precisely because managers know they can hire shitty programmers that will churn out a working product. And by the time any maintenance is needed on it, neither they nor the original programmers would be around to deal with the mess, so it doesn't matter.

      --
      "If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
  9. Re:Don't make me puke... by jellomizer · · Score: 3, Funny

    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.
  10. Re:The Betrayal by tylikcat · · Score: 3, Interesting

    *grin* I weirdly managed to completely miss Pascal. Cut my teeth on Fortran* because it was what my father's grad students were using - though I then picked up Modula2, out of a book written in German, which I didn't speak because my father was convinced it was the Next Big Thing and figured if I learned it I could teach him (thanks, Dad). My undergrad institution was all about Ada ridiculously late, though... Picked up C++ at the beginning of my professional life, back in the mid-nineties, though these days I use more Python than anything else. I've written my share of Java. It wasn't horrible, I was more amazed that it kept being kind of subliminally annoying without being downright awful.

    * Which keeps still being relevant - okay, I'm in the sciences now - though I often deny knowing it. I think I took it off my resume in '96.

  11. "Turning on a generation of coders"? by jeffb+(2.718) · · Score: 3, Funny

    But maybe I don't want a language that turns on me.

  12. It allows for more mediocre programmers by pauljlucas · · Score: 4, Interesting

    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.
    1. Re:It allows for more mediocre programmers by H0p313ss · · Score: 3, Insightful

      Despite Java being my bread and butter for a decade this is hard to disagree with, I've met lots of professional java "programmers" who don't understand the JVM at all. (And don't even get me started on system administrators for enterprise systems... Seriously you're admin of a linux box and you don't know what top is and you're uncomfortable at the command line? Really?)

      Even worse is the student world, just dip into the Java question stream on StackOverflow. 50% of the questions any first-year student C.S. would laugh at.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
  13. Lives up to a lot of the hype by MikeRT · · Score: 3, Interesting

    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.

  14. Re:I don't know why people still say Java is slow. by H0p313ss · · Score: 4, Informative

    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
  15. Re:Don't make me puke... by warm_warmer · · Score: 3, Informative

    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.

  16. Re:Easier to learn != easier to use by peppepz · · Score: 5, Informative
    The basic idea is that in Java programs, you can understand what's going on by looking at a fragment of code. Therefore the code is easy to read and to maintain. With syntactic sugar such as properties, operator overload and closures, you can't know which statements will cause side effects without inspecting upstream definitions.

    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.

  17. Java is just a tool like any other language by msobkow · · Score: 4, Interesting

    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.
  18. So long as you are doing batch processing by iamacat · · Score: 4, Informative

    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.

  19. Re:20 Years by IgnitusBoyone · · Score: 3, Funny

    That is disingenuous. You pay 99 dollars to test apps on your friends device.

    --
    Momento Mori
  20. The absolute #1 contribution of Java by tlambert · · Score: 3, Insightful

    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.

  21. Re:Easier to learn != easier to use by Simply+Curious · · Score: 3, Insightful

    - I would say that operator overloading in some cases is evil. In others, it is the natural thing to do. For example, linear interpolation between two vectors is much easier to read as "s*v1 + (1-s)*v2" than as "v1.multiply(s).add(v2.multiply(1-s))".
    - Yes, but by no means should I need to. In C++, I could pass all objects as void* and then include a tag to show which type it represents. I don't do so, because that is something that the compiler can handle.
    - Yes, which is why I mentioned it. The situation is better, but only in recent versions of java.
    - Generated code gets too complicated, because you need to look at each function and determine whether it is still identical to the generated version, or if it has been modified. If code is present, it should be present as the result of a reasonable decision.

  22. Re:Java programmers? - don't make me laugh by tompaulco · · Score: 3, Interesting

    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.
  23. Java is fully open source by Kunta+Kinte · · Score: 4, Informative

    But Java was the important thing we couldn't let die. And it isn't open source so the community couldn't steal it away from oracle.

    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