[RAD stands for Ruby Ape Diaries, of which this is part XI.] I think this concludes the Diaries, although ongoing already has a couple of five-part trilogies. The Ape works reasonably well and is getting quite a bit of use; Sam Ruby has convinced me that, rather than whittle away at the to-do list, I ought to figure out a way to build a large catalog of problems and edge cases, test-suite style, in such a way that you can add new ones without writing code. I haven’t yet figured out how to do it. My Ruby is still not fully idiomatic but it’s better than pidgin, and there’s a real possibility that the next time I get my back to a wall and need to do something to a few million lines of text right now, I may not use Perl. It should be reasonably obvious that I like Ruby. Still, there are flies in the ointment, worms in the apple, fake jewels in the shop window.

An IDE · Ruby needs an IDE. All programming languages need IDEs. Some Rubyists push back, pointing out that you only need to write one-third as many lines as if you had to do the job in Java, so you shouldn’t need crutches.

Horseshit. Here are a bunch of things that an IDE does for you that would make Rubyists’ lives more fun and more productive:

  • There should be a background parser running all the time so that you always know if you have syntax errors and can jump to them with one click; it is so totally a waste of time for me to save, then try to run, a file that the computer is in a position to know won’t work.

  • I shouldn’t have to type the names of well-known methods, like File.new or (anything).each, or type in closing parentheses or the keyword end, or fill in more than a couple of characters of begin/rescue/ensure structures; it is never correct for a human to hit keys when a computer, in principle, could provide the input.

  • The computer should help with refactoring; and all you really need is renaming. I regularly want to change the names of classes and variables and methods (if only to add or subtract a @), and it is so so stupid that I have to go mousing all over my files to find all the places that the name needs changing; that’s what computers are for.

  • I should never have to scroll much; IDEs go to a lot of trouble to make it trivial to jump from wherever to the source for the method being called, or its docs, or the next compile error or breakpoint, or variable declaration, or whatever. Scrolling back and forth in a source-code file is just stupid.

  • Unit testing should be part of the infrastructure. To create a test, or run a test, or look at test results, you shouldn’t have to hit more than one keystroke.

I’m not saying it’s easy. Java’s static typing gives an IDE a lot more to work with, and I wouldn’t insist on super-intelligent auto-complete in a brand-new project; but who spends their time on brand-new projects? Once I’ve got a few hundred lines of code, the IDE should damn well know what my classes and methods are.

Docs · The fact that Ruby’s documentation is laughably incomplete, and that the entirely-essential Ruby-Doc.org site has awkward, irritating navigation hurts less than you’d think, because as I’ve previously noted, the language’s extreme readability make it a viable option to skip the docs and go straight to the source.

A teeny little example: Today I needed to know the class hierarchy under Exception, and maybe it’s there online but I couldn’t find it. Blecch. Hint: Pickaxe, 2nd ed., page 462.

Still...

Libraries · The conventional wisdom is that compared to Python & Java & Lisp & Smalltalk, Ruby is a more beautiful language but has weaker libraries. I haven’t gone deep enough to be definitive, but the evidence I’ve seen supports that view. In particular, in an XML-centric world, REXML is a real problem.

(To be fair, I’ve found that Net::HTTP is just the thing, if you’re writing a protocol exerciser.)

Unicode · It’s easy to make people angry about this subject, and some of the angry people have a point; certain aspects of Unicode are, on the surface at least, objectively racist; for example, why does UTF-8 encoding of characters become progressively less efficient as you move from the languages of the Western hemisphere to those of the East?

Having said all that, it is my opinion that Unicode works pretty well, and in terms of making the Internet useful to the many peoples of Earth, is part of the solution, not part of the problem. And for that reason, I think that any language that doesn’t do a real good job at Unicode isn’t a very good citizen. And I think Ruby has a major problem in this area. Solutions are promised; we’ll see. And hey, in a few weeks I’m going to get up a stage in a room in Denver full of Rubyists and talk about this stuff; we’ll see whether they let me out of town alive.

Integration · Here’s what seems like the biggest problem to me, and it’s not a Ruby problem, or really even specific to any language. Java ain’t going away, and neither is .NET nor PHP nor Python nor Rails. How we gonna get all these things talking to each other? Hint: the answer isn’t WS-*. Two or more of these language communities need to drive a stake in the ground and say “Do it this way” and get a trend going. Why not Ruby?

The End · Even with all these little irritations, Ruby might win, big-time; it’s that good. And if someone wanted to throw some engineering cycles at a few interesting problems with potentially huge pay-offs, well, here they are.


author · Dad
colophon · rights
picture of the day
September 05, 2006
· Technology (90 fragments)
· · Dynamic Languages (45 more)
· · Java (123 more)
· · Ruby (93 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!