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

12 of 382 comments (clear)

  1. 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.
  2. Re:Plant? by peppepz · · Score: 5, Informative

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

  3. Re:Plant? by bws111 · · Score: 4, Informative

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

  4. 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.
  5. 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
  6. 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.

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

  8. 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.
  9. 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.
  10. 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.

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