On 4/21/06, Tim Dysinger <[EMAIL PROTECTED]> wrote: > Don't some of you guys come from the Java world? Don't you miss the > features in code completion, re-factoring and all that goodness that > IDEs gave you?
Two words: duck typing. Pick and use simple interfaces that *really* hide implementation details, (instead of simply codifying them in an abstract interface) and you shouldn't have to go through so much churn. When you first started writing Java, were you really able to recall all the various Exception subclasses and core library interfaces immediately? Was the method signature hinting in Eclipse really that useful before you had a solid grasp of the "Java Way" of doing things? Did J2EE come totally naturally to you, without any reference outside of your trusty IDE? > How productive is it to stop, change windows, search > and look an API and switch back to you editor to finish the task > every time you forget the exact APIs format? [...] Again, if the API you're working with is really so obscure it requires you to constantly refer to documentation, perhaps it's the library, not the language, you should be complaining about. Yes, there are scenarios where you must expose a certain amount of underlying complexity, but the richest Ruby libraries (such as the Rails zeitgeist) tend to move in the direction of implementing a domain-specific language, not just a complicated body of method signatures. > Don't get me wrong, I'm committed to finishing the "Agile with RoR" > book but I miss Java already. Homesickness and culture-shock are common occurrences for people moving to new environments, no matter how dysfunctional their home or idyllic their new surroundings. (It's a joke, of course, but there is some truth to it...) Remember that RoR is an acronym for "Ruby on Rails" -- not only a programming language, but a rich and featureful set of libraries and tools for crafting web applications. Expertly-crafted screencasts aside, it is not something you can learn overnight, nor should you expect your tools to do all the learning for you. Once you've internalized some of it, though, I think you'll find that method signatures and class interfaces naturally follow pretty consistent patterns. The other practice that stepped up my productivity considerably was doing most of my initial development work in an Irb session with readline and completion support turned on; that way, I get tab-completion like a full IDE, and immediate feedback on the syntactic and logical validity of my code. Once I have a method working in an interactive session, I can basically just copy-and-paste it into a text editor window, and add it to my library. > So far I'm not seeing the benefit over Maven w/ project templates > (which can give you convention over configuration), Spring (which > gives you IoC), Hibernate (ActiveRecord) and a Eclipse with all the > web tools plugins (which doesn't cost me $50 either like TextMate). It sounds like you're trying to make a decision on the basis of a list of features, rather than a real sense of the workflow and productivity associated with each tool. Yes, the better Java IDEs such as Eclipse and IntelliJ can hide or automate much of the complexity of the underlying language and frameworks, but the fact remains that Java and J2EE offer an inelegant (if conservative and utilitarian) environment in which to create code. I don't consider myself a Rails developer, but I wouldn't give up the productivity gains (and stress reduction) I accomplished by leaving Java behind for application development of all kinds. The mental overhead required to juggle all the layers of abstraction in most Java apps more or less *requires* the kind of rich tool support you talk about missing, while I find that I seldom have to refer to the API documentation for most basic Ruby coding, and when I do, I often find that my initial guess as to method naming and signatures likely was correct. Finally, there is no special relationship between TextMate and Rails; DHH may prefer it, but you really can use any decent programmer's editor to produce Rails code quite happily. I alternate between TextWrangler and Vim, personally, which is especially handy for those situations when I have a live demo running off a server other than my PowerBook and want to make a 5-second change without doing a full Subversion commit, update, and refresh on the server. Claiming that the $50 price tag somehow means that Ruby can't compete with Java is disingenuous. -Lennon _______________________________________________ PDXRuby mailing list [email protected] IRC: #pdx.rb on irc.freenode.net http://lists.pdxruby.org/mailman/listinfo/pdxruby
