Wolfmans Howlings

A programmers Blog about Programming solutions and a few other issues

Experiences with Komodo Pro and Ruby

Posted by Jim Morris on Wed Aug 09 22:39:06 -0700 2006

I got a license for Komodo Pro, (Komodo-Professional-3.5.3-262321-linux-libcpp5-x86) and started trying to use it, I have the latest KUbuntu, with GTK installed so I had no problems installing Komodo as far as libraries and requirements were concerned, however running it had me stumped, I ran into immediate problems (some of my own making I'll admit).

First I saw a stream of errors on the screen, they didn't seem fatal but are annoying, for instance...

(Gecko:24458): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `pixbuf != NULL' failed
(Gecko:24458): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `pixbuf != NULL' failed
(Gecko:24458): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_rowstride: assertion `pixbuf != NULL' failed
(Gecko:24458): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(Gecko:24458): Gdk-CRITICAL **: gdk_pixbuf_get_from_drawable: assertion `gdk_window_is_viewable (src)' failed

For a commercial product costing around $299 that seemed a little unnecessary.

The first problem was my making I launched Komodo from the command line in the installation directory, then deleted the installation directory, which caused it to have hysterics about chdir etc, although to be honest an xwindows IDE probably shouldn't care where it is launched from, as it would normally be launched from a button or desktop icon.

Tech support was very fast in responding to my email though, and they didn't even know I had a pro license. They asked a bunch of questions, which I answered, but seeing as the remaining problems were non-fatal I wasn't too concerned about the response, which I haven't got yet, but I would like to know if all those GTK errors are normal.

The more disturbing problem was when I tried to write a simple Ruby script, I expected completion as you would see with Java and Eclipse, but instead typing:

str= ""
str.

gave me an error:

 error determining members: don't know how to make a suitable dumb_get_members for Ruby

This error was what I got at first, after going back and typing str. again I got the expected list of possible completions, seems this happens the first time every time, either it is slow figuring out what to complete or it is very buggy. (Update see later, it is the former, it is slow figuring out what type something is).

Time.

Did give me a list of completions most times. When it does decide to offer a list of completions, it also shows the parameters for the calls, like Eclipse/Java does, that's nice, I hope it is reliable though.

OK got word back from tech support, apparently it can take "a couple of seconds" for Komodo to catch up with typing, so my example of...

str= ""
str.

Would probably not work unless I waited a few seconds between the two lines, I think this may be acceptable as it is unlikely to be an issue in normal use. In practice it seems to be more than a couple of seconds BTW.

The main reason for me trying Komodo was for the code completion, without intelligent code completions I really don't see the use for an IDE, I can use my trusty Epsilon editor from Lugaru, with the ruby syntax highlighting and formatting extensions and my own contribution to the Epsilon library snippets, much like the great Textmate snippets (although not nearly as complete), there are also various user contributed extensions for various source code code control systems etc here.

Yes Epsilon is quite expensive for an editor, but I have been using it for nearly 20 years, upgrading every few years or so, it is basically Emacs with a c-like extension language (instead of lisp), it is very solid, and runs on all the platforms I use (Mac OS/X, Windows and of course Linux). It does not have code completion of course (although I think I can write an extension ala Vim7 to do that, watch this space).

Maybe I should mention what I am looking for in an IDE for Ruby and Rails...

I want:

  • syntax highlighting
  • auto indentation
  • auto-correction (or at least error highlighting, or suggestions)
  • snippets (or templates)
  • code completion (showing the possible methods for a variable called intellisense or intelligent code completion by some)
  • word completion based on something in the source already, or from a tags list or from a known-word list
  • showing the parameters for a given method I am currently typing
  • full debugging (with breakpoints, watches, stepping and variable examination)
  • SCCM integration (subversion, CVS, perforce)

Basically everything I get when I use Eclipse and Java.

I get some of this with Epsilon, and Textmate but they are not IDEs so do not have debugging or code completion, or error detection.

Back to Komodo...

It has Perforce, CVS and Subversion bindings built-in, and does show the files status in the project view.

The auto-indent works nicely, unlike RadRails which I tried but just didn't get along with as I kind of expect it to be as good as Java and Eclipse, but my main complaint is it doesn't even auto-indent. (I think intentionally).

The syntax highlighting in Komodo is OK but not great, I think that can be tweaked, but I haven't looked that closely.

The debugging does seem to work well, you can set breakpoints, and step over, into and watch variables, everything you would expect. This may be worth the price of admission (YMMV).

It does show you highlighting when it detects errors as you type, within the limitation of Ruby syntax.

The Snippets implementation is pathetic compared to Textmate or Eclipse, you can't specify tab stops, you can't type the trigger word for a snippet and have it expanded on TAB, you have to either bind it to a key sequence, or double click the snippet name in the toolbox, that is simply clunky, and pretty much unusable. There are NO built-in snippets, you have to create them all yourself, so if you like typing "for" then tab and have a for loop created forget it, unless you create it yourself then you have to find the "for" snippet in the toolbox and double click it. I also couldn't find any on the web, I think for the price of this product they should supply most of the expected snippets. The other thing I don't like is the snippets will pop up a dialog box asking for input, instead of the usual way of just highlighting the text and typing over it to replace it.

My initial impressions is the editor part is clunky, given the excellent examples of Eclipse and Textmate, it simply doesn't compare as far as modern editing conveniences such as snippets are concerned.

The debugging seems capable, and probably the best I have seen for Ruby.

The code completion is slow and doesn't always work.

The source code control seems a little buggy in some places, although only from a UI standpoint. (Pops up strange dialog boxes on updates saying files need to be added, when they don't).

A serious bug is if the file changes on disk, (like if you do a revert), you get a dialog popping up saying the file has changed on disk, but you can't get it to go away, clicking OK just pops it up again, ad infinitum, you need to kill the program to move on.

All in all I think this would be a nice IDE if it were free, and the personal version may well be useful for some if you want decent debugging, but I simply can't see a justification for $299 for the pro-version. (At least not for this version). There is an alpha for the next version that claims to support Rails development, if they also fix the snippets and the code completion (which they have not in the current alpha), then we may be getting close to value for the money, but right now I think they have a long long way to go before this product justifies the price tag, and comes close to competing with the few other editors out there let alone IDEs.

Update

Tech support have been very responsive, and they came up with a macro that inserts snippets almost the way I expect,

Add this as a macro, bind it to a key (say ALT-=), and then add your snippets to the same folder as the macro is in, name them appropriately, and the type im the name hit ALT-= and the snippiet is found and inserted, pretty neat.

Disclaimer: These are my personal opinions, I am not affiliated with any editor or IDE manufacturers.

Posted in Rails,Ruby  |  Tags komodo,ide,ruby,rails,editors,epsilon  |  1 comments

Comments

  1. Anonymous said on Sat Mar 10 16:07:01 -0800 2007
    The new 4.1 beta has tab stops now =)

(leave email »)