8 ms·
I know why he gets downvoted: There's a lot of kids on hacker news that only use ruby and/or javascript and they really don't want to hear about them being bad
by factorizer 15y ago
I know why he gets downvoted: There's a lot of kids on hacker news that only use ruby and/or javascript and they really don't want to hear about them being bad at something. hell they wrote a WEB APPLICATION. Now ain't that something.
- eropple 15y agoThat's just foolish. I write Java daily for a very large web company, and I downvoted him. Because his claim is nonsensical. I downvoted you too, because your claim is trollish and wrong. I have been writing Java since I was 13. I am 23 now. I have been paid for code written in C#, Java, JavaScript, PHP, F#, and Python. My personal projects are written in Scala, C#, C++, and JavaScript. I emphatically do not use Ruby for personal or professional projects (unless forced, with regards to the latter). From this reasonably broad body of experience, I am quite certain that I would be vastly more productive if the language wasn't consistently getting in my way. As it is, I have an unhealthy number of vim macros to deal with all the boilerplate that Java foists upon a developer. It is insufficiently expressive without them, and once those macros are applied the resultant boilerplate code (method objects, for example) greatly decrease readability and increase potential failures, due to more difficulty in conceptualizing and reviewing the code. His posts also belie a lack of perspective. He doesn't "write with anyone else," yet I would venture to guess that the primary use case of Java, today, is in environments with more than one developer. He doesn't "use 3rd party libs", which suggests a lack of familiarity with his own ecosystem of tools, let alone those that provide these features that others (including myself) have indicated are part of what makes Java unpleasant to use. (Seriously--if you're not using Apache Commons at the very least, there is a credible argument that you're probably reinventing wheels and Doing It Wrong.) And he has a critical lack of perspective about what are generally considered basic programming constructs: if you think closures and first-class functions exist to "make some developers happy," you are ignorant of why they exist in the first place. Do you think that now-very-standard tools like map, fold, etc. would be generally adopted if the only way to use them was Java-boilerplate code-vomit? . pivo said it nicely upthread: "I'm tired of visually parsing 20 lines of a Java method and filtering out all the boilerplate iteration junk just to find the one or two lines that actually do something. Often this kind of thing can be reduced to a few simple, relevant lines when you have closures, for example." And he is right. Because this is what Java makes you do. In 2011, it has been surpassed in terms of flexibility, expressiveness, and utility by other JVM languages that allow you to pull in Java objects and work with them, but write your code in a way that is much more pleasant. . But no--clearly we're all kids, writing Ruby and JavaScript. Except that this kid almost certainly writes more, better Java than you do, and still finds it a regular source of frustration simply because it isn't good enough. Perhaps you should be less upset when people demonstrate that you are lacking in perspective about your favorite toys.
- felipemnoa 15y agoYou 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).