The Artima Developer Community
Sponsored Link

Java Buzz Forum
Ruby (!)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Steve Conover

Posts: 37
Nickname: sgcjr
Registered: Feb, 2003

Steve Conover is a professional Java engineer and consultant
Ruby (!) Posted: Jul 16, 2003 11:33 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Steve Conover.
Original Post: Ruby (!)
Feed Title: Steve Conover's Weblog
Feed URL: http://www.sonic.net/~conover/index.rdf
Feed Description: Mostly java-related.
Latest Java Buzz Posts
Latest Java Buzz Posts by Steve Conover
Latest Posts From Steve Conover's Weblog

Advertisement

I've been playing with Ruby the past couple of weeks, and I'm hooked. I've been reimplementing a small personal project and I'm definitely not going back to using Java for it.

A short list of the things I like:

It's expressive and concise: When I write a bunch of Ruby code, then come back to it later and read what I wrote, it's almost effortless to understand what I was doing. Even the most well-factored Java code sometimes takes a little concentration to wrap my mind around - mostly because there's just more stuff for my brain to parse.

Iterating is the first difference that leaps out at you. What takes 3-4 lines of java for a plain ol' iteration is one line in Ruby. Overall it feels like I write about 1 line of Ruby per 5 (or maybe more) lines of equivalent Java.

Speed: I don't have to wait for compilation step, or a VM to start up - I hit F5 in my IDE and bam I get output from my tests. Which means I run tests a lot more frequently (probably an average of less than a minute between runs), which means I catch errors earlier and can move a lot faster.

And combined with the tiny amount of code it takes to express an idea, I've had to get used to being ready to transition to the next use case much faster than before. It took a few days of completing use cases, thinking "that's it?", and double checking my code to get used to the faster flow.

Power, OO support, and attitude toward the developer: Nanning gave me mixins in Java, but in Ruby they're just part of the language. Java has anonymous inner classes, but they're poor (and verbose) substitutes for blocks.

Ruby's approach is to give you a ton of power and trust that you know best - a marked constrast to Sun, which tells me it knows what's best for me and pats me on the head and sends me on my way.

I'm way behind here, though - many other smart people have put 2 and 2 together - that static typing is the poor man's TDD, and if you're TDD'ing anyway, why not use the tools that give you more readable programs containing fewer lines of code?

It's hard to argue with the economics - as Bruce Eckel pointed out, programmer cycles are a lot more expensive than CPU cycles - at some point we'll hit a tipping point where Python and Ruby adoption overwhelms Java's (big) advantage in available tools and apis. Not for a while, and until then Java is a pretty good language (with the help of Intellij, that is), but I'm predicting that the shift is inevitable.

That said, Ruby needs something like Intellij and a better debugger - but those are just details that are actively being worked on.

Ruby resources:

Read: Ruby (!)

Topic: Rob Gingell Our Friend at SUN? Previous Topic   Next Topic Topic: the blog monster and the devcon

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use