3 ms·
Don't get me wrong, I love automated refactoring. It's fun to slice-and-dice a large Java code base using Eclipse, and to leave it tidier than you found it. I l
by ekidd 15y ago
Don't get me wrong, I love automated refactoring. It's fun to slice-and-dice a large Java code base using Eclipse, and to leave it tidier than you found it. I like the way that basic cleanup operations are fast and safe enough to do while browsing code.
But I maintain some large, older Rails projects in Emacs, too. And personally, I'd rather maintain a slightly hackish Rails 2.3 application than a typical Java application. Why?
- Rails has rigid conventions for database tables, model classes and controllers. Even in a strange app, the structure is familiar.
- The Rails application will generally express the same ideas using far less code. I can dive in, figure out everything that's going on, fix it, and get out. In Java, I often have to dig through various facade classes, gratuitous design patterns, and parallel class hierarchies. Maintenance is cheaper when the fugly evil all fits on one page.
- The Rails world is in love with cute libraries that (for example) reduce an entire application's access control to 20 lines of code. Even if I don't know the library, I can learn it, and then I've only got 20 lines of code to think about.
Mind you, I keep hearing about fancy new Java frameworks, so I suppose the Java world is getting better. And a truly awful Rails application—especially one without unit tests—can be a Lovecraftian horror.
But in the real world of at least semi-competent teams, it's possible to understand both Elicpse+Java and (Rails|Python)+(Emacs|vim|shiny Mac editor), and still choose the later, even if you're a maintenance programmer.
- vladoh 15y agoYou are comparing Rails to Java, which is wrong because the first is a framework and the second a language. A fair comparison would be between Rails and Spring or Ruby and Java. And here things are different. In Spring you also have clearly defined rules about the Model, View and Controller classes like in Rails. However you still get all the benefits of tooltip JavaDoc and auto-complete on . and Ctrl+Space (in Eclipse).
- ekidd 15y agoDespite the disagreement, I'll stand by my earlier remarks: Many popular Java frameworks involve a lot of boilerplate. I've never used Spring, so I can't comment on it. But in the last two years, I've worked on multiple GWT and Android applications, and both frameworks encourage people to write a lot of code for something as simple as MVC bindings. Seriously, GWT can easily require 10x as much code as Backbone.js + CoffeeScript. I'm impressed by newer Java frameworks like Play, which make Java look terse and flexible. And I agree that refactoring IDEs are amazing tools, and well worth some sacrifices to use. I merely disagree with skrebbel's remark that, The advantages of IDEs over text editors isn't look or feel. It's code quality. The are multiple, valid ways to achieve high code quality. IDEs are one of them. But there are real tradeoffs here, and other legitimate choices.