Please stop saying Java sucks

I’m tired of reading all these blog posts about how Java is so much worse than languages like Python and Ruby because Java programs take more lines of code or because type-checking is evil or because Java programmers are morons.

There’s a reason why most enterprise applications are written in Java, not Ruby, and it’s not because Java programmers are stupid.

The main argument I’m hearing recently is that “more lines of code for the same job is automatically bad.”  This is clear and sensible on the surface.  More lines means more chance for a bug.  More lines means more to comprehend when you’re maintaining code.  If projects get too big, no one can understand it completely.


This glosses over the fact that many applications have no choice but to be millions of lines of code.  I know, 37signals wrote an application in 600 lines of code and they are millionaires.  But AutoCAD is going to be big, Quickbooks is going to be big, FireFox is going to be big, and yes, even a code review tool like Collaborator is going to be big.

So let’s pretend that FireFox was rewritten in Ruby, so instead of being 10 million lines of code it’s only 5 million.  I don’t think that sounds any easier to maintain — 5 million lines of code is still more than anyone can fathom.

So my question is: Which language makes it easier to work on large code bases?

In Java I can refactor with confidence.  Move code around, change signatures, add a function to an interface, and I know nothing is broken.  Python can’t.

In Java I can say “Show me all the places where this code is called.”  When changing the behavior of a method, this is critical, especially in a large code base where you have no way of tracking all those callers.  Ruby can’t show you that.

In Java if another developer checks in a change that breaks types and signatures on what I’m currently working on, I see it immediately and I can fix it now.  Big projects mean lots of programmers which means things like that happen all the time.  In Python I won’t find out until run-time, and even then I might not find out until it’s at a customer site, doing something I didn’t test for.

The second reason I don’t like the “more lines of code is bad” argument is that not all lines of code are created equal.

It’s true that in Java you tend to have lots of filler code.  Bean-style fields are a simple example — instead of just having a field that other code can access you typically make a “getFoo()/setFoo()” combination, and then you add JavaDoc to that, and soon you have 20 lines of code instead of 5.  Another example is in patterns like Adapter and Composite where you end up doing a lot of pass-through code.

The typical counter-argument is “The compiler can write that for you.”  The typical response is “Yes but I still have to read that and make sure it’s not doing anything funny if I’m a client of that code.”

True, but still those lines of code are unlikely to have bugs, particularly if you have unit tests. More work, yes, more lines of code, yes, but more bugs as a result? No.

The fact is, most of that kind of code is written once and never changed, and that’s fine.  Does that really make the system more difficult to understand?

Plus, in this day of unit testing, if you’re doing that well it means you can leave even more code unexamined.  Just seeing how it works (the unit tests and documentation) is enough.

Yes, you can unit-test your Python and Ruby code as well, but that doesn’t stop another developer from injecting a method into your class at runtime that breaks everything.

In the end it comes down to which trade-offs you like best or which match the goals of the project. In theory anyway.

But to me, I need a good reason to abandon a JVM that’s faster than a C compiler, IDEs like Eclipse, tools for correctness and profiling and debugging and analysis, the vast array of quality libraries, and millions of people who are already familiar with the environment.

