11 ms·
Stop hating Java
- chrisledet 15y agoI don't hate Java. I just prefer to write code in Ruby.
- sambeau 15y ago"Refactoring came to us from Java" Maybe the word came from the Java community but people have been carefully restructuring code since code was invented.
- mullr 15y agoIt didn't. The wiki tells us that it was first used in 1990, somewhat before Java was on the scene. http://en.wikipedia.org/wiki/Code_refactoring#History http://en.wikipedia.org/wiki/Code_refactoring#History
- sigzero 15y agoSmalltalk was famous for it.
- sambeau 15y agoMakes sense, I guess: Java was based on Objective C which was based on Smalltalk (and C).
- bromagosa 15y agoRight, http://books.google.com/books?id=1MsETFPD3I0C&lpg=PP1&hl=ca&pg=PA71#v=onepage&q&f=false http://books.google.com/books?id=1MsETFPD3I0C&lpg=PP1... It actually came from Smalltalk, just for a change.
- DanielRibeiro 15y agoWell, Unit Tests also came from it (SUnit was the first Unit Test framework). Which is unsurprising, as refactoring without unit tests is quite daunting. But JUnit did make them mainstream, and so did Eclipse' refactorings.
- eru 15y agoInterestingly, refactoring usually works quite well for functional Haskell code without tests just relying on the types. (Of course the types won't help you in more imperative sections of your code, i.e. it's hard to guarantee a specific order of actions in the IO Monad with types only.)
- silentbicycle 15y agoActually, the Smalltalk community got it from Forth, where it was called "factoring" (no "re-"). See e.g. Leo Brodie's _Thinking Forth_ (http://thinking-forth.sourceforge.net/ http://thinking-forth.sourceforge.net/).
- masklinn 15y ago> Maybe the word came from the Java community Nothing of refactoring came from Java or its community. The formalization of its concepts largely came from the Smalltalk community (Opdyke, Johnson '90; Opdyke '92; Johnson, Opdyke '93; Opdyke, Johnson '93), using unit tests to ensure refactorings don't change behavior came from the Smalltalk community and automated refactoring tools came from the Smalltalk community (Roberts, Brant, Johnson '97; Refactoring Browser http://st-www.cs.illinois.edu/users/brant/Refactory/ http://st-www.cs.illinois.edu/users/brant/Refactory/) In fact, as you may note both the concept and the name are older than Java itself. The only claim to fame Java has in relation to refactoring is Smalltalk refugees reimplementing IDEs and refactoring browsers for it.
- jinushaun 15y agoC# is a better Java anyway.
- chrisledet 15y agoAs far as the language goes, I agree with this but I'd take JVM over CLR anytime.
- Maro 15y ago"but I'd take JVM over CLR anytime" Because of cross-platformity, or is there more?
- chrisledet 15y agoBecause it's cross platform, yes. Huge advantage.
- lucian1900 15y agoAlso, performance. Both the .NET and Mono JITs are still significantly behind HotSpot.
- deleted 15y ago[deleted]
- mhd 15y agoModula-3 was a better Java way before somebody thought of naming a programming language after an Indonesian island… [considering that there are 17000 Indonesian islands, this statement might not be factual]
- jjm 15y agoI believe there is hate because a lot of 'over engineering' was done in most projects. This then necessitated the need for more complicated (and `sometimes` useless) new Java techniques. This most likely comes from seeing Java (or x,y,z) as thee only tool one would possibly need. Unfortunately, Java much like every other lang should be seen as a tool with pros and cons, in a chest of other tools. Also, it's bad measure to only consider deployment size regarding any platform effectiveness. " Let's learn more from Java". I'd rather learn more from "Computer Science" and apply those techniques to Java. Not the other way around.
- diolpah 15y agoOver the course of the past few years, a lot of the overengineering mindset has been leaving the Java community. Bruce Tate and others have had a significant impact on this shift. More dynamic languages becoming available for the jvm has also helped, as well as lightweight frameworks like guice and picocontainer that permit some degree of complex configuration injection without the overhead of past solutions. Java's ecosystem is changing, albeit slowly.
- calpaterson 15y ago> I believe there is hate because a lot of 'over engineering' was done in most projects. Just reading this and thinking: "oh man, if ONLY that was my problem".
- benihana 15y agoWhat I don't understand is, why does this guy care if other people don't like the language he likes? It doesn't change the number of Java jobs or the kind of things you can do with the JVM, so why does he care if a bunch of Rubyists hate Java? Also if he doesn't want people to hate his language, maybe he should use something other than Java.
- chrisledet 15y agoOn the sidebar of the article "Available for Rails contracts/consulting"
- smackfu 15y agoYou might a well ask, why fight against ignorance?
- mgkimsal 15y agoIt does change the number of Java jobs. The more advocacy happens for a technology - often - the more adoption it gets. While not entirely a zero-sum game, a tech choice for a company generally precludes them from seriously using alternatives. If a company switches from Java to Ruby, for example, that's fewer Java jobs, and more Ruby jobs. I'm working with an org doing this right now, and they will then be looking for Ruby devs instead of Java devs. Seems pretty straightforward to me. Why would the OP using languages other than Java stop people hating Java?
- yock 15y agoAll you need to do to experience this first hand is go to one Ruby meetup. The roundtable introductions at my local Ruby brigade are often seasoned with AA-like declarations of soberness such as "Hi, I'm So-and-so and I've been Java-free since 2006." As a Java pro (and someone who really does like Java) it's a little disheartening. On one hand I know they don't really mean to belittle the technology that pays my bills and feeds my family, but there's a definite mindset of superiority among some professional Ruby-ist communities.
- mattgreenrocks 15y agoJava, by design, imposes an upper-bound on cleverness/productivity that can be feel stifling to some. Thus, it becomes a badge of honor to graduate to sharper tools, such as Ruby. Whether they're cutting themselves (and others around them) with them is another story, of course. We need more devs who are not so emotionally invested in their tools. Not that they shouldn't care about them, but the loud-mouthed, posturing alpha dev stereotype gets too much airtime on the Internet because they instigate drama and drive hits by playing on the audience. It is little more than bikeshedding, ultimately.
- nirvdrum 15y agoI'm totally fine with different strokes for different folks. But I don't buy the productivity argument. For any reasonably sized project, productivity tends to level out regardless of language or platform.
- andrewvc 15y agoOh really..... try building a large scale web app in Forth then. Tools matter, at every scale.
- nirvdrum 15y agoSo your counter example is a relatively obscure language? I don't know Forth, but I'd imagine someone well-versed in it could handle the task. In any event I didn't say it was categorically the case. I said tends to be the case. We could go case / counter-case all day. I can bootstrap a project in Ruby or Python considerably faster than I can in Java. But when it comes time to scale, Java usually -- not always, but most of the time -- wins out. They all can do it. None is really more expressive than any other. It's just the level of effort involved. And the pros and cons of each usually start to even out as a project grows.
- strmpnk 15y agoThis hardly starts to address the things people dislike about Java. Sure, it's a capable language - the JVM even more so. The thing is, it hasn't kept up with the pace of everything else. The JCP is clearly broken. The best thing for people would be to move on, not in anger but to explore as many languages as possible. Java could very well be the best thing for some BUT you can't really say until you go out and look. From where I'm standing (subjective since I left Java ages ago) most people that go out to explore new things rarely go back.
- PaulHoule 15y agoThat's an important point. When Java came out it was a big step forward for a lot of people. Most of the scripting languages with OO features (Ruby, Python, PHP) have a lot of Java influence. I see the problem is that Java stopped evolving a decade ago. C# shows the kind of path that a Java-like language can follow to get better, and Java just hasn't been moving.
- Jach 15y agoScratch Ruby and Python from your list and I'll agree with you on the OO influence! Not to mention Python is older than Java. I think most of the 'scripting languages' with OO have decidedly not gone the Java/C++ way. Other than that I'm pretty much in agreement. Even not so long ago as 2002 people would say "Let's use Java" when they really were saying "Let's NOT use C++." C# is a great language, though MS didn't put their heart into really killing Java. I think Microsoft could have dominated with C# outside of Windows World (lots of enterprises still rely on Linux, and Java's not a bad choice for an enterprise app on a Linux server, then there's Android..) if they put more backing behind Mono or just open sourced everything to begin with.
- 16s 15y agoIt's been my experience that most people who put down Java or C++ or [your language here] have never seriously used the language and are insecure about learning a new language so they make fun of other languages to hide their insecurity. Edit: I'll also add that this is not limited to the Ruby community. One last edit: General Patton once said, "Find what a man is cynical about, and you will know his weaknesses." or something like that. I think that quote applies here.
- mattgreenrocks 15y agoI think developers like to think of themselves as above dogma, but threads like this show they are just as prone to fashion-oriented thinking as any other group of people. Intellectual honesty is always in short supply on the Internet, it'd seem.
- colin_jack 15y ago> General Patton once said, "Find what a man is cynical about, and you'll know his weaknesses" or something like that Abraham Lincoln once said "If you are going to quote a man on the Internet make it accurate", or words to that effect. Only messing, googled and it seems to be "Watch what people are cynical about, and one can often discover what they lack."
- 16s 15y agoSorry, I was paraphrasing and tried to make that clear. I think I captured the spirit of the quote.
- colin_jack 15y agoDefinitely, I was only joking.
- bo1024 15y agoJava and C++ were the first languages I learned, and I used them exclusively for about 5 years (mainly C++). I simply don't like either language. I think they have both have a lot of problems and downsides. I'm not guaranteeing that this is true in an objective sense, but then again I can't guarantee that anything is true in an objective sense (I'm no philosopher). However, take a lot of people with a similar opinion and the voices tend to add up.
- perlgeek 15y agoI don't hate Java, I just don't want to use it. I find it ridiculously verbose, and the lack of closures (or even passing around code references) leads to the perceived overengineering mentioned in the post (I'm not sure it's really overengineering all the time - it's just that a rather rigid language forces you to write huge amounts of code to make your library flexible). That said I have no problem with using programs written in Java - in that case somebody else has already dealt with the things I don't like about Java.
- TeMPOraL 15y agoIt's not overengineering, it's greenspuning[1] around the expressiveness limitations of the langage to make the code flexible. [1] - http://en.wikipedia.org/wiki/Greenspuns_Tenth_Rule http://en.wikipedia.org/wiki/Greenspuns_Tenth_Rule
- yesimahuman 15y agoJava is awesome purely because of the large corpus of useful libraries. Apache, stanford NLP, etc. Universities and open source groups contribute a large amount of Java code and it really pushes the boundaries of the types of applications you can create that are mature and perform well. Other than that I develop much faster in Python or Javascript. I've come to love treating functions as first class objects, and I just don't love static typing that much anymore. Getting my projects done more quickly has become more important than anything else. It just so happens that other languages than Java are better for that.
- Hisoka 15y agoI agree. I just want to get things done. It just so happens, fun languages like Python, and Ruby are better for that. I don't treat programming languages like religion, or sports teams. I treat them as tools to help me do what I need.
- eru 15y agoI felt the same about static typing when I first learned Python and Scheme. But I encourage you to give non-crappy static typing, like in, say, Haskell, a try just to broaden your horizon.
- snorkel 15y agoTwo other reasons I avoid Java the dependencies ecosystem for a typical Java app is bloated and always changing, and it didn't really live up to the promise of write-once-run-anywhere. And by the way, the over-abstraction habit is really annoying when you're trying to write a simple util app and you can't just say foo = new Foo() instead you have to extra nonsense such as factory = new FooParamsFactory() then fooparams = factory.getFooParams() then then foo = new Foo(fooparams) ... it's nice to get away from that nonsense. I just find Java to the playpen of architecture astronauts who would rather design APIs than write apps.
- St-Clock 15y ago"it didn't really live up to the promise of write-once-run-anywhere" Care to explain this one? All the code I have written for the past 10 years do not need to be recompiled and can run on Windows/Linux/Mac/*BSD 32 bit/64 bit. And I used IO, NIO, sockets, threads, files (not necessarily high-level stuff).
- mechanical_fish 15y agoIt turns out that there is a level of abstraction where every desktop OS is just like every other. And Java evolved to exploit this common ground. But the ultimate lesson was that the intersection of all operating systems is an awful place to live. Because Java's not-exactly-native widgets often have the wrong look, it feels generic. Because they often have subtly different semantics, it feels slightly alien. Because platform-specific behaviors like drag and drop generally don't work right, it feels like an outsider, even though it's running on your machine. And because the app requires a giant brick of a runtime that generally hasn't been preloaded by anything else, it starts so slowly that you can practically hear the gnomes turning the rusty crank on the starter motor. And it's not as if these are fatal objections. Clearly, based on the success of the web, they are not. But the lesson has been: If you're going to run an idiosyncratically-designed slow-loading quirky app that's imprisoned in it's own window why not just run a web app. And that's what people do.
- mnutt 15y agoFor non-gui work it mostly lives up to that promise, but if you're building a consumer app you end up having to do a lot of tweaking per-platform.
- swah 15y agoThe part that I don't like is when I can't write a webapp in Java because I don't know about Hibernate and JBoss and Maven and servlets and JDBC and more. I'd love to try a strict language, having used only Clojure and Python lately. Playframework might be an alternative.
- zeemonkee 15y agoI think a lot of the Java hate is because of the architecture astronauts who hijacked the language in the last decade - J2EE/EJB, the GoF, FactoryFactoryFactory shit and so on. I remember seeing the earlier versions of the servlet API and it was very elegant and well designed; unfortunately once the astronauts were through with it writing Java web apps became such a form of mental torture (Struts, anyone?) that even PHP was a welcome relief, let alone Rails. My hate for it came from having to use some shitty app server like WebSphere because the coding-averse CTO considered it a "standard". Looking at more recent work such as the lovely Play framework and the influence of new JVM languages such as Clojure and Scala, it looks like things are improving in Java-land. It's still a bit dated and clunky compared to Ruby and Python (let alone Clojure/Scala or even Groovy) but it's not as bad as people make out.
- mironathetin 15y ago... architecture astronauts who hijacked the language in the last decade - J2EE/EJB, the GoF ... Thank you for writing this. When I first read the GoF Design Pattern Book I thought "this is the reason, why the code in my project is bloated, unmaintainable and shitty".
- ominous_prime 15y agoI do think GoF has it's place, and every serious programmer should be familiar with it; if only to know what to avoid. [edit] I didn't mean to sound so negative about GoF. Know the patterns so you know when to use them, and when to avoid them. You can't debate these decisions when you're ignorant of design principals and history.
- St-Clock 15y agoYou are right. The GoF only promoted bloated code. Who in their right mind would use patterns like the Observer, the Adapter, or the Visitor?</sarcasm> Not sure if you know the history, but the authors of the book really only collected the patterns that they had seen around them in Smalltalk and C++ code. They wrote a catalog so we could all refer to the same name instead of using different names for the same concept. They identified the common problems that these patterns tried to solve and they also identified the trade-offs. Oh yes, they identified trade-offs! Unfortunately, many developers thought that they had to put as many patterns as possible in their code, which was not the intent of the GoF. Ralph Johnson said that they received emails like "I have now used 15 patterns in my project, do you think we should use more?" Andrzej mentions in his blog post that Java (and C++) lacks dynamic capabilities so this is why sometimes, you need these design patterns to make your code more easily extendable. Other patterns are good even with dynamic languages (observers...).
- juliano_q 15y agoJava had many problems with absurd over-engineering (aka EJB2) in the past. Even today, a LOT of legacy code is over-engineered and a pain to mantain. That said, it is possible to write thin apps with Java today, much by the innovations brought by SpringSource. Roo is a rails-like framework to Java that works really well, and the Spring container took out the word EJB from almost every new project. If I have to choose a language to start a new project today I will probably go with other language, but I have no problems working with Java at all.
- equalarrow 15y agoI have to profess I haven't coded in Java for about 5 years. But when I did, Spring and Hibernate are what drove the final nail in the coffin for me. I'm sure it's changed but after that experience, I never felt the need to revisit. Kinda like that one girlfriend that messed you up so bad that once you got over everything and realized life was ok, you never felt like rolling by her house ever again. :)
- programminggeek 15y agoJava as a language is decent. It's boring. It is stagnant. I expect very little of it. Java EE is an atrocity and it is just an over-enginnered pile of garbage. Try play framework. I just finished a webapp in play and the whole experience has been awesome. IntelliJ + Play + MongoDB is AWESOME. I haven't messed with the Scala version, but I can imagine that Scala + Play is even more interesting. Either way, Java EE/EJB/XMLHell is probably my most people hate Java. Also, Swing was garbage too, but who builds desktop apps in Java anymore anyway?
- eropple 15y agoPlay! Scala is really, really, really cool. The major downside--drink if you're expecting this one, folks--is the recompile time. Building an app is just so bleeping slow. But writing it? Very nice, aside from the somewhat iffy SQL layer. (I'm not a huge ORM fan, and the process of actually writing SQL through Anorm can be problematic.)
- programminggeek 15y agoFor our app, we went straight up MongoDB driver. We didn't mess with an ORM at all. We still have our objects that end up mapping to Mongo, just not using a 3rd party lib. It's actually a really clean and enjoyable experience.
- eropple 15y agoHuh, didn't think of that. I'll have to try it. Thanks a lot.
- simpsond 15y agoHave you tried jrebel to cut your compile time? It might ease some of that pain.
- eropple 15y agoJRebel isn't applicable to Play - Play (both when running Java and Scala) hosts its own compiler. In dev mode, when you change a .java or .scala file, it recompiles it and reloads it on the fly. Which is why Play is freaking awesome--well, one of the reasons.
- mattmcknight 15y agoI've done a ton of Java work, server side and desktop apps. What really amuses me about Java advocates is how they don't realize that the XML is not there for "configuration", it's there to form a dynamic (non-statically typed) appendage to the language. The trick of Spring and similar tools is that under the covers they use the reflection API. It's sort of a joke to claim that you are using static typing, when the config files are more or less a contained bit of dynamic typing.
- flocial 15y agoLong live the JVM and here we go again comparing Java to Rails the framework. I've seen the pros and cons of both Java and Ruby. From an organizational standpoint it's hard to beat Java. The performance is there and in a team setting statically typed languages really shine. You can argue about the quality of programmers that flock to Java quoting pg ad nauseaum but we don't live in a lisp world. Elegant code is written by good programmers not the language. Ruby is fun and really nice for exploring ideas though. It doesn't marry you to an IDE and you can go from idea to reality quite fast with a text editor and a command line. Unfortunately, Rails is a lot of meta-programming magic and syntactic sugar that can really obscure the language for newbies. It's changed the landscape for web frameworks and I would even say mobile as well. RoR didn't invent MVC but it certainly refined our thinking of frameworks in general.
- beaumartinez 15y ago> Elegant code is written by good programmers—not the language. But some languages make writing elegant code easier than others (compare C to Python, for example).
- firemanx 15y agoFor some task-specific definition of elegance. For me, elegance is not just about how terse the syntax is, but how well it solves the problem at hand and responds to changes around it. For me, some problems require a performant solution as well, and the elegant option is the one that does this without requiring a bunch of rewriting or adding hard to discover dependencies. I can write some terse AND elegant list comprehension code in Python that takes lines and lines of crappy looping in Java, but I can also write some seriously terse code to centralize business logic via a web service with automatic transaction and security management and have it perform an order of magnitude faster than a similar implementation in Ruby or Python (JEE 6). To me, that is elegant. Likewise, I can do some elegantly maintainable things with .NET generics that I can't do with Java's lame erasure based implementation. Of course, you could always just takes Einstein's opinion :) "If you are out to describe the truth, leave elegance to the tailor."
- funkah 15y ago> "I always disliked the XML impact on the Java frameworks. It didn’t come from nowhere, though, let’s be fair. Java as a languages is not as readable as Ruby, so it wasn’t perfect for configuration. Yaml wasn’t popular and JSON was still not really mature back in 2000. Something had to be chosen and that was XML. What would you do better back then?" This piece seems to be mistaking criticism of technology with criticism of people, which is what happens when nerds get too personally attached to languages, frameworks, OSs, etc. I don't think Java folks are stupid for using XML, or anything of the sort. The above succinctly lays out the reasons why that choice made sense at the time, but times change, and that is not a reflection on the judgment of those who made this decision.
- a5seo 15y agoAnother reason to stop hating on Java is that in a lot of cities, it would be a fool's errand to assemble another kind of dev team. Like Ruby? Great. Good luck building a team in Omaha. Skills go where the jobs are: http://www.indeed.com/jobs?q=ruby&l=Omaha%2C+NE http://www.indeed.com/jobs?q=ruby&l=Omaha%2C+NE = 11 jobs http://www.indeed.com/jobs?q=j2ee&l=Omaha%2C+NE http://www.indeed.com/jobs?q=j2ee&l=Omaha%2C+NE = 101 jobs Bottom line: if you expect to hire developers, in most places, you'll want a language with the deepest bench of talent. The trick is to resist the Java framework nazi's and keep it simple.
- onemoreact 15y agoUnless you have horrable retention issues highering someone who does not know the language your using is not that big of an issue. Taking a C# ASP.NET developer > Ruby on rails is faster than bringing a Java developer who knows nothing about the web into a large Spring/Struts project.
- a5seo 15y agoThat might be true for a basic/early Rails app where it's ok to have script kiddie relationship with Ruby, but if you have a more complex app, I don't think the learning curve is quite as easy as you're making it sound. My own experience with Rail is that I quickly wanted to see inside and control all of the implicit stuff that was going on, and I needed to invest a lot more time to learn Ruby to have the knowledge that would give the amount of control I wanted.
- run4yourlives 15y agoHiring any programmer that can't adapt to an unfamiliar new language is a bad idea (TM). I'm far from a guru, but I've been able to pick up quite a few different languages, frameworks and structures over my tenure. It's the ones that limit themselves to a single language (be it Java or not) for long periods of time that you need to worry about. These are the programmers that will build a square wheel because that's what the spec told them to build. Employ them at your peril.
- 15y ago
- 23r90q3aefij 15y agodammit its a tool, whats the big fuss about. People can act so juvenile some times.
- felipemnoa 15y agoI'm with you. We all have our preferences. Use whatever tools makes you feel more productive. Ideally all of your code should be language agnostic. An algorithm is an algorithm in any language. While developing programs I've found that coding itself takes the least amount of time, is figuring out the algorithms, overall architecture, and debugging that takes most of the time. The coding part is the easy part. I do agree that Java has some junk in it, but you don't have to use it. I'm sure I could say the same thing about any language though. I still prefer Java though.
- teyc 15y agoIt is not easy to avoid the nasty pieces of "factory factory" patterns if the people who you have to work with think it is a great idea. The problem is not peculiar to Java. I spend most of my C# time stepping through OPF (other people's factories) before hitting the code that actually performs some work.
- Troll_Whisperer 15y agoI may be the target of this article. I like Ruby quite a bit and I don't like Java at all. The word "hate" isn't quite appropriate, but here's my problem with Java: I hate how much work Java makes me do to get things done. It doesn't matter if you're writing "hello world", an English to pig-latin converter, a web server or a lisp interpreter. In every case, it's a lot less code and a lot less work to do in Ruby than it is in Java. Java is just too low-level of a language for anything I'm working on, and in those cases where I do need to get closer to the metal, it's easy enough just to use C.
- dpark 15y agoWe seem to have a rather short institutional memory. It wasn't that long ago (Java's only as old as Ruby) that Java was new and hailed as a savior from C++ and C. Java was widely seen as a great language, or at least a language that presented a great improvement over the existing mainstream languages. It gave GC to the masses for the first time. It delivered standard-sized primitives, an (almost) everything's-an-object design, a cross-platform runtime, JIT compilation, and a host of other improvements to mainstream programmers for the first time. Java has a lot of issues, but in the grand scheme of things, it's a pretty good language. Stroustrup was dead on: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." The more popular a language is, the more people will complain about it. (And the more people will build crappy software around it.)
- masklinn 15y ago> Java has a lot of issues, but in the grand scheme of things, it's a pretty good language. Definitely not. Especially not in this day and age. Java has a pretty good language, java has a good ecosystem, java has a passable standard library, but in 2011 java is a crummy language.
- dpark 15y agoDepends on what you want to do. Want to hack together a low-traffic website quickly? Java's a pretty poor choice. Want to build large-scale systems that are reliable and fast? Java might fit the bill pretty well. It's no coincidence that Google builds much of their infrastructure on Java. It's no coincidence that Hadoop is written in Java. And it's no coincidence that Twitter is rewriting much of their infrastructure in Java. Java is a good language for building Big Stuff.
- masklinn 15y agodammit fingers. Java has a pretty good runtime.
- mechanical_fish 15y agoFirst, let me point out that once again we are comparing Java - a runtime, a language platform and an entire ecosystem comprising many frameworks - with Rails, a specific web framework designed with a specific philosophy (opinionated defaults that work in 90% of cases, YAGNI, etc.) for a specific range of uses ("rapidly prototyping a small-to-moderately sized web site"). So just because Rails developers hate something doesn't mean it's generally evil. It might just be wrong for Rails. Many things are; otherwise Rails would have no texture. Saying no to things is what design is about. Now let's talk about hate. Everyone hates something. There is nothing wrong with hating things. Hate is just personal taste turned up to eleven. You should strive to hate politely and with grace, to realize that other people love the things you hate and are nonetheless human, and probably even smart. And you should strive to remember that there's an important difference between the things you hate and things that objectively suck. Java, for example, does not suck. Not always. Lots of work has gone into it. Lots of Java-based tools are essential. There are big classes of problem for which Java is currently the best solution. Nonetheless, I hate Java. It is a handy mental shortcut, one that has yet to lead me astray. My belief is that the problems for which Java-the-language is the solution are problems I don't want to work on, and that I don't have enough time in my life to address the problems I do want to work on, so I should simply develop a Java allergy that kicks in whenever I see the generics syntax and that causes my eyes to water until I flee towards fresh air. It works well. (What's sad is when you find yourself hating something that is smack-dab in the middle of a set of problems that you want to work on. Hello, PHP! This requires a much richer set of coping techniques than simple allergic avoidance.) (And, of course, Java is not just a language, and JRuby appears, from the outside, to be awesome, and my curiosity about Clojure is rising, so I may soon temper my simple hatred of Java into a rich melange of love and hate. The stuff of which novels are born, really.)
- zmoazeni 15y agoI agree with the you. While it's mean, I dislike the current state of the Java community for the reasons zeemonkee stated in http://news.ycombinator.com/item?id=2793472 http://news.ycombinator.com/item?id=2793472 The tough part about languages like Scala and Clojure is that the existing Java ecosystem bleeds through heavily. For instance, while Scala boils away a lot of repetitious code, it's still there under the hood. It feels like an architectural band-aid. That may change as the ecosystem around each language evolves and writes frameworks and libraries in Scala/Clojure rather than reusing them from Java. However in Scala's case it's as if the language is being marketed as the next evolution of Java-as-a-language with a heavy emphasis on reusing existing Java frameworks and libraries, so I expect the people writing code in the existing Java community to migrate to Scala. Elitest? Maybe. But I think it's a realistic view. The newer JVM languages are great if you already have an existing Java codebase, however I'm struggling to find sound reasons to use Scala on a geen field project.
- beermann 15y agoWhat's the general consensus in the HN community regarding GWT? We're pretty happy with it and I think it has a lot of advantages over other frameworks.
- benmccann 15y agoI can't speak for others, but I hated it. The people I know who liked it were the ones who were scared of JS because they didn't know it very well. The problem with GWT is that if you want to do anything semi-complicated you end up needing to write native JS anyway. So you end up with an ugly cludge of an app written in two different languages and cobbled together with a JNI-like mechanism. I also had a ton of trouble getting their funky debugger to work correctly. Writing in Closure is soooo much nicer. The Closure compiler can give you type safety, which seems to be about the only benefit of GWT.
- beermann 15y agoRegarding the debugging features, I think things have gotten a lot better. Debugging is done in Eclipse and you're debugging java, not javascript (if that wasn't clear to some). It honestly works really well. I think there are also quite a few benefits other than type-safety. Easy implementation of asynchronous calls that serialize Java objects is one example. GWT does have its drawbacks, but we do a lot of complex work in it with very minimal native javascript and support a site with hundreds of thousands of active users.
- uriel 15y agoI still can't believe GWT is not an April Fools joke, and I'm stunned that anyone ever took it seriously.
- beermann 15y agoPlease elaborate. So many people on HN love their newest language of choice and overlook frameworks like this because it isn't as sexy. As I mentioned in my previous comment, we have a pretty large site by most standards and are happy with GWT.
- its2010already 15y agoI have a question... The article states: ... Whenever you needed a pluggable system in your code you had to abstract away some concepts in order to make it work. Ruby lets us do it much easier and that’s cool. ... Can someone give a concrete example of this?
- jbooth 15y ago“If you drop static methods, then welcome to Java and its billions of useless factories.” And if you use them everywhere, then welcome to Rails, where to service more than 1 request at a time you actually have to run multiple instances of the whole app behind a balancer.
- Fid 15y agoJob search in New York City on Dice.com: Java - 2698 Ruby - 204 Even within the Ruby jobs, the majority have a Java requirement within them as well. Been hearing Ruby aficionados for like a decade, but sorry, it just hasn't penetrated.
- bromagosa 15y agoI think this metric is invalid, the market rarely takes what's best, but rather what's trendy. Before you begin to troll me, what I'm saying is that >>the metric is not valid<<, not that one language is better than the other.
- Fid 15y agoWhile being strong in the market doesn't necessarily quantify better/worse or more/less elegant. But it does mean the tires have been kicked a lot more.
- a5seo 15y agoOne thing I've learned is that your language/framework is an HR decision. The jobs metric tells me that if you hope to hire >>experienced<< Ruby programmers, you can probably expect to have fewer to choose from, possibly wait longer, fight harder, and pay more to get them. I'm not saying you can't hire good programmers and give them a few months to transition, but that wouldn't work for my bootstrapped startup that's planning to ship product in 90 days. You might say, yeah, but with 2k Java jobs, you have to compete against a lot of employers. Personally, I'd rather take my chances with a deeper pool of Java talent that I can out recruit the competition.
- podperson 15y agoNo. I prefer to continue hating Java. Having recently decided to abandon my anti-Java prejudice from way back I've discovered that everything I hated about Java back in the 90s is still there, only worse. COBOL at least had the excuse that it was first.
- kungfooguru 15y agoDidn't all those "good" things he mentions that come from Java actually come from other languages (Smalltalk, Haskell, Lisp, ...)?
- fleitz 15y agoRuby and Java serve different developer segments, it's much more fun to compare Java and C#. Java and C# are languages that are pretty much the same, serve similar markets but one of which I vastly prefer to program in because of the little niceties: no checked exceptions, first class functions, closures, properties, etc. Comparing Java to Ruby is a philosophical matter, comparing Java to C# illustrates numerous ways in which the language and runtime (real support for generics) could improve while staying true to its market. The article honestly looks like a comparison between rails and java rather than ruby and java.
- deleted 15y ago[deleted]
- dillon 15y agoI believe the fact that Oracle owns Java is almost reason enough to hate the language.
- ArtemZ 15y agoI love Java.
- deleted 15y ago[deleted]
- mark_l_watson 15y agoI am not in the mood to defend Java, but I would like to give a tip to people who keep mentioning J2EE: J2EE is from a bygone era; learn to say Java EE 6, which is better (although JPA 2 is really the only part I like) and take J2EE out of your vocabularies. Discussing J2EE kind-of makes it sound like your knowledge is out of date. Also, Scala and Clojure are wonderful languages so I don't understand some of the negative comments about them.