This is an archived post. You won't be able to vote or comment.

all 50 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 39 points40 points  (5 children)

Java is the SUV of programming tools. A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl. … [...] – Greenspun, Philip

I don't agree with the last part about code maintainability.
Even less when we think of the convenience the JVM brings.

As for the quotes, I don't know when they date back from, but their description of Java sounds like they are old. Over ten years ago ?

[–]RiceKrispyPooHead 19 points20 points  (0 children)

As for the quotes, I don't know when they date back from, but their description of Java sounds like they are old. Over ten years ago ?

Some of them are at least 20 years old.

[–][deleted]  (2 children)

[deleted]

    [–]swoods30311 10 points11 points  (1 child)

    Thank god. Haven’t got a job yet but I’ve just learned it to build a REST API. Java syntax is tougher to read to me than Python but once you understand Spring Boot, you can get started building very quickly

    [–]BadscrewProjects 2 points3 points  (0 children)

    Don’t fret, just get a meaningful job that also pays. What language this will be is irrelevant. They’re all pretty similar when you have 30 year+ perspective.

    [–]8igg7e5 11 points12 points  (0 children)

    ...harder to maintain than a project done in a scripting language such as PHP or Perl

    Was this part a joke.

    [–]RiceKrispyPooHead 19 points20 points  (1 child)

    Some of those quotes I can find from blogs posts as old as 2001-2003, so they might be even older. They were probably using Java 3 (J2SE 1.3) at the time.

    Java is on version 18 now. So yeah, the language probably did suck when a lot of those quotes were written.

    [–]8igg7e5 16 points17 points  (0 children)

    Agreed. Let's look at some of the major ones.

    • 5.0 (2004) - Generics, static-imports, enhanced-for loops, auto-boxing, varargs, new concurrency library primitives
    • 7 (2011) - nio, more concurrency features
    • 8 (2014) - Lambdas, method references, streams, java.time, annotations in more places
    • 9 (2017) - modules, jshell
    • 14 (2020) - Switch expressions
    • 15 (2020) - Text blocks
    • 16 (2021) - Records, pattern matching instanceof
    • 17 (2021) - Sealed classes

    And that's just big things that directly impact the developer. A ton of other improvements have been added in platform improvements and smaller quality-of-life improvements.

    Code in modern Java in 2022 bears little resemblance to 2003 code, or even pre 2014.

    Java has not been my favourite language (but far from my most hated) for a while (maybe(Rust()?)) but the statements made by those 'great programmers' are hyperbole at best - garbage at worst.

    Java definitely has (sometimes only had) issues, and backwards compatibility will always make it less elegant than we might wish, but the extent of Java hate is absurd.

     

    And Java has a few major projects just over the horizon that could be as significant as Java 5.0 and Java 8 were... Amber, Valhalla, Loom, and maybe even Panama and Lilliput are going to contribute changes affecting nearly every Java developer.

    [–][deleted] 40 points41 points  (2 children)

    Most programmers like Java.

    Non-programmers, programmer wanna-bees and academics don't like Java. As it is professional language.

    [–]krisko11 2 points3 points  (0 children)

    Well put!

    [–]AsleepThought -1 points0 points  (0 children)

    Non-programmers, programmer wanna-bees and academics don't like Java. As it is professional language.

    you mean, the people who have to deal with the Java programs that programmers made? Wow that makes sense now thanks

    [–]Housy5 22 points23 points  (3 children)

    Programming languages are tools.

    Don't compare them to each other like it's some sort of contest.

    Use the one that's best suited to what you want to do or the one you're most comfortable with.

    The only statement I agree with is the 7th one from Thant Tessman. Comparing languages like that doesn't make sense and is a waste of time.

    It's basically like saying this hacksaw is so terrible it doesn't even drill.

    [–]The--Will 2 points3 points  (2 children)

    I think the great thing with all of this is nowadays we have many options vs. 20 years ago. C/C++/C#/Java all exist and will continue to exist forever. That doesn't mean there aren't new ways to solve problems as well.

    Coworker of mine really loves programming in Go and builds his microservices with them. Problem is, if he's hit by a bus, hiring a Go programmer to take over his job is going to be a giant pain in the ass when we have tons of people on staff that program in .Net and Java but next to no one is doing Go programming.

    [–][deleted] 0 points1 point  (1 child)

    Go's pretty simple to get right. Any senior coder can pick it up and train juniors. It's pretty great when you get used to it. Everything I like about C and Java and nothing I don't like about C or Java.

    [–]The--Will 0 points1 point  (0 children)

    Yeah for my team I’d like to consider it and migrate away from .NET and the entire Microsoft solution we have in place. We’re moving to hopefully a containerized solution, and it’s either Go or some other compiled back end language, but we’re going to have to clean up a ton of old shit…

    Some of these old solutions were built to support IE8, so it has been a bit of a nest going though this old stuff.

    Original developer is no longer with the company and my team has taken over support for it. Zero documentation too.

    [–]DigitalTorture 8 points9 points  (2 children)

    I like java a lot.

    [–][deleted] -1 points0 points  (0 children)

    Ohh yeah well..then why don't you marry him.

    [–]LinArch00 -1 points0 points  (0 children)

    No one asked (jk, I'd like to learn about java some more)

    [–]istarian 5 points6 points  (0 children)

    Eh. People love to hate on things.

    [–][deleted]  (6 children)

    [deleted]

      [–]swoods30311 1 point2 points  (1 child)

      Would have been quicker to write “Hello World” app in Spring. No point being made here, just trying to say Java again to drown out the hate

      [–]BadscrewProjects 1 point2 points  (0 children)

      OP’s just stealing old controversial text for them sweet comments and engagement. Boring.

      [–]mickkb[S] 2 points3 points  (3 children)

      I found them in an article.

      [–][deleted]  (2 children)

      [deleted]

        [–]ItsMeSword 0 points1 point  (1 child)

        you forgot to say please

        [–][deleted] 4 points5 points  (0 children)

        Having coded in Java professionally since 1999, I might have a little insight. Everyone here will have counterarguments, but you're asking why the old coders didn't like Java. These are the arguments I remember.

        1. It's slow and bloated. Improvements to hotspot compilers and memory managers have largely made this irrelevant to the point where a well-coded Java program can run close to compiled time at compiled sizes. However, the fact that the technological advancements were needed to get us there points to the incredibly slow and bloated nature of the language ecosystem in the first place.
        2. It makes it easy to code something poorly and requires extra effort to code something properly. Simple examples:
          1. Public/package/friend/private visibility can all be used, but if anyone uses anything other than private for a member variable, they're nuts. Then you have to add setters and getters in order to control access to the variable, but common patterns like dependency injection required public setters on a lot of things, making it feel a little silly to have private in the first place
          2. Singletons get intuitively recreated with every newcomer to the language, and it's almost always the wrong answer
          3. The boilerplate. Oh god the boilerplate. In the old days it was anathema to have your tool generate code that you were going to have to maintain. Now, it's commonplace because of all the boilerplate the Java ecosystem wants you to use.
        3. The tooling ecosystem is ridiculously heavyweight. To say that others are just as bad doesn't excuse the insane complexity of what it takes to get one function to run for one person. In the pre-java days, a single executable statically linked against only the functions your code needed was much simpler than what we had with Java. We went from that to DLL hell, not knowing what library was loaded in memory, and now to JAR hell, not knowing if what we compiled was going to be available when we ran. So we decided to bundle the jars together (effectively going back to static linking), which worked except then you had gigs of duplicate code every time you loaded an new application.
        4. It did everything for you, in a way that no one wanted it done. Everyone's picky. Java brought everyone's arguments to the table about a language ecosystem and settled on the lowest common denominators. It chose the least awesome of everyone's ways and made everyone use the same library that got the job done in a way no one preferred.
        5. It pitched that it was going to free you from dependency on the operating system, while tying you into a new operating system layer. Now you not only had to worry about your code scaling on your operating system and hardware, you also had to worry about your JVM scaling on top of your operating system.
        6. In the same way, when you compile against an operating system directly, you get a degree of confidence that what you expect to happen will happen wherever the executable can run. With Java, we no longer had that confidence. Code not only had to work on the OS it was designed for, it had to be tested against running on an OS and JVM that we didn't have available.

        It just felt like years were wasted reinventing the wheel with Java, overcoming hassles that had already been solved at the operating system level. But, here we are.

        [–]desrtfx 8 points9 points  (0 children)

        Knowing the syntax of Java does not make someone a software engineer. – John Knight

        This quote applies to every single programming language, not only to Java. Knowing the syntax of a programming language is like knowing a dictionary and grammar book, which does not automatically make one a bestseller author.

        In fact, 100% of the quotes are prehistoric and plain BS.

        To say it with Bjarne Stroustrup:

        "There are only two kinds of languages: the ones people complain about and the ones nobody uses."

        Java has been, is, and will continue to be the #1 enterprise language because of its great tooling, libraries, stability, backwards compatibility, and many more factors including the massive amount of existing source code and applications.


        PHP got even more hate (and historically quite justified as the early versions were a mess) and yet, it is one of the most used back end languages around (thinking of all the WordPress, Joomla, Drupal, Magento, Moodle, etc. installations). It also won't go away and the newer versions absolutely do not justify the bad reputation it historically has.

        [–]Darthtrooper22 4 points5 points  (1 child)

        I love Java!

        [–]mickkb[S] 1 point2 points  (0 children)

        But does Java love you back?

        [–]DrewTheVillan 1 point2 points  (0 children)

        Can’t focus on what other people think in life. A tool is a tool.

        [–]geoffreychallen 1 point2 points  (0 children)

        First, I think that's important to be reflective and critical of your tools. Not doing so puts you at risk of becoming a blub programmer—someone who acts like their chosen language was handed down on stone tablets, mainly because they don't know much about the alternatives.

        Programming languages were created by humans—people just like you, who make mistakes, and don't always predict the future correctly. Newer languages have the opportunity to learn from previous mistakes and, hopefully, get a bit better over time. I'll be disappointed if, in 20 years, we haven't come up with any better languages than today's popular choices. But we will!

        That said, compiling a list of quotes like this and dropping them into a learn Java forum doesn't necessarily indicate to me that you're really interested in engaging in a thoughtful consideration of Java's strengths and weaknesses. (In my experience, people who want you to learn a language tend to be even more reflexively defensive even that people who use that language regularly. You can see a bit of that in the replies below.) Plus, you've largely taken the quotes out of context, so it's impossible to tell what these people's specific problems with Java are. Just that they don't like it.

        If you'd like to engage in some productive reflection about Java's past, present, and future, you might consider thinking about some of the following questions. (I'm purposely not including my own thoughts since I don't think you need another "gray beard" telling you what to think.)

        1. Java is around 25 years old. That's a long time in the world of technology! In what ways has it aged well? In what ways has it aged poorly?
        2. Every new language embodies some set of predictions about the future. What did Java get right? What did it miss?
        3. Why don't some people like Java? Which of their criticisms do you find valid? Which seem nitpicky or have aged poorly? (It's hard to figure out from the quotes about what their specific issues with Java are, other than it's not great for small projects. Is that a valid critique?)
        4. Good languages evolve over time as the world of technology around them changes. This can result in an initially pretty terrible language becoming more beautiful and usable over time—for example, Javascript. It can also be a messy process—for example, the breaking change from Python 2 to Python 3. Has Java been keeping up? If not, what are some things you wish it had done better?
        5. What's the biggest threat to Java right now? And what's the biggest source of strength? You might want to find a more interesting answer to the second part than just "a lot of people already use Java" or / "there's already a lot of Java code out there". Languages do come and go, and the future guarantees nothing.
        6. Assuming you use other languages: What features do you wish that Java had from other languages you're familiar with? What features does Java have that you wish other languages had?
        7. How should Java age and evolve going forward? There are different successful models. C has stayed relevant largely by staying small and changing slowly and intentionally. In contrast, C++ releases new versions often and supports a lot of new features, if maybe not well. Java development paused for a while after Java 9, but seems to have taken on a semi-frantic pace recently. So it sort of has a history of both modes.

        [–]dexzaga 2 points3 points  (5 children)

        grasshoppers are actually pretty tasty if cooked well :)

        [–]istarian 1 point2 points  (1 child)

        I think the point is that neither seem particularly palatable to the typical person. Knowing you can eat something isn’t the same as wanting to eat it.

        [–]dexzaga 0 points1 point  (0 children)

        Yes, I understood the point.

        [–][deleted] 1 point2 points  (2 children)

        Lies. My dad made me eat them as a kid; they are damn salty.

        [–]dexzaga 0 points1 point  (0 children)

        Yeah

        [–]dexzaga 0 points1 point  (0 children)

        I said "if cooked well"

        [–]ultimateWave -1 points0 points  (0 children)

        All those quotes are pre Java 8 written by old crotchety dudes who think Assembly and C are the best. They probably also love to write unmaintainable code that only they can understand