“Fewer lines of code” and “I don’t need types” isn’t enough.

 See also:




  1. Grep can show all the places a function or method is called in pretty much any language… Really I don’t think java is helping you do this but maybe your development tools with their drop down menus do?

    • Mike Schaeffer says:

      Grep is only a partial solution. For grep to work, at least the following has to be true:

      1) The developer has to take the time to use grep, interpret the results correctly, and then apply patches to all relevant call sites.
      2) All call sites must contain the name of the function/method to be detected by grep. (This can break down in the presence of run-time evaluation or reflection.)

      The fact that Java enforces static checks at compile time doesn’t eliminate either of these issues, but it does reduce them when compared to dynamically typed languages.

      Also, I don’t get the slight against development tools with pull down menus. The point of the profession is to build tools to make people’s lives easier and make it easier to achieve useful results. Developers themselves aren’t somehow excluded from the need or desire for better tools.

    • Jochen Bedersdorfer says:

      var myApiNow = YourApi.YourClass;


    • Grep isn’t semantically aware. It’s not even remotely close to being as powerful as the refactoring tools in Eclipse or IntelliJ

      Note: This isn’t about detecting the string of characters in the function name, it’s about analysing all the actual call sites (which requires context aware parsing and knowledge of argument types etc.). Good refactoring tools do a whole lot more than just textual search + replace.

  2. Err… I’m sorry, java sucks, I have no idea about Ruby or any other dynamically typed languages, but java sucks simply because it is not C#. C# is a serious, strongly typed, object oriented language, which basically has all the features that java lacks.

    And no, not ALL java programmers are morons. There are a bunch who are, but then there are probably much smarter programmers, who are still forced to write shitty code due to the limitations of a crappy dinosaur language that hasn’t evolved since the 90′s.

    The best java programmer in the world cannot write code as simple, effective, and beautiful as any mediocre C# programmer simply because the language features aren’t there.

    And no, language is not “just a tool”. A language conditions your thinking, and a lacking leads to more convoluted patterns and designs (anonymous inner classes, anyone?).

    And no, the “Microsoft-only” argument is irrelevant and doesn’t change the fact that C# is a much superior language. And before anyone brings that argument, let me say that I’m already creating beautiful Android (and iOS) apps in C#.

    • Quantumplation says:

      Mono is now fully binary compatible with the .Net Framework too! :)

    • The features you request in Java (that C# has) will be available in Java 8. I agree as it is C# is superior. After Java 8, they will be more or less clones of each other.

      • That’s great!

        Does that mean that java 8 will have:

        - Real Generics.
        - Real Properties.
        - Type Inference.
        - Delegates and Events.
        - Extension Methods.
        - Value Types.
        - Async/Await. (language level support for async)
        - Iterator Blocks.
        - A REAL, Reusable, store-agnostic querying mechanism such as LINQ, which can take the collection expressions and turn them for example to SQL? or query backends such as Excel or XML or even Twitter?

        If so, that’s awesome!!

        • Thanks for your dickheaded sarcasm.
          It will have, or already has everything on that list, except properties.
          But what it will have is the things that makes C# attractive to me: closures.

          “- A REAL, Reusable, store-agnostic querying mechanism such as LINQ, which can take the collection expressions and turn them for example to SQL? ”

          Is not part of the language itself, so should not be discusess

        • Anyway if you want to get into a “my language is better than yours” in the “my dad can beat your dad” type of discussion, then fine. Java is not my language anymore. Scala is.
          And it beat the hell of out of both Java and C#.

        • ” or query backends such as Excel or XML or even Twitter?”

          Btw, that statement it not understandable. When you run out of bosswords its never a good idea trying to invent your own.

          • the C# (language feature) called LINQ is actually backend-agnostic. there are “query Providers” that take the Expression tree generated from the LINQ queries and translate them to all sorts of store-specific queries (such as SQL, XML, and even getting data from sources such as Excel or Twitter). I’m not inventing anything =)

            • You’re talking about a tool, or a platform, or whatever. You dont talk about anything that is language core.

            • The only “language core” feature is Expression Trees, which, yes is part of the C# language core. Then you have different Framework-level mechanisms that interpret that

            • Anyway, no one can be sure if it will have everything C# has right now. But it’s getting a lot better.
              And yea I think that C# is also the better language still.

            • “But it’s getting a lot better” – That’s right. C# is also getting a lot better. They’re just about to make the new compiler official, which will probably allow them to improve the language faster. I guess my biggest argument against java is the lack of evolution it has had throughout it’s history? Some would argue that’s a good thing. I disagree

            • It seems to me you spend your energy looking for flaws instead of flowers. Java has a lot of good things. I’ve been working with both languages professionally and I think that they both have things going for and against them.
              If you were really looking for a “good” language you wouldnt be coding C# anymore, but Scala.
              Defending a pretty primitive language like C# like it’s the best thing since slices bread, makes you look like a fanatic fanboy instead of someone who actually knows stuff.

            • I wasn’t trying to defend C#, I was trying to point out why people say that java sucks. Which is what the article argued against in the first place. and yes Scala looks like a much more decent language to look at. I can’t comment on it because I have never used/seen it in action, but seems like there is a big traction towards FP these days? F# is also gaining momentum.

            • I would never use anything from MS. I’ve seen companies going bankrupt because MS suddenly stopped supporting certain technologies. I know one day they will do the same with C# and you can throw 10 year old codebases out the window or start to redevelop them in another language, which most dont have time for or can’t afford. Even the first app ever written in Java still runs, on any platform, and on any version of Java.
              That kind of stability is more important to me.

            • Sorry I would need to see that to really believe it. Here in the company that I work for we just retired our VB6 application officially less than 6 months ago, and it still worked and people were still using it. And the anti-MS paranoia makes you look like a fanatic fanboy instead of someone who actually knows stuff. Oracle is no less “evil” than MS. At least MS doesn’t bundle Ask toolbars and other random crapware with the .Net Framework installer =)

            • Oh because you have worked “in a company” that had “one vb6″ application you would have to see it to believe it ?
              whats there to see ? they stopped supporting it, it might not work during the next update.
              Some companies spent a decade developing in vb6, they have their core products there.
              So you think its ok for MS just to say, hey fuck you, sorry about all the time and money you spent, but just recode everything in C# because it has delegates.
              Thats not a way to treat customers.

            • You seem to have a misunderstanding of what “they stopped supporting it” means. just because things are unable to coexist in your jvm world where you can’t have more than one version of java installed in a particular machine doesn’t mean the rest of the world is going to be like that =)

            • Holy just keep getting more and more ignorant dont you ? You can have as many JVMs installed as you wish !

            • I just think that one like you should not be permitted to talk. You have not developed seriously in Java so you have no idea of it’s current state, other that what you picked up in wikipedia or what other (fanboy) cooworkers told you.

            • GEmersonBiggins says:

              MS doesn’t even bundle a text editor with line numbers, even when you buy the workstation or enterprise version of Windoze. MS doesn’t bundle much of anything really.

            • HighCore says:

              What does that have to do with anything? java is a retarded language which doesn’t even have properties. C# is a modern, strongly typed language which has all sorts of features which make code more readable (events, delegates, LINQ, async/await, properties, var keyword) and simply beautiful. get a clue =)

            • Well fine, Java sucks, but C# is not far behind in suckiness really.

            • And yet you don’t see any posts around the Web saying “please stop saying C# sucks”… why would that be?

            • Yes, they stopped supporting still works, but it might not work during the next “hotfix” or whatever.
              Seen two companies go down because they cant ship their vb6 apps anymore. That has nothing to do with being fanboyish or a hater. Thats a legitimate source of concern, if I was going to base my business on a MS product.

            • Didn’t happen here. Our VB6 app worked even on Windows 8 last time I checked.. Again, I’d have to see that to believe it. I never heard of anything like that before

            • YEa it didnt happen ? so fucking what ? IT MIGHT HAPPEN ! It just works by chance ! Are you going to let your business rely on that ? MS said it themselves, we dont support it, we dont develop it. And they will do that again.

            • You have no sense. Even when MS clearly are in the wrong, you defend them. Everything they say or do is OK with you. Their every product is perfect in your eyes !
              Thats the definition of a fanboy.
              At least I see the many errors that Java has. You see nothing. You’r just..i dont know..lame..

            • It also MIGHT happen that a huge asteriod eliminates all life on Earth. I cannot live based on assumptions of what “might” happen.

              I’m not defending anyone. I’m just stating what has been my experience so far with the technologies I work with. And no, not everything they say is OK

            • Well in this case it was not “might” it DID happen. When they stopped supporting it, you cant sell you VB product anymore.

            • Well, as mentioned above, we just retired our VB6 app last year, before that, the company was selling it just fine. Too much unbased paranoia, IMHO

            • Unbased paranoia ? hows is it unbased if your entire codebase will not work tommorow ? Or it migth. Or it might work with bugs ?
              Tell me why that is paranoia ?

            • Only hippies develop libraries to Java ? try google, a little company relying heavily on Java. They write tons of open source quality libs for java.
              You heard about Google ? last time I checked they were kicking MS ass.

            • It would be awesome that Google’s work was included in the official version of java as opposed to forcing the developer to manually search and download all that stuff. Last time I checked that didn’t happen

            • Why is that a problem? anyone knows how to download.

            • Look dude, Visual Studio offers me everything I need to develop stuff, it doesn’t expect me to “search” for stuff in order to be able to code anything. I get VS and start coding. Period. as opposed the java workflow where you need to start “guessing” which java IDE, libraries and all that you need to download, and then “hoping” that “” version 5.1.23 will work just fine with “com.unknown.random.hippie.library” version 0.2322.3123

            • When I developed in .NET we used plenty of third party libraries. There’s a pletora of “hippie” libraries out there. Many of them pretty good.. Also some .libs only works in .NET 2.0 or certain versions of .NET. so dont give me that bull.
              VS is pretty limited. We needed multiple plugins just to get it on par with eclipse. You truly are an ignorant fanboy.

            • Funny, a google search “c# sucks” yielded plenty of results. Just face it, its not the wonder you have been brainwashed into believing.

            • yet the only relevant relevant google hit for that talks about .Net rather than C#, while all the rest date back to 2003/2002 when, yes, it really sucked

            • The functional aspect of C# is just limited. It is not a true functional language. Delegates ? how lame.
              A function should be be able to be passed between other functions without the need to declare a “delegate”.
              Scala can do that. Java will be able to do that.

            • You seem to have a misunderstanding of how delegates work. I never in all these years of C# “declared a delegate”. I just use them.

            • Can u pass a function to another function simply by using its name ?
              Not !
              And because of that, it is not a pure functional language !
              And because of that, it sucks.

            • of course it’s not a pure functional language. How does that make it inferior? or even comparable to java? as I already mentioned, there seems to be a lot more traction towards FP these days. I seriously plan to get into it, even if that means to abandon my current confort zone. Nevertheless, no one has been able to give me a sensible reason to touch java.

            • You have never programmed in Java, I doubt you have programmed in anything else than C#. You shoudlnt talk about which is better before you had actually tried the stuff you’re hating on.

            • GEmersonBiggins says:

              Java doesn’t have an “unsafe” keyword. Nuff said.

            • HighCore says:

              How is that any relevant? java doesn’t have a LOT of keywords, such as “var” for example.. hahaha what about the crappy (lack of proper) type inference which makes your java 8 lambda stuff look like it’s done by an 8 year old? sorry dude, your platform is 15 years behind. Face it.

            • Tom Dane says:

              I think the phrase that describes it most accurately is, that Java sucks and C# sucks just a little less.
              Get outside your little box and try a real programming language. Both of these are based on C++..and that alone sucks. That’s a 20 year old language and a little syntactic sugar is not going to change that.

            • HighCore says:

              “just a little less” – except that “little less” is 15 years of uninterrupted evolution against 15 years of complete stagnation. Yes there are other paradigms flourishing out there. That doesn’t make my argument invalid.

            • Tom Dane says:

              Didnt see C# change much either. Its not a really advanced language. It’s for simpletons really.

            • HighCore says:

              “Didnt see C# change much either” – A little bit of history, from wikipedia:

              C# 2.0:
              Partial types
              Anonymous methods
              Nullable types
              Private setters (properties)
              Method group conversions (delegates)
              Covariance and Contra-variance
              Static classes

              C# 3.0
              Implicitly typed local variables
              Object and collection initializers
              Auto-Implemented properties
              Anonymous types
              Extension methods
              Query expressions
              Lambda expressions
              Expression trees
              Partial Methods

              C# 4.0
              Dynamic binding
              Named and optional arguments
              Generic co- and contravariance
              Embedded interop types (“NoPIA”)

              C# 5.0
              Asynchronous methods
              Caller info attributes

              C# 5.0
              Compiler-as-a-service (Roslyn)
              C# 6.0
              Import type members into namespace
              Succinct syntax for primary constructors
              Readonly properties
              Property expressions (property lambdas)
              Method expressions
              Parameter arrays for IEnumerable interfaces
              Succinct null checking
              Multiple return values
              Constructor type inference

              while java is still struggling to do lambdas? and they haven’t been able to do proper generics after all these years?

            • Tom Dane says:

              Impressive have really scraped the bottom. “Enumerations and properties”. Like its something revolutionary. It has variables also ? Most of these features, apart from lambdas, doesnt really help you in your daily work.

              Its still a simpleton language for MS developers who needs a wizard just to make a form.
              Of course Java has developed as well. Java not is not the same as 15 years ago. it didnt evolve quite that much but it’s just as good as C# to get things done. Or rather it will be from Java 8.
              Anyway Scala is the way to go. Scala>C#>Java.

              What annoys me is that you have never developed in Java. You just hate on it because all your other MS buddies do the same. You’re an ignorant person.
              Btw, Java is still in more use than C#, according to Tiobe. Infact, Objective C and C++ is ahead of C#

            • HighCore says:

              I don’t have any “MS buddies”. In fact all my fellow devs here keep telling me to stop bashing java. But it annoys me when these java kids go around yelling “no C# because it’s microsoft!!” without having ever tried it as well, or saying that it’s “full of bugs” without a relevant source backing that statement.

              And no, I never said any of that was “revolutionary” – most probably languages from 50 years ago already had many of these concepts, but again, java doesn’t have many of them. It’s a poor, inexpressive, boilerplate-based language that doesn’t allow beatiful code. Jeez, it doesn’t even have “var” – you need:

              MyGeneric variable = new MyGeneric();

              effectively writing the same thing twice in the same line of code, whereas the C# equivalent would be:

              var variable = new MyGeneric();

              And it’s still Strongly Typed (it’s inferred, not dynamic).

              Again, I cannot comment on Scala, and as little as I know about Functional languages it seems like there are a huge leap ahead. None of that invalidates my point that “java sucks”.

            • Tom Dane says:

              “and as little as I know about Functional languages”

              Dang ! Did you know that C# is in fact a functional language ?

            • HighCore says:

              No it’s not. I’t an OO language. It has functional features but it’s not a purely functional language like Haskell, F# or OCAML. Sorry you failed.

            • Tom Dane says:

              it doesnt have to be “pure” to be functional. It has closures. That’s the definition of functional. F# has classes as well and that is a functional language-

            • Tom Dane says:

              I didnt say it was a pure functional language. I said it was a functional language. You said it wasnt.

            • Tom Dane says:

              Well do you think you are doing any better than the Java dudes when you come here in you ” I know it all and Java sucks haha” way ?
              Yea lots of Java dudes are ignorant that’s why I’m saying, to them as well, do not open your mouth before you have profound knowledge. That means, you have at least finished a few projects in the technology in discussion.

            • HighCore says:

              I don’t really need to finish any projects. I read the official Oracle article saying “we’re releasing java 8. It has bugs, but we’re releasing it anyways”.

              I don’t really need to finish any projects to find out java doesn’t have real generics, or “var”.

            • Tom Dane says:

              Yea because MS has never released anything with bugs, right ?

            • HighCore says:

              Of course, but you and I know that official voice saying something like that has a different weight. It’s not like “Ok, this is RTM – we have tested it and most critical bugs have been taken out”. – It’s a big huge warning sign saying “DO NOT use java 8!!!!”

            • Tom Dane says:

              Well at least they are honest. MS just shuts their mouth if there’s bugs or not.

            • Tom Dane says:

              You do not know anything about the Java platform.
              You only know C#.
              You are nuthugging it in the most disgusting newbie fanboy way.

              You are really not qualified to talk about this.

            • How does that makes it inferior ? just, by being a halfass, bastard of a language which some half ass solutions.
              THATS why its inferior. As a language, there is simply no reason to chose C#.

            • GEmersonBiggins says:

              Somehow eBay, Amazon, and the other massively scaled, hugely successful Java enterprises, get by without being able to do that.

            • Tom Dane says:

              Try read my comment. It was a bout C#. And any language can scale. That’s not a good argument. Facebook is written in PHP.

            • GEmersonBiggins says:

              Calling BS on this one. C# and .Net took 10 years to even show up on the scene. Meanwhile, Java matured and kept the enterprise running. Now that they got C# working, you want to claim that your toys are better? Please…

            • HighCore says:

              eerhhmmm.. I’m sorry. the Ford-T came hundreds of years before any current car. That doesn’t make it less useless in the present world in 2014. How is “.Net took 10 years” an argument against: C# has real generics, java does not. C# is a serious language, java is a useless dinosaur. ?

            • GEmersonBiggins says:

              LMAO! You would know how dumb this sounded if you understood that C# is a copy of Java. That’s right, the dinosaur you loath is what C# came from. Ironic that such an awesome language like C# would steal 95% of its crap from a useless dinosaur. Get a clue…

            • HighCore says:

              Sorry. You failed. C# has real generics, and has had lambdas since 2007, Who’s the copycat now?

            • GEmersonBiggins says:

              What awesome language features in C# can you not live without in Java? What are you doing in C# that is so amazing that Java cannot do? I’ve been working with Java for almost 20 years now, and I don’t recall wishing I had what C# was offering.

            • HighCore says:

              ever heard of LINQ? it is a tiny little piece of technology that .Net developers have enjoyed for 7+ years now…

            • Tom Dane says:

              One thing: closures.

            • As far as I can see it’s just autogenerated classes that use closures to give you a more expressive approach to a problem. C# has closures. You already mentioned that on your list. You cannot just put more things on that list that is just a sideproduct of lambda expressions.

            • When Java will have closures, it will be possible to make LINQ and the like as well on Java. As it is now, you can’t.

            • So you’re saying that it will be possible to use java streams (which is all that’s being said so far about the use of lambdas in java) and turn them to SQL?

            • Java streams ? You mean input/output streams ? I dont see what they have to do with Lambda expressions.
              Anyway, any lambda expression can be turned into SQL, of course. Why not ? There’s a framework mapping everything behind it, of course. There’s nothing in the bare C# language that knows how to turn lambda into SQL.

        • Look at your entrance to this discussion:
          “Err… I’m sorry, java sucks, I have no idea about Ruby or any other dynamically typed languages, but java sucks simply because it is not C#.”

          I rest my case..

        • GEmersonBiggins says:

          Does C# come with a toaster too? Java does not. So it sucks!

          • HighCore says:

            On the other hand, you could go ahead trying to name what features make java “better” as a language / platform (in your opinion). Please leave the useless “write once, run away” stuff outside. java doesn’t even have a decent client-side UI framework.

            • Tom Dane says:

              ” java doesn’t even have a decent client-side UI framework.”
              It has a few. Swing and GWT are pretty good.

            • HighCore says:

              Sorry, “swing” is similar to .Net’s “winforms”, which is a dinosaur piece of technology completely deprecated and forgotten and useless. All modern UI technologies in .Net are based on XAML and support patterns such as MVVM, something which has no equivalent in the java world.

              GWT seems to be browser-based, so no, that is NOT a client-side (thick) UI framework.

              If you seriously believe that “swing is pretty good”, you really have no idea what UI frameworks are. You’re talking to a UI guy..

            • Tom Dane says:

              I meant SWT, which is pretty good.

            • Tom Dane says:

              Swing is actually pretty good (again, did you do anything in it ?).
              But yea, Java is not strong on the client side. It has some really good web-gui frameworks though.

            • HighCore says:

              Yes, but Web GUIs are really HTML [+ JavaScript + CSS]. Strictly speaking, java does not play a role there. java in the browser is non-existant. In fact latest browsers disable it by default or post big red warning messages saying “warning, you’re about to run a java applet, this is a security risk”.

            • Tom Dane says:

              Of course I’m talking a bout webframeworks, like .ASP .NET. Thought that was clear.

            • Tom Dane says:

              Well what is important really is the JVM. That one rules on the serverside. And we all know that the serverside is what matters.
              .NET blows on the serverside. Who the hell would use .NET for anything serious ? (apart from MS, who is getting killed left and right anyway).
              Twitter runs on JVM and gmail uses Java. What does .NET run ?

            • HighCore says:

              errmmhhh… ever heard of StackOverflow(dot)com?

            • Tom Dane says:

              Stackoverflow beats twitter ? and Gmail ? :)

            • HighCore says:

              “beats” – what do you mean by that? it’s not a competition. You asked about a serious project done in ASP.Net and I replied to that. What does that have to do with google’s maniac avoidance of everything related to MS?

            • Tom Dane says:

              Well beats in a way that it is more impressive :)
              Yea google avoids MS..because they have no use of them of course.

            • HighCore says:

              Except for the fact that if google had decided to use C# on Android it would be 400% faster and consume less memory, due to the improved performance gained by C#’s value types and proper generics and Mono’s VM optimizations

              Search for XobotOS. again I can’t post links here.

            • Tom Dane says:

              400% faster ? less memory ? Because of “value types” and proper generics ? references to why so please..
              And why are Javas generics not “proper” ?

            • HighCore says:


              sorry for the badly formatted link. This disqus thing won’t let me post any links without requiring moderator intervention.

              and yeah, java generics are a joke, while .Net offers real generics.

              java generics do “type erasure”, which forces all sorts of casting stuff at runtime. And since java doesn’t have proper Value Types, you can’t even do a List without requiring that “boxing” stuff, which hurts performance left and right.

            • Tom Dane says:

              Javas strength is not really it’s core libraries. They are OK but the real power comes from third party libraries. It would be too extensive to get into that, and you will just call them “hippie” libraries anyway, despite companies like IBM, Google, Oracle, Bea, Apache are behind them.
              Live on in your ignorance. Your problem is that you think a quick google search and wikipedia gives you any real knowledge.

            • HighCore says:

              Alright, I’ll try to open up my mind a little bit.

              Can you name a “third party library” in java that gives the the power, scalability, maintainability, ease of use, customizability of WPF as a UI framework?

            • Tom Dane says:

              No, because I dont know WPF.

            • HighCore says:

              Don’t forget to mention that java doesn’t even have a decent client-side UI framework to begin with.

              BTW, there’s something called javaFX, which, if you do a little research, you will realize it’s a poor, half-baked copycat of WPF and XAML.

              Of course C# and .Net are a “copy of java”…

            • Tom Dane says:

              It has a “decent” client side GUI. I mentioned SWT. Weather its as good as WPF i dont know.

            • HighCore says:

              Except that C# and .Net “raise the bar” when you use them, therefore your consideration of what’s “decent” and what’s not changes.

              People who are used to working in WPF and XAML will consider procedural-based UI framework as “useless crap”.

              people who are used to modern languages such as C# will consider dinosaur languages such as java, which don’t even have properties as “useless crap”.

            • Tom Dane says:

              I dont understand your problem. I already said that C# is a better language. To get into what of the million of libraries available is better is hopeless, not you or I know it.

            • HighCore says:

              I don’t have a problem. I’m in the beautiful side of things with all my XAML and my DataTemplates and my DataBinding and my LINQ and my real generics and my type inference. I really have no problems whatsoever.

            • Tom Dane says:

              Yea and other people have GWT, Spring, Guice, JPA etc.

            • GEmersonBiggins says:

              Most people in the Java Enterprise don’t do UIs. Everything is on the web now. When I get my email, or view my bank statements, I don’t need to download Silverlight or some framework. I just go to the browser. That’s how a lot of the world works now. I haven’t built a UI in ages.

            • HighCore says:

              And no, I don’t need to do anything in swing to realize:

              - it is not hardware accelerated.

              - It does not have a serious DataBinding engine.

              - it does not have the concept of “Styles” or “Templates” that you can find in modern .Net UI frameworks (similar to what you do in CSS for the Web)

              - It does not use a declarative language (XML or other) to define the UI.
              - It does not support animations, or rich interactive UI features.

            • Tom Dane says:

              ” it is not hardware accelerated.”
              Yes is has
              “It does not have a serious DataBinding engine”

              Yes it has

              “it does not have the concept of “Styles” or “Templates” that you can find in modern .Net UI frameworks (similar to what you do in CSS for the Web)”

              Yes it has. You fail.

              “It does not use a declarative language (XML or other) to define the UI.”

              Many third party libs provides this functionality,, which btw sucks as hell. Why would you use XML ?

              “It does not support animations, or rich interactive UI ”

              Yes it does.

            • HighCore says:

              Sorry, googling:

              – java swing hardware acceleration.
              I found a stackoverflow post talking about double buffering. That is NOT hardware acceleration support.

              WPF uses DirectX to render the UI, therefore it’s hardware accelerated by default.

              - java swing styles and templates
              I find an article saying to introduce HTML in the UI. Using HTML means you’re actually NOT using the UI framework’s own classes and capabilities.

              WPF allows total customization of the UI and a complete separation between a control’s appearance and it’s behavior, while also allowing the definition of DataTemplates to display all sorts of items-based UIs with a customized per-item view.

              - java swing animations
              I find an article saying to use a Timer and control the UI when the timer ticks. That is NOT built-in support for animations.

              WPF DependencyProperty mechanism allows animations in all levels of UI, without resorting to manual Timer stuff.

              and XAML is not XML. XAML introduces the concept of Markup Extensions and allows complex scenarios to be declaratively defined with ease. As opposed to creating an object graph in procedural code, which is much more cumbersome.

              again, swing looks really similar to winforms, which is a crappy piece of technology. If you believe that is “pretty good” (in 2014), you have no idea what a serious UI framework is.

              I wish I could post all the sources for this information, but this site gives me “moderation pending” warnings if my posts contain links.

            • Tom Dane says:

              “WPF allows total customization of the UI and a complete separation between a control’s appearance and it’s behavior, while also allowing the definition of DataTemplates to display all sorts of items-based UIs with a customized per-item view.”

              I do not see how that is different from the MVC architecture of swing.
              I dont get your “timer” comment I’ve made plenty of animations in swing. It’s simply switching one picture with the next. Or move it around the canvas.
              As for “stylesheets” it has something called “Look and feel”. Which is pretty much the same.

            • HighCore says:

              errmmm… no. “move it around the canvas” is not what I mean by animation. What I mean by animation is Framework Level support for transitional timelines which modify the properties of UI elements on a given amount of time. WPF has that, not only for “moving stuff in a canvas”, but for example for color animations, translation / scale animations. vector animations, and the like

            • Tom Dane says:

              It doesnt matter. Some libraries is better in Java and some is better in C#.
              Original discussion was about what language is better, and in that case, C# is (still). Not that I even care much since I’m trying to get away from Java.
              To get into a full blown platform discussion including all major libraries and tools is not the aim. That would be impossible also since none of us know enough. Doubt anyone does.

            • HighCore says:

              Fair enough. Bottom line is that you (and probably a lot of former java developers) are moving away from java due to it’s lack of evolution in all these years, and embracing modern languages. No matter how loud oracle screams “we’re releasing java 8!! (full of bugs)” – it’s too late for that. java has become legacy.

              Looks like no amount of “hurry up, bring the lambdas in, even if they don’t really work and are full of bugs!!!” will change that.

            • Tom Dane says:

              Not many are really “moving away” because, after all, it pays the bills. Most will live with it until it catches up. Think about it, Java developers had had at least 10 years to make the move to .NET. Still Java is more widespread than .NET.

            • Tom Dane says:

              That wasnt an insult to .NET. I was making a point that most people are very conservative.

            • HighCore says:

              Yeah, but that’s probably due to these universities teaching java? And the widespread misconception that “MS owns C#” and that every single line of C# code that you ever write is subject to be sued about for intellectual property. Seriously, I’ve heard several people state that as a fact. Not to mention many people immediately disregard C# and .Net entirely just because the MS brand on it.

            • Tom Dane says:

              It’s based on the tiobe index. How they got it is not really clear to me.
              And it wasnt an insult to .NET. I was making a point that most people are very conservative and because of that, they wont just move away from Java. It will take more than a few nifty language features to make that happen.

            • HighCore says:

              Or Oracle putting some very big money on java and getting brilliant minds (such as Anders) to work on it, which could reverse the trend. if java had the rate of evolution C#/.Net had the last decade, nobody would be talking about .Net by now. It’s just sad that one can’t have the cake and eat it.

            • Tom Dane says:

              Whatever reason they do what they do, it’s not incompetence. I’m sure they have their reason.
              It seems to me that Java moves slow but surely. I think that’s also one of the reasons many stick with it.

            • GEmersonBiggins says:

              I’m sorry, but this is getting silly. Java was in the enterprise solving our problems while .Net took a decade just to get up & running. Sun Microsystems dropped the ball. Maybe Oracle can pick it up and run with it. Doesn’t matter. Java was already stable, mature, safe, hardware accelerated, and pushed to blistering speeds, LONG before .Net or C# were (viable) options.

            • GEmersonBiggins says:

              I have not met a single Java developer that is moving away from it. Can you provide your source for this information? Was it a MS blogger perhaps?

            • Tom Dane says:

              There’s not a single thing on that list that is not possible with Swing. If it’s easy or not is another thing. I never said it was perfect, just that it was pretty good for most cases.

            • HighCore says:

              “Pretty good for most cases” – if you want to make a UI that looks like it was done by a caveman 5000 years BC. I don’t get your point. this is 2014, not 1990. Seems like java people don’t realize that yet?

            • Tom Dane says:

              Swing is old. But as I mentioned, there’s SWT..that one is, in fact, good.

            • Tom Dane says:

              You talk out your ass now

              “I found a stackoverflow post talking about double buffering. That is NOT hardware acceleration support.”

              Wtf do you mean ? Hardware acceleration can use double buffering if it wants to.

            • HighCore says:

              Alright I missed on that one. winforms is not hardware accelerated and I assumed that swing would equally be as lacking.

            • GEmersonBiggins says:

              This is WRONG. Since Java 1.4, all 2D/3D is hardware accelerated. It also has styles & templates. You’re info is over 10 years out of date and I’m not reading the rest.

            • HighCore says:

              Please show me how you do anything similar to CSS in “swing” or whatever crappy half-baked useless dinosaur java UI framework from 500 years ago.

              Don’t forget being able to completely customize a UI element’s appearance without writing a single line of code, and using vector graphics, not crappy pixelated bitmaps

            • GEmersonBiggins says:

              XAML? Is that the premier language for building UIs now? I’ll take Swing over XAML.

            • HighCore says:

              Since you don’t do much UI work.. you can’t really speak on the subject, can you?
              please google “WPF Razorfone” and show me how your crappy dinosaur “swing” stuff from 500 years ago can compete with that. I can’t post links in this disqus thing.

            • GEmersonBiggins says:

              I guess you missed the part where I stated I’ve done Java2D/3D, AWT, Swing, JAI, and more (such as GWT, Flex, etc.).

              Also, I never compared Swing to “WPF Razorfone”, whatever that is. Nobody argued that Java was the best UI platform. YOU said Java didn’t have a decent framework, which is what I’m saying is false. You made a lot of claims on this thread that were proven false.

            • HighCore says:

              Except, as I said elsewhere, .Net and C# “raise the bar” in general and that changes your notion of what’s decent and what’s not.

              – People who are used to C# will find java as a retarded useless dinousaur language because all the missing language level features.

              – People who are used to WPF and XAML will find any UI framework which doesn’t support a big amount of DataBinding and Rich UI features as a retarded useless dinosaur.

              You can keep screaming “java is awesome!” as much as you want. It still doesn’t have proper generics. It’s a retarded dinosaur who’s unable to grow up and evolve.

              They finally realized how much it sucks and they’ll make their best to imitate C#, by introducing:

              - Lambdas.

              - Real generics as opposed to the current retarded useless “type erasure” crap.

              - Value Types as opposed to the current retarded “primitive types” crap.


            • GEmersonBiggins says:

              I have done Java2D/3D programming, AWT, Swing, and there are other options like GWT or JOGL, which are 3rd party. I’m sure others have done much more than I have, as I normally don’t do UI work. I was just wondering if you simply didn’t know these existed, or if you’re claiming they all suck?

    • GEmersonBiggins says:

      This was good for a laugh! I loved this:

      “…the fact that C# is a much superior language”

      Sounds right out of the brochure! Next time, get an engineer to post instead of a sales guy.

  3. PathogenXD says:

    My major gripe with Java is not the amount of lines of code it takes to run it but with the type of programming mindset that developers using it seem to pick up.

    Usually, applications written with Java are slower than equivalent applications written in languages like C++. Java itself may not be slower, but the applications written with it certainly are. Also, Java applications appear to use more memory than equivalent non-java applications. The memory issue is most likely a side effect of the garbage collector, but I think the efficiency issue may stem from something else about the language.

    Python is nice as a scripting language because of its standard library and not-in-your-face typing system. The nice thing about Python is that you can develop things quickly in it, without having to worry very much about interfaces or inheritance. In that way, it’s better than Java, where it seems like everything has a couple layers of inheritance you have to deal with, and everything has a wrapper you have to put it in before you can use it.

    At the end of the day, a non-trivial Python script will most likely be easier to understand because the language is fairly simple. A Java application doing the same thing will most likely have several layers of inheritance, object factories, and all sorts of complicated things that will make it more difficult to understand.

    As far as re factoring, debugging, and other things to do with the development process go, there are many IDEs for different languages that have the functionality you describe. Eclipse itself has plugins for almost every language there is.

    • > …applications written with Java are slower than equivalent applications written in languages like C++
      No fucking shit. C++ is pretty much the fastest thing out there. Python is even worse for performance, so using this argument works against you.

      Yes, tha garbage collector is not the best it could be, this is a downside of Java.

      > Python is nice as a scripting language

      Exactly. And that is all it ever will be, a scripting language, not a language used for building huge enterprise-scale applications.

      What you and some other people don’t realise is that Python and Java are (and should be) used for slightly different purposes. For scripting tasks like collecting statistics from log files, I use Python ever time, its not even a question. Its a one man task. But for building larger applications requiring many people to contribute, you need Java’s (or C#, C++ etc) type safety and other language mechanisms for the exact reasons listed in this blog, unless you want all your bugs to appear in production.

    • > A Java application doing the same thing will most likely
      > have several layers of inheritance, object factories, …

      Inheritance is code design and not “must to have” feature.
      Java can be as simple or complicated as Python.

  4. Christophe says:

    People who know their IDE well combined with Java know that it works well, especially for refactoring/maintenance work. I would not consider writing a huge application with a scripting language, those may be useful for doing some specific work but not the whole thing. Think of IDE + Java as your aircraft carrier and scripting languages as the small companion ships, each one plays a role. Of course the carrier is quite heavy ! Many lines of Java are simply generated by the IDE, no one writes all of that code by hand…

  5. Tin Pavlinic says:

    So essentially, the author here is saying, ‘dynamic typing sucks because it does not provide type safety in large codebases’ Hence, java.

    That is silly. We can have static typing systems that are better and safer than java while still reducing boilerplate and verbosity. Scala, F#, Haskell are examples. Even C# is less awkward and verbose than java.

    So use the best tool for the job. That was always the case. But nowadays, the only job I see java being good at is legacy java projects. Possibly android in some cases, though cross-platform mobile apps are preferable when possible.

    Server side? Use scala. Desktop apps? Java was never really a good option. Little scripts? Python/Ruby,etc to the rescue. GWT? JS is better, as are other compile-to-js languages.

    Also I should mention that when I say Java sucks, I mean Java the language. The JVM is one of the best pieces of technology in existence, and there are plenty of productive languages that target it. So embrace scala, clojure, groovy, jython, etc. but for your sanity and that of your successors, avoid java if you can get away with it.

    • GEmersonBiggins says:

      JS is better than GWT? Scala is better for Java in the enterprise? C# is less awkward? My first thought is, have you been eating paint chips? But we’ll give you a chance to backup those arguments and explain why the enterprise is better off with Scala and how Java is unsafe. I’d especially like to hear how C# (a copy of Java with added bugs & bloat, not to mention the unsafe keyword) is less awkward.

      • Tin Pavlinic says:

        Why the enterprise is better off with Scala and how Java is unsafe:
        Options – no more NPEs
        Try monads – better error handling
        Better concurrency through actors and immutability.

        I am not a C# expert but it does appear to evolve faster and leads to more consise code. Properties, delegates, etc. And faster evolution, with java, we seem to get new features 10 years after they stop being cool. If the C# language is really full of bugs, then I will take back the statement supporting it.

        And JS vs GWT – that one is more debatable because the Java’s static typing, even as poor as it is does give you better IDE support. But having spent a lot of time using GWT, moving to knockout.js was a pleasure. (though I miss static typing, there are other languages that compile to JS popping up but I haven’t used them so I cannot comment. One thing I will say is that javascript frameworks today are a lot better than javascript frameworks when GWT came out. So that may tip the balance.

        And to reiterate, the JVM kicks ass!

        • GEmersonBiggins says:

          If you don’t set a variable, you’re going to have a problem, regardless of whether it’s expressed as an NPE or not. The language won’t fix technical debt or poor programming.

          Regarding concurrency, I can’t imagine Java has much room for improvement. It took Microsoft a decade to get .Net working up to where Java/J2EE was when they started. Meanwhile, Java matured, has seen insane performance improvements (hardware acceleration, NIO & bytebuffers, VM (or parts) rewritten in assmebler, some ops faster than C/C++ for over a decade now), not to mention wide industry adoption. I can run anywhere, any time, no installs, no recompiles, and I do it all the time, with Java.

          I can’t speak for Scala much, but C# and .Net are a kock off, a day late, and a dollar short. It’s like giving up my Toyota because somebody promises that the new Ford is better.

          • For some reason, when you’re attacking C#, it sounds like you don’t know much about languages other than Java. I won’t say that Java sucks, because I believe there must be something it does well, otherwise no one would use it. Besides it’s probably the language I used most. I don’t have much experience in the industry, but looking at your arguments here it seems like you don’t know much about C# and are just saying the image you have of that language in your mind. For example, you didn’t mention any of the many bugs you said it has, and complained about the unsafe keyword just because of it’s name, sounding like you don’t know what it does (btw, I don’t know what it does either). In fact, your arguments sound like something I would say about something I don’t have much knowledge. Sorry if you get offended, I’m just trying to reason about your arguments so that I can understand better of both sides and learn a bit more with this discussion.

      • HighCore says:

        Sorry, you’re blatantly ignorant. Please show a relevant source backing your statement that C# is “full of bugs”. You have no idea what you’re talking about. While I can name an official source (oracle) saying that java 8 will be shipped EVEN WITH BUGS. And yes, C# is a “copy” of java, that’s why C# had lambdas 7 years ago while java is just releasing a version including them.

        • GEmersonBiggins says:

          IIRC, and I think I do, the part of C# that has traditionally worked well is the part they stole from Java. The stuff MS hacked onto it didn’t work too well. It took SEVERAL YEARS before .Net was a viable platform, just like everything else MS has released. So even if they have fixed everything that was hosed in .Net, I still don’t trust them and Java is still that much further ahead.

          It should also be noted that Java has survived (and is still #1) without lambdas, structs, or an unsafe keyword.

          • HighCore says:

            Again, your lack of sight leaves you in evidence. Please show a relevant source proving your statement that C# “didn’t work too well”.

            “java Is further ahead” – yes, that’s why they’re just releasing a crappy, half-baked, full of bugs (admitted by Oracle themselves) java 8 version with a poor lambda syntax that lacks even the most rudimentary type inference, something that C# already had by 2007.

            And no, your argument that something “took years” is not relevant, even if it was true, which It’s not.
            “java has survived” – that doesn’t make it less useless in the present world in 2014.

            Come back when you have real generics, or at least properties.

            • GEmersonBiggins says:

              I love how noob programmers like to compare the language they love with the language they hate, because it doesn’t have what they are used to. I heard all this drivel 20 years ago when everyone said Java sucked because it didn’t allow direct memory access (i.e. pointers). 20 years later, we still don’t have it, and Java still sucks to those people. Fortunately, those dinosaurs will be retiring soon.

              Also, if you missed the first 5-7 years .Net was being pushed on everyone while broken, I can’t help you. Go read the news archives about how sad the .Net rollout was.

            • HighCore says:

              www(dot)infoworld(dot)com(slash)t(slash)java-programming(slash)full-speed-ahead-oracle-ship-java-8-in-march-even-bugs-234091 =)

              I won’t speak anymore with you. I don’t have that much time.

              You don’t seem to live in the real world.

              Instead of reading “news archives” from things that happened 10+ years ago and nobody cares about, go read current news, which state java 8 will be shipped even with bugs =)

            • GEmersonBiggins says:

              Yup, Java is crap, full of bugs, and nobody wants to use it anymore. Meanwhile, C# is taking the world by storm, is light years ahead of everyone, and is completely bug free.

              Did I get that right? Sorry, holding in the laughter…

            • HighCore says:

              I never said that “C# is completely bug free”. I just said that java is a retarded useless dinosaur, while C# is a modern language from this century, which is constantly evolving as opposed to staying in the 90′s =).

              Try again, kid, try to bring relevant technical arguments to discuss instead of trying (and failing) to ridiculize me.

    • GEmersonBiggins says:

      I will look into Scala. Something tells me that I’ll be doing Java for a long time to come though, as that’s where the market need and salaries are. If Scala and C# were so great, I think I’d see more adoption in the enterprise. i.e. Support (or lack thereof) for things like Ruby and Scala make it scary.

      • HighCore says:

        “adoption” – sorry. Please have a look at builtwith(dot)com(slash)framework. You might notice that the leading technology in the Web is PHP with ~40% , followed by ASP.Net with 22%, while java stuff has a miserable 8%

        • GEmersonBiggins says:

          According to TIOBE, Java is #2 behind C. Then again, it also shows that C# is declining and VB.Net is on the rise. I think there’s a lot of movement out there. I’m not using PHP though, I can tell you that. :)

          • HighCore says:

            “C# is declining and VB.Net is on the rise” – yes, and my name is Michael Jackson. Pleased to meet you. Open your eyes kid look at the REAL WORLD.
            “I’m not using PHP” – Ever heard of FaceBook?

            • GEmersonBiggins says:

              Yes I’ve heard of Facebook. I don’t like it or use it, but not because it’s written in PHP. I don’t have any problems with PHP as a technology. I simply avoid it because it’s nasty.

      • Tin Pavlinic says:

        The nice thing about scala is that it does interop well with your existing code base and libraries. At my company, we still do maintain some java projects but for anything new, we always use scala. Try it, spend some time learning it (because functional programming is not OO – you do need a mind shift), and you will not look back.

        I am not saying Scala is necessarily a perfect language, but it is an excellent drop-in replacement for java in the enterprise world.

        I will add that the eclipse scala ide is pretty good, but not as performant as the java one. Ditto for IntelliJ. They are good but not perfect. Don’t let that put you off though

        • HighCore says:

          ” At my company, we still do maintain some java projects but for anything new, we always use scala” – This confirms my point that java (the language) is legacy stuff, no matter how fast is oracle at releasing a new version full of bugs (admitted by themselves). A java-based shop like yours has already switched to Scala for all new projects, while non-java based shops are moving to newer technologies.

          • GEmersonBiggins says:

            ” At my company, we still do maintain some java projects but for anything new, we always use scala”

            This confirms, to me, that they’re more interested in using Scala than using the right tool for the job. Just saying, if you’re trying to fit Scala into every project first, before consideration of other tech/languages, then you have a bigger problem at your company.

            • HighCore says:

              Face it dude, your language sucks. Period. Even people who used it in the past are moving away from it.

            • GEmersonBiggins says:

              I’m fine with people moving away from Java. That’s less competition and more money!

              Fortunately, most people have a brain that works and can see that, over the past 20 years, Java has only gotten better, and better, and better.

              I think you’re just jealous that the language YOU like isn’t as popular, capable, and loved overall.

            • HighCore says:

              “jealous” – how can I be “jealous” of a retarded language which is trying to imitate C#?

              Look dude, they’re finally acknowledging that java sucks and they’re going to fix it.

              They already did this lambda stuff (which C# had by 2007).

              Now they’re talking about proper Value Types as opposed to crappy useless primitives (again, C# had that in version 1.0)

              And they also admitted that java generics are a useless joke and they’re planning in doing proper generics (which C# had in version 2.0) in java 9.


              Bottom line: java is now (10 years later) evolving to imitate current and past C# features =)

            • “Java’s trying to imitate C#”
              That’s a ridiculous thing to say, C# is the Java copycat since it very first days, and not just Java, C# has pretty much copied features from other languages as many as possible: linq, lambda, extension methods etc. It seems like C# is going on the same track that C++ went, and that was the reason why C++ got less popular.
              More ways to do things encourage bad practices, Java’s creators reduced the number of language features inherited from C++ and there is no way they are gonna follow C#.
              The only reason C# grows is that it is the official language for software development in Microsoft’s ecosystem. C# code looks even longer than Java and the convention is confusing. Even if Java was not the best language in what it is still used for developing today, C# whouldn’t be as well because its simply a Java’s bastard.

  6. I am just sitting here and write the everything in C++ and C#, or even HTML5. Java Programmers are not moron, i just hope they know what they are getting into because my friends who learned Java, quickly realized that he chose a wrong path.

    Right now the land of Java is limited, Java runtime isn’t stable on Windows, Java on Mobile is being reduced greatly with Symbian dieing off quickly. Low Level but Powerful Language like C is easier to code, easier to port to different platform and generally supported by all modern hardware. So it is your choice.

    • ” Java runtime isn’t stable on Windows,” ?
      What !? care to elaborate ?

      • Back in Windows XP time, having it running in the background was painful. I haven’t touched it for over 4-5 years, so don’t quote me on that.
        And of course, because of that experience, i have never installed Java since Windows 7.

        • So you blame Java for this ? Yea well, I once ran a program that was pretty slow, it was made in C++.
          Because of that, I dont run C++ programs anymore. Got my point ?

          • Yeah? What is? Anything can be made to run perfectly, or buggy , that is the dev choice. But in my experience ,C/C++ has been much easier to deal with , and widely supported by all modern hardware.

            • “in your experience” : ) since it’s your ONLY experience, it can be disregarded easily.

            • Same argument can be applied to yours. Back to square one. I will still call Java sucks if i want to, because it doesn’t work for me, and if it works for you, good for you. And i am not the only one who dislike Java, a lot of people agree with me. Blind Hate you might say, but Java doesn’t suddenly get that kind reputation out of nothing.

              Anyway, this is pointless.

            • I might have respected your opinion if it was based on real experience, arguments, facts etc.. not based on that you 5 years ago ran a slow Java program. As it is you just sound stupid as hell.

            • last time i wrote a code in Java was 3 years ago, i dropped that class. That’s all.

  7. i only feel jave sucks when the old time, the hardware is not that good and this make java run slow.

    and that let me feel bad is java community has made too many wheels which prevent us enter this domain quickly, for eg, ant, maven, xml configuration files, etc

  8. Agree with a lot of what this article says.

    But I think there’s a lot more to love about Java:

    - The JVM is awesome. Absolutely rock-solid as a production platform. There isn’t anything better for general purpose server-side development.
    - The language is Simple. Yes, this means you need more lines of code, but it’s much harder to shoot yourself in the foot. Remember that maintaining code is harder than writing it – anyone who’s ever got into a mess with monkey patching code in a dynamic language will appreciate this.
    - Backwards compatibility is awesome. I can usually run code from 10-15 years ago unchanged. That’s enormously valuable for enterprise customers, and no other actively developed language that I’m aware of comes even close to maintaining this level of backwards compatibility.
    - The library ecosystem is second to none. You have battle-tested, production ready libraries for almost everything.
    - It’s open source, both in terms of the JDK itself (OpenJDK) and most of the library ecosystem
    - It’s highly portable. The same compiled bytecode usually works without issue on both Linux and Windows for example, including complex GUI and networking code. Most other compiled languages can’t achieve this – either they need recompilation from source code, or the libraries themselves are platform-specific to the extent that serious porting work is required.
    - You can easily use the new JVM languages alongside Java (Clojure, Scala, Groovy, JRuby etc.) – getting the benefits of the JVM and all the platform investments while using shiny modern new languages where appropriate.
    - Performance is great. It beats most modern “dynamic” languages by a mile. Yes, you can theoretically match or beat Java with hand-tuned C or C++. But few people have the skills, time or energy to do that – and even if they did they would be giving up a whole host of other advantages (see above)

    Seriously, saying that “Java sucks” is pretty dumb. Anyone doing is probably either seriously uneducated about modern development, or trolling for pageviews.

    • > The JVM is awesome. Absolutely rock-solid as a production platform

      The .Net CLR is also rock solid, and doesn’t force you into a crappy dinosaur language. BTW, I’d love to see how much you can do in java without having to resort to a bunch of “external” libraries made by a bunch of hippies and supported by no one. In .Net, everything you need is built-in. No need for useless external crap.

      >The language is Simple. Yes, this means you need more lines of code,

      > but it’s much harder to shoot yourself in the foot

      Wrong. As I already mentioned, a limited horrible language leads to horrible code and horrible patterns. And no, having a bunch of useless boilerplate (such as java’s “listeners” which are a workaround to compensate the lack of real delegates) does not make the code any easier to maintain.

      >Backwards compatibility is awesome. I can usually run code from

      >10-15 years ago unchanged. That’s enormously valuable for enterprise

      >customers, and no other actively developed language that I’m aware of

      >comes even close to maintaining this level of backwards compatibility.

      Wrong. java’s “backward compatibility” strategy is simply stupid. In .Net, you target a specific version of the Framework AND Language and your code will run FOREVER in a machine that has that Framework version installed, regardless if many other newer versions are installed on the same machine. Different Framework versions coexist peacefully. Now THAT is backwards compatibility, as opposed to being unable to upgrade the language to something decent just because you need to maintain “compatibility” with stuff from 20 years ago.

      > The library ecosystem is second to none. You have battle-tested,

      > production ready libraries for almost everything.

      The same can be said about C# and .Net, with the exception that most .Net libraries are made by or contributed to (and supported) by Microsoft themselves, as opposed to a bunch of unknown hippies.

      > It’s highly portable.

      Write Once. Run Away. Seriously. Attempting to “run everywhere” makes java a citizen from nowhere.

      For example, there’s literally NOTHING in the java world like WPF, no matter how loud you scream about your supposed hippie libraries, NOTHING can match the power and ease of use of WPF and XAML to create Windows Applications. And no, it does not run on Linux, but it’s a FIRST CLASS citizen in Windows. And then you got GTK# if you need Linux stuff, or even Winforms which runs on Mono.

      > Seriously, saying that “Java sucks” is pretty dumb
      java sucks. Even though they’re copying (some) of the features of C#’s LINQ for a (yet unreleased) java 8, it still doesn’t have:
      - Real Generics.
      - Real Properties.
      - Type Inference.
      - Delegates and Events.
      - Extension Methods.
      - Value Types.
      - Async/Await. (language level support for async)
      - Iterator Blocks.
      - A REAL, Reusable, store-agnostic querying mechanism such as LINQ. Even though they’re implementing a crappy version of it… Can you get java’s Streams and convert them to SQL such as in LINQ-To-Entities?
      Not to mention they’re yet to release (in 2014) a poor imitation of a feature that C#/.Net already had by 2007.
      java sucks. Face it.

      • The JVM doesn’t force you into any language. There are dozens if not more compatible languages for the JVM, Scala being my favorite.

        Also, good luck running .NET on any relevant server. It’s absolutely useless as a platform.

        • Except I can run C# code on Linux with Mono. You can keep dismissing it, but the company behind it is making big deals with big companies and that will bring them big money which will be used to create an even more awesome platform =)

          BTW, good luck getting any client to install a java runtime which bundles a lot of crapware together with the installer/update and is horribly full of security holes =)

          Should I say it’s absolutely useless as a client platform?

          • Holy Cow just read some of your other comments ? Why the Java hate ?

          • Aber Kled says:

            Except Microsoft closed the standard when Mono got faster than .Net and now Mono is stuck on an old version of C#!

            And yes, Java is not for clients.

            • HighCore says:

              Sorry. I’m ok if you bring relevant FACTS to the discussion but I will not let LIES unexposed.

              This is from the Mono official website:

              “The Mono C# compiler is considered feature complete for C# 1.0, C# 2.0, C# 3.0 and C# 4.0 (ECMA). A preview of C# 5.0 is distributed with Mono 2.11 or when building Mono from our trunk source code release.”

              They’re currently building the C# 5 compiler, which is the latest available from MS at the moment. Please leave your LIES out of the discussion

            • HighCore says:

              Sorry. It’s ok if you bring relevant FACTS to the discussion but I will not leave LIES unexposed.

              This is from the Mono official website:

              “The Mono C# compiler is considered feature complete for C# 1.0, C# 2.0, C# 3.0 and C# 4.0 (ECMA). A preview of C# 5.0 is distributed with Mono 2.11 or when building Mono from our trunk source code release.”

              And in the same page, some paragraphs later:

              “All C# 5.0 feature are supported including:
              – Asynchronous programming support
              – Caller info attributes”
              They’re working in the C# 5.0 compiler, which is the latest available from Microsoft at the moment.
              Please leave your LIES out of the discussion

  9. Great post!

    All languages have a better use. Python, ruby and JavaScript isn’t a good choice for enterprise development

  10. Gianluca Romanin says:

    I think that a tool should be chosen according to the problem. It is the same for a language.
    About what the author says, I can say that one thing is the metodology and another one is the tool/language.
    All what is said can be done in a high quality product with an interpreted/dynamically typed language as well: just use TDD/BDD, extend your tests and make them pass.

  11. Yes, Java is a powerful language with it’s own merits. That doesn’t change the fact that I hate wading through lengthy functions, anonymous inner classes, tracking bugs backward through design patterns that can quickly turn any easy bug into a rampant search through a haystack of code for a random needle. All because the stacktrace is providing dick in terms of relevant information. Every language has it’s drawbacks, but I will say that out of all the languages I’ve learned Java is the worst. I truly hate it. It’s painful to work with, kind of like explaining multi-variate calculus to a mentally challenged individual. I’m sure there are people who will disagree, but I’ve been working with it since it’s inception. It sucked in the beginning, and now it’s an extremely large base of patches on patches on patches of convoluted shit. If you really want to hate Java, look no further than how much work is required to read a text file and parse it. Java isn’t just verbose, it’s verbose in a retarded way.

  12. setting up web-fad scripting strawmen and knocking em down. guess you gotta do something to assuage your moronic self for using a moronic language.

  13. I agree. Java has one thing missing, functional programming. Working with lists is cumbersome in Java. That will be fixed in Java 8 though.
    A language like Scala beats them all though. You can write in less code than Ruby or Python if you want, and you have all the advantages of the amazing Java ides.

  14. Re: “In Java if another developer checks in a change that breaks types and signatures on what I’m currently working on, I see it immediately and I can fix it now. ”

    What does that have to do with Java? That has to do with the code management tool you are using and not the language.

  15. Re: “But to me, I need a good reason to abandon a JVM that’s faster than a C compiler”

    What you really mean is “faster than a C program” but, to that point: the only place I’ve found the JVM to be faster than a C program is in some optimizable loops and it’s impressive how well the JVM does that, but in day-to-day code, the startup time and JDBC connection time (mysql or postgresql) of a java program are killers.

  16. GEmersonBiggins says:

    I had a boss once that got swept off his feet by Ruby. We worked for some time trying to convert from Java to Ruby, only to revert back to Java when it was determined that Ruby was not adequate. Ruby isn’t really comparable to Java with respect to support, maturity, adoption, capabilities, interoperability, you name it. Java has all this and Ruby has very little. A greenfield web project can use Ruby, sure. An enterprise-level, distributed application is another story. There’s a reason why Amazon, eBay, and the rest use Java.

    Ruby has been around almost as long as Java. There’s no excuse for Ruby to be in the shape it’s in. Ruby has a long way to go before it’s fair to compare it to Java. Java is also a lot more than a “fun” language. I can solve just about any problem with Java.

  17. First, I’ve just stubbled upon this wonderful tome of articles and I am overwhelmed with anticipation and excitement. It was a C++11 article that led me here, but this article is actually the first one that I read.

    I literally shouted; “NEVER”, upon seeing the title nestled on top of the site’s article queue. I’m only partially serious in my belief that… well, all the things you said about Java and it’s devoted dullards. Like all stereotypes, it is impossible to assert the generalization, but when it comes to Java I think there are legitimate seeds of truth in those words. Maybe this will make you feel better; I think that .NET programmers are worse. Maybe will get the chance to discuss why I believe that someday.

    As for your appeal and the evidence you submit in this article, I have to say, I am not moved one bit. I do agree, as you say, “that the it comes down to which trade-offs you like best”. Other than that, everything you said is either dubious or weak. I’ll specify what I mean by that, but first I want to add to the analysis of the problem here.

    The problem is that “problem solver” that religiously and blindly reaches for their “one and only trusty-problem-solving-framework” is inherently limited and subordinate to a host of other solutions. Java might have been the right tool for a certain job, then Python, Ruby, Go, Erlang or even Forth is the right tool for another. RDBs for “this” and then Document-style persistent storage for “that”. To be fair, there are a myriad of everyday tasks where there is not an obvious advantage of one or the other “technology”.

    All too often, though, the factors and attributes that are not strictly in the “technology” category are grossly undervalued during the evaluation of “which way is the best approach”. For example; “getting features x, y, and z into next week’s production release” vs. the happiness of the developer. Okay, that is a bit extreme; but seriously, consider “strongly typed objects” vs. “team culture” or “platform independance” vs. “product philosophy”. Debating which technology should be used to implement a product is moot if the problem being solved or motivation for solving said problem is not compelling.

    When it comes down to it, I am convinced that the technology we use (the programming languages and the miniaturized hardware components) are subordinate to a solution’s philosophy and the protocols that it yields.

    It seems that more often than not, the decision makers have the situation flipped on it’s head. Quite frankly, I think that is how we ended up with things like SOAP APIs, Java running in web browsers by default, and the OLAP/STAR family of “solutions” (I use that term loosely here) to perceived problems.

    I never got to explain what I meant by dubious and weak, referring to your argument that “Java isn’t bad”. I need to wrap this up, so I am not going to go back the aspects you brought forth. I’ll just say that I thought your comparisons of strengths, weaknesses, or fragility not only lacked any real disparity in the technologies being contrasted, but missed the mark of what’s really meaningful when anyone of those technologies is used to implement a solution.

  18. dylan sullivan says:

    No worries, we Java developers simply shake our heads and go back to work cranking out code, while the bystanders and ivory tower dwellers ponder their navels and the perennial question “what language doesn’t suck” and “what framework doesn’t suck” etc. Kind Take facebook for example. Instead of whining about PHP, they build a compiler. Whoa. Not taking a breath, they then build a VM, the JVM, oh, I mean HHVM. Double-whoa. But we are with you, the JVM rocks. Still not satisfied, facebook created their own language – Hack. “Our principal addition is static typing. ” Wilkommen Facebook! We slyly wink, realizing that Java is a platform, not a language. Got to go now and write some Java code :)

  19. java sucks

Speak Your Mind