Some people program in Notepad. For all I know, maybe
they also sweep their floors with a toothbrush and wash
their clothes with a bar of carbolic soap. Sure, it can
be done. But personally, I prefer to do things the easy
way.
When it comes to writing programs, I am used to working
in an integrated environment – usually either Visual
Studio or the Borland Developer Studio. That’s
all very well just so long as I am developing in one
of the languages supported by those IDEs. When I want
to code in some other language, such as Ruby or PHP,
however, I have to venture out into the big bad world
where Integrated Development Environments are often notably
lacking in ‘Integration’ and are frequently
not are not all that hot on the concepts of ‘Development’ or ‘Environment’ either.
Komodo has a neat environment with a multi-window editor,
code-completion tools and integrated debugger
Which is why Komodo came like a breath of fresh air.
This multi-language editor provides good support for
PHP, Python, Tcl, Perl and Ruby plus basic support for
various other languages ranging from Ada to XML. It has
syntax sensitive code colouring for each language; and
for its five principal languages, it also has integrated
debugging, code collapsing and code completion (similar
to Visual Studio’s ‘IntelliSense’).
Komodo lets you organise projects by adding files to
a tree in its project pane. You can keep multiple projects
open in this pane (even across different programming
languages) and switch quickly from one to the other.
One thing I don’t like about the Project pane is
that it fails to restore the collapsing between sessions.
If you have ten projects in the pane, say, and you collapse
nine of them for the sake of clarity, the next time you
load Komodo, all ten projects will be fully expanded
again.
As an alternative to writing programs in a full sized
editing window, you can code in ‘split view’ by
opening a new horizontal or vertical pane onto the same
or different code files. You can edit in either pane
and, when both panes show the same file, all editing
changes made in one pane are immediately reflected in
the other.
Code is syntax coloured with automatic collapsing. You
can enter method names from a drop-down list
The editor provides tabbed windows so that you can quickly
switch between one file and another and all open documents
are restored between sessions. There are good code location
and navigation facilities; these include function and
variable browsers plus incremental search and ‘find
in files’ tools.
Komodo has a number of code reformatting tools built
in. You can mark off some code and change its case,
increase its indentation level or comment and uncomment
it. It also has a ‘reflow paragraph’ option
which I initially took to be a code formatting tool to
correct the indentation levels and so on. Having tried
it and found it didn’t work as expected (it incorrectly ‘corrected’ line
breaks in my Ruby code), I checked with ActiveState and
was told that paragraph reflowing is only intended for
use with plain ‘text’ such as comments and ‘here
documents’ – which, frankly, makes it of
somewhat limited utility.
The built-in code completion features are more useful.
They let you select both standard and user-written methods
from a drop-down list and you can also auto-complete
the names of identifiers – so, if for example,
you have written a method called myVeryLongMethodName you can subsequently enter the characters ‘my’ and
press a hotkey (Ctrl+Space by default) in order to fill
out the rest of the name; when there is ambiguity between
two identifiers, Komodo takes a ‘best guess’ (based,
I am told, on the proximity and scope of identifiers).
If it guesses wrong, you can press the hotkey again to
cycle through all other matches: myVeryLongMethodName,
myOtherVeryLongMethodName and so on.
Other useful tools include bracket matching and
a keyboard macro recorder. You can also create boilerplate
code using a snippet editor which simply lets you enter
some text or program code and associate it with a hotkey.
When you press the hotkey the text will be inserted into
the editor. Ah, if only Visual Studio snippets were this
easy!
The GUI Builder (in the professional edition) is one of
my least favourite tools...
There is a tool to help you to build regular expressions
interactively and there is a GUI Builder to create visual
interfaces by dropping buttons, edit boxes and other
controls onto a blank ‘form’. The GUI Builder
(for Perl, Python, Ruby and Tcl, available in Komodo
Professional only) supports the Tk graphic interface
widgets. The resulting dialog is saved to disk as code
which can be accessed using the target language. It has
to be said that this is very clunky by comparison with
the click-and-code form designers of Delphi or Visual
Studio. On the other hand, it’s better than nothing.
The debugger, on the other hand, while slower than its
Visual Studio equivalent, is much the best thing I've
used when debugging Ruby code
Komodo has a decent debugger. This lets you set simple
or conditional breakpoints, step through code and watch
variables in a separate pane. You can ‘drill down’ into
watched variables by opening up the branches of objects
to view their internal data or you can look inside arrays
to view their component elements. You can also get a
quick view of the internals of a variable by hovering
the mouse pointer over it name in the editor. This displays
the data of variable in tooltip (though, unlike
the debug tooltips in Visual Studio, the Komodo debug-tooltips
can’t
be expended to ‘drill down’ deeper).
Komodo is not, of course, the only dedicated programming
IDE on the market. There are numerous free multi-language
IDEs such as SciTE,
some expensive single-language IDEs such as Zend’s
PHP
Studio (from
$99 to $1,495 depending on the edition) and a few mid
price multi-language editors such as SlickEdit (about
$284). In my experience, however, Komodo is an excellent
all rounder for anyone who needs to code in one or more
of its principal targeting languages. At $295 the Professional
edition it’s great value for
a commercial developer. For students and hobbyists, the
Personal Edition at just $29.95, is practically a steal.
Huw Collingbourne
April 2006
|