4 ms·
I have no insight into Twitter's decision making, but the reason I recommend Java over the other popular languages comes down to readability and maintainability
by guelo 16y ago
I have no insight into Twitter's decision making, but the reason I recommend Java over the other popular languages comes down to readability and maintainability. In my experience the dynamic-ness of the language begins to work against maintainability and readability after a while, especially after the original designers hand off the project to other programmers. Most language communities have built over time best-practice guidelines for readability and avoiding common bugs. But I think Java's age and enterprisy culture have allowed it to evolve stronger guidelines (see Joshua Bloch's Effective Java), and it's limited flexibility make it easier to maintain.
If you are in a highly competitive startup environment where break-neck execution for the next 6 months to a year is a matter of survival then Java might not make sense, but that doesn't describe most projects.
- eropple 16y agoThis matches my own experience as well. There are creeping-horror Java codebases, but I find it easier for me and the people I work with to effectively build long-term, maintainable, sustainable code in C# or Java. (My day job involves Java, my play-around startup concept is based on .NET.) I suppose that if you're building a crash-or-sell "startup," this might not be a huge priority for you, but as guelo noted, most projects don't fit in this mold.
- Sapient 16y agoI don't believe Ruby and Rails are prescribed for most projects. Just the ones where they makes sense. That said, I have taken over development of a few legacy rails applications and never had a problem adapting to the idiosyncrasies of the old developer or team.
- haploid 16y agoWell, it's not necessarily true that RoR is prescribed for most projects. A more general statement, which seems in my experience to be accurate, is that $shiny_hot_language_popular_with_the_kids_these_days is the prescribed language/platform for startup applications. I am old enough to remember when Java was actually in this exact role, with "legacy" web apps written in C( via cgi or nsapi ), perl, or c++/com/asp( via asapi )being seen as uncool and dinosaurish by kids who shat their pants after reading the servlet/jsp 1.0 spec. Nowadays, I'm seeing more chatter about clojure/haskell/node.js startup technology stacks than RoR, so my guess is that the shiny new thing is moving yet again.
- eropple 16y agoI have no idea why haploid's comment went dead - he raises a very good point. RoR, for better or worse, has become the trendy tool to use for web apps. Java, once upon a time, did occupy that niche, too. - worse, IMO
- Sapient 16y agoJava programmers commenting on this story seem to be claiming that Ruby is a messy language and hard to grow a team around, while Java somehow solves all these problems, yet I see only anecdotal evidence and opinion to back this claim up. One thing I cant remember ever having read is a horror story about people taking over a legacy Rails app, while those stories seem to be fairly common when talking about Java apps. Seems to me that, for the most part, people who know Ruby and Rails have taught themselves, while sub-par and mediocre Java programmers are produced in their hundreds, fresh from their first programming experience in college. Seems logical to me then that its going to be far easier to get experienced Ruby programmers than to get experienced Java programmers.
- guelo 16y agoThere are crappy developers everywhere, if your team is full of them then the language doesn't matter.
- eropple 16y agoHorror stories about legacy Rails apps? I have a couple, though not "taking over" them but rather fleeing from them. (My employer is in the process of replacing a home-built Rails-based code review tool with Review Board, and I've looked at that tool's code - it couldn't be rehabilitated if you tried. To be fair, it was a weekend project that spiraled out of control...but that in itself is saying something.) Bad code can be written in any language or on any framework. I would suggest, however, that when at larger scales, there are significant benefits to a more restrictive language and tool set. I write Java at work, and while there are cases where it's not as expressive as I'd like (s'why I write my own code in C#, which is as expressive as I'd like), reducing the ability of developers to Do Stupid Things is, to me, a very large plus. The claim that people who know Ruby and Rails have taught themselves--well, no shit, right? I taught myself Java, too. And C#. And PHP, Python, Ruby, and half a dozen other languages. Of course sub-par and mediocre Java developers are churned out by college. So what? Hire ones who aren't. And if you give it ten years (assuming the Rails fad has legs--I'm skeptical, but just for argument's sake let's assume it's not) colleges will be churning out mediocre Ruby hacks just as well. Your comment reads as fanboyism and not much more.
- rbanffy 16y ago> it's limited flexibility make it easier to maintain. I prefer added flexibility combined with convention over configuration. In my experience, Java teams deliver less functionality implemented on top of more complicated infrastructure at 2 to 5 times the time it takes for a smaller team working on Django to implement slightly more functionality.