5 ms·
You are basically saying that people cannot write good code in Java. You are generalizing and that makes you sound like and troll even though I know that is not
by felipemnoa 15y ago
You are basically saying that people cannot write good code in Java. You are generalizing and that makes you sound like and troll even though I know that is not your intention. You can write good or bad code in Java. I personally have never really had an issue with Java so I don't really understand the hate.
Yes, there are sucky frameworks out there but you do know that you don't have to use them? Either I'm writing really simple code that Java never gets in the way, Java is not really a problem, or I'm a super programmer. I don't think I writing simple code, I don't think I'm a super programming, so it has to be that Java is not really a problem for me. And I write similar code in Objective-C, C++/C, JavaScript and even had to write a lot of code in VBA. Had even to write code in PL-SQL several years ago.
Every language has its own nuances, you just find the best way to work with them, ignore the junk, and adapt. Which is why I really don't get where all this hate is coming from. You never hear this for C++ and it can also be a pain in the ass but you do hear it for Java.
Is almost like it is cool to hate on Java.
- beagle3 15y agoYou know, I was thinking the same about Java. That's when I posted this question. http://news.ycombinator.com/item?id=2094274 http://news.ycombinator.com/item?id=2094274 ; It got front page, and one (that's 1) pointer to good Java code. For whatever reason, whether it is merit or culture, Java programmers tend to write horrible code. I'm sure there's some nice Java code out there, that is not 20 times longer than it should be. But I have not yet seen evidence, even though I've been searching for it for a while.
- dm3 15y agoFYI - several more examples of good Java code (concurrency): http://code.google.com/p/disruptor/ http://code.google.com/p/disruptor/ http://code.google.com/p/jetlang/ http://code.google.com/p/jetlang/ http://code.google.com/p/actorom/ http://code.google.com/p/actorom/
- eropple 15y agoYou can certainly write good code in Java. Totally doable, never said it wasn't. But I'd agree with you that Java programmers tend to write horrible code. I linked the essay by pg (which I'm sure our upset friends did not read) that suggests a decent reason why: I tend to find that in the Java world there's a lack of awareness of the proper (and I do mean proper) way of writing a lot of more advanced, more indirected code. (This is the "thinking in Blub" you see from pg or Joel Spolsky.) I have a hunch that this lack of higher-level awareness results in weird kluges and hacks that don't even really match the "canonical" design patterns and idioms of what you or I might call "good" Java. I feel pretty confident in saying that people who are fully comfortable with a more expressive tool (C#, Scala, even dynamic languages like Python or JavaScript) will write better Java than someone who is inculcated into Java first and Java only. It's easy, if unpleasant, to move "down" the continuum that pg references--it's not so easy to move "up", especially when you don't see a reason to (as these posters clearly demonstrate that they do not).
- eropple 15y ago>> You are basically saying that people cannot write good code in Java. Wrong. I would not say that, because I do it. I am saying that it is vastly more difficult than it needs to be to write good code in Java because it is insufficiently expressive. I will say that I am suspicious of the ability to write good code of people to whom Java is not a poor development choice, because I suspect brain damage, but a decent programmer can write fine Java. It just sucks to do it. . >> You are generalizing and that makes you sound like and troll even though I know that is not your intention. I am doing no such thing. You are misunderstanding me, but it's pretty clear from the upvotes that you're the only one. . >> I personally have never really had an issue with Java so I don't really understand the hate. It is likely because you think in Blub. Read pg's article regarding Blub, Beating the Averages: http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html He makes the contention that Lisp is at the apex of the pyramid of software development tools. I disagree, for a number of reasons, but the contention of the article is correct at its core: once you have the perspective of a decent set of other tools, you realize that regardless of your tools of choice, Blub languages rank very low on the scale of expressivity--and thus, in power and ease-of-use. (And everyone should learn Lisp, anyway. Even if they don't write code in it. I think in Lisp when writing Java, and aside from Java's miserable boilerplate, my Lisp-in-Java is better than your average Java programmer's Java-in-Java.) And I would submit that Java is one of the most Blub languages in common use. You have no basis for understanding why others would have an issue, because you are looking up the continuum without insight into what is above. . >> Yes, there are sucky frameworks out there but you do know that you don't have to use them? Meaningless statement. At my current employer, we are forced to use a legacy servlet infrastructure, but my own Java (and Scala) code uses Play! and other frameworks and libraries that at least attempt, if not always successfully, to drag Java reluctantly into some semblance of modernity. Writing Java still sucks. . >> Either I'm writing really simple code that Java never gets in the way, Java is not really a problem, or I'm a super programmer. Or you are insufficiently experienced with better tools to be able to reliably determine whether it is done better elsewhere. One who does not know any better may be happy with Blub, but one who has used better is not. This seems eminently straightforward. . >> And I write similar code in Objective-C, C++/C, JavaScript and even had to write a lot of code in VBA. I'm beginning to see your problem. With the exception of JavaScript, you do work in Blub. And I'd bet that you write Blub in JavaScript, too, instead of JavaScript in JavaScript. . >> Every language has its own nuances, you just find the best way to work with them, ignore the junk, and adapt. Which is why I really don't get where all this hate is coming from. Nonsense and worse words. The best way to "adapt to Java" is to download a Scala compiler. Spend a few weeks using the JVM with something modern like Scala or Clojure and you will get where the antipathy towards Java comes from. Java commits the ultimate sin a programming language can commit: it wastes my time. It is a language designed by committee that does nothing excellently. Its successors on its own platform do not commit the same sin and I am more productive for it--they are better for it. . >> You never hear this for C++ and it can also be a pain in the ass This is blatantly untrue, in my own experience. I can rant on about C++ quite successfully and at great length, because C++ has its own share of problems. Where it differs is in much, much greater expressivity--that C++ is capable of supporting Boost is a perfect example of this expressivity. It is by no means perfect, but it is certainly a smaller problem than Java. And unlike Java 7, C++0x actually fixes (most of--templated lambdas are unavailable for what I consider fairly stupid reasons) the problems that. Oracle decided to push anything useful out until Java 8, and I'm skeptical it'll actually keep the promise of "next year." . >> Is almost like it is cool to hate on Java. You lack the breadth of experience to make this claim.