Slashdot Mirror


Slashdot Asks: What Are Your Favorite Java 8 Features? (infoworld.com)

New submitter liveedu shares with us a report from InfoWorld: When Java 8 was released two years ago, the community graciously accepted it, seeing it as a huge step toward making Java better. Its unique selling point is the attention paid to every aspect of the programming language, including JVM (Java Virtual Machine), the compiler, and other help-system improvements. Java is one of the most searched programming languages according to TIOBE index for July 2016, where Java ranks number one. Its popularity is also seen on LiveCoding, a social live coding platform for engineers around the world, where hundreds and thousands of Java projects are broadcasted live. InfoWorld highlights five Java 8 features for developers in their report: lambda expressions, JavaScript Nashorn, date/time APIs, Stream API and concurrent accumulators. But those features only scratch the surface. What makes Java 8 amazing in your opinion? What are your favorite Java 8 features that help you write high quality code? You can view the entire list of changes made to the programming language here.

427 comments

  1. Java? by Anonymous Coward · · Score: 0, Troll

    Arrgghh, no thank you?

    1. Re:Java? by Anonymous Coward · · Score: 0, Insightful

      Agreed. Not the best choice for anything.

    2. Re:Java? by bobbied · · Score: 5, Informative

      Agreed. Not the best choice for anything.

      Bullocks.. There are places for using Java.. Lots of them actually...

      Now, I'm not going to blow the fan boy smoke and say Java is great for everything, it's not. I've seen applications in Java that where wholly inappropriate for the language, but because that's what the development team knew, that's what we got, with horrible results, performance and foot print problems that would make your head spin. (It made mine spin, trying to keep up with the ever expanding hardware requirements to keep that garbage running.)

      So what's Java good for? User interfaces (GUI, WEB you name it) it's great. Need it OS independent? Use Java. It's OK for data processing, but you will need lots of compute resources compared to the same thing in C++. Don't like the "hard work" involved in memory management, Use Java and restart often. However, if you have strict response time budgets, or cannot afford to cycle processes to keep running, and lots of extra hardware use something else... PLEASE use something else because I know I won't field those kinds of applications in Java for you, I've had enough pain in my life already and I'm going to quit your project if you try to make me do it again...

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re:Java? by Anonymous Coward · · Score: 0

      Oracle's whoring hard all of a sudden, how much do you charge?

    4. Re:Java? by MightyMartian · · Score: 2

      I don't think it's Oracle astroturfing. That would involve an entire paragraph dedicated to how Google is an evil IP pirate that must be destroyed at all costs.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    5. Re:Java? by 0100010001010011 · · Score: 4, Insightful

      Tools are tools. People need to quit arguing over how a tool was made and just use them.

      I use Jenkins daily, it's written in Java. It's great. I have no desire to ever learn Java but it doesn't mean I can't use Jenkins. I have tools written in JavaScript, C, C++, Matlab, Simulink, Python, Perl, PHP, et al. As long as I have a way of getting it fixed if it's broken I don't care.

      Additionally there's good money to be made in supporting tools that everyone still uses. COBOL, Fortran, Assembly all still have a massive amount of technical debt that may never go away.

    6. Re:Java? by brantondaveperson · · Score: 1

      Use Java and restart often.

      You're kidding, right? Restart often? Like, the whole machine, or just the JVM? What class of problem admits restarting often as part of a viable solution?

    7. Re:Java? by Pseudonym · · Score: 2

      I disagree. It's by far the best platform for those researching JIT compilation or designing advanced garbage collectors.

      Like you'd want to do research with Python or something?

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    8. Re:Java? by KiloByte · · Score: 1, Troll

      Many places use Cobol, and even more use Windows, too. That people use either doesn't mean Java is the right tool for the job. Any job (maintaining existing code notwithstanding).

      Need it OS independent? Use Java.

      Contrary to what Oracle's marketing dept says, in the real world even C is more portable.

      User interfaces (GUI, WEB you name it) it's great.

      I have no experience with Java on a web server, but after trying to use a few GUI programs in Java, sorry, no. It's a major pain in the ass to deploy: every single program needs a specific version of Java with specific configuration oddities, and even then there's no guarantee of success. And if you manage to start the program, expect crashes, ages-long startup, insane memory use, frequent pauses or outright lockups.

      It's OK for data processing, but you will need lots of compute resources compared to the same thing in C++.

      In other words, it's not OK. I'd understand if it was faster to write in Java than C++ -- after all, we don't use assembly for most tasks despite it being faster -- but you make your compute task being slower for no gain.

      Don't like the "hard work" involved in memory management, Use Java and restart often.

      Say what? If I wanted required restarts, I'd use Windows. Sorry but "reboot/restart often" is. not. acceptable., period.

      It's hard to leak any memory in Perl or Python, and it's a rare thing in C++ unless you're a doofus.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    9. Re: Java? by BlackSabbath · · Score: 0

      For a great many years, anything that involved Windows.

    10. Re:Java? by Anonymous Coward · · Score: 4, Funny

      My favorite Java 8 Feature: the uninstall feature.

    11. Re:Java? by Anonymous Coward · · Score: 0

      that would make your head spin

      So ... you're an old fart?

      The rest of your info was spot-on though.

    12. Re: Java? by Anonymous Coward · · Score: 1

      The best garbage collector collects Java and throws it out of the system

    13. Re: Java? by Anonymous Coward · · Score: 0

      Oh Grandpa...

    14. Re: Java? by lucm · · Score: 1

      For a great many years, anything that involved Windows.

      The Microsoft support handbook:

      -small problem -> reboot
      -medium problem -> reinstall
      -big problem -> upgrade

      This solves 85% of the problems. For the remaining 15%, blame the antivirus and/or the user.

      --
      lucm, indeed.
    15. Re: Java? by Anonymous Coward · · Score: 0

      More like, "this solves 15% of the problems. For the remaining 85%, (correctly) blame the antivirus or - especially - the user."

    16. Re:Java? by OrangeTide · · Score: 1

      Contrary to what Oracle's marketing dept says, in the real world even C is more portable.

      C runs on many platforms and environments. But Java tends to only run on one environment: the JVM.

      Some clever folks know how to port the JVM to run on top of lots of platforms, but JVMs are usually written in C or C++. The Java apps themselves are still targeting a single universal environment.

      --
      “Common sense is not so common.” — Voltaire
    17. Re:Java? by Anonymous Coward · · Score: 0

      Tools are tools. People need to quit arguing over how a tool was made and just use them.

      You can cut things with a shard of broken glass, but I prefer a knife. Similarly, I won't be pounding in nails by hitting them with the hilt of my knife, blade turned toward my face - I'd much rather use a hammer.

      Some tools aren't appropriate for your particular job, and some tools are just plain garbage.

    18. Re:Java? by Anonymous Coward · · Score: 0

      You could come up with something better than that.

      "What are your favorite Java 8 features?"

      The uninstall feature.

    19. Re:Java? by Anonymous Coward · · Score: 1

      Now for the bad points:

      1: Java is a different language, bytecode, and VM. Essentially causing performance loss (there is a reason why applets are not used.) This is evident in Android and why it needs ever larger CPUs, while Objective-C can run faster on custom ARM chips, as it doesn't need a layer of translations.

      2: Java application containers are ass. Bog knows how many times I've had to restart Tomcat, clean up after WebLogic's temp files, or otherwise deal with the memory leaks and slowdowns... all on production critical machines. Java is a point of failure, and would have caused production downtime were it not for load balancers.

      3: Java doesn't run the same on different platforms. The write once, run anywhere dream doesn't happen. I learned that the hard way.

      4: Java is VERY finicky on what JVM, and what version of the JVM. I have had to make virtual machines for the sole purpose of having one JVM accessible so I can use applets on an appliance or an application. Contrast this to .NET which just runs, no issues, be it on XP or Windows Server 2016 betas.

      tl;dr, Java had a lot of promise, but it tends to require constant admin attention. I wish it could be punted from the enterprise for good.

    20. Re:Java? by Anonymous Coward · · Score: 1

      If Java is good for GUIs, how come every GUI java program has a frustrating GUI that doesn't follow any OS settings, and needs special workarounds at the window manager level just to get focus when it has focus, and not when it doesn't - and those workarounds become different for every new Java version?

    21. Re:Java? by Anonymous Coward · · Score: 0

      Mod parent up. The only people that think java is the right choice for stuff are in management, and they think it for the wrong reasons.

    22. Re:Java? by Joce640k · · Score: 1

      +1 Informative.

      If Java was originally designed for UIs then how come every single Java program in the world has a crappy, slow, inconsistent UI?

      Where are the major Java desktop apps? Or even the minor ones?

      --
      No sig today...
    23. Re:Java? by Joce640k · · Score: 1

      Use Java and restart often.

      You're kidding, right? Restart often? Like, the whole machine, or just the JVM? What class of problem admits restarting often as part of a viable solution?

      We're reading an article called "What are your favorite features in version 8 of a language that's already had over 100 updates". 100 updates just in version 8. That's a whole language update nearly every week since it was released, mostly for gaping security holes that could take down the entire system if you don't update.

      Version 7 had 111 updates before it was retired.

      Version 6 had 121...

      Over 330 updates to apply in recent history ... which part of "restart often" are you failing to understand?

      --
      No sig today...
    24. Re:Java? by DrXym · · Score: 1
      Even the most trivial C program can run afoul of differences from one system to another, one compiler to another. And C code has to be recompiled for each platform it ends up running on. It would be nice if I could compile a C or C++ application to LLVM bitcode against some portable APIs and have a runtime compile it natively but this is not the case right now and I doubt it ever will happen. Only then can we talk about C being portable.

      Non-trivial C or C++ software is always littered with #ifdefs and other conditional tests throughout its build system and source to make it work across systems. For example SQLite3 has over 2000 #ifdef, #if, #else clauses in its source code to deal with various platform, compiler, debug configurations. And that's just a small library.

      By and large Java DOES run anywhere. It is quite common for developers to write and test Java code on a PC workstation and deploy the same .jar / .war / .ear file to servers running Linux, Solaris or something else. The main reason this might not work is when the Java has JNI or some OS dependency that breaks this portability (e.g. SWT or JOGL). But most code has no such problem. And this is why Java is the prevalent language it is.

    25. Re:Java? by TheRaven64 · · Score: 1

      Exactly what I was going to say. Java is good at cross-platform GUIs if your idea of a good cross-platform GUI is one that looks and feels the same on all platforms. A good GUI, however, is one that integrates with the host platform and matches all of the platform's human interface guidelines. Java GUIs don't do this. AWT aimed to, but it was deprecated in favour of Swing. Swing implements everything in Java, with pluggable looks and feels, but the looks and feels never quite match the platform. SWT thinly wraps the host windowing toolkit and works fine as long as your host system is win32, otherwise it has a bunch of impedance mismatches and ends up leaking CPU.

      --
      I am TheRaven on Soylent News
    26. Re:Java? by TheRaven64 · · Score: 2

      For garbage collectors, I'll agree (as long as, by Java, you mean MMTk on Jikes RVM and not OpenJDK). For JITs... no. CoreCLR is a lot nicer. It supports nested JITs with fallback, so you can add a new JIT easily and have it bail to another one when it can't handle a particular construct. This makes incremental development and research prototypes that focus on a specific area both a lot easier than anything I've seen in a JVM. Modifying the Jikes RVM JIT is horrible (actually, the Jikes RVM code in general is fragile and flakey - MMTk isn't actually good, it's just that it doesn't really have any less-buggy competition).

      --
      I am TheRaven on Soylent News
    27. Re:Java? by Anonymous Coward · · Score: 0

      There are some nice skins for Swing and it generally works quite well when used right. Sure it does not look native, then again have you seen how often Microsoft switched out its "native" look since Java was first written?

      Where are the major Java desktop apps

      I have seen quite a few Eclipse based tools a few years ago, generally available for $$$, think big business. Also Matlab uses a Swing UI I think, the Vuze bittorent client also had a Java UI. I am sure I could find more if I tried to think about them and while not widespread they exist.

    28. Re:Java? by smartr · · Score: 1

      Ugh, are you sure you didn't post this 15 years ago? Swing and SWT have always struck me as a means to create a lot of work for no real platform advantage. If you had some kind of bizarre love for C++, you could just use Qt and be done with it. Hell, when it comes to web development and GWT, those devs bailed and built Angular.js, probably because it tried too hard to abstract away all the fantastic stuff you get using web frontend frameworks. Yes, you can use Struts 2 or JSTL, but by that point, you've pretty much eliminated Java from the whole GUI layer and instead cordoned it off into being your server model and business logic. Data Processing with C++? Java actually does a fantastic job of interconnecting to data sources through jdbc and tools built on top of that. There are plenty of great free libraries for reading/writing loading information. Still, it's not going to shine like something you might see from R or SAS. Restart often with Java? The code is broken. Horrible performance and footprint problems? The code is broken. Find some smarter programmers to lead and gatekeep development. Too many cycles? Developers are rolling Virtual Machines on cloud metal that have lesser virtual machine docker instances which might contain java virtual machines, which actually do a better job at managing memory resources than their parent containers. Java 9 is actually sounding like it will be even be more superior in this kind of application space.

      Java can be used well or poorly in pretty much anything. There are specific cases where it's less applicable to more native solutions. There are also a ton of libraries and frameworks within and built primarily for Java. The quality of the frameworks you choose at that level will have more bearing on how well Java does for your use case than simply looking at "Java" or "JEE". Spring is fantastic.

    29. Re:Java? by Joce640k · · Score: 1

      There are some nice skins for Swing and it generally works quite well when used right. Sure it does not look native, then again have you seen how often Microsoft switched out its "native" look since Java was first written?

      My C++ app has changed its appearance to match Microsoft's UI changes and I haven't touched a thing in the code since about 2002.

      No, it isn't using MFC or whatever the hell's fashionable these days. It just calls "DrawThemeBackground()", etc., in the Windows theme API.

      My app runs on X11 and Linux, too. Is there a reason why Java can't do that?

      And why can't Java restore a fullscreen window's position when you close/restore an application? It's been 25 years now, has nobody read the documentation for "GetWindowPlacement()"?

      --
      No sig today...
    30. Re:Java? by holz.name · · Score: 1

      Who is this authority that declares what a good GUI is for the rest of us? I rather like an application that is the same everywhere, on Mac, Win and Linux, and I don't have to learn the nuances of a new system. Also, I think only Mac is different, 99% of all computers are the same, 3 mouse button, wheel, menu, buttons, etc.

    31. Re:Java? by Junta · · Score: 1

      On GUI/Web, if you mean it's 'good enough', fine, but if you are claiming it is advantaged, it really isn't. Particularly on the Web side, Java really doesn't do *anything* for you GUI wise, it's just beyond the scope (unless you are saying applets, which no sane person would start new and in fact getting an applet to run in a modern browser is insanity). If you refer to Java webstart, for just make your app run in the browser already and not subject the users to the pain in the ass that is making sure javaws runs right.

      On cross platform, nowadays it is extremely easy to have a write once, build everywhere. Now if you think the 'build once, run anywhere' is significant, then your build system isn't adequate and your users' lives are made more complex because they suddenly need to understand how to launch a jar, which is somewhat unnatural for all the platforms.

      Basically, Java is the right choice when your developers happen to be experienced in Java. However you still need to make platform specific builds to abstract the java-ness (e.g. user downloads an '.exe' rather than a .jar') and your users will be pissed if you deliver your 'webapp' as a jnlp.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    32. Re:Java? by Clsid · · Score: 1

      Dude, user interfaces has got to be the weak point of Java by far. Pretty much everything everybody abhors from the language comes from using slow and heavy software like Limewire, Java IDEs, the dreaded applet loading and crashing or slowing down everything. It provided a somewhat ok video player when there was none for the web, but was quickly replaced with Flash because Java is and will always be a hassle for the desktop. Oh don't forget the constant Java update prompts. With C++ if you shipped an old version of MFC, that was it, wait for a next release if you want to use the updated one, but you really don't want to bother your users with your scaffolding.

      Now, the thing is from a technical point of view, Java is beautiful, very correct, even if verbose and restrictive in some areas. So for web backend, Android (not like you really have another choice), and non real-time systems, do use it. But please people, stop using Java for user interfaces other than Android. I can imagine that something like IntelliJ would be twice as succesful or taken the crown out of Visual Studio a long time ago if it was done in C++ instead of Java. Look at something like SublimeText for things that are a speed demon, small and lean that will never be possible to achieve in Java IMHO.

    33. Re:Java? by Clsid · · Score: 1

      Windows, Linux and Mac are different enough. Windows leans more on the 2 mouse button plus wheel, Linux you really get to use that third button a lot more for pasting, and Mac you can work with a one mouse button. So no, they are not the same by a long shot, and it is not only look and feel. There is a reason why brew exists for the mac or MinGW for Windows.

      A good GUI is one that follows the OS provider human interface guidelines so that the user does not have to relearn how to use a scrollbar, text box, etc every time they want to use a new program. Unless you have a very specialized program like AutoCAD or 3dsmax, it makes no sense to build a custom GUI.

    34. Re:Java? by K.+S.+Kyosuke · · Score: 1

      It's by far the best platform for those researching JIT compilation

      Why not Smalltalk? It doesn't cheat with primitive types or limit you with a rigid object system. Quite a bit more interesting for researching what can be done about JIT compilation of more complex code IMO.

      Like you'd want to do research with Python or something?

      PyPy people have apparently done quite a bit of research with Python.

      --
      Ezekiel 23:20
    35. Re:Java? by Anonymous Coward · · Score: 1

      Honestly people are using Python and Perl for data processing. Compared to those things it is a great choice. There are arguments that developer time is more valuable than machine time so CTO's would rather buy more web servers than suffer even the time to write things in Java. You could write the same thing in C++ of course but you are more likely to have memory leaks, and you may spend time re-inventing the wheel.

      Restart often is not really a usual Java thing. Additionally Java has a very convenient threading model which works pretty well for using multi-core processors and there are tons and tons of distributed system computing libraries/systems. Hadoop is Java, Cassandra is Java these are two examples of massively parallel projects.

      It is true C++ is faster than Java but mostly I would say they are in a similar tier and Java has advantages in simplicity and available libraries. It does seem that for real time systems Java is not the best choice. Though some people do make them anyway with different custom garbage collectors. Not sure how I feel since even in C real time systems often do different things like avoiding malloc and many other unknown performant system calls.

      Still it is not C++ that is the usual alternative to Java, it is Ruby on Rails, Node.JS, Python, Perl, C#, etc...

    36. Re: Java? by Anonymous Coward · · Score: 0

      Windows presentation foundation looks nice. Works a lot like swing themes underneath. Hopefully uses the same drawing calls as windows desktop theme. .Net 3 was all open source and you could see the code for this. Sometimes every different colored line is drawn to construct the texture of a button. I would say the theming features actually works really well in Java and WPF but sometimes they look slightly off from the native, I.e. The title bar stretches and that stretches the close button on the window to fit the height but in the native window manager centers title bar buttons vertically instead of fitting/stretching. It's only off by 4 pixels but it is really noticable. there also seems to be no agreement of what tabs should look like in Java too. It would be cool if there were native calls to the desktop manager to draw the controls but who in the world could keep up? Certainly not Oracle's Java.

    37. Re:Java? by jellomizer · · Score: 1

      Java is a good choice for bosses who are still stuck on decade old buzzwords and you don't want to use .NET.
      Because of that it is a language known by a lot of people and schools teach it as part of the Computer Science Program. So it is easier to find people with that set of skills for larger projects taking a team of developers.

      In the 1980's we had COBOL -- Built mainly for mainframes and filling out forms data and parsing fixed sized files (often compatible with magnetic tape)

      In the 1990's we moved to C/C++/Visual Basic -- We moved to the slower PC hardware so we needed the Speed of C/C++ and/or the ability to handle he new GUI capabilities that VB offered.

      In the 2000's we moved to Java/.NET -- Finding that are gping to be moving from 32bit to 64bit computing also dealing with many rough OS upgrades the bytecode languages offered easier migrations. Here is Java Strongest point, because compared to .NET you could actually make cross compatible products.

      In the 2010's we are moving towards JavaScript/Python/Ruby -- As our personal devices are getting smaller at the expense of performance we are moving towards cloud based solutions so we emphasising more on Web Technologies and Server hosted processing.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    38. Re:Java? by Anonymous Coward · · Score: 0

      If you have to restart a Java application/service your Java developers are pretty crappy. It's far harder to create memory leaks in Java than C++ yet you have them in your programs. The baseline resource consumption of your app will be higher, but it shouldn't continuously grow larger and larger. Stop blaming the language and start blaming yourself and your co-workers, that's the only way to improve yourself. Denying you have a problem won't allow you to fix it.

    39. Re:Java? by SQLGuru · · Score: 0

      My favorite feature is Uninstall.

    40. Re:Java? by hesiod · · Score: 1

      I rather like an application that is the same everywhere, on Mac, Win and Linux, and I don't have to learn the nuances of a new system.

      That absolutely makes sense for people who use multiple operating systems regularly and rely heavily on one application across those platforms.

      Most people, however, use just one operating system and are used to how the OS works, not a specific application. For them, making them adapt to a different interface every time they run just one specific application is counterproductive.

    41. Re:Java? by tomhath · · Score: 1

      So what's Java good for? User interfaces (GUI, WEB you name it) it's great. Need it OS independent? Use Java.

      I've used (or attempted to use) Java for user interfaces. I'm surprised you even mentioned that, it's the worst possible choice - even with the many attempts at providing a library (Struts, Spring, various desktop libraries, etc.). Do yourself a favor and learn Node.js

      OS independent for web programming? Nope, put it on Linux, there's really no other choice (well, Windows .Net is pretty good if you really want to use MS as a server). I've never found Java useful for desktop apps on any platform.

    42. Re:Java? by thechemic · · Score: 0

      I seriously love the UNINSTALL feature built into all versions of Java.

      --
      Let's make like a bird... and get the flock outta here.
    43. Re: Java? by Anonymous Coward · · Score: 0

      Have y'all not heard of the Standard Widget Toolkit (SWT) for making native GUIs with Java? Eclipse has been using this for over a decade now...

      https://en.m.wikipedia.org/wiki/Standard_Widget_Toolkit

    44. Re:Java? by bobbied · · Score: 1

      Use Java and restart often.

      You're kidding, right? Restart often? Like, the whole machine, or just the JVM? What class of problem admits restarting often as part of a viable solution?

      I am not kidding at all. It is standard practice to kill and restart Java processes in high availability systems, in fact, it's a good idea to actually PLAN to do this. Sometimes it is the only way to fix specific problems which are quite difficult (or impossible) to find and fix programmatically.

      Shesh, Sometimes I wonder why folks don't get this, until I remember that there is a whole generation of programmers who only know java and have never had to deal with memory and threading issues directly. They don't understand what the JVM has to do to keep the magic happening.... So they don't understand why I, the moldy old guy who's doing this since Java was developed by Sun, make them do things before I will allow them to field that nifty Java based system of theirs...

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    45. Re:Java? by bobbied · · Score: 1

      Actually, my thought was "user interface" kinds of things where the response time is not a big factor, where a fraction of a second difference doesn't really matter. This includes GUI's, CGI, and other User Interface applications. If you have to do interfaces on multiple Operating Systems, Java is great..... However...

      Java suffers from having to do garbage collection and a lot of house keeping that makes the response time of the program to vary greatly from one invocation to the next. The longer you keep the JVM process running, the more variance you will likely see. If your application can stand this, Java is an option for you, otherwise, stick with something else..

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    46. Re:Java? by Hognoxious · · Score: 1

      "user interface" kinds of things where the response time is not a big factor

      Fast response is crucial for a good GUI.

      https://www.nngroup.com/articl...

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    47. Re:Java? by bobbied · · Score: 1

      Not really... Unless your program is REALLY slow.... But your definition of "slow" does depend greatly on your fame of reference.... If you are writing a device driver, milliseconds count... In a user interface, the differences between 1/4 of a second and 1/8 of a second will be hardly noticeable...

      It's not until you start having delays beyond about half a second will users really care. Half of a second is a LONG time in terms of what a CPU, memory and disks can do, but it's just about a blink of an eye for the user.

      Java, with it's garbage collection causing huge delays (from the perspective of the machine) that you cannot stop mid stream, introduces slight delays here and there. These are not a problem for a user interface, but they'd cause havoc for a device driver, where your response time budgets are significantly shorter than what you need when responding to a mouse click or key press by a user.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    48. Re:Java? by angel'o'sphere · · Score: 2

      Why do you say 'Jave' when you mean 'incompetent Programmer' is beyond me.
      The things you mention are not Java problems or problems of the Java library.

      A window 'programmed' in Java just goes full-screen and back to its original sizes, just like any other window ... no idea what you are talking about.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    49. Re:Java? by bobbied · · Score: 1

      Yep, I have ~25 years in this business.. Started coding in C, back when folks berated it for being to uppity, slow and a resource hog by the assembly guys.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    50. Re:Java? by Pseudonym · · Score: 1

      Why not Smalltalk? It doesn't cheat with primitive types or limit you with a rigid object system.

      Strong types (and unboxed types) are one of the things that make a garbage collector interesting. For example, if you can prove at compile time that a certain object never points to cycles (which you can often determine from type information alone), that translates to real performance gains in practice.

      PyPy people have apparently done quite a bit of research with Python.

      I'll never understand some people.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    51. Re: Java? by TheRaven64 · · Score: 1

      You know, if you're going to reply to a post, it might be a good idea to read it all of the way to the end.

      --
      I am TheRaven on Soylent News
    52. Re:Java? by GodelEscherBlecch · · Score: 1

      It is standard practice to kill and restart Java processes in high availability systems

      As someone who works solely on HA systems, I can assure you that this is not a standard practice. It is in fact the opposite of what 'HA' means and would be considered an unacceptable showstopper in any project. Our server platform consists of Java, C++, Fortran and AIMMS, and out of all these the only components which require a separate daemon to monitor their status / restart on failure are the C++ ones. This is not a negative commentary on C++, merely a byproduct of the higher bar of code quality required to achieve graceful fault handling in that language. The Java components running out of containers never need to come down unless they have an actual memory/resource leak induced by the code, something so ridiculously easy to spot and and address it would never have made it past round 1 of QA. Perhaps you meant 'It is standard practice to kill and restart poorly written processes of any language in high availability systems', but you would still be wrong because if you have such components you do not have an HA system.

      Sometimes it is the only way to fix specific problems which are quite difficult (or impossible) to find and fix programmatically.

      Complete nonsense. Aside from the fact that I can use a debugger, profiler, JMX console and heap/thread dumps to diagnose literally any problem on a live Java process, if a developer ever said the above to me they would be immediately reassigned to intern-level shitwork and fired at the nearest opportunity. 'bounce it once in a while' is an utterly unacceptable solution in HA regardless of language.

      They don't understand what the JVM has to do to keep the magic happening

      I don't think you do either. You seem to think that there is something about the JVM that inherently leads to long uptime issues. This is a function of bad code, not the language in which it was poorly written or the container under which it is executing. Profiling Java applications for deviations in resource usage / behavior is so easy that we had an intern set it up as an automated post-build step using only tools that come standard with the JDK, It took her about a week. There are some valid criticisms of the mis-use of Java (or any language for that matter), but your whole stability argument here is just completely bogus.

  2. Could you gush a little more? by Anonymous Coward · · Score: 4, Funny

    Seriously? This is "journalism"? It's just a gushing promotion.

    My favorite features are the brutally awful runtime performance and the incompatibility from one JVM/J2EE server to the next. Just awesome.

    Runner up "feature" is the litigous vendor behind it all. I just *looooove* Oracle. They are such nice people!

    1. Re:Could you gush a little more? by RobotRunAmok · · Score: 4, Insightful

      No, it's not journalism. It's another in Infoworld's tedious astro-turf-by-story-submission stories. They pay Slashdot, have one of their Marketing Chippies put together a story with a link back to their trade mag, and the skids are greased for it to hit the main page here as scheduled. (snydeq is their usual flunky) The incredible -- or just-precious -- part of it is that InfoWorld believes there is enough of any critical mass of programmers or software industry decision-makers who still frequent Slashdot to make this a worthwhile media buy for them.

    2. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      Well, probably a greater percentage of the productive ones do. The rest are too busy on twitter to be of any use to anyone.

    3. Re:Could you gush a little more? by squiggleslash · · Score: 4, Interesting

      I've been debugging and rewriting a lot of legacy C# code recently, and I have to say that it's a breath of fresh air. I used to advocate Java, before Oracle went crazy, but after using C# I never want to touch that bureaucratic pile of over engineered crap and its litigious nutcase "owner" again.

      Google: please, please, consider switching. You could even piss Oracle off by porting over the official JVM to Android, writing a Dalvik to Java byte code convertor, and letting legacy Java Android apps run at 10% of the speed they're supposed to, just to simultaneously encourage developers to move to C# and to end the lawsuit with Oracle completely unable to do anything about it.

      --
      You are not alone. This is not normal. None of this is normal.
    4. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      And like a good little submissive you read it and then delve into the comments and contribute to the conversation. Thanks for making Slashdot great!

    5. Re:Could you gush a little more? by bondsbw · · Score: 1

      Heck, now that the C# compiler suite (Roslyn) is open source, Google could even fork it and do whatever it wanted with it. Not that I suggest it... that community is pretty awesome and the language has managed to remain incredibly clean and forward-thinking given its heavy evolution.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    6. Re:Could you gush a little more? by cpm99352 · · Score: 2, Informative

      The incredible -- or just-precious -- part of it is that InfoWorld believes there is enough of any critical mass of programmers or software industry decision-makers who still frequent Slashdot to make this a worthwhile media buy for them.

      Well, I'm both a programmer and a decision maker, and I really wonder about the motivation of someone who would pick Java for a new project. Oracle is beyond toxic.

      I'm a certified Java Programmer (1.4) and really don't advertise it any more. Oracle's Java is dead to me.

    7. Re:Could you gush a little more? by superwiz · · Score: 1

      He's on the wrong Java.

      --
      Any guest worker system is indistinguishable from indentured servitude.
    8. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      My least favourite Java features are the antivirus and search bar crapwares the installer brings if user is not actively unselecting them on each update. I have cleaned up countless machines which were full of crapware the Java installers had brought.

    9. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      What's the point of switching from a large company's managed language to another large company's managed language? If you think Google did a mistake choosing Java in the first place, then it shouldn't be doing it for a second time.

    10. Re:Could you gush a little more? by Anonymous Coward · · Score: 1

      Java compiler is also open source

    11. Re:Could you gush a little more? by dgriff · · Score: 1

      What do people use as an alternative to Slashdot to get their tech news then? (Or should I say news plus comments because the comments plus the ability to filter them based on rating is the most interesting thing).

    12. Re:Could you gush a little more? by nateman1352 · · Score: 1

      Java is now toxic thanks to its owner. For the sake of the entire tech industry, we all should consider it a legacy technology that should be removed from everything as quickly as possible. Unfortunately that will take years... maybe even decades, but we must start the deprecation process as quickly as possible. Besides, in the 20 years since it was created we have better cross platform languages now anyway.

      Thankfully a lot of us have input in to technical decisions here. We all need to take a stand and kill Java.

    13. Re:Could you gush a little more? by jandersen · · Score: 1

      I don't know C#, other than it is a sort of almost C++, but not quite. Oh, and it runs in a kind of JVM, but not quite. Obviously I can't comment on the merits or otherwise of the language, but having long experience with both Microsoft and Oracle, I feel I come out in favour of Oracle - perhaps not on how nice they are (they are both businesses - ie callous, greedy and only trustworthy if it is profitable), but to an engineer what matters is not 'how gentle their smile, how sweet their countenance', but the quality of their product, the documentation and their willingness to engage in support. Oracle's documentation in particular is astoundingly good - not a lot of colour pictures, I'll grant, but just have a look at their SQL manual, or the Messages and Codes; the amount of detail is exquisite, in my view. Not beginner friendly, but most of us don't stay beginners forever.

      The other thing in favour of Java over C# is that Java is supported on nearly enything that is a computer - from mobile to mainframe; mainframes even come with dedicated Java processors, in effect. That is the real reason for anybody to use Java; in itself it isn't an incredibly good language - I think C++ is a better object oriented language, and C is better for ad hoc coding, but Java, with it's huge set of standards for nearly everything, is probably the most portable language there is.

    14. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      Better languages like what? Python and Ruby? C#? C++14? Get real. There is a reason Oracle have been able to get away with so much shit without killing either themselves or Java.

    15. Re:Could you gush a little more? by squiggleslash · · Score: 1

      In theory it is.

      In practice, Oracle will sue you if you modify it. So far they've lost, but...

      --
      You are not alone. This is not normal. None of this is normal.
    16. Re:Could you gush a little more? by holz.name · · Score: 1

      Oracle didn't sued Apache Harmony but Google, because they didn't forked Java but created a new implementation. OpenJDK is the reference implementation and is under the GPL.

    17. Re:Could you gush a little more? by holz.name · · Score: 0

      I think C++ is a better object oriented language

      How can you possible think that? C++ is just class slapped on C. The fact that you need to define your private fields and methods publicly in the header file makes C++ just a cripple as an object oriented language. The rest is just good to obfuscate your code, i.e. op-overloading and templates.

    18. Re:Could you gush a little more? by squiggleslash · · Score: 1

      Both Sun and Microsoft have made it clear they'd be happy with Google adopting their managed code technologies, and that Google can use them for free. The difference is that Microsoft isn't likely to be bought by Oracle.

      --
      You are not alone. This is not normal. None of this is normal.
    19. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      The other thing in favour of Java over C# is that Java is supported on nearly enything that is a computer

      A glaring counter example is gaming software. Usually the domain of C++, there is a very serious contender there, called Unity (the game engine). It is so portable it comes over all OSes (that matter, sorry, Solaris), including all mobiles. And Unity is... .NET.

      Is there a JVM game engine that's actually used more than for a few pet projects?

      The fact a platform like the JVM, so heavily marketed, so heavily present everywhere, failed to the mistrusted, maligned, new kit on the block challenger like .NET is telling.

      Anyway, we can argue merits all day, but in the end, pragmatic portability is more important than absolute portability. Know what your domain is.

    20. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      Well, I'm both a programmer and a decision maker, and I really wonder about the motivation of someone who would pick Java for a new project

      Maybe because all the alternatives are unsuitable/undesirable?

    21. Re:Could you gush a little more? by McLoud · · Score: 1

      Who has the luxury to start a made to last new project from scratch except maybe some opensource zealots?

      --
      sign(c14n(envelop(this)), x509)
    22. Re:Could you gush a little more? by StormReaver · · Score: 1

      You and I have completely different experiences. I've had to maintain people's C# code, and it's no better than Java, and is frequently so obtuse as to be a bad joke. It has a whole set of solutions solving problems that don't exist, except in the minds of bad programmers, but completely lacks the cross-platform benefits of Java.

      Java's cross-platform powers far exceed the minor (and most are very minor, to the point of insignificance) problems the platform has. Of the dozens of languages/platforms I've learned and forgotten over the years, Java hits a sweet spot that nothing else has come close to touching. It's unfortunate, because Oracle is a decayed, green, rotten donkey dick; but the GPL compensates for that.

    23. Re:Could you gush a little more? by slapout · · Score: 1

      Rumor has it Google was considering Swift

      --
      Coder's Stone: The programming language quick ref for iPad
    24. Re:Could you gush a little more? by meta-monkey · · Score: 2

      The documentation for C# (and to be honest all of Microsoft's recent offerings) is phenomenal. Easy to read, easy to search, well referenced, lots of examples. The language itself is modern, sleek, well thought out, and has incredibly useful features like LINQ that simply no one else has.

      As a linux nerd I spent two decades laughing at M$'s incompetence. But I have to give credit where credit is due. I hate the fact that C# is my current favorite high-level general purpose language.

      --
      We don't have a state-run media we have a media-run state.
    25. Re:Could you gush a little more? by Clsid · · Score: 1

      This. The only reason why I still have to deal with Java bs is because of Android. Let Google come up with a Swift like language, or hell just use Go/Dart or whatever you want for Android development, just stop using this bullcrap that causes lockups on the phone and massive memory consumption. Phones nowadays need to have 3GB of RAM to avoid those lockups comfortably.

    26. Re:Could you gush a little more? by Clsid · · Score: 2

      C# IS a better language by far. The reason Java made it that big was because people wanted an alternative to Microsoft so bad and Java was the Android of the time. Well that and the massive hype during the dot-com bubble era.

    27. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      I don't know C#, other than it is a sort of almost C++, but not quite. Oh, and it runs in a kind of JVM, but not quite.

      Well. here are two things about it:
      1) Code targeted for the old .Net framework 2.0 still runs on 4.5x, and won't complain about versions of the JVM
      2) There is a utility [ngen] to generate a processor-specific binary of your intermediate code, and bypass the JIT.
      Microsoft uses this on lots of their software installs.

    28. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      My favorite feature is that it's a huge security hole that makes early Windows XP look like OpenBSD.

    29. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      So you don't know C# but feel like your opinion is relevant, even after claiming that quality of product is a huge determining factor?

      C# is way more than a warmed up C++, it's an elegant and far superior language to code in with a much better engineered supporting framework than Java. C# in reality doesn't really have much to do with C++, the direct competitor is Java and it pretty much demolishes it. The documentation is on the level of Java. I say all this as a huge MS-hater.

    30. Re:Could you gush a little more? by IvanYosifov · · Score: 1

      I don't know C# enough to comment, you could be right. Unfortunately, the MS issue stands. Just because Oracle are assholes doesn't make MS trustworthy.

    31. Re:Could you gush a little more? by chrylis · · Score: 1

      Let Google come up with a Swift like language

      You mean Groovy, which was the inspiration for Swift and has been able to target Android for at least a year and a half?

    32. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      You should not let your feelings towards Oracle cloud your personal judgement. I dislike them greatly and I think Java would be much better if they set it free, but that's not the world we live in.

      As a technology Java still fills a very important role in the market, for many projects it is easily the best choice. Maybe one day .net will be a real contender, but for the kind of projects I work it's not there yet.

    33. Re:Could you gush a little more? by hesiod · · Score: 1

      There is a reason Oracle have been able to get away with so much shit without killing either themselves or Java.

      Because so many software companies created large projects in Java and can't afford to (or simply won't) spend the resources to convert those projects to something better.

    34. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      I can write C# .NET that works on everything from smart-cards to servers.... what does that remind you of?

    35. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      Microsoft may also sue you too, so... better avoid large company products.

    36. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      It doesn't have to be bought by anybody. Culture changes, people stepping down, new guys arriving... What you take for granted today may change tomorrow.

      You can be a Microsoft evangelist and fall in love with Nadella, but Google, as a company, can't put their mobile tech under Redmond control.

    37. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      As a linux nerd I spent two decades laughing at M$'s incompetence. But I have to give credit where credit is due. I hate the fact that C# is my current favorite high-level general purpose language.

      What's the point in being a Linux nerd when you want to use a programming language designed for windows environments? It's like a Cocoa programmer pretending to use Windows.

    38. Re:Could you gush a little more? by angel'o'sphere · · Score: 0

      Actually there is nothing better right now.

      Every other tech that is somehow competing has server drawbacks. I don't see anyone doing enterprise software in Python, C++ or C#/.Net ...

      An no other 'ecosystem' is as dynamic and moving quickly as Java is, thanx to ByteCode and ByteCode morphing technologies.

      Stuff like Annotation processing, Byte Code Weaving, Hibernate, AspectJ etc. simply don't exist in such abundance outside of the JVM ecosystem.

      Standards, like servlets etc. only Java has that.

      People who don't grassp that Java (the platform) is the most solid and most flexible and most avangard platform for anything around software, simply should not work in the software business.

      If you have reasons to chose something else, fine. E.g. I really would like to work on a project done in Qt and C++. But I don't write REST backends in C++ or C# ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    39. Re:Could you gush a little more? by PCM2 · · Score: 1

      1 SQUIGGLESLASHMOD +! \ sig

      --
      Breakfast served all day!
    40. Re:Could you gush a little more? by meta-monkey · · Score: 1

      Hence my frustration.

      --
      We don't have a state-run media we have a media-run state.
    41. Re:Could you gush a little more? by erapert · · Score: 2

      Who has the luxury to start a made to last new project from scratch except maybe some opensource zealots?

      If no one has that luxury then shouting "rah rah Java!" from the rooftops also does no good since everyone in this hypothetical is already stuck with whatever language their project was written in.

      But that world isn't real. Instead, some of use do start new projects and we do think about what tool to use.

      And Java is the absolute last tool I will ever use... except Oracle's database: that comes below even Java.

    42. Re:Could you gush a little more? by Rakarra · · Score: 1

      As a linux nerd I spent two decades laughing at M$'s incompetence. But I have to give credit where credit is due. I hate the fact that C# is my current favorite high-level general purpose language.

      Do you still have to use that horrible Mono implementation on Linux? If we could bypass that, I might give it a look..

    43. Re:Could you gush a little more? by Tablizer · · Score: 1

      I believe the poster's comment was about the language itself and not code written in the language. You seem to be comparing Java coders to C# coders.

      Microsoft did have existing Java implementations and code bases to learn from when designing C#, and by many accounts learned from Java's rough edges to incorporate the lessons into C#.

    44. Re:Could you gush a little more? by shutdown+-p+now · · Score: 1

      I don't know C#, other than it is a sort of almost C++, but not quite.

      This would imply that you don't know it at all.

      C# was sort of almost Java, except with a bunch of different syntax of C++ and Delphi heritage. But that was back in 2001.

      These days, it's still closer to Java than it is to C++, but I'd say it's pretty far ahead of Java in terms of high-level language features.

    45. Re:Could you gush a little more? by shutdown+-p+now · · Score: 1

      Do you still have to use that horrible Mono implementation on Linux?

      You don't. However, .NET Core has a more limited standard library - in particular, it doesn't include anything GUI-wise out of the box. I would imagine that existing libraries like Gtk# will be ported to it soon enough, but from Microsoft's perspective, its primary purpose is to run server-side code - web apps and services - and various associated command-line infrastructure tooling.

    46. Re:Could you gush a little more? by shutdown+-p+now · · Score: 1

      In what sense is C# the language designed for Windows environments?

      The original .NET standard library (what's now known as "desktop profile"), you could say that in places (though not for 90% of it - a linked list is a linked list on any platform, for example). But the new .NET Core is designed to be cross-platform from the very beginning.

    47. Re:Could you gush a little more? by shutdown+-p+now · · Score: 2

      Every other tech that is somehow competing has server drawbacks. I don't see anyone doing enterprise software in Python, C++ or C#/.Net ...

      If you don't see anyone doing enterprise software in C++ or C#, you haven't looked hard enough. There are thousands of companies doing exactly that. Heck, go check out any job search site.

      One particular trap that you may be falling into is assuming that your local market is representative of other places. Some geographic regions can become locally locked in to some tech that dominates the market in that region - Java, Delphi, VB, you name it. These come and go, though, and of course, being local, they don't necessarily correspond to the bigger trend.

      An no other 'ecosystem' is as dynamic and moving quickly as Java is

      I have no idea what your definitions of "dynamic" and "moving quickly" are, except that they clearly aren't mainstream.

      In terms of moving quickly, Java is the laughing stock - they took several years to implement lambdas, for example, and they were overtaken even by C++ in the process, being pretty much the last mainstream language to get them. Even then, the result is a crapshoot due to the lack of reified generics, requiring tons of interface definitions to cover a very basic subset of functions taking/returning primitive values while avoiding boxing and the associated perf issues.

      In terms of dynamic, obviously, Java can't really compete with a true dynamic language like Python. But even C# leaves it far behind in that regard, with opt-in duck typing.

      thanx to ByteCode and ByteCode morphing technologies.

      Bytecode is an implementation technique predating Java by 30 years or so, and is used by most VMs out there. Including C# and Python. C# ramps it up a notch by providing AST-like expression trees as a first-class data type, which can be inspected and changed at runtime before they get compiled to bytecode.

      Stuff like Annotation processing, Byte Code Weaving, Hibernate, AspectJ etc. simply don't exist in such abundance outside of the JVM ecosystem.

      Every single thing that you've listed exists in other ecosystems. In some cases it's direct ports of the same projects even. As for abundance, who needs that in the enterprise? What people want is a single stable implementation that everyone can standardize on.

      Standards, like servlets etc. only Java has that.

      Care to list a single ISO or ANSI standard that defines Java language or VM?

      C++, for example, is standardized by ISO, both the language and the standard library. An older version of C# the language (sans standard library) is also an ISO standard.

      And who uses servlets in 2016, anyway?

      People who don't grassp that Java (the platform) is the most solid and most flexible and most avangard platform for anything around software, simply should not work in the software business.

      People who don't grasp that creating a religious cult around a piece of software is a bad idea shouldn't work in the software business.

    48. Re:Could you gush a little more? by jandersen · · Score: 2

      How can you possible think that? C++ is just class slapped on C. The fact that you need to define your private fields and methods publicly in the header file makes C++ just a cripple as an object oriented language. The rest is just good to obfuscate your code, i.e. op-overloading and templates.

      I suppose it is a matter of taste what you consider good, and I have no problem accepting that other people don't have the same likings as I do, but I will try to explain. Firstly, I think your description of C++ is wrong; a huge amount of very careful considerations have gone into the design of C++ from the very beginning. Bjarne Stroustrup, for all that he's a Dane (like me), is actually a clever guy. Your reasons for not liking the result should not include the assumption that it is "just class slapped on C", I think, since it is grossly inaccurate.

      Next, there is no need to define private fields and methods in a publically available header file; just like Java has its interface classes that are meant to protect the public from viewing the horrors that lie within, in C++ you achieve the same by creating a class with only pure, virtual methods, and then inheriting that from your implementation. This of course forces you to define getters and setters, which many don't like, but that is at least one way to do it.

      Overloading is an obvious idea, at least if you have some background that involves mathematics; all languages I know, except for assembler and possibly COBOL, have operator overloading in some limited fashion: integers and floating point numbers are different data types, but for both, we want to be able to use arithmetic operators. And it is not that much of a stretch to imagine other cases where you might want to do the same - strings being one example. But as we know from pascal vs C, there are more ways than one to implement strings, so although the concept of how '+' and '==' should work is obvious, the details are not. Without expanding too much, I think the rationale behind overloading is very reasonable; but of course, it also opens up for stupid misuse cases - there is nothing to stop people from changing '+' to mean something like 'division', except for common sense.

      Templates is "macros with syntax check", in a way; it is an incredibly strong tool, and I find it hard to imagine how one would implement design patterns without templates, but just like all other power tools, you need to know what you are doing - and in most cases you should choose a smaller tool.

      Finally, the reason I like C++ is the same reason I like C: C is a very clean language - the syntax is a very good compromise between the minimal and the practical, and it is what I, perhaps incorrectly, call 'logically complete'. Somebody (K&R, probably) very carefully designed the language, so that the only limitations are the ones set by the external parameters (like available RAM), not by arbitrary design decisions. The same is true about C++, but when you add things like multiple inheritance, overloading and all the other stuff to C, things will necessarily get much more complicated. However, the added complexity is only the minimal, logical consequence of the extra syntax. The upside of this is that although it is more complex, it is so in a natural manner, and that makes it relatively easy to see what the correct syntax is. And that is, in essence why I like C++ and think it is the best implementation of OOP.

      A simple example: In mathematics, a vector space is a set of objects for which linear combinations are defined: a*V+b*U, where U, V are your 'vectors' and a, b are 'scalars' (and I'm being deliberately vague on what scalars could be). The interesting thing about vector spaces is that no matter what the actual vectors are, they all follow the same, basic rules. Operator overloading would enable me to define what '*' and '+' might mean; just as in maths, a vector could represent geometric objects ('directed line segments'), functions whose values can be added and multiplied (c

    49. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      I know what Microsoft means when they say "cross-platform". It runs on Windows XP AND Windows 7.

    50. Re:Could you gush a little more? by shutdown+-p+now · · Score: 1
    51. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      In terms of moving quickly, Java is the laughing stock - they took several years

      Ecosystem, not necessarily java itself.

      The variety and quality of support for mock-objects , AOP, ORM, servlet etc. support in java is unparalleled.

      One particular trap that you may be falling into is assuming that your local market is ...

      C# doesn't have much of an existence outside Microsoft's area of influence, so your statement applies more to you than any one else.

    52. Re:Could you gush a little more? by shutdown+-p+now · · Score: 1

      C# doesn't have much of an existence outside Microsoft's area of influence, so your statement applies more to you than any one else.

      Microsoft's "area of influence" is global, so this isn't really telling anything.

      But note that I didn't claim that C# is the only popular, or even the most popular, server-side enterprise language.

    53. Re:Could you gush a little more? by angel'o'sphere · · Score: 1

      Java took longer in many areas to make standards official as in lambdas e.g.
      Nevertheless it is the academic and industrial leading platform for VM and language evolution.

      No one is using CLR etc. for academic projects. Oh yeah, I should not write "no one" when the correct term is "only a small minority (MS funded) is doing it".

      All the stuff you mention is done by one platform or another, but none besides the JVM is used/supporting all of it.

      There is no ISO standard needed to make the Servlet API or EJB/JPA 3.0 a standard.

      In some cases it's direct ports of the same projects even.
      Exactly. People working on JVMs, understanding the power of byte code morphing etc. had it first. And the others ported it, mostly badly.

      People who don't grasp that creating a religious cult around a piece of software is a bad idea shouldn't work in the software business.
      I'm an atheist.

      But as always, thanx for the AST link ... in Groovy (running on the JVM, we have this quite a while, too :D )

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    54. Re:Could you gush a little more? by Anonymous Coward · · Score: 0

      Microsoft's "area of influence" is global, so this isn't really telling anything.

      Yes, excluding most servers, embedded, mobile software. So it's telling nearly everything, excluding "desktop".

  3. System.exit() by oddware · · Score: 2, Insightful

    It's the best thing java can do

  4. I like how stupid and convoluted it is by Anonymous Coward · · Score: 0, Flamebait

    with it's ugly rat nest of hierarchical imports, and how it was designed to prevent you from having simple, intuitive computational things like 'unsigned integer" and bitwise access to char buffers.

    1. Re:I like how stupid and convoluted it is by Anonymous Coward · · Score: 0

      Yeah completely UNLIKE every other programming language out there.

      Sheesh, what a n00b.

  5. Row row row your boat by javawocky · · Score: 1

    Streams are my new happy place - mostly. I still use the for loops, but it has helped make some hard to understand for loop logic much clearer to understand.

    1. Re:Row row row your boat by Anonymous Coward · · Score: 0

      I still use the for loops, but it has helped make some hard to understand for loop logic much clearer to understand.

      Loop logic can be hard to understand? If's a fucking loop.

    2. Re: Row row row your boat by AuMatar · · Score: 4, Insightful

      Exactly the opposite. Streams took easy to read and understand for loops used by every language on earth and replaced it with gibberish that you need to work through to understand, and is far more difficult top debug as there's no damn place to put a break point or print statement. They're banned everywhere I've heard of

      --
      I still have more fans than freaks. WTF is wrong with you people?
    3. Re: Row row row your boat by Anonymous Coward · · Score: 0

      You are special. He means logic inside the loop.

    4. Re: Row row row your boat by BlackPignouf · · Score: 2

      there's no damn place to put a break point or print statement.

      https://docs.oracle.com/javase...

    5. Re: Row row row your boat by swilver · · Score: 1

      If you're replacing loops with Stream's forEach, then you're doing it wrong.

      Banning streams is like banning multiple returns, use of ?: operator, regular expressions, etc. Tell those old coots that work on your team to suck it up and get with the times. I'm not rewriting stuff that is clear and concise to some triple nested behemoth just to avoid something that "looks too complicated".

    6. Re: Row row row your boat by ACE209 · · Score: 1

      Not special. Just a bit out of the loop.

      --
      "we are all atheists about most of the gods that societies have ever believed in. Some of us just go one god further."
    7. Re: Row row row your boat by AuMatar · · Score: 3, Insightful

      No,you're going to rewrite it to a for loop because its more maintainable, more easy to change with changing requirements, and more understandable.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    8. Re: Row row row your boat by PCM2 · · Score: 1

      You ban regular expressions?

      --
      Breakfast served all day!
    9. Re: Row row row your boat by shutdown+-p+now · · Score: 1

      Streams took easy to read and understand for loops used by every language on earth and replaced it with gibberish that you need to work through to understand

      If you have been writing simple maps and folds as explicit for-loops for 20 years, I can see that being a problem. But for someone whose mind is not so conditioned, streams are clearer because they describe what is done, not how it's done - and more concise at that.

      is far more difficult top debug as there's no damn place to put a break point or print statement.

      You can put it inside the lambda, you know. Which is exactly equivalent to putting it inside the for-loop body.

      They're banned everywhere I've heard of

      Yeah, we passed that stage in C# land, too, after they've added lambdas and LINQ back in 2008. Took about 3-4 years for the old guard to give up and embrace the future.

    10. Re:Row row row your boat by Jake+Griffin · · Score: 1

      Loop logic can be hard to understand? If's a fucking loop.

      Actually, "If" is a branch. "While" and "For" are loops.

      --
      SIG FAULT: Post index out of bounds.
    11. Re: Row row row your boat by Anonymous Coward · · Score: 0

      Maybe you need to hear about more places then.

  6. Promoted? by bengoerz · · Score: 4, Insightful

    This user's entire submission history consists of 2 stories about Java within an hour of each other. Smells like shill.

    1. Re:Promoted? by 0100010001010011 · · Score: 1

      After seeing how bad "Corporate Social Media Consultants" are on Reddit and nearly everywhere else I don't doubt it.

      If it's anything like the Fortune 500 companies I've worked at it's a committee of 40+ year olds* that are also 10-15 years behind the wave of everything. "Hey I heard of this company called Slashdot. It's for techny people. I's really easy to make an account. Lets make something up, they'll never notice".

      Based on how and when it was posted they're all at home right now patting themselves on the back for doing their 9-5 job. They'll come in tomorrow morning and sort it all out then.

      *. I'm not saying that there aren't people in that age group that don't know their stuff. That's not the demographic I'm talking about. There are also a lot of younger people that don't understand the nuance of Slashdot as well. See Brianna Wu's AMA where the Twitter crowd had no clue how any of moderating worked and it was a hilarious shit show.

    2. Re:Promoted? by Pseudonymous+Powers · · Score: 1

      This user's entire submission history consists of 2 stories about Java within an hour of each other. Smells like shill.

      Good detective work, but I didn't really need it, because to me, the summary already looks like this:

      ShillWorld shilllights five Java 8 features for shillvelopers in their shillport: shillambda shillspressions, ShillavaShillpt Nashorn, shill/time APIs, Shill API and shillcurrent shillcumulators. But those shills only shill the shillface. What makes shilly shilly shill-shill-shill in your shillpinion? Shill shill shill shill shill shill shill. SHILL!

  7. Not having java by Anonymous Coward · · Score: 0, Troll

    Yup that the best option

  8. New and exciting ways to run out of heap space by Anonymous Coward · · Score: 2, Insightful

    No more permgen!

  9. The Dear Leader created Java in a single hackathon by RightwingNutjob · · Score: 0

    And he also seems to have written this story.

  10. lambdas of course by bigsexyjoe · · Score: 1

    The signiture feature is lamdbas for easier functional programming. Other goodies are nice but the lamdbas are the best new feature.

    Did I say it first to get the 5?

  11. Decimal Numbers? by CastrTroy · · Score: 3, Interesting

    Have they added support for decimal numbers yet? .Net has had support for decimal numbers for quite a few years now (At least since 2003). It comes in really handy for doing applications dealing with money, which quite a lot of applications deal with. Floats and doubles don't work well with currency values as they can't hold exact decimal values for many commonly encountered numbers. There are work arounds like using integers to store the number of cents, and using classes like BigDecimal, but both of those have quite a few drawbacks.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    1. Re:Decimal Numbers? by ADRA · · Score: 3, Informative

      Looks like you're looking for "JSR 354: Money and Currency API" Its an API, not language primitive. Its not surprising given that decimal numbers are essentially strings for all tense and purposes with some convenience math features wrapped around them. Outside of said library there are probably dozens of math libs that you could work with for your fixed size precision needs.

      --
      Bye!
    2. Re:Decimal Numbers? by sanosuke001 · · Score: 1

      Store your values as total cents instead of fractional dollars? The base unit is cents, not dollars, anyway. (In the US) If you're storing fractional numbers for anything that requires a specific value you're doing it wrong.

      --
      -SaNo
    3. Re:Decimal Numbers? by gerald.edward.butler · · Score: 5, Informative

      BigDecimal is not a work-around. It is the exact solution to the problem.

    4. Re:Decimal Numbers? by CastrTroy · · Score: 1

      How do this work when calculating tax rates? Taxes can be at a fraction of a percent. Quebec for instance has 9.975 % sales tax. If you store your amounts as integers in total cents, what value do you multiply by to get the tax? If you have a proper decimal data type, you can store store the exact values. .Net has no problem storing 9.975, 0.09975 or any number up to 28 significant digits without worrying about weird floating point anomalies.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re:Decimal Numbers? by CastrTroy · · Score: 4, Informative
      It works, but it makes your code kludgy. Without operator overloading, you have to do fun things like a = b.add(c) just to numbers together. Just hope you never have to do a complex mathematical operation. It's much harder to see what's going on when you can't use things like BigDecimal. Even a simple comparison just gets ugly.

      if ( bigDecimal1.compareTo(bigDecimal2) < 0){
      ...
      }

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    6. Re:Decimal Numbers? by 110010001000 · · Score: 2

      You round down the cents and transfer the fraction into your back account. I knew three guys who did that and got away with it.

    7. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      for all tense and purposes

      Congratulations for not using "intensive purposes" like so many others. But, however, the correct phrase is "intents and purposes."

    8. Re:Decimal Numbers? by RoccamOccam · · Score: 2

      For future reference, the phrase should be "for all intents and purposes".

    9. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      Intents and purposes.

    10. Re:Decimal Numbers? by arth1 · · Score: 2

      The base unit is cents, not dollars, anyway. (In the US)

      No, that would be mill, which is defined by congress as the "lowest money of account, of which 1000 shall be equal to the federal dollar".
      Except for property taxes and gasoline prices, it's generally rounded to the nearest cent, though.

    11. Re: Decimal Numbers? by AmazingRuss · · Score: 5, Funny

      Tents for porpoises?

    12. Re: Decimal Numbers? by Anonymous Coward · · Score: 0

      intent without the s

    13. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      BigDecimal is not a work-around. It is the exact solution to the problem.

      All mechanical representations of numbers lead to inaccuracies.

      Computer scientists using binary-based representations realize this and design their algorithms to minimize the errors.

      Accountants just define any inaccurate decimal-based results as "correct".

    14. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      No, BigDecimal does not have "quite a few drawbacks", it works perfectly fine for currency. Bottom line is if you're going to astroturf/troll for Microsoft then you need to be more subtle about it.

      TL;DR: WTF are you talking about?

    15. Re:Decimal Numbers? by Anonymous Coward · · Score: 1

      for all tense and purposes

      Congratulations for not using "intensive purposes" like so many others. But, however, the correct phrase is "intents and purposes."

      Irregardless, they're exact diction had nothing to do with the topic. That's almost as bad as new-kyoo-ler power plants. So their!

    16. Re:Decimal Numbers? by Dog-Cow · · Score: 1

      All mechanical representations of numbers lead to inaccuracies.

      That statement is false. While decimal number types may have limited precision, they are, in fact, accurate.

    17. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      You should learn what decimal numbers are before asking if X has decimal numbers.

    18. Re:Decimal Numbers? by Hognoxious · · Score: 1

      A rate and an amount are quite distinct things.

      For your example, you'd multiply by 9975 and then divide by 10000. Or maybe 100000. Fuck it, QA will catch it.

      Yeah, I've seen old code dotted around with magic numbers like that.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    19. Re:Decimal Numbers? by swilver · · Score: 1

      Just introduce a class for monetary values. It can wrap BigDecimal or anything you want. Give it functions that make sense (like convert, round, add, substract, but not functions like power, sin, cos, division, etc.).

      Using double is just laziness. Just because money looks like a number doesn't mean you should use a primitive type. It's like using ints where you should use enums, or storing postal code in an integer field... think about what your data represents and if the standard functions like * + - / would make sense for them. If not, use a custom class -- it will help with type safety as well.

    20. Re:Decimal Numbers? by Hognoxious · · Score: 1

      Without operator overloading, you have to do fun things like a = b.add(c) just to numbers together.

      Java programmers probably think that's a good thing.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    21. Re:Decimal Numbers? by swilver · · Score: 1

      Not really. BigDecimal offers way too much functionality that makes 0 sense for monetary values. Wrap it in a class, and only offer what makes sense.

    22. Re:Decimal Numbers? by Hognoxious · · Score: 1

      All mechanical representations of numbers lead to inaccuracies.

      No they don't. I store the number of eggs in my fridge as [integer] four. Are you saying it's really 3.9 recurring?

      Accountants just define any inaccurate decimal-based results as "correct".

      Despite the cheers from the peanut gallery, actually they don't. They apply predictable & consistent rules on how to round currency amounts, which due to some labyrinthine conspiracy or bizarre coincidence are extremely similar to the ones BCD uses.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    23. Re: Decimal Numbers? by Anonymous Coward · · Score: 0

      Tents for porpoises?

      Carried over staid lions for immoral porpoises?

    24. Re:Decimal Numbers? by holz.name · · Score: 1

      I'm a Java programmer, and I think for BigInteger and BigDecimal op-overloading would make sense, because those are numbers. In fact, Java should have a native type bigint and bigdec. But for anything that is not a number op-overloading is not good, it just obfuscates the code. There are of course always some cases when op-overloading makes sense even for non number types (Strings, but only the + operator for concatenation), but as a general rule, op-overloading is not good. There is no difference in writing stream.write("something") and stream "something".

    25. Re:Decimal Numbers? by hcs_$reboot · · Score: 1

      BigDecimal or a more adequate type name should be part of the language, then they can allow to write directly `(x+y)/z` (and no user operator overloading).

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    26. Re: Decimal Numbers? by Anonymous Coward · · Score: 0

      No: pants for tortoises

    27. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      > Its not surprising given that decimal numbers are essentially strings for all tense and purposes

      Holy fuck, how stupid are you? They are essentially *integers* which is just a special case of what they really are: fixed point numbers. Learn a little bit about coding before you open your mouth, idiot.

    28. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      No they don't. I store the number of eggs in my fridge as [integer] four. Are you saying it's really 3.9 recurring?

      Now try using compound interest to grow your egg investment.

    29. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      That statement is false. While decimal number types may have limited precision, they are, in fact, accurate.

      That statement is self-contradictory.

      What happens if you need to evenly split $10 into three payments?

    30. Re:Decimal Numbers? by CastrTroy · · Score: 1

      And hope you aren't running with 32 bit integers and encounter an overflow because you just multiplied 1 million by 9975

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    31. Re:Decimal Numbers? by petermgreen · · Score: 1

      IMO a decimal type that doesn't suck would.

      1. Allow arithmetic and comparision using the normal mathematical operators.
      2. Be a fixed-size value type that can live on the stack.

      Java's BigDecimal fails on both these counts. A type that doesn't is not possible as a custom type in Java.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    32. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      Intensive porposes

    33. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      For future reference, the phrase should be "for all intents and purposes".

      I only use that one for all intensive purposes.

    34. Re:Decimal Numbers? by DickBreath · · Score: 1

      Wrong system. Intents are not part of Java. They are part of Android.

      --

      I'll see your senator, and I'll raise you two judges.
    35. Re:Decimal Numbers? by Hognoxious · · Score: 1

      SIgh. BCD are not really integers, and they can have almost as many bits as you like, but if you're that worried about overflows you can divide first before multiplying, with the minor hiccup of getting the wrong answer (I've seen people do that too).

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    36. Re:Decimal Numbers? by Hognoxious · · Score: 1

      When an egg can partially hatch into a fractional chicken that lays irrational eggs get back to me.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    37. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      When people claim that they need big decimal number types, they're not counting whole eggs in refrigerators.

      Single precision floating point or even 16-bit integers would do a completely equivalent job at that.

    38. Re:Decimal Numbers? by angel'o'sphere · · Score: 1

      A tually not, as the adoption of _needed_ changes in .java is rather slow, we programm in .scala and Groovy now (usually using both in the same project).

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    39. Re:Decimal Numbers? by angel'o'sphere · · Score: 1

      As everyone knows you can not split $10 evenly by three, and that is not an error but a mathematical fact.

      Your arguments make no sense.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    40. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      You'd like to split $10 exactly by 3. You think that you can't because you're using a decimal representation. You could if you were using duodecimal or any other base containing a factor of three. (It would be exactly $3.4 in duodecimal.)

      Accountants would inaccurately divide the quantity into unequal amounts of $3.33, $3.33 and $3.34 decimal, and then call that "correct". Scientists would divide it into three payments of $3.333333333333333, and disregard the insignificant error. Which is closer to the ideal? I would argue the latter.

      Accountants are used to adding gross errors at every step of their algorithms just so the results look neater. (Government accountants even encourage you to round every intermediate value of your tax returns to a whole dollar. Such sloppiness would be laughed at in scientific computing.) You're just so used to these errors that you've come to expect them.

    41. Re:Decimal Numbers? by avandesande · · Score: 1

      no it's "in tents with porpoises"

      --
      love is just extroverted narcissism
    42. Re:Decimal Numbers? by NotAPK · · Score: 1

      Actually in mathematics we can prove that 3.33333333333repeating = 10/3 exactly.

    43. Re:Decimal Numbers? by Anonymous Coward · · Score: 0

      Bloody BigDecimal. Pushing their base 10 agenda on everyone whether we like it or not.

    44. Re:Decimal Numbers? by shutdown+-p+now · · Score: 1

      Without operator overloading in the language, any attempt to implement something like this as a library is going to be subpar: x.add(y).multiply(z) etc - you might as well be coding in COBOL.

    45. Re:Decimal Numbers? by shutdown+-p+now · · Score: 1

      .NET had "decimal" since the very first release in 2001. The actual type predates .NET even - Decimal in VB6 is the same exact thing, and it corresponded to DECIMAL structure (and the corresponding VT_DECIMAL variant subtype) in OLE Automation, which is still usable from regular Win32 apps. If I remember correctly, that, in turn, was an implementation of some early IEEE spec for decimal floating point.

    46. Re:Decimal Numbers? by shutdown+-p+now · · Score: 1

      Operator overloading per se is not good or bad. Or rather it's inherently good, because it lets you implement various number-like data types as libraries, and there's no way any language is going to implement everything that someone might need in the base language itself (think rational numbers, complex numbers and quaternions, ranges, sets, vectors and matrices etc).

      What can be bad is a particular use of operator overloading where it's not supposed to be used. This is not specific to operators - method overloading can be similarly misused, as can inheritance and many other features.

      C++ iostreams are an unquestionable example of bad design in that regard, but it's rather telling that this example, which dates back to, what, late 1980s, is still the one cited - because there aren't really any other examples of prominence. C# also has operator overloading, for example, and that makes it possible to define Decimal, Complex etc as library types - but it doesn't use it for streams (or any other weird stuff where the behavior is non-obvious).

    47. Re:Decimal Numbers? by shutdown+-p+now · · Score: 1

      Accountants want decimal, because input numbers are going to be represented as decimal, even before you start doing any operations on them. And binary floating-point may not be able to represent those inputs accurately, while decimal floating-point will.

    48. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      To avoid getting errors in the magnitude of 1e-15 on these inputs (which they could often entirely avoid anyway by working in cents), they instead happily round intermediate results to quantized values with errors typically in the range of 1e-2 to 1e-9 over and over again.

      As the saying goes: "Accountants know the cost of everything and the value of nothing".

    49. Re: Decimal Numbers? by Anonymous Coward · · Score: 0

      Intensive porcupines

    50. Re: Decimal Numbers? by Tablizer · · Score: 1

      Well comb too flash dot, Siri.

    51. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      Way to use an example that completely ignores why you would need BigDecimal in the first place (the ability to supply a MathContext as the 2nd argument to each operation). You can't just say 'A * B' if you are even remotely serious about controlling the accuracy of the result. You have not told it how many accurate digits to retain or how to resolve rounding when the resulting decimal is longer than the accuracy allocation. Just using BigDecimal by itself doesn't mean shit - its purpose is the ability to ensure with every single operation that no inaccuracies are produced. I don't know of any arbitrary precision math API that doesn't work like this. Many of them allow you to set global contexts, but if you are really serious about performance and accuracy then each operation needs to be considered.

    52. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      There is more to decimal errors than the number of bits allocated for the number. Inaccuracies can be easily encountered in any size of floating point number (usually by aggregating them or multiplying them by larger numbers). If you're really serious about accuracy (i.e. you are working in finance), you treat all your values as rationals/exponents. An evaluated decimal before presentation time is just a little error waiting to be aggregated/multiplied into a bigger one. Arbitrary precision libraries are the only safe way to handle this, and even with those you have to use great care with how you manage precision vs. accuracy.

    53. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1
      Quoting myself from above, since you made exactly the same blunder as the other guy:

      Way to use an example that completely ignores why you would need BigDecimal in the first place (the ability to supply a MathContext as the 2nd argument to each operation). You can't just say 'A * B' if you are even remotely serious about controlling the accuracy of the result. You have not told it how many accurate digits to retain or how to resolve rounding when the resulting decimal is longer than the accuracy allocation. Just using BigDecimal by itself doesn't mean shit - its purpose is the ability to ensure with every single operation that no inaccuracies are produced. I don't know of any arbitrary precision math API that doesn't work like this. Many of them allow you to set global contexts, but if you are really serious about performance and accuracy then each operation needs to be considered.

    54. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      Computer scientists using binary-based representations realize this and design their algorithms to minimize the errors. Accountants just define any inaccurate decimal-based results as "correct".

      You have it backwards. Most programmers will never know how to properly use an arbitrary precision math library until a financial application forces them to do so. I have not met many programmers who even know what machine precision/epsilon even is, much less how to avoid subjecting yourself to it.

    55. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      Precision and accuracy are far from the same thing. It is perfectly possible to have a number with 10 digits precision where the last 5 are garbage because you weren't educated enough about how hardware arithmetic works. Parent is correct - if you are serious about retaining accuracy, machine precision floating point decimals are out of the question.

    56. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      My point is that many programmers of financial applications build gross errors into every single step of their algorithms, rounding off each intermediate result to an even decimal to make the results look pretty.

      Then they pat themselves on the back and say how the decimal types helped them represent the results "exactly", when in fact it was a case of "garbage in, garbage out".

      It's true that most so-called developers know the principles behind neither numerical algorithms nor data types. That doesn't excuse smugness on the part of people who only know the latter, and who think that big decimal data types are somehow inherently superior to any other numerical representation.

    57. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1
      Nope. The last 5 or so years I've been delivering a math processing framework for various use cases that supports everything ranging from machine-precision floating point operations to rational/exponent representation numbers and intra-operational accuracy specifications. Scientists and EE guys always go for floating point, max 4 decimals precision. Accountants always go for arbitrary precision with accuracy settings twice as far out as precision and decimals only ever actually evaluated when they are to be presented to a human.

      Accountants would inaccurately divide the quantity into unequal amounts of $3.33, $3.33 and $3.34 decimal, and then call that "correct". Scientists would divide it into three payments of $3.333333333333333, and disregard the insignificant error. Which is closer to the ideal? I would argue the latter.

      Wrong on both counts. The only 'correct' representation of 10/3 is 10/3. Need 10/3+1? Well, then that's 13/3, and so on. The moment you evaluate this rational you have an error, so you don't. This is what arbitrary precision libraries do, and they are de rigueur in finance for a reason.

    58. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      All mechanical representations of decimal numbers potentially lead to inaccuracies.

      There, I fixed his poorly worded statement. Now you are definitely wrong.

      a) We are talking about decimals so nice try with your integer example

      b) If something is potentially inaccurate, it is functionally inaccurate

      c) Are you seriously not aware of what binary approximation is, and the fact that numbers as 'simple' as .1 have no exact binary representation?

      Your ignorance is a time bomb waiting to go off.

    59. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      big decimal data types are somehow inherently superior to any other numerical

      BigDecimal is not a data type, it is an API (containing 'numerical algorithms'), and it is no more superior to machine floating point numbers than a hammer is to an oxygen atom. If the use case is financial however, then yes BigDecimal is unquestionably superior unless you are comparing it to another arbitrary precision API like JScience (which I do like better).

      That doesn't excuse smugness on the part of people who only know the latter,

      As I explained above, I think you have these concepts muddled up so I'm not even sure what you think 'the latter' is, But if it was somebody trying to tell you that BigDecimal retains accuracy better than floating point, then that was 'correctness' not 'smugness'. Well, maybe it was both.

    60. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      Accountants always go for arbitrary precision with accuracy settings twice as far out as precision and decimals only ever actually evaluated when they are to be presented to a human.

      There's the whole problem with your smug position.

      Accountants typically represent intermediate results to humans at many points in their algorithms. At each of these steps they make gross roundoff errors, but they make sure that all of the rounded off numbers add up neatly at the end. All of your vaunted precision and lazy evaluation has just been made irrelevant.

      Accountants shrug it off and declare it to be the correct answer, when in many cases appropriately designed algorithms using plain floating point would have come out closer to the actual truth.

    61. Re:Decimal Numbers? by Hognoxious · · Score: 1

      When people claim that they need big decimal number types, they're not counting whole eggs in refrigerators.

      No, they're counting whole pennies/cents in invoices and bank accounts. Nonetheless, when the thing is intrinsically an integer storing it as an integer involves precisely zero loss of precision, which is what you or some other asshat claimed.

      Single precision floating point or even 16-bit integers would do a completely equivalent job at that.

      Floating point wouldn't, because the way it rounds is a) different to conventions established before floating point was common and b) because the precision varies depending on the value stored.

      Integers might, but you'd have to handle the decimal places yourself, with frigs and bodges as I mentioned in a prior post.

      Do you think they invented these things just to be contrary? Really?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    62. Re:Decimal Numbers? by GodelEscherBlecch · · Score: 1

      Accountants typically represent intermediate results to humans at many points in their algorithms. At each of these steps they make gross roundoff errors

      No, they don't. They purchase my framework for the express purpose of not doing what you just said. Values are handled end-to-end by the framework with no floating point operations - this is why they buy it. You don't seem to understand that what I'm telling you is based off the real world, delivering real software to real customers for real money. But that's all just smug lies apparently, because you have some opinions on 'accountants'.

      All of your vaunted precision and lazy evaluation has just been made irrelevant.

      Oh shit, I guess we've got a couple million dollars in refunds to issue then. I better tell the CFO.

      Accountants shrug it off and declare it to be the correct answer, when in many cases appropriately designed algorithms using plain floating point would have come out closer to the actual truth.

      Sure, one incorrect approach in many cases does better than another incorrect approach. Or, you could do it correctly using the standards which are required in any reasonably serious financial application.

    63. Re:Decimal Numbers? by Hognoxious · · Score: 1

      All mechanical representations of decimal numbers potentially lead to inaccuracies.

      There, I fixed his poorly worded statement. Now you are definitely wrong.

      Yeah, it's not like adding two words to a sentence changes the meaning at all. *eyeroll*.

      Another thing. "All" and "potentially" don't really mix well, given that one is an absolute and the other is a weasel word.

      Your ignorance is a time bomb waiting to go off.

      Given that I'm basically stating the reasoning behind things designed before I was even born, which are still in daily use today, I'm not diving for cover just yet.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    64. Re:Decimal Numbers? by shutdown+-p+now · · Score: 1

      You don't need arbitrary precision for the task that OP asked about. And, indeed, numerous languages that catered to that niche before managed just fine with either fixed-precision or floating-point fixed-size decimal data types - Currency in VB and Delphi, Decimal in C# etc.

      So what you're saying is that BigDecimal is overkill for this job, and inconvenient to use for that reason.

      Then again, we weren't talking about BigDecimal here, either. If you walk up the thread, you'll see that it was about "JSR 354: Money and Currency API". Which is exactly the kind of thing that lets you say A*B - or rather A.multiply(B) - with all the details coming implicitly from context. Which, coincidentally, is provided with sane settings (i.e. the kind that accountants normally use) by default.

    65. Re:Decimal Numbers? by Waffle+Iron · · Score: 1

      They purchase my framework for the express purpose of not doing what you just said.

      Every account statement and tax return in my filing cabinet says otherwise.

    66. Re:Decimal Numbers? by angel'o'sphere · · Score: 1

      You could if you were using duodecimal or any other base containing a factor of three. (It would be exactly $3.4 in duodecimal.)
      That is wrong.

      The question if a numbers are dividable is completely unrelated to number system.

      However you can use fractions and simply say 10/3 is "10/3" ... problem solved. SmallTalk does it that way, all calculations try to use the appropriated class derived from number to hold intermediate results, so (10 / 3) / (10 * 3) is "10/3" / "10*3" and so on ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    67. Re:Decimal Numbers? by Tablizer · · Score: 1

      That's why Cobol Lives

    68. Re:Decimal Numbers? by NoOneInParticular · · Score: 1

      Yeah, same with Matrix, Complex, Polynomial, Rational, or any mathematical object that defines a Group, Ring or Field. Java is a mathematical wasteland.

  12. Major features are complementary by benjfowler · · Score: 5, Informative

    The biggest news in Java 8, obviously, are lambdas, but they also fit together with functional interfaces and java.util.stream.Stream to really change the way you build stuff in Java.

    I'm absolutely loving, after making use of Java 8 streams, just how clean, succinct and compact a lot of my new code has become.

    Oh -- and yes -- Java now has monads:


    public String getLastFour(Optional employee) {
    return employee.flatMap(employee -> employee.getPrimaryAddress())
    .flatMap(address -> address.getZipCode())
    .flatMap(zip -> zip.getLastFour())
    .orElseThrow(() -> new FMLException("Missing data"));

    }

    See here

    (Now if only they borrowed a bit more heavily from Scala or even C#: stuff like a Try monad, tuples and tuple destructuring and proper pattern matching (like C# is getting) would be awesome. Although given the glacial pace of standardization in Java-land, I'm not holding my breath.)

    1. Re:Major features are complementary by Anonymous Coward · · Score: 0

      Now if only they borrowed a bit more heavily from Scala or even C#: stuff like a Try monad, tuples and tuple destructuring and proper pattern matching (like C# is getting) would be awesome.

      Screw that. Give Java pass-by-reference parameters for methods, like every other language that isn't brain-damaged. Even something as old as Pascal has pass by reference, FFS, so one has to wonder how far James Gosling's head is up his ass that he decided not to include it.

    2. Re:Major features are complementary by epyT-R · · Score: 0

      Yes, java does indeed have you by the balls..

    3. Re:Major features are complementary by Anonymous Coward · · Score: 0

      > .orElseThrow(() -> new FMLException("Missing data"));

      Is that the new Java 8 FuckMyLifeException I've heard about?

    4. Re:Major features are complementary by 110010001000 · · Score: 1, Interesting

      Christ! That is modern Java? It looks like absolute shit. .orElseThrow() -> new FMLException()? WTF? Why is the return value String and you look like you are stringing together flatMap? WTF is a flatMap? Are you returning a bunch of concatenated strings? How do you get the data? You load the String into a flatMap? Jesus.

    5. Re:Major features are complementary by Anonymous Coward · · Score: 0

      Congratulations: You figured out the joke.

    6. Re:Major features are complementary by udachny · · Score: 1

      The best part of Java 8 AFAIC is that it is still possible to write and run the code with it that doesn't use any of the new 'features' starting with java 5.

    7. Re:Major features are complementary by Ksevio · · Score: 2, Interesting

      But wait! It gets worse. You can't call these long function names directly on a data structure, you have to first get a stream which then can take map functions and then you have to convert it back to the data structure when you're done. Coming from Python it's just painful to see how long and ugly the code gets

    8. Re: Major features are complementary by AuMatar · · Score: 3, Insightful

      If you think that mess of streams is clearer than a for loop would be, you're on crack. It's incomprehensible.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    9. Re:Major features are complementary by The+Evil+Atheist · · Score: 4, Insightful

      How about... read the fucking documentation? I'm a C++ guy and always lamented the fact that Java did not have an algorithms equivalent. Java 8 streams + lambdas are almost there and you can achieve complex things without nested loops.

      Stop conflating your unfamiliarity with it being shit. It took me, a C++ guy, a day of getting used to it. If you can't wrap your head around that, you shouldn't be programming. It's easy stuff.

      --
      Those who do not learn from commit history are doomed to regress it.
    10. Re: Major features are complementary by The+Evil+Atheist · · Score: 2

      Don't mistake unfamiliarity with incomprehensible. It's better than for loops because the method names tells you the intention and the guarantees of that operation.

      --
      Those who do not learn from commit history are doomed to regress it.
    11. Re:Major features are complementary by Tablizer · · Score: 1

      Run-on statements should generally be avoided. For example, what if you had 50 data fields and the error statement gave you little more info other than there's an error SOMEWHERE in that giant statement?

    12. Re: Major features are complementary by AuMatar · · Score: 2

      No. No it isn't. THe method names would tell me just the same used inside a forloop. You have added no value, while making it harder to debug and harder to read. If you use streams you're a shitty programmer.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    13. Re:Major features are complementary by abies · · Score: 3, Insightful

      Yes, it looks like garbage, this is why some people are switching to java dialects (still fully compatible with all libraries and java APIs both directions, but considerably shorter). My favorite, xtend, would have

      def getLastFour(Optional employee) {
          employee.flatMap(primaryAddress) .flatMap(zipCode) .flatMap(lastFour) .orElseThrow[new FMLException("Missing data")];
      }

      or, without Optionals and exceptions, old school, embrace nulls

      def getLastFour(Employee employee) {
          employee?.primaryAddress?.zipCode?.lastFour
      }

      You can get similarly short code in groovy, scala, koitlin and whatever else. Java strength lies in ecosystem (frameworks, interoperability, portability etc), not because of language syntax.

      Said that, there is a lot of overdesign and monstrosities in popular frameworks as well, but there you have a choice of using something more lightweight.

    14. Re: Major features are complementary by The+Evil+Atheist · · Score: 1

      Gotta love them sour grapes.

      --
      Those who do not learn from commit history are doomed to regress it.
    15. Re:Major features are complementary by Anonymous Coward · · Score: 0

      read the medium page you linked.

      This crap is what I hate about modern development.

      A load of unreadable gibberish, with unexplained naming.

      basically its a magic incantation, badly made up of shit naming that does not tell you what it actually does! this does not help readability of code at all.

      Makes no sense unless you read all the crap about the magic incantation which just looking at makes no logical sense.

    16. Re:Major features are complementary by Anonymous Coward · · Score: 0

      There are some basic functional programming idioms in there, and this code should not be news to anybody who's studied functional programming styles and modern languages.

    17. Re: Major features are complementary by swilver · · Score: 1

      List<SoftwareEngineer> softwareEngineers = ...

      softwareEngineers.stream()
          .filter(SoftwareEngineer::isShitty)
          .map(SoftwareEngineer::toCodeMonkey)
          .forEach(CodeMonkey::fire);

      // problem solved.

    18. Re:Major features are complementary by Anonymous Coward · · Score: 0

      JavaSlang is an attempt to fix some of the usability issues with the Java platform streams.

    19. Re:Major features are complementary by Anonymous Coward · · Score: 0

      And lambdas are completely useless in Java, as anonymous implementations of interfaces handle every single use case a lambda could have been wanted for in addition to covering quite a few lambdas didn't cover. This whole lambda bullshit (which has been raging since java 5) is a bunch of CSC weenies who don't actually code for a living giving each other reach arounds in a giant circle jerk.

    20. Re:Major features are complementary by Anonymous Coward · · Score: 0

      This is why people don't like Java, a function called getLastFour when it seems like what you really meant is getZipLastFour

      also your exception missing data is idiotic it doesn't tell what data is missing, your error to the front end is useless. The user does not know if it was a bad employee, a bad zip code, a bad zip + 4.

      This is exactly why I hate Scala it is people who start using .map.map.map.map.flatmap with awful naming. I sincerely hope you are fired soon. I hate having to parse lines and lines of the drivel when in the past there would be small properly named functions making things more obvious with better thought out error handling. Thanks for bringing the worst of Scala to Java.

    21. Re:Major features are complementary by Anonymous Coward · · Score: 0

      Yes, because while the GP example was stupidly verbose given modern programming language features, obviously it would read better like:


      public String getLastFour(Optional<Employee> employee) {
              return employee.flatMap(new Function<Employee, Optional<Address>>() {
                              @Override public Optional<Address> apply(Employee employee) {
                                      return employee.getPrimaryAddress();
                              }
                      }) .flatMap(new Function<Address, Optional<ZipCode>>() {
                              @Override public Optional<ZipCode> apply(Address address) {
                                      return address.getZipCode();
                              }
                      }) .flatMap(new Function<ZipCode, Optional<String>>() {
                              @Override public Optional<String> apply(ZipCode zip) {
                                      return zip.getLastFour();
                              }
                      }) .orElseThrow(new Supplier<FMLException>() {
                              @Override public FMLException get() {
                                      return new FMLException("Missing data"));
                              }
                      });
      }

      Although I'm guessing you prefer:


      public String getLastFour(Employee employee) {
              if (employee != null) {
                      Address address = employee.getPrimaryAddress();
                      if (address != null) {
                              ZipCode zip = address.getZipCode();
                              if (zip != null) {
                                      String lastFour = zip.getLastFour();
                                      if (lastFour != null) {
                                              return lastFour;
                                      }
                              }
                      }
              }
              throw new FMLException("Missing data");
      }

      Which is obviously so much clearer than the C# (using throw as an expression slated for 7.0):


      public string GetLastFour(Employee employee) {
              return employee?.PrimaryAddress?.ZipCode?.LastFour ?? throw new FmlException("Missing data");
      }

    22. Re:Major features are complementary by hraponssi · · Score: 1

      Right. I can admit I am still not comfortable with all the functional stuff so booboo me. But I do slowly find that Streams are handy for some applications, especially when written clearly.

      Still, I find streams confusing, and looking at your link, you seem to have left out the Employee type parameter for the Optional, making it even more confusing. After reading the link, I get the idea, which is kind of nice in theory.

      But I still don't quite get the point of this example. You apply the .flatMap() "transformation" on single items just to avoid null checks? It seems to be chaining of calls for methods that returns single values but might not be there.So, Employee only has one primary address but you call those flatMaps on Optionals just to avoid null checks on the returns?

      I thought streams were for handling collections using some fancy new syntax to make us all nerds happy about another new toy for the same thing. The one someone else wrote on this thread about firing code monkeys made a lot more sense to me.

    23. Re:Major features are complementary by Anonymous Coward · · Score: 2

      Although I'm guessing you prefer:

      public String getLastFour(Employee employee) {
              if (employee != null) {
                      Address address = employee.getPrimaryAddress();
                      if (address != null) {
                              ZipCode zip = address.getZipCode();
                              if (zip != null) {
                                      String lastFour = zip.getLastFour();
                                      if (lastFour != null) {
                                              return lastFour;
                                      }
                              }
                      }
              }
              throw new FMLException("Missing data");
      }

      I'm not the original anonymous coward but, yes, if the point of the function is to throw an exception when any of the sub-fields leading to the zip code are missing then, to me, this form is clearer in it's intent.

      Assuming that's the point, then I would probably try to be even clearer:

      public String getLastFour(Employee employee) {
              if (employee == null) {
                      throw new Exception("getLastFour(): employee is null");
              }
              Address address = employee.getPrimaryAddress();
              if (address == null) {
                      throw new Exception("getLastFour(): primary-address is null");
              }
              ZipCode zip = address.getZipCode();
              if (zip == null) {
                      throw new Exception("getLastFour(): zip-code is null");
              }
              String lastFour = zip.getLastFour();
              if (lastFour == null) {
                      throw new Exception("getLastFour(): zip-code last-four is null");
              }
              return lastFour;
      }

      And, if the correct behavior is really to throw an exception when the field is missing, then ideally there would be a corresponding set of getters:

      public String getLastFour(Employee employee) {
              if (employee == null) {
                      throw new Exception("getLastFour(): employee is null");
              }
            return employee.getPrimaryAddressNotNull().getZipCodeNotNull().getLastFourNotNull();

      And if you're so casual that you're going to be throwing exceptions on failure then why not just accept the default null pointer exceptions:

      public String getLastFour(Employee employee) {
              return employee.getPrimaryAddress().getZipCode().getLastFour();
      }

      But, if all you've got is a single line - then why bother to wrap it in a function at all. Why not just:

              String lastFour = employee.getPrimaryAddress().getZipCode().getLastFour();

      Sure, you get an exception if anything is null. But since that's what you get anyway, why is the functional mapping approach any better?

      Yes, there are (rare) times when a functional style is really best. And sometimes code can be too verbose. But the goal isn't to be as terse as possible. The goal is to write simple code that is easy to understand quickly and also that is easy to debug.

    24. Re:Major features are complementary by Anonymous Coward · · Score: 0

      I'm absolutely loving, after making use of Java 8 streams, just how clean, succinct and compact a lot of my new code has become.

      public String getLastFour(Optional employee) {
              return employee.flatMap(employee -> employee.getPrimaryAddress()) .flatMap(address -> address.getZipCode()) .flatMap(zip -> zip.getLastFour()) .orElseThrow(() -> new FMLException("Missing data"));
      }

      Since you get an exception if any of the subfields are missing, how is that any better than

      String lastFour = employee.getPrimaryAddress().getZipCode().getLastFour();

      If an FMLException is really better than a NullPointerException then wrap the line in a try block and re-throw the NullPointerException as an FMLException.

      I got my start in programming at MIT so I really want to like functional programming. But I am repeatedly disappointed by the examples on the internet that supposedly make the case for functional programming.

    25. Re:Major features are complementary by Anonymous Coward · · Score: 1

      The problem with allowing it to just throw NullPointerException is that, by default, the JVM fast-throws the NullPointerException which omits the stack trace. It's also an unchecked exception. I've dealt with way too many Java programs that do this and it's ridiculous to troubleshoot. It smacks of massive developer laziness. NullPointerException really should be an exceptional situation, not the result of the fact that the developer was too lazy to properly validate their arguments or to gracefully degrade.

      The goal shouldn't be to be terse; it should be to be succinct. Some developers conflate the two to horrific results. But having to so explicitly spell out every tiny detail often obfuscates the intent and is no better. That's where lambdas shine: declarative intent. Sure, anonymous classes allow you to do the same, but in too many cases the boilerplate is 95% of the code. You lose the intent in the middle of a bunch of useless garbage that doesn't tell you anything useful.

    26. Re:Major features are complementary by NotAPK · · Score: 1

      Here here, great post and well said.

    27. Re:Major features are complementary by Rakarra · · Score: 1

      I always liked assignment and comparison in the same statement. Though I understand why it'd be an anathema to some. :-D
      public String getLastFour(Employee employee)
                      if (employee != null)
                                      if ((Address address = employee.getPrimaryAddress()) != null)
                                                      if ((ZipCode zip = address.getZipCode()) != null)
                                                                      if ((String lastFour = zip.getLastFour()) != null)
                                                                                      return lastFour;
                      throw new FMLException("Missing data");

      Better yet, an if statement checks if something is true, so "if ((String lastFour = zip.getLastFour()) != null)" and "if (String lastFour = zip.getLastFour())" are equivalent. It's one of those C things that makes for delightfully compact code, but has a few pitfalls, Since if you used == instead of =, the problem with the statement might not be immediately obvious. And confusing starting/closing parentheses has been a problem in that situation, though an IDE (or even vi) helps greatly.

      Of course, the biggest problem is that this example breaks Slashdot's automatic content filtering. "Try less whitespace and/or less repetition?" My original comment was fine, thank you. I had to remove all the curly brackets -- it just wouldn't let me post this until after I removed the curly brackets, no matter how much junk text I put at the end. Thanks, Slashdot.

    28. Re:Major features are complementary by shutdown+-p+now · · Score: 1

      Give it tuples or other form of multiple return values, and forget about pass-by-reference.

    29. Re:Major features are complementary by shutdown+-p+now · · Score: 1

      Think of Optional as a collection that has either one or zero elements. Then it all makes much more sense.

      But what he was really trying to show is that you can treat optionals as a monad, same way as in e.g. Haskell. Although not quite, because in Haskell you get some nice syntactic sugar that makes it all much smoother.

    30. Re: Major features are complementary by ZeroWaiteState · · Score: 1

      It's a dumb contrived example. There's no reason to use streams for logic that works on a single value. On top of that, I've never liked their API anyway, since its only like half a solution to asynchronous data flow problems. Oh, and it eats your exceptions, because reasons. I used RxJava and found it actually did all that I would have needed the Java streams for.

  13. The most useful thing to do in Java 8 by Anonymous Coward · · Score: 0

    FileUtils.deleteDirectory("/usr/lib/jvm/");

    Fuck Java. It's the Adobe Flash of programming languages.

    1. Re:The most useful thing to do in Java 8 by sanosuke001 · · Score: 1, Offtopic

      No, that would be JavaScript.

      --
      -SaNo
  14. CVE-2016-0636 by lusid1 · · Score: 1

    on the desktop anyway, and on the server it would be the ever increasing ram consumption by misguided java developers.

  15. I'm still on Java 6 you insensitive clod by ADRA · · Score: 1

    EOM...

    --
    Bye!
  16. The Uninstall Button by Anonymous Coward · · Score: 0

    n/t

  17. Speed Improvements by Anonymous Coward · · Score: 4, Funny

    Java is so [Garbage Collecting] much fas [Garbage Collecting]ter then C becu [Garbage Collecting]se of its [Garbage Collecting] GC algorithms.

    If y [Garbage Collecting] o [Garbage Collecting] u want raw [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] speed, you h [Garbage Collecting] ave to prog [Garbage Collecting]ram in Java, not C or [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ASSembler.

    With only 16Gb of [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] RAM, I can compile a simple h [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ello W [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] orld program, and it only takes 15 [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] to run!

    Windows should be redone in [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ..out of memory, stack trace, garbage here:

    1. Re: Speed Improvements by BlackSabbath · · Score: 2

      Haven't had mod points for years (no idea why) but if I did, you'd get them all. Thanks for making me truly laugh out loud.

    2. Re:Speed Improvements by Anonymous Coward · · Score: 0

      It might be funny, if it weren't completely ignorant. But hey, I can see why this was modded as funny, too many python shills there.

  18. Entertaining Google vs Oracle Stories by Anonymous Coward · · Score: 0

    Enough said.

  19. Best feature by mattyj · · Score: 2

    ... is how easy it is to remove.

    1. Re:Best feature by Anonymous Coward · · Score: 0

      Uninstall.

  20. Yaaaaay! Favorite Java 8 feature of all! by Narcocide · · Score: 0

    Uninstall

  21. It's NOT Microsoft... by bobbied · · Score: 1

    Yea, that's about it for Java.... Well that and that cool "Memory leaks are a thing of the past" idea can be nice... Yea, I know, Java still leaks memory from time to time... But they at least tried to rid us of all that malloc and free complications..

    --
    "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
  22. Date Time API by viperidaenz · · Score: 1

    .... is a bit shit. It's better than the old one but not as easy to used as the Joda Time library it was based off of.

  23. Nashorn by viperidaenz · · Score: 0

    .... No.
    Who runs Javascript inside a Java application?

    1. Re:Nashorn by brantondaveperson · · Score: 1

      People with a sense of humour. It would certainly make me laugh, anyway.

    2. Re:Nashorn by Anonymous Coward · · Score: 0

      There is commercial products which are doing this. The Javascript interface is for the customer to customize the application and write their own procedure within the application. There is even C++/C applications running Javascript, HP Service Manager, for example. That's why SpiderMonkey, Rhino and others exist. There is a lot of applications for which you may want to enable the users to write snippets of codes to integrate and interface with the product. Even writing webservices using Javascript and CXF. Obviously your horizon is limited.

    3. Re:Nashorn by viperidaenz · · Score: 1

      Java already had the capability. The javax.script package is from 1.6
      Nashorn is just a newer, faster Rhino.

    4. Re:Nashorn by mwvdlee · · Score: 1

      JavaScript seems like an extraordinarily bad choice for a customer-scripting language. I like JavaScript, but it has way too many dark corners to push it as a language for people with limited coding experience. This is what a language like BASIC was built for.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  24. Marketing by alantus · · Score: 3, Interesting

    The best thing Java ever had is good marketing, that's it.

    1. Re:Marketing by Anonymous Coward · · Score: 0

      That's not entirely true.

      There's also the ability to uninstall it. That's pretty cool.

    2. Re:Marketing by Anonymous Coward · · Score: 0

      Agreed, that's why multiple companies have stolen and rebranded Java technology (MS with its .Net java clone and Google with Android). It seems like Java is a totally useless technology.

  25. Favorite Feature by Anonymous Coward · · Score: 0

    The uninstaller....

  26. The feature where.. by Anonymous Coward · · Score: 0

    it downloads node.js, converts the java bytecode to java script and then overwrites itself and calls the node.js entry point.

    I wish java would just go away

  27. My favorites: by Anonymous Coward · · Score: 0

    Its support for high entropy matrices.
    Its adhering to best business practices.
    Its interoperability with things that interoperate with it.
    It's no longer influenced by Oracle.
    Its incompatibility with previous versions of Java-based applications... consistency is good.

  28. security fixes! by schklerg · · Score: 2, Informative

    I mean, it's awesome that security fixes are now separate from feature changes and that they are so easy to install and track! I love being able to so easily manage a single runtime with no compatibility issues on my clients now too. Oracle has saved java!

    --
    Be Excellent To Each Other
  29. Slashdot you can do better than that! by qume · · Score: 1

    C'mon we're pretty stupid to be here in the first place, but not that stupid. At least put an effort in to deceive us.

    Right, I'm off to drop all my other languages and shift everything to Java...

  30. Choice by Anonymous Coward · · Score: 0

    Best feature is that I can choose not to use it if I want.

  31. Best Language Ever by watermark · · Score: 2, Funny

    They've finally done it! Java is now indisputably the best programming language available! They finally fixed all of the bugs! It's the most secure language available! Best of all, Oracle opened source the whole JVM under a copy-left license! Java 8 is indeed a game changer! These are exciting times indeed!

    1. Re:Best Language Ever by Anonymous Coward · · Score: 0

      Best of all, Oracle opened source the whole JVM under a copy-left license!

      You're trying to be funny, but...
      Actually, Sun released Java already, OpenJDK is GPL2 (+linking exception). All Oracle controls is the Java brand. The lawsuit with Google is over pre-GPL code.
      As for the rest, it's more secure than C++. You're probably thinking of Java applets. That's an insecure sandbox/plugin, nothing inherent to the language.
      Bugs: which implementation doesn't have bugs? Compared to PHP, it's rock solid...
      My only real gripe with Java is the stagnant, verbose syntax, but you can fix that with xtend or by using another JVM language.

  32. Subpoena generator by Billly+Gates · · Score: 1

    I love the fact when a non sanctioned language generates a lawsuit on demand when interacting with the APIs

  33. According to HR by Hognoxious · · Score: 1

    The best thing about Java 8 is that you only need 73 years' experience with it to land a great job.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:According to HR by godrik · · Score: 1

      The best thing about Java 8 is that you only need 73 years' experience with it to land a great job.

      Especially if you are under 25!

  34. My favorite feature? by Snotnose · · Score: 1

    The fact that I still don't need to have Java installed anywhere to enjoy the Weird, Wild Web.

    1. Re:My favorite feature? by supremebob · · Score: 1

      That's a good thing, because client side Java from the browser is basically dead. Google Chrome doesn't even support the Java plugin anymore, and neither does Microsoft Edge. Firefox and Internet Explorer still support it, but disable the plugin as a security risk if you're not updating it to the latest release on a monthly basis.

      They've basically made supporting the operation of Java applets in a browser impossible to support, which is great unless you're still stuck supporting them.

    2. Re:My favorite feature? by Anonymous Coward · · Score: 0

      It's great unless you need to do certificate signing in your browser, which has been usually done with applets and has still no alternative (well, there's one, called ActiveX, which ties you to windows and internet explorer... some java haters may see that as an improvement though)

  35. Popularity by Anonymous Coward · · Score: 0

    The fact that it is searched a lot does mean we have to use it a lot, but that does not imply we like it!

  36. Lambda's plug poor OOP language design by Tablizer · · Score: 1

    With better OOP Java wouldn't need stinkin' lambdas. Lambda's just give spaghetti coders more ways to write cryptic "cutesy" code. Flexible methods can usually do that same thing.

    For example, if Java blurred the distinction between instances and classes, then one could attach an OnClick() method directly to a UI button object instead of pushing it to a listener doodad, which is silly and unnatural.

    If the guts of a button object want to register the button's method(s) in a listener object via instantiantion forwarding (up the tree) or reflection; so be it, but the UI coder shouldn't have to care, that's usually internal UI engine guts that one should only have to study for debugging event handling.

    Parent forwarding is when a parent method of the same name could specify BEFORE or AFTER to automatically run before or after the child method. (Without BEFORE or AFTER, the child method just overrides it so that it doesn't run.) Perhaps I'm using the wrong terms.

    1. Re:Lambda's plug poor OOP language design by MouseR · · Score: 1

      In Obj-C, Code Blocks are an awesome way to un-spaghetti-fy source code by doing away with protocols.

      Translate that to Java:

      In Java, Lambdas are an awesome way to un-spaghetti-fy source code by doing away with interfaces.

      In Obj-C, we've been able to clean up and streamline our code a lot using completion blocks. But as with any technique, you can be an idiot using it. It's all about proper usage. Knowing when to eat your spag and when to eat the meat balls.

      Disclaimer: I work for Oracle, using native iOS tools & languages. Our project embeds some HTML server-provided pages, connects to the server using server-side service calls all written in Java. I have no opinion on anyone's dislike of the company. But from the inside, it's not trying to be fundamentally evil. But then again, I'm not a paying customer.

    2. Re:Lambda's plug poor OOP language design by Alomex · · Score: 1

      With better OOP Java wouldn't need stinkin' lambdas. Lambda's just give spaghetti coders more ways to write cryptic "cutesy" code. Flexible methods can usually do that same thing.

      I actually like lambdas but I think they are highly overrated. They have become trendy and furthermore it has become trending to claim you could write an awesome programs if only you had lambdas. In most cases what they mean by this is simply "if the language supports functions as first class objects" and all that lambda provide beyond that are anonymous functions.

    3. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      I'm more concerned about how others would use them when I have to read or maintain their code. I've seen some really ugly JavaScript because people misuse anonymous functions (in part because JS also has a poor OO model/syntax). Using methods instead keeps things a bit more disciplined in my opinion.

      By the way, a correction:

      Original: "Flexible methods can usually do that same thing."

      Fixed: "Flexible methods can usually do the same thing as lambdas."

    4. Re:Lambda's plug poor OOP language design by TheSunborn · · Score: 1

      But if you could attach your own OnClick method to the button, only one method can be called when the user click on the button, which would be a huge problem for many gui objects.

    5. Re:Lambda's plug poor OOP language design by Anonymous Coward · · Score: 0

      Sounds like that would break static typing which is one of the primary reasons to use Java. Only the syntax of the listener doodad is annoying, the design works well.

    6. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      Sounds like that would break static typing

      How so?

      Only the syntax of the listener doodad is annoying, the design works well.

      If you get used to it, a lot of things "works well". I found it fundamentally unnatural. The info for a given button should be together under a class-like grouping, something like the following pseudo-code:

      buttonX = new Button {
        title="Click me";
        container=panelZ;
        placemen=this.float("left");
        method onClick() {
          messageBox.display("Look Mom!");
        }
      }

    7. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      Well, with better branching opcodes modern CPUs would not need register based arithmethic.

      Did that make sense?

      Likely not ... branching and doing arithmethic are basically two completely different things in the opcode set of an CPU.

      So are Objects/Classes on one side and lamdas/functions on the other. They are orthogonal concepts and you can only very badly mimic lamdas with OO concepts and the opposite not at all.

      Again: you clearly show that don't know much about the stuff you are talking about.

      Do you really thing basically all new languages are introducing lamdas/closures like mad if they simply could 'improve' OO?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    8. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      And? You can write more or less exactly that in Java.
      What is your point again? Showing us that you have no clue about Java?

      Ofc in the way how a button right now is implemented the inherited fields like title etc. are likely private and you need to call a setter ... otherwise Java works exactly as you described here.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      But if you could attach your own OnClick method to the button, only one method can be called when the user click on the button, which would be a huge problem for many gui objects.

      Put the calls to the other ones in that method. Treat it as a stub method.

      And I am not against a "listener registry" or whatever one wants to call it, it's just that a dev shouldn't have to deal directly with it for the vast majority of typical UI coding. Have a convenient front-door for the vast majority of "customers", and a back-door for specialized fiddling. You could stuff a hundred additional on-click events for that button into the listener registry if you wanted. A default on-click method doesn't prevent that. (Hopefully there is a priority code to control order of handling.)

      Also, one could put a general event handler on the button's container, and do the other handlers that way, using reflection or environment info to know what widget and what action triggered it.

      There are many options without having to deal with lambda's. Would you like to present a specific use-case to explore further?

      (I've been trying to invent/define a table-oriented GUI engine that is mostly language-neutral. Most events can be handled using tablized attributes instead of imperatively coded behavior. Everyone's just used to hand-coded behavior out of industry habit. It's poor tool/labor factoring to re-invent a GUI engine for every different programming language. A good language-neutral GUI engine could be attached to any language.)

    10. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      I couldn't get it to do it smoothly, but if it can somehow be done, that's great, and emphasizes my original point that you don't need lambdas to associate actions with objects.

      I'm not a Java expert by any stretch and didn't claim be. (I don't use it at work.) BUT, my original point is more about lambdas than Java.

    11. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      I don't know why you are talking about chips.

      They are orthogonal concepts and you can only very badly mimic lamdas with OO concepts and the opposite not at all ... Again: you clearly show that don't know much about the stuff you are talking about.

      Show it, don't claim it. Can you present a use-case to demonstrate such? In other words, provide a practical (real world) example of something that lambda's noticeably improve upon compared to an OOP version of the same thing. (We'll try to ignore language-specific differences/limitations, but that's not always easy.)

      Do you really [think] basically all new languages are introducing lamdas/closures like mad if they simply could 'improve' OO?

      I do believe functional programming is in "fad mode" right now. Language designers are all me-too-ing.

      Further, overhauling an OO model in existing languages without breaking existing apps may be harder than tacking on lambdas.

    12. Re:Lambda's plug poor OOP language design by shutdown+-p+now · · Score: 1

      On the contrary, with better lambdas, Java wouldn't need OOP, since lambdas give you state + identity + encapsulation in a much simpler abstraction than classes.

    13. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      Side note:

      Ofc in the way how a button right now is implemented the inherited fields like title etc. are likely private and you need to call a setter ...

      Some OOP languages allow one to call "set" behind the scenes using assignment notation. I personally find that a nice syntactic shortcut feature, especially for testing-stubs.

    14. Re:Lambda's plug poor OOP language design by Anonymous Coward · · Score: 0

      You can/should use the Action class instead of lambdas. The action has a title, tooltip, keyboard shortcut, event callbacks, etc... Create an Action instance then you add it to one or more controls, such as a button and a corresponding menu bar entry. If you disable/enable or update any of the Action's fields it updates all the controls its linked to. You remove or add different Actions too, so if you want the layout to stay the same but the event to change you can swap Action objects instead of creating two buttons and having having one hidden.

      In Java controls aren't in charge of their position. Whatever they're placed in handles the layouts. An individual button doesn't know what's going on around it, so it shouldn't mandate its position. You can change the positions of a large group of things by changing the controlling layout instead of having to update each control.

      The OOP nature of Java's APIs allow you reuse objects in ways that are hard to manage in more dynamic languages . It's not the best, but it works well with complex software when you learn how to use it. I find web development fundamentally unnatural, so to each his own.

      Being able to add a method onto a class during runtime breaks static complication checking. That was my first impression of your description, but I might have misunderstood it.

      Your parent forwarding reminds me of aspect-oriented programming. Their goals are different, but some of the effects are the same. I don't know the technical term for your concept, I just always called it code injection.

    15. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      Create an Action instance then you add it to one or more controls, such as a button

      It's simpler to just have the button object have an "onClick" method. Why have a middle-man object? It may help things 5% of the time, but it's better to optimize the design for what you do 95% of the time, even if it makes the 5% a little harder.

      In Java controls aren't in charge of their position.

      Whether they should or not would make an interesting discussion, especially in terms of whether Java's UI API's have too many middle-men objects/classes. But, it's not really related to Lambdas so I'll skip that. My example was simplified for illustration. (GUI's should have the option of coordinate-based placement in my opinion (relative to a container). WYSIWYG can be very helpful at times, yet was murdered by the dogmatic flowites.)

      The OOP nature of Java's APIs allow you reuse objects in ways that are hard to manage in more dynamic languages

      I'd like to see an example practical scenario.

      I find web development fundamentally unnatural

      Me too, the HTML-stack is a plague on developer productivity and should be replaced by a network-friendly GUI standard, as I've ranted about many times on /. but that's probably off-topic also.

      Being able to add a method onto a class during runtime breaks static [compile-time?] checking. That was my first impression of your description, but I might have misunderstood it.

      Why did you get that impression? The way Java is now it's messy to have methods on lower-level things. The distinction between a class and an object should be blurred. A button "instance" with an OnClick method should be easy and normal.

      And inserting lambdas into a listener registry/list is adding behavior during run-time. So if adding behavior during run-time is "bad", why would it be bad to add a method during run-time (assuming I was actually proposing such) but not via lambdas? That seems like a double-standard.

      And I'm not against the idea of adding a method during run-time, but in THIS case it's not needed. Perhaps a class/object can use "final" or the like to prevent future additions/changes if the designer so feels, but I've seen similar "locks" cause problems because the class designer couldn't properly foresee future needs.

      so if you want the layout to stay the same but the event to change you can swap Action objects instead of creating two buttons and having having one hidden.

      I'm not sure what problem you are attempting to address or prevent. I must be missing context. Perhaps an example scenario/use-case would help illustrate it.

    16. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      You answered to the wrong person, that post you are citing is not from me.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    17. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      Show it, don't claim it. Can you present a use-case to demonstrate such? In other words, provide a practical (real world) example of something that lambda's noticeably improve upon compared to an OOP version of the same thing.
      Sure ...

      I have a library function:

      Func doSomething(int[] numbers, Func theSomething) {
            for (int i=0; i < numbers.length -1; i ++)
                theSomething.callMe(numbers[i], numbers[i+1]);
          return theSomething;
      }

      This is how you do it without lambdas. To make that work you either need a dynamic language (dynamic typed) so that you don't have to define what "Func" actually is and that it needs to have a method called "callMe()" or you need an interface or Similar as in java/C#:


      interface Func {
              void callMe(int left, int right);
      }

      Every time I want to call my function doSomething I have to create a new object and likely a class that implements Func:

      Func result = doSomething(new Func() {
            int result = 0;
            void callMe(int left, int right) {
                  result = result + left + right;
            }
      }

      The main problem without Lambdas is finding a good name for "callMe" ...

      With lambdas my library function looks like this:

      Func doSomething(int[] numbers, Func theSomething) {
            for (int i=0; i < numbers.length -1; i ++)
                theSomething(numbers[i], numbers[i+1]); // no method name needed theSomething is a method
          return theSomething;
      }

      And when I want to call it:

            result = doSomething(left, right -> { result = result + left + right ; });

      The definition of doSomething is simpler and the call is a one liner.

      On top of that, most languages that support lamdas have a special syntax if the last function/method argument is a lambda/method.

      Instead of writing:

      obj.methodWithLongParamListAndOneLambda(arg1, arg2, arg3, (left, right) -> { result.add(left + right); }) // note, the function is defined inside of ( and )

      You can write:

      obj.methodWithLongParamListAndOneLambda(ar1, arg2, arg3) {
            result.add(left + right);
      }

      The function now looks like a code block as in an if or else block.

      Direct support of lambdas avoids that you need to define an interface/class and instantiate an object from it (and have a silly function name, like doit, calc, callMe ... in that interface). You simply write the function you want literally at the place where you need it.

      This was only lambdas: functional programming goes one step further ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    18. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      Further, overhauling an OO model in existing languages without breaking existing apps may be harder than tacking on lambdas.

      Erm? How so? The old APIs don't vanish. The old Apps just work like before, sorry, were you drunk when you wrote that?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    19. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      I said "real world" for a reason. I've seen plenty of "lab" examples to illustrate how great they allegedly are, but not actual, practical examples of things people would need to actually do in real apps at real orgs.

      Without those, so far I have to conclude lambdas are a solution looking for a problem.

    20. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      One may have to change the existing language to fix up OO in a nice way. That could mean breaking some existing apps.

      As far as the drunk comment, I've resisted insulting you when I felt like it, and I hope you return the favor. Else, I'd be happy to insult you in retaliation.

    21. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      Lambdas are fro writing shorter code, and if you are used to them: more readable code.

      Constructs that in "pure oo" take X lines plus all the class and method definitions needed, only need X lines as a lambda, so you save the overhead.

      In groovy e.g. (or SmallTalk) you might have a list/array of integers, and print each by giving a "lambda" or closure to the each() method of the list/array.

            list.each { print it }

      In pure Java or old C++, that Lamda needs to be a method/member function of a class/object.
      So you need to define a class:

      class MyIntPrinter implements ForEachInterface { //silly interface name
              void calledByEach(int it) { // silly method name
                    print it;
              }
      }

      And you need to create an object:

              list.each (new MyIntPrinter());

      If you have lamdas you safe the need for a class, and you don't have to do gymnastics to find a "silly interface name" or a "silly method name".

      Can you do without? Yes, but obviously programmers don't want to do without, otherwise they had not whined nearly a decade that Java 8 finally adds Lamdas.

      You should have a look how builders in Groovy work and how the same code would look in Java.

      Also keep in mind: lamdas are only new for you like every old snob you think: "who might ever need that new crap?"

      However they are not new, they are from the 1960s.
      Lamdas are actually a form of a theoretical calculus, which I e.g. was required to study in university (together with Prolog and Lisp).

      The reason why I dropped Java for Groovy and Scala in private projects: lack of MI and lack of lamdas :D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    22. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      I guess I am still not making myself clear. I have yet to find PRACTICAL use for such. Actual. Real world. Production. At least not the domains I work with.

      I agree there may be occasional instances where it might save some code, but it's not common enough to stuff Yet Another Paradigm into the language. It may cause more confusion and language complication than it's worth.

    23. Re:Lambda's plug poor OOP language design by Tablizer · · Score: 1

      Addendum

      Note that I have looked for such patterns. I've had similar debates about lambdas and related functional constructs before, and thus am keen to keep an eye out for possible uses.

      The main problem is that the pattern of variations-on-a-theme (VOAT) often don't divide up simply into code blocks. If there are many different VOATs, there are also usually attribute-level variations, not just algorithm variations. OOP is (potentially) better than lambdas at managing a variety of VOAT inputs.

      And OOP falls apart for even larger sets of VOATs, with some form of set theory being more flexible in my opinion. RDBMS are then often used to implement a set-oriented viewpoint.

      VOATs rarely are so uniform that a simple technique or input difference (such as a code block) can handle them well. In other words, the real world is too messy. Maybe in some domains, such as systems software (OS's, compilers, database engines, etc.) there is more uniformity in the variations because the variations are generally managed by engineers. But law-makers, marketers, and business owners are people who often don't give a fudge about logical design, and thus make screwy VOAT patterns.

    24. Re:Lambda's plug poor OOP language design by angel'o'sphere · · Score: 1

      I had today at least 10 cases where it saved some code.

      However I had to fucking copy/paste the same nested loop several times to exchange one single line of code in the middle of it.

      I have yet to find PRACTICAL use for such. Actual. Real world. Production. At least not the domains I work with.
      Well, if you only do SQL ... sigh.

      If you lack the intuition to realize when to use closures/lambdas, that is your lack :D

      When the API of the objects is changing over which I'm looping, I have to change nearly a dozen places. With lambdas: only one. And I had much less code anyway, I hate duplication.

      but it's not common enough to stuff Yet Another Paradigm into the language. It may cause more confusion and language complication than it's worth.
      You don't need to use it ... facepalm. What do you care what features a language has if you are not interested in those features? Why are you demanding that other people suffer just because you don't need it? Features you don't care about don't make the language complicated :-/

      And stuff like this you should have learned in school!

          f(x) -> ( x * x )

      In most programming languages lamdas look extremely close to stuff you learned in 6th grade.
      A class is much more complicated.


      E x | x < 99;

      Ofc. the E above would be an E pointing to the left (as in "there Exist X for which is true, X is smaller than 99)

      Yeah, that is the exact reason why I restrain my self from using future past tense conjunctive forms: "if I would have done the marathon tomorrow, wich will end around 6PM, I would be very hungry afterwards. However I will (you don't say shall anymore, do you?) restrain myself from that misery and rather will cook my own dinner around 20:00 if I only would have the nerves. So I will simply watch TV, unless of course if my GF would not had canceled the subscription.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  37. My favorite feature by buss_error · · Score: 0

    is "REMOVE".

    Java used to be somewhat useful. Now I consider it a nightmare of dependencies, incompatibilities, insane security restrictions, vuns, and required development forks for our internal stuff.

    "Write once, use anywhere" my left testicle. What utter eyewash.

    --
    Necessity is the plea for every infringement of human freedom. It is the argument of tyrants; it is the creed of slaves.
    1. Re:My favorite feature by mark-t · · Score: 1

      Honestly, what the fuck are people doing that a Java program doesn't work everywhere? I don't code in Java anymore because my current job doesn't require it, but when I did, everything that I wrote worked on every single platform that we tested.

    2. Re:My favorite feature by Anonymous Coward · · Score: 0

      now improved to remove even obsolete versions, courtesy of an FTC lawsuit.... https://www.java.com/en/uninst...

    3. Re:My favorite feature by Anonymous Coward · · Score: 0

      All the stupid libraries you need to use because you need them do stuff every other damn thing can do out of the box.

    4. Re:My favorite feature by mark-t · · Score: 1

      How vague... Like what, exactly?

  38. Re:Fuck em by Anonymous Coward · · Score: 0

    The fuck are you even talking about?

    You do realize Oracle lost that case, right? Or are you just too busy jacking off with the rest of the Slashdot circle-jerk crowd to give a shit about silly things like fucking facts?

    You're the one who needs to die a horrible death you fucking twat.

  39. The amazingly incompatible features.... by Anonymous Coward · · Score: 0

    that push developers straight off of Unicode and back to 7-bit ASCII, and stable, higher performance languages like raw C.

  40. My favorite feature by 110010001000 · · Score: 0

    The best feature by far is the uninstall script.

  41. Unique? Nope by PmanAce · · Score: 1

    "Its unique selling point is the attention paid to every aspect of the programming language". Other languages do this so hardly unique.

    --
    Tired of my customary (Score:1)
  42. Java Bash by Anonymous Coward · · Score: 0

    This article when sent to intelligent readers is just asking us to start bashing all the problems with Java 8. Let the Oracle attacks begin....

  43. Unsigned integers ? by Anonymous Coward · · Score: 0

    Does it support unsigned integer (32 and 64 bit) values yet ?

    This missing feature means we have to use C# for some of our code. We'd love to port it to Java and run on Linux but without unsigned 64 bit integers it's simply not possible.

    Seems a glaring ommision in programming language to me.

    1. Re:Unsigned integers ? by BBCWatcher · · Score: 1

      "Sort of." Java 8 added unsigned integer arithmetic methods to Integer. Examples: compareUnsigned, divideUnsigned, parseUnsignedInt, remainderUnsigned, toUnsignedLong, etc. You still use long and int, and they still have the capability to store signed values. However, if you want, you only use them for unsigned values and with the Unsigned methods.

      I don't think it's a "glaring omission." Life is quite difficult without signed integers -- you've really got to have those. Signed integers (of sufficient width) can functionally do everything unsigned integers can do. (What *functionality* are you missing?) If you have both signed and unsigned integers then you've got to have facilities for typecasting, and that has proven to be at least complicated enough. I think the reason unsigned integer data types were created in other languages has much more to do with the "every bit is precious" constraints in the formative years of those languages and their ancestors. They didn't want to "spend" a precious bit on a sign for every integer, hence the unsigned integer data type. Well, the 1990s (and even 1980s) came calling, with 32-bit and 64-bit addressable memory, and we don't have to be quite so bit thrifty. Every integer can have its sign, even if we never need it.

      Signed strings and characters in Java were probably a mistake, though.

    2. Re:Unsigned integers ? by bytesex · · Score: 1

      Nope. Unsigned integers have everything to do with (at least) two things that I can think of:
      - expression. It is non sensical to have an array of size -3, for example. In a language like Java, one would ideally even forbid to use array indexes from being negative. An unsigned type gives you this facility out of the box.
      - network protocols. When you interact with other languages over a network, you want to be able to convey naturally, an unsigned type. If I have a protocol that conveys 8-bit flags, I want to suck those up inside an unsigned 8-bit type. Not a 16-bit type of which the 15-th bit is a sign.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    3. Re:Unsigned integers ? by Anonymous Coward · · Score: 0

      You've obviously never worked with binary data in Java.

    4. Re:Unsigned integers ? by Anonymous Coward · · Score: 0

      char is actually unsigned in Java, unlike all the other primitive integer types!

    5. Re:Unsigned integers ? by Anonymous Coward · · Score: 0

      "Sort of." Java 8 added unsigned integer arithmetic methods to Integer. Examples: compareUnsigned, divideUnsigned, parseUnsignedInt, remainderUnsigned, toUnsignedLong, etc. You still use long and int, and they still have the capability to store signed values. However, if you want, you only use them for unsigned values and with the Unsigned methods.

      I don't think it's a "glaring omission." Life is quite difficult without signed integers -- you've really got to have those. Signed integers (of sufficient width) can functionally do everything unsigned integers can do. (What *functionality* are you missing?) If you have both signed and unsigned integers then you've got to have facilities for typecasting, and that has proven to be at least complicated enough. I think the reason unsigned integer data types were created in other languages has much more to do with the "every bit is precious" constraints in the formative years of those languages and their ancestors. They didn't want to "spend" a precious bit on a sign for every integer, hence the unsigned integer data type. Well, the 1990s (and even 1980s) came calling, with 32-bit and 64-bit addressable memory, and we don't have to be quite so bit thrifty. Every integer can have its sign, even if we never need it.

      Signed strings and characters in Java were probably a mistake, though.

      You need unsigned numbers when interoperating with other systems. Doing socket communication, calling a library or talking to a process sometimes requires unsigned numbers because protocol requires it. Doing this in Java is a pain in the ass.

      If Java supported unsigned numbers, I would use it for many projects at work. However, that one thing makes it a royal pain to use when interoperating with all the other infrastructure.

    6. Re:Unsigned integers ? by NoOneInParticular · · Score: 1

      Why do you want to an unsigned 8-bit type to contain an 8-bit flag? That's not natural! And what if you only have 3 things you need to flag? Shouldn't the language also give you a 3-bit flag type? In other words, if you need to manipulate bits, you are no longer working on the level of integers, and signedness really doesn't matter anymore. There are 8 bits, and when each bit has its own meaning in your network protocol, why do you care what the meaning of the 8th bit used to be? It's now EVIL_BIT, no longer 'positive', or '128'. Java gives you access to those bits in the usual formats: 8, 16, 32 and 64 bits.

  44. My favorite feature by Anonymous Coward · · Score: 0

    Is that no one uses this shit platform anymore

  45. Clearly by QRDeNameland · · Score: 2

    ...the Ask toolbar. Who doesn't love that?

    --
    Momentarily, the need for the construction of new light will no longer exist.
  46. Ugh. by ashshy · · Score: 1

    "...the community graciously accepted it, seeing it as a huge step toward making Java better. Its unique selling point is the attention paid to every aspect of the programming language..."

    Java 8 also turns your garbage into gold, serves you pancakes in the morning, and will never give you up. This is ad copy.

    --
    #o#
    O Moo.
  47. What kind of article is this ? by Anonymous Coward · · Score: 0

    "What are your favorite Java 8 features ?"
    Is it a joke ?

    1. Re:What kind of article is this ? by arth1 · · Score: 1

      It's a bit like asking "What are your favorite cholera features", isn't it?

      I guess the best Java 8 feature is that it enables more H1B visas?

  48. all these complaints about java by Anonymous Coward · · Score: 0

    are actually about bad programmers.

    1. Re:all these complaints about java by Anonymous Coward · · Score: 0

      because they go together

  49. Host Unknown by Spazmania · · Score: 1

    My favorite Java 8 feature:

    java.net.UnknownHostException: slashdot.org: unknown error

    Because really, it's impossible to get a better message than "unknown error" from the getaddrinfo call it's making under the hood.

    Hrm, I guess that's a bug not a feature.

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
  50. Re: Fuck em by Anonymous Coward · · Score: 1

    I'm afraid, sir, that it is you who are mistaken... about a great many things.

    This is how Oracle "lost" the case:

    1. They LOST a ruling at trial - the judge (Alsup, I believe) said that APIs cannot be copyrighted;

    2. They WON a ruling at the court of appeals (fucking CAFC -- Court of Appeals for the Federal Circuit), that said that Judge Alsup was WRONG, and that APIs CAN be copyrighted;

    3. They LOST a jury trial in which a jury said that Google's use of Oracle's APIs was Fair Use.

    Here is one thing you may not realize: Fair Use is what's called an "affirmative defense". That means the only way to get out of a copyright claim by Fair Use is to *go* *to* *trial* and convince a judge of a jury to agree that you didn't copy to much of the original AND you're not harming the market for the original work AND etc. etc.

    And a second, very important thing that you might not realize: the CAFC's ruling that APIs CAN be copyrighted? That's binding *everywhere* in the entire USA. The jury's decision that Google's use of Oracle's APIs was Fair Use? That's binding for *one* *case* *only*.

    So the bottom line-- Are you a developer that would like to build a replacement library for someone else's API? (Like the WINE project?) Or are you a user of such projects? Is the company that owns the API in the US? Are you? Yeah, if the company wants to shut you down, you're fucked, unless you've got the time and money to prove your case of Fair Use in front of a judge or jury. (Are you Google?) ...and all thanks to Oracle.

    "Or are you just too busy jacking off with the rest of the Slashdot circle-jerk crowd to give a shit about silly things like fucking facts?"

    I don't know... are you? :-)

  51. So what would you use? by aberglas · · Score: 0, Troll

    C/C++ was a joke when first produced long ago. Archaic technology obsolete before it was produced.

    JavaScript/Python etc. No static typing. Great until you get over 1000 lines of code. Also, Java compiles to binary, runs as fast (sometimes faster) than C. .Net. Technically better than Java in every way ... as long as you like windows.

    There is a need for a light weight, garbage collected language with static typing an efficient compilation, but it does not exist. So Java it is.

    Unless you like staying up all night tracking down errors in pointer arithmetic.

    1. Re: So what would you use? by Anonymous Coward · · Score: 1

      Haskell and Scala would beg to differ on your last point.

    2. Re:So what would you use? by Dutch+Gun · · Score: 4, Insightful

      Unless you like staying up all night tracking down errors in pointer arithmetic.

      Lumping C and C++ together generally means you haven't looked at how dramatically the C++ language has changed recently, especially if you talk about pointer arithmetic. If you're using modern C++ and are still worrying about pointer arithmetic (i.e. you're not abstracting it away), you're probably doing it wrong.

      The nice thing about C++ is that, quite often, those abstractions either cost nothing at all, or at worst, far less than interpreted languages. Also, having used modern C++ for a few years now, I think garbage collection is vastly overrated compared to reference counted pointers and simple RAII. C++ is still harder to use than Java or C# in many subtle ways, but basic memory management is no longer one of those persistent thorns.

      Efficient compilation? Yeah, sadly, that's not C++, and likely never will be. There are some newer alternatives that have these features and compile quite efficiency, since they don't come with the baggage of backwards compatibility, but I'm not sure how much traction they're going to gain in practical measurements outside of some niche locations. Their biggest downside? Yeah, they're not backwards compatible with billions of lines of C or C++ code out in the wild.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    3. Re: So what would you use? by Anonymous Coward · · Score: 0

      efficient compilation has been solved already, its called precompiled headers.

    4. Re:So what would you use? by BBCWatcher · · Score: 5, Interesting

      There is a need for a light weight, garbage collected language with static typing an efficient compilation, but it does not exist. So Java it is.

      Exactly. However, Java is pretty damn lightweight and efficient nowadays -- a heck of a lot less heavy than many alternatives. Partly that's because hardware improved, but mostly it's because several Java implementations have improved tremendously over the circa two decades and counting of Java's history. So, for example, Java is a mandatory part of the Blu-ray standards on ~$50 video players. And Google's Android Runtime (ART), another implementation of Java technology, is the world's most popular smartphone platform. On the server side there are extremely fast starting, lightweight, lower memory runtimes such as IBM's WebSphere Liberty Profile. The traditional efficiency rap against Java doesn't apply any more. "Back in the day" people complained about COBOL because it was "too slow" compared to that (allegedly) hand tuned Assembler code they weren't actually writing. Well, for several years, they had a point. By about the 1970s they didn't. Hardware improved, and the compilers got a lot better -- and that process continues, also for COBOL. Java used to be slow, sure...but what's that in your hand and on your wrist now? (And color TV used to suck, and car tires used to blow out at the first pothole....)

      Another huge point in Java's (and for that matter COBOL's) favor is that it's a durable programming language. The invested value in Java code, and the ability to draw from that code portfolio to solve problems, is utterly massive. It's so massive that the Java programming language has crossed over into IT immortality along with only a very few other programming languages (FORTRAN, C, C++, and probably PL/I). Also, Java is the most demonstrably portable programming language (and compilation/runtime path) we have. (Any other nominees?) It's not at all hard to write functionally portable Java code that'll run, unmodified, on platforms ranging from Android smartwatches to z/OS mainframes. That's the default, and it really does work. High quality, performance-optimized and/or battery-optimized code is always a separate question. Any programmer can write lousy code in efficiency terms, and most do at least for Version 1.

    5. Re:So what would you use? by Anonymous Coward · · Score: 0

      Using C++, my Java fingers recently wrote

          log("Count " + 1234);

      To a C programmer it is obvious that this should do the useful thing, pointer arithmetic! (And no compiler has a warning to catch this type of useless thing.)

      C++ also does not have garbage collection, and that affects everything. Reference counting does not cut it, never has.

      C++ is lipstick on a pig.

      By "efficient compilation" I mean the generated code. Modern java is generally as fast as C. And can do good tricks beyond C, like efficiently access 32gig of memory using 32 bit pointers.

    6. Re:So what would you use? by Joce640k · · Score: 1

      Garbage collection isn't RAII. It's OK for RAM allocations but useless for everything else. In Java you still have to remember to "free" all your non-RAM resources manually. Every time.

      It's true of a lot of things in Java - retype all that boilerplate code over and over and over again.

      Given the choice? I'll take reference counting thanks. It's not really much of a problem in practice and it works consistently for _every_ type of resource.
      .

      --
      No sig today...
    7. Re:So what would you use? by Joce640k · · Score: 1

      Unless you like staying up all night tracking down errors in pointer arithmetic.

      If you're doing pointer arithmetic in C++ then you might actually be writing C.

      (Which was obvious from the moment you used "C/C++" in a sentence ... C++ is about as similar to C as Java is)

      --
      No sig today...
    8. Re:So what would you use? by Joce640k · · Score: 1, Troll

      Exactly. However, Java is pretty damn lightweight and efficient nowadays -- a heck of a lot less heavy than many alternatives.

      People have been saying that since before Hotspot - 20 years ago.

      Repeating something often enough doesn't make it true.

      --
      No sig today...
    9. Re:So what would you use? by Anonymous Coward · · Score: 1

      C/C++ was a joke when first produced long ago. Archaic technology obsolete before it was produced.

      JavaScript/Python etc. No static typing. Great until you get over 1000 lines of code. Also, Java compiles to binary, runs as fast (sometimes faster) than C. .Net. Technically better than Java in every way ... as long as you like windows.

      And they all run on platforms written in C and/or C++.

      There is a need for a light weight, garbage collected language with static typing an efficient compilation, but it does not exist. So Java it is.

      And the JVM is written in C and C++.

      Unless you like staying up all night tracking down errors in pointer arithmetic.

      Those of us who are better programmers than you? The ones who wrote the platforms your crap runs on?

      We don't make those mistakes.

      The entire foundation of what you do is written in C and C++, something you've admitted you're not competent enough to do well.

    10. Re:So what would you use? by TheSunborn · · Score: 1

      True. The upgrades and improvements in HotSpot is what make it true.

    11. Re:So what would you use? by BBCWatcher · · Score: 3, Interesting

      Repeating something often enough doesn't make it true.

      Rather the point! The fact is that the Java programming language and runtimes, today, utterly dominate Blu-ray disc players, Android smartwatches, and Android smartphones, to pick some examples. (And what examples they are!) They're powerful evidence that Java hardware and software efficiencies have improved tremendously over two decades. Java is a raging market success, including on devices that cannot afford much inefficiency. It's reasonable and rational to mark-to-market dated views of Java's hardware and software performance attributes. The successful, high efficiency use cases are staring us in the face, literally.

      Of course it is still quite possible (a) to write lousy code that the toolchain and runtime, for any language, cannot performance-fix sufficiently for your intended use cases; (b) to have certain scenarios where Java and its toolchain/runtime (for a particular implementation at a particular moment in time) do not produce the very highest efficiency/performance result technically achievable. Point (a) is always true (although a richer and deeper toolchain, and associated skills, can help a lot), and point (b) simply means that you toss efficiency/performance into your calculus with the relative importance it merits for your particular needs. There are other programming languages (and associated runtimes) available, including five durable ones: COBOL, FORTRAN, C, C++, and PL/I. Plus myriad not-yet-durable (and most never will be) options. (Pascal, Ada, ALGOL.... IT history is littered with them.)

    12. Re:So what would you use? by Junta · · Score: 1

      No static typing. Great until you get over 1000 lines of code.

      If you are saying it is a code maintenance nightmare, then whether it is typed or not, your code must be spaghetti code if the overall line count significantly impacts your variables. Even in a complex project, things should be nicely scoped so that readability is preserved enough that lines of code does not impact whether static typing is a good idea or not. That's not to say it is not a good idea, just that the good idea is pretty constant whether the project is small or large.

      Also, Java compiles to some abstracted bytecode. This is the case for pretty much all interpreted languages (just the compile step happens on 'load', and many languages make effort to cache that). Performance is governed by the quality of the runtime, and yese the JRE is one of the better language runtimes, though Javascript has had a *lot* of similar work, but the language is limited. Ruby, Perl, and Python do have runtimes that are far behind the JRE, but at this point more to do with relative investment in the runtimes than things enabled by the language (though yes there is a difference by having things like static typing, it's tiny compared to general optimization potential).

      --
      XML is like violence. If it doesn't solve the problem, use more.
    13. Re:So what would you use? by Anonymous Coward · · Score: 0

      Ah, so that's why my TV needs 30 seconds to boot up and get ready to show a picture and start receiving ANY commands, be it over the remote or even the push buttons? The audio controller system must use some arcane crap like assembly or solid state electronics though, because audio is right there, at the volume it was at last time it was turned off. So I'm standing there in front of an unreponsive TV blaring away at full volume in the middle of the night for 30 seconds without any chance of tuning it down, because those dumb engineers didn't use Java everywhere in the machine to make all subsystems suck equally, right?

    14. Re:So what would you use? by Clsid · · Score: 0

      I don't know what makes you think Java can compete with C++ or their cousins in the desktop space. No, it is not light and efficient, something like SublimeText is light and efficient and it was not coded with Java. I see the appeal, the language is awesome, and for backend stuff I agree with you, very powerful and well architected systems can come out of it, especially compared to the quick fix languages like Python, PHP and Ruby. But the thing is that Java does not stand a chance in the long run against modern languages like Swift, C# (or call it Java as it should have been done), Go, and even if hate to say it, Javascript.

      Webspace you are better off with javascript nowadays, maybe something like Meteor could be the future there? who knows. And for Android devices, hate Apple as much as you want, but in all the iOS devices I have had, no matter how little RAM they could have, I have never seen what happens with my Android phones when the garbage collection kicks in. Sometimes a full 3-5 seconds lock up of the interface in the worst scenarios. Try to pull that off with something based in Objective-C and you will see my point.

    15. Re:So what would you use? by Anonymous Coward · · Score: 0

      I do "pointer arithmetic" all the time in *C++*. If you've ever written a templated function designed to be passed iterators, you have too.

    16. Re:So what would you use? by michael.karl.coleman · · Score: 0

      "modern C++" is a non-existent abstraction, like an ideal, dimension-less point. Most real C++ systems are a mish-mash of styles and levels of quality. Even for actual high-quality C++ codebases, it's all but impossible to verify that they are without months of study. And a couple of commits by Joe Schlub will knock it back to the stone age again.

    17. Re:So what would you use? by Anonymous Coward · · Score: 0

      Aren't C (and Forth LOL) more portable?
      LOL

  52. Cat got your tongue? by Anonymous Coward · · Score: 0

    If Java is so great... why Mozilla and almost any sane browser ask us to not run anything based on it and block the plug-in?

    Personally i use it only 2 times per year when I need to use a dorky system based in java for sign government paperwork. I just install it, do the paperwork, delete it, forget about it.

    1. Re:Cat got your tongue? by BBCWatcher · · Score: 1

      If Java is so great... why Mozilla and almost any sane browser ask us to not run anything based on it and block the plug-in?

      Because the browser plug-in security model was/is fundamentally broken. Browser vendors are discontinuing that plug-in model for every plug-in. If you want to continue running PC client side Java applications then you'll be moving to something called Java Web Start. JWS is a different, more secure way to launch those applications. Meanwhile, the Web sites you visit are often running lots of Java code to generate the content your Web browser displays. And if you're browsing the Web from an Android device (far more numerous than PCs) then most of the apps you run are written in Java. There's more Java than ever, but the ways and places Java runs are changing and multiplying.

    2. Re:Cat got your tongue? by TheSunborn · · Score: 1

      Because Java is great, but Java in the browser sucks.

  53. You forgot best feature of all! by Gravis+Zero · · Score: 1

    That I don't have to install it, use it or ever have to deal with it again. That is by far it's best feature.

    --
    Anons need not reply. Questions end with a question mark.
  54. SSO support for windows! by Anonymous Coward · · Score: 0

    Oh wait, it's 2016 and Java doesn't have that.

  55. Re: Fuck em by mark-t · · Score: 1

    Here's the thing the very important thing you might not realize:

    Fair use of a copyrighted work is *NOT* breaking the law.

  56. This is insenstive by goombah99 · · Score: 1

    I'm using Dalvek

    --
    Some drink at the fountain of knowledge. Others just gargle.
  57. The best feature is that I don't have to run it by chaoskitty · · Score: 1

    It has sucked so much lately, with so many security issues, that anything that requires Java has been replaced with something more modern. Just say no to Java!

    1. Re:The best feature is that I don't have to run it by hlavac · · Score: 1

      Nonsense, the security issues were there for years since Sun didn't bother to fix them. What Oracle did is open that can of worms and start squishing them, which was the right thing to do. Good work you greedy corporate sharks :)

  58. Most Searched? by Anonymous Coward · · Score: 0

    Java is one of the most searched programming languages according to TIOBE index for July 2016, where Java ranks number one.

    Yeah, because people need the most help figuring out all the details.

  59. char buffers are more intuitive than strings, not by lucm · · Score: 1

    bitwise access to char buffers

    What exactly would you like to achieve with this? A stream reader that converts ASCII to EBCDIC on the fly? A XMLReader that takes an EDI payload as a parameter?

    Please give some details. Unless you're trying to show off like a Radio Shack employee complaining that iPads have no serial ports.

    --
    lucm, indeed.
  60. Favorite Feature by Anonymous Coward · · Score: 0

    There is a non-O.R.A.C.L.E. version...

  61. Least favorite Java feature by OrangeTide · · Score: 2

    That it is still controlled by Oracle.

    --
    “Common sense is not so common.” — Voltaire
  62. Oracle database shite by Anonymous Coward · · Score: 0

    It's clearly a bit of Oracle database shite that belongs in a library not in the language. Looks to be them trying to implement a select statement on memory structures the way their database would do it on a file.

    I don't care, I program on Android, what Oracle does at this point has no consequence, they don't provide any of my tools now, the VM is not theirs, the Java language as such, their choices on that are irrelevent. They control the name, but as far as I care, I program on Android not Java.

  63. Re: Fuck em by Anonymous Coward · · Score: 0

    Did you read my post? Especially this part:

    Fair Use is what's called an "affirmative defense". That means the only way to get out of a copyright claim by Fair Use is to *go* *to* *trial* and convince a judge or a jury to agree that you didn't copy to much of the original AND you're not harming the market for the original work AND etc. etc.

    Now maybe you know more about copyright law than the IP lawyer running my copyright seminar at Harvard Law, but I'm not holding my breath.

  64. Re:char buffers are more intuitive than strings, n by Anonymous Coward · · Score: 1

    RGBA channels for image processing... access to thousands of protocols with bit-packed fields... You know, extraordinarily common computer stuff.

    Is that what constitutes showing off in your mind? Wanting a saw that can cut at the intervals you might need? I mean, gosh ... how elitist.

    Christ - look at me, acting like a big-shot and wanting to manipulate data. I bet you take your data the exactly the way it comes and just shrug helplessly. That's what external libraries are for, right?

    Probably utter a little defense of Java and then blame the data for being "unfriendly".

    At least you're humble tho.

  65. None, please people STOP using JAVA by WindowsStar · · Score: 1

    Please stop programming in JAVA. It does not work, it is extremely buggy, there is a patch almost everyday and that patch breaks everything that is working, requiring hundreds of hours rolling back patches and/or begging developers to update their software. Can we please just get a way from this forever!!!

    1. Re:None, please people STOP using JAVA by Anonymous Coward · · Score: 0

      No idea what you are talking about. All of my server stuff is Java and I make the decisions when and what to upgrade and what and when not to update.

    2. Re:None, please people STOP using JAVA by hlavac · · Score: 1

      You are confused, why do you talk about Windows 10?

  66. The Ask Toolbar! by Tablizer · · Score: 2

    My favorite Java 8 feature is that wonderful Ask Toolbar! You like type words into it and it finds stuff that actually has those words! It's like a personal librarian ... well, with ads glued to her ass.

  67. it's minecraft by pyrrho · · Score: 1

    ...

    --

    -pyrrho

    1. Re:it's minecraft by Anonymous Coward · · Score: 0

      My words exactly.
      The only reason I have Java 1.8 on my machine is Minecraft.

  68. I don't use Java by eWarz · · Score: 1

    I tend to chase the latest trending technologies...they pay more and are more fun. Also, anyone who has been following Oracle lately knows they are circling the drain. There is a huge code base written in Java, but i get the feeling it'll be the next Cobol. Whether that is a good thing or a bad thing will depend on how the market plays out.

  69. My favorite feature by Anonymous Coward · · Score: 0

    The best feature of Java 8 is that I don't have to use Java.

  70. Uninstaller by Anonymous Coward · · Score: 0

    My favorite feature of Java 8 is the uninstaller.

  71. Base64 Encoding!!! by dougTheRug · · Score: 1

    I don't have to scrounge around for Base64 anymore.

  72. Streams by pmontra · · Score: 1

    Streams were the best surprise when I had to work with Java a couple of months ago after years of other languages. They are good but it's still the worst language with that kind of functionality. I could write in 5 lines what would have taken me a page of code, but it's still a one liner in Ruby or Python. Too much boilerplate, as usual for Java. The problem is that it can't be helped given the nature of the language. Faulty original design.

  73. Ignorance shouting its head off by Anonymous Coward · · Score: 0

    Ignorance is not a virtue. The "shitty" programmer should look in the mirror some day. Learn the basics of functional programming then come back and tell us who is "shitty".

  74. Stacks! by Anonymous Coward · · Score: 0

    That there are so many stacks and that its not truly OO since some of the variables are fake objects.

  75. Terrible site by Anonymous Coward · · Score: 0

    That site actually inserted an ad into a code sample. Seriously, people?!

  76. The feature that really increased productivity by Opportunist · · Score: 1

    Java8 has a much more streamlined uninstall routine.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  77. Advertising by xenog · · Score: 1

    How did an article attempting to praise Java made it to Slashdot. We may not be great fun at parties. We may live in basements. But one thing we do know is our programming languages enough to dislike Java on grounds of its excessively verbose, bureaucratic style, its bloated feel, its appeal to people wearing suits, and its general mediocre feel. Anyone who has hacked Haskell, Lisp, Perl, Ruby, Rust or a number of great programming languages out there knows that Java is just not fun. Go, C++ and JavaScript can all sit next to Java in the mediocre languages bench.

  78. TIOBE counting wrong by AlexanderMyczko · · Score: 1

    Seriously if you check the details how TIOBE calculates the popularity of languages. It's like I search for Swift, and count in all Taylor Swift occurences. I guess they are missing a space after Java, so they also count all Javascript occurences. I mean the link https://www.livecoding.tv/ shows like 20k videos for Java (which exists over 10 years) and 40k for JavaScript, and 10k for Swift .. go figure. Just because people have Java installed, doesn't mean they use it, take a look at Debian users for example: https://qa.debian.org/popcon-g... Around 15000 installations, but recently used not even 150, not even 1 %!!!!

  79. Any numbers on Java 8 adoption? by Lisandro · · Score: 1

    From my own empirical evidence, the best feature of J8 seems to be that no one wants to use it.

  80. Some good, some bad by bradley13 · · Score: 3, Interesting

    Lambda expressions: A total brainfart. Lambda notation has no place in an imperative language; mixing paradigms is confusing for the vast majority of Java programmers. Most people just use lambdas as "magic syntax" to simplify things like declaring event handlers. The ugly syntax is a problem, but lambdas are the wrong solution.

    Date/time APIs: Yes, finally!

    JavaFX: Oddly, the best feature of Java 8 isn't even mentioned in TFA. JavaFX is immensely better than Swing, in every possible way: it looks better, it works more reliably, and it's easier to program.

    And the worst feature of Java 8 is the unnecessary complexity throughout the new features. Two examples:

    - The Optional class. Instead of checking directly for a null result, you have to unpack every result out of this idiotic wrapper.

    - Factory methods instead of constructors. Java is supposed to be an object-oriented language. In OO, you create an instance of a class with a constructor, which has the name of the class. But not in Java 8, no, instead you use a whole stable of factory methods with all sorts of weird names. Look at the new date/time classes for an example.

    --
    Enjoy life! This is not a dress rehearsal.
    1. Re:Some good, some bad by DetriusXii · · Score: 1

      I'm sorry, but unwrapping the Optional class is simply better than directly checking for null result. People forget to null check and not null checking will cause the program to crash. It is more difficult to forget to None check on a Optional class. The Optional class is a type that's caught by the compiler at compile time. Null checking can only be caught at runtime. Missing if (variable != null) statements don't get noticed by the compiler. Being forced to unpack the result is what you need to do everytime you deal with nullable values and most developers are going to forget null checking once in a while. The Optional class also gives a better meaning to element searching as both primitives and objects can be wrapped in the optional class. Searching an array of primitives for a found result previous to Optional would require a default value to be passed when nothing is found matching the search predicate It's nonsensical. Searching an array of primitives with an Optional construct defined let's the API return None, which has better meaning for elements not found.

    2. Re:Some good, some bad by Anonymous Coward · · Score: 0

      mixing paradigms is confusing for the vast majority of Java programmers.

      So what you're saying is that the vast majority of Java programmers aren't very smart?

    3. Re:Some good, some bad by shutdown+-p+now · · Score: 1

      Lambda notation has no place in an imperative language; mixing paradigms is confusing for the vast majority of Java programmers

      Really? Common Lisp had it for 30 years now.

      And lambdas do not necessarily correspond to a "functional" paradigm. For that matter, paradigms themselves are blurry - they are a rather arbitrary, and very coarse, human classification of much more complicated patterns. If you have ever passed a function pointer to another function in C, one could argue that you're "mixing paradigms".

      The Optional class. Instead of checking directly for a null result, you have to unpack every result out of this idiotic wrapper.

      It's a good thing, because it forces you to check when you use, while allowing pass-through to be zero-overhead.

      Null pointer, which you have to check, but can use without checking, is a flawed concept in that regard due to decoupling of these two operations - which is why NRE or equivalent is one of the most common unintended exception type in Java (and other languages that share the concept, which is most mainstream ones). Even the guy who invented the concept 50 years ago considers it his worst mistake.

      What Java could use is a better syntax for making those checks/uses - some kind of syntactic sugar that's more concise than lambdas. Something like "match" from ML would be nice, but probably too unfamiliar to most Java users. Kotlin does the next best thing by making regular null comparisons change the type of the compared variable within one of the branches, i.e.:

      var x: String?; // ? means nullable
      y = x.length; // won't compile, since String? can be null, and member access is not valid on null.
      ...
      if (x != null) {
      // x is of type String inside here, cannot be null
        y = x.length; // compiles, no NRE possible here
      }
      ...
      y = x.length; // still illegal
      ...

      which is really the same thing, but wrapped in a way that's more familiar to someone coming from a C-style language.

  81. Re: Fuck em by Hognoxious · · Score: 1

    Fair use of a copyrighted work is *NOT* breaking the law.

    Who said it was? Don't they teach the legal concept of defenses at DeVry?

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  82. internetseekho.com by Anonymous Coward · · Score: 0

    wow this is marvelous i like it very much . it help me alot and now i will suggest ma friends here , thanks for a good job here .. Thanks have a good day
    http://internetseekho.com/

  83. Java ? Why not... by eco_illusion · · Score: 2

    Not specific to 8, but I just like the huge number of libraries at your disposal, maven/gradle make for great dependency management tools (in fact I don't think C/C++ even have something remotely similar), and Spring just helps you write even less code than you did before. The thing I love most about the JVM is that you don't have to write Java code for it. You can even make an unholy mix of Java, Scala, Kotlyn, Groovy etc.

    1. Re:Java ? Why not... by Anonymous Coward · · Score: 0

      maven/gradle make for great dependency management tools (in fact I don't think C/C++ even have something remotely similar), and Spring just helps you write even less code than you did before

      Learn another language. The reason those tools don't exist is because they aren't needed.

    2. Re:Java ? Why not... by eco_illusion · · Score: 1

      There is python and it has pip, NodeJS has NPM, PHP has composer and they work cross platform. I worked with c++ in uni a lot and I could not find an automated dependency management system (not even Visual Studio had one). Hell, you could be happy to download / compile libs and then link them to the build system, but upgrading becomes cumbersome if the need arises and especially in big projects. If you had something else in mind, what do you mean by "they aren't needed" ?

  84. Unsigned integers by bytesex · · Score: 1

    You can't have a serious, binary network protocol aware language, and not have unsigned integers.

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
    1. Re:Unsigned integers by mark-t · · Score: 1

      Can you elaborate? Exactly why does having only 31 bits of precision make a difference when dealing with positive numbers as opposed to 32, or 63 as opposed to 64? We're not even talking about anything close to an order of magnitude of difference here... it's just one factor of 2.

  85. Deserialization by Anonymous Coward · · Score: 0

    ...but then again, I'm a pen tester
    http://www.darkreading.com/informationweek-home/why-the-java-deserialization-bug-is-a-big-deal/d/d-id/1323237

  86. Re:char buffers are more intuitive than strings, n by Anonymous Coward · · Score: 0

    bitwise access to char buffers

    What exactly would you like to achieve with this?

    Consistent sorting, which has been broken in Java since day one.

  87. Re:char buffers are more intuitive than strings, n by holz.name · · Score: 1

    You have NIO in Java. https://docs.oracle.com/javase... As for protocols, I would rather use NIO or a library. The cases of unsigned types are really small, so the Java devs made a choice to reduce program bugs by having only signed types.

  88. Uninstall by Anonymous Coward · · Score: 0

    Uninstall is by far my favorite Java feature. It's only slightly lower on my list than uninstall of Flash.

    I'd love a .Net uninstall, but that's unfeasible at the moment because Microsoft makes so many core components out of that .Net horseshit.

    Remember when applications were built in C or Delphi or whatever, and all the components were right there in the application directory, and you could simply copy the directory form one machine to another without any hassle and everything just worked? No frameworks, no dependency issues, no container management systems...

    Remember when developers weren't lazy fucks pumping out utter shit?

  89. Making Python and even Perl look good by hughbar · · Score: 1

    I'm old enough to have programmed in COBOL, and Java is the COBOL of the 1990s, bloated and ugly. The licensing is 'murky' and therefore subject to the current Google/Oracle 'discussions' and probably more of the same later.

    However, as a Perl person and increasingly a Python person who 'sometimes' does Java, it makes both look good. I'm expecting some flaming for the mention of Perl, but, when you're used to it, it's nifty, just over-comment. Admittedly APL was probably 'too' expressive, but Java makes one die of boredom before the first finger hits the keyboard.

    --
    On y va, qui mal y pense!
  90. My #1 Java feature by OneHundredAndTen · · Score: 1

    I do not have to work with it.

  91. Best Java feature? by Anonymous Coward · · Score: 0

    Best Java feature? uninstall.

  92. Java’s problem is memory usage by Theovon · · Score: 2

    That’s funny, although unless you’re bumping up against your VM memory limit, it’s not such a problem. When you DO approach your memory limit, performance drops to a crawl. In the 32-bit days, I hated the fact that my colleagues in AI developed in Java instead of C++ for programs that worked on really huge datasets just because of this issue. The programs would be frozen on GC for as much time as they did computation. That doesn’t mean I hate Java; I really like it, but this was the wrong time to use it.

    But a bigger problem is that Java VMs are memory-hungry. After a little while, a long-running Java app has grown to its maximum size and stays there tying up system resources that it’s not really using. This can happen in C too, but with Java, you can’t avoid allocating and freeing objects constantly, while you can keep memory allocation well under control in C/C++, keeping your process size small. You can’t keep your Java process size small AND have good performance.

    BTW, despite this, I do all kinds of work in Java. Mostly server stuff and some swing. When I need speed, I use C and/or C++. When I want to do something like string processing or just want to hack together a one-off, I use Ruby. When I want to do symbolic math, I am forced to use Python (a language whose syntax I object to on moral grounds) because sympy is the awesomest thing ever.

    My FAVORITE language? Probably Verilog. I’m a chip designer, so you can just assume that any piddling arguments you have over programming languages will just make me roll my eyes over how trivial the differences are. That’s like watching a Lutheran and a Methodist try to argue over the infinitessimally trivial differences in their religions. Just to piss people off for fun, I’m going to say that software languages (except maybe Haskell, which is scary for other reasons) are these arbitrary constructions that people argue about like religions. On the other hand, Verilog is grounded in reality and science; it has some rough edges too, but that is the way of science. (Our VHDL bretheren fully recognize that the two languages ultimately have the same semantics.)

    1. Re:Java’s problem is memory usage by Anonymous Coward · · Score: 0

      Ah, the good old verilog vs VHDL debate.

      architecture, entity, declaration , lots of easily readable text, vs good old verilog.

      VHDL kind of reminds me of Java, code the same thing 3 times, so it can be instanced once.

      What about the aberration of SystemC? C to gates, how bad could it be?

      Lets have code monkeys make hardware!

      Sure, the silicon "works" at 500Mhz, and requires a small nuke plant to power it, and another to cool it.

      Every language could be "bad". Java simply encourages sloppy code, becuase its programmers never start out learning the basics.

      "Memory management is hard, let Java do it for you!"

      "Sorting is hard, let java do it for you"

      "Pointers are hard, let java do it for you"

      "X is hard, let java do it for you"

      2^n levels of useless abstraction, to make "X,Y,Z" "less hard".

  93. Unsigned numbers by Anonymous Coward · · Score: 0

    Does it finally have support for unsigned numbers? And I am not talking about horrible workarounds but real, POD unsigned types.

    1. Re:Unsigned numbers by mark-t · · Score: 1

      Java doesn't technically have POD anything... while things like int and float and double, etc, do conveniently map to specific POD data types, that is really just an artifact of how it is often implemented, and not really meant to be the way that one thinks of that data abstractly.

  94. Finance and Banking.. by vasanth · · Score: 1

    Java is a big deal in the world of finance and banking for backend server applications.. We used to use Java for the backend and middle ware and .net for all UI requirements.

  95. The Uninstaller by Anonymous Coward · · Score: 0

    It's the only feature I ever use.

  96. Functional programming... by AtomicRobotMonster · · Score: 1

    ...in Scala

    --
    Is that a ding I hear? GET BACK IN THE MAGIC HOUSE!!!
  97. Re: Fuck em by mark-t · · Score: 1

    Idiots sue people they think they can get money from without just cause all the time... that doesn't mean they are going to win. If anything, this case gives precedent that fair use *IS* a legitimate defense to using an API, and when that defense is presented, an accuser is going to have to be prepared to show exactly why that defense shouldn't apply if they are going to have any significant hope of winning. Yeah, you'd have to go to court to defend yourself in the worst case, but given the circumstances, I'd think that would be about the same situation as X suing Y because Y was doing something X didn't like but wasn't actually illegal or causing any kind of real or financial harm to X. There isn't really a whole lot that Y can do to avoid being sued if X is feeling litigious anyways.

  98. Sux!! by Anonymous Coward · · Score: 0

    Ever since Oracle took over java it has gotten more bloated and filled with unnecessary complexity. I haven't used 8 yet because... why? Most of these new "features" are worthless to a real java person, just some bozos trying to make it more like C. Leave it alone!!!!

    Oh and BTW Oracle Sucks Ass!

  99. Favorite feature by DickBreath · · Score: 1

    My favorite feature is being able to write:

    private static final long serialVersionUID = 2016_08_31_001L;

    Or being able to write this on Raspberry Pi code . . .

    private static final int mask = 0b0001011;

    --

    I'll see your senator, and I'll raise you two judges.
  100. Java 8 by Anonymous Coward · · Score: 0

    I would have to say the uninstaller.. I loath java a much as a fat girl loathes a salad

  101. The wrong audience... by CabanaBoy · · Score: 1

    Infoworld has done better articles on the topic. A little dated (2010... Applets? Flash?), but still fun:

    Nothing screams "get off my lawn" like a language controlled by Oracle, the world's largest enterprise software vendor. The chances that Java can attract the mohawks-and-tattoos set today seem slimmer than ever.

    1. Re:The wrong audience... by PCM2 · · Score: 1

      Hey hey! I resemble that article...

      --
      Breakfast served all day!
  102. The bundled spyware or ... by Anonymous Coward · · Score: 0

    The bundled spyware or the uninstaller, it is really a toss up.

  103. The new and improved uninstaller by Anonymous Coward · · Score: 0

    Definitely the new and improved uninstaller

  104. hmmm by Anonymous Coward · · Score: 0

    The feature that lets me uninstall Java.

  105. Sponsors by poofmeisterp · · Score: 1

    I really liked the random unckecking of the "Supress sponsor offers when installing or updating Java" check box in the Java Control Panel after you do updates or before you do the next update (Windows releases). That was definitely my favorite little hidden feature.

    Yes, I'm being a smartass, and yes, I'm serious, but not in a good way.

  106. orly by Anonymous Coward · · Score: 0

    The uninstaller is my favorite.

  107. The old features by Anonymous Coward · · Score: 0

    Portability and compatibility are the key. The features you should expect to be widely used are the ones that were already present in Java 1.0.

    1. Re:The old features by mark-t · · Score: 1

      Uh, no. 1.2, at least.

      Seriously... 1.0 was broken in so many ways that it's not funny.

      And I'd say it took them until 1.4 or so to get to a point of being possible to be productive with at scales that were practical for anything of significant size. The difference between 1.4 and 1.3 was astounding, and the differences I noticed in usability at my job at the time led to me choosing Java primarily for my own projects as well, and it remained a language favorite of mine for years.

      The biggest reason I don't use it as much any more is because I don't have as much time to do coding on my own time as I used to, and my current job doesn't require it.

  108. TLS 1.2 by default by Anonymous Coward · · Score: 0

    What's up with Java 7 still using TLS 1.0?

  109. The best feature of Java... by Anonymous Coward · · Score: 0

    The best feature is the uninstall feature.

  110. Re: Fuck em by Rakarra · · Score: 1

    Fair Use is what's called an "affirmative defense". That means the only way to get out of a copyright claim by Fair Use is to *go* *to* *trial* and convince a judge or a jury to agree that you didn't copy to much of the origina

    Of course. But then again, you can sue whether or not you have a case.

    If Corporation X crunches the numbers and realizes that their case would be tossed out on fair use grounds, then they're a lot less likely to spend the money on a lawsuit in the first place.

  111. Best Java 8 Feature, By Far... by Anonymous Coward · · Score: 0

    I can now afford to sandbox applications by complete physical isolation, and I still see no reason to install a JVM!

  112. You were wrong even before Java 8 by Anonymous Coward · · Score: 0

    âoeIn Java you still have to remember to "free" all your non-RAM resources manually. Every time.â

    Nope. Java 7 (not 8!) added AutoCloseable and try-with-resources. That was four years ago.

    https://www.mkyong.com/java/try-with-resources-example-in-jdk-7/

  113. Google programmers not smart enough? by Anonymous Coward · · Score: 0

    I used to work at Google. They have some massive C++ code bases with some of the best code style guidelines, code review, and testing infrastructure anywhere. And you know what? The number of lines of C++ has been steadily dropping for a decade while Java has been increasing rapidly. A lot of the code in C++ is actively being ported over to Java.

    Because Java's a lot easier to debug. It's a lot easier to write. It's a lot easier to manage. And it's a lot easier to recover from an errant exception (with a helpful stack trace) than a segfault.

    Python's showing up in more and more places too.

    Sometimes it's still useful to write assembly language. Most of the time though, the compiler (or JIT) works better in the large and allows your best and brightest to keep moving forward faster instead of boasting about how big their brain is by using a more complex language when you don't need to.

  114. Ever used Google's search engine? by Anonymous Coward · · Score: 0

    The entire Google front end is written in Java: the templating engine, the authentication pass through, the profile management, the pretty histograms, etc.

    The query engine is in C++ with the search results, but once you get past a raw data result, it's 80-90% Java. There's a bunch of JavaScript of course too, but when possible Google computes server-side rather than browser-side; you can't make browsers execute faster, but you can add more and faster servers.

    And C++ is a bear to manage via clustered servers compared to Java.

    But sure. Believe what you like. "Management made us use Java."

  115. Favorite feature? by Anonymous Coward · · Score: 0

    That it isnt installed on my machines.

  116. Better than Jenkins? by ttfkam · · Score: 1

    What do you use for continuous integration? And what language is it written in? And how does that language make it better than Jenkins?

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re: Better than Jenkins? by Anonymous Coward · · Score: 0

      Jenkins is that creep in the bushes spying on you. But you like that.

  117. Threads tooRe:Java’s problem is memory usage by Anonymous Coward · · Score: 0

    Worked at GE before my server systems admin job got offshored to India to save pennies.

    We made good use of JavaMelody for tuning Java and while I would NOT want to run Java on a server without that tool, we could never get Java tuned to the point where it would not need to be shutdown and restarted to free up resources.

    Not just memory, but threads as well. IT was a PITA and resource HOG.

    Loved it when one group wanted to let the servers limp along for at least 2 or more hours while the end users (other GE Developers in countries all over the world) suffered with a system that was anything but responsive. They (the other group) kept insisting Java would 'fix itself' and free up resources eventually.

    Thankfully a 5 - 7 minute shutdown and restart of the VM would free up those resources for 4 days to a week before you would need to do it again.

    Considering when we started those shutdowns were daily, we felt JavaMelody did a great job tuning so the shutdowns were less frequent.

    With Java, just as with the book "Soul of a New Machine" engineers will never tune out all the resource hogging, just make it less frequent.

  118. You MUST restart to free up resources.. Re:Java? by Anonymous Coward · · Score: 0

    Don't know who 'he' is, but he is not kidding.

    Usually Java these days is run on a VM (Virtual Machine) and that VM will slowly use up all available memory, threads and more...you can actually watch it over time with the Java tuning tool Java Melody.

    So yes, use Java, restart often. We were able to get restarts from every day to every 4 days to a week, but you still need to restart...hey that is what Maintenance windows are for right!

    And anyone who says you can just spin up another VM to fix the problem is in denial to the way Ethernet cards control and validate their sessions. Of course it has been a few years (2-3) since I used it, So perhaps in the Virtual World there is a way to get the application to use a different Ethernet adapter, thereby freeing up the Ethernet adapter it was using without creating a socket error condition. Honestly have not looked into it.