IDE Joys


I've used NetBeans, Eclipse and other IDE's over the years.  However, I started programming in the days before IDE was a buzzword, so I'm always suspicious of them.

My first IDE, BTW, was the UCSD P-System.  On an Apple ][+.  But that was long ago and far away.

IDE Trump Cards

I've had the J2EE vs. .NET conversation with folks who said the following:

"The .NET issues don't matter very much because Visual Studio makes me so productive."

Interesting.  Security holes, non-standard features, and vendor lock-in can be trumped by the auto-completers in Visual Studio.  At that point in the conversation, there's nothing more to say.  

That's the kind of attitude that may -- in part -- have lead that particular firm to cancel projects and fire whole departments.  It can't be the only factor, but the ".Net or die" attitude can be self-destructive.  Not so much because .Net is evil, but because people with that attitude are bad listeners.

Pragmatic IDE Choices

Komodo Edit has the advantage of zero cost and a nice upgrade to the real Komodo IDE.  Further, the ActiveState folks are deeply committed to modern dynamic languages (Python, Tcl, Perl) and write tools that fit these languages.

Autocompletion -- specifically -- is difficult in a dynamic language environment.  In Python, a variable could be assigned to any object of any type.  It takes a fair amount of reasoning to deduce the most likely type for a variable when typing in code.  In many cases, it's impossible to deduce, and you don't get autocompletion pop-ups.  The lack of autocompletion is more a feature of Python than Komodo.

In Python, we don't often have a big problem with this because we can enter code in the Python interpreter directly.  This is better than any autocompleter could ever be.  First, you can explore your object classes (the help() and dir() functions are a huge plus).  More importantly, you can see things work as you enter statements.  

Komodo Extensions

In addition to source files, Komodo allows you to add other things to your project.  You can add menus, and toolbars -- something I haven't made use of.  If I had a super-complex development environment, menus and toolbars might be cool.  But I only have subversion, and that's very easy to use.

You can add templates and snippets.  This is something that can easily get out of control.  Copy-and-paste programming is a fundamental evil.  Object-Orientation gives you many ways to avoid copy-and-paste.  Templates and snippets can reintroduce copy-and-paste techniques where they don't belong.

However, some snippets are helpful.  Specifically, I have this snippet in most projects:  __docformat__ = "restructuredtext en".  This helps me write epydoc docstrings in RST instead of epytext.  Why?  Because Sphinx works better if everything is in RST.

Commands

Komodo has a macro capability, but I don't have much use for this either.  Nothing ever seems to get that complex.  And if it does, I often write a shell script and use that instead of a multi-step macro.

The biggest thing I use are Komodo's Commands.  Of those, I'll always have two at the top of every project: a basic "Run This File In Python" and a "Run Python" command.  These make it easy to pick a file, double-click and the command, and watch the program run.

The "Run This File In Python" usually has a command line like %(python) %f.  Run this file in the currently-configured Python interpreter.  I direct this output to the command output tab so I can capture the output in Komodo.  Further, I map this to F5 so I can hit a key and run it.

The "Run Python" is just %(python).  I direct this output to a new console so I can interact with this Python interpreter.  Usually, I map this to F6.

Documentation

For larger projects, where I'm using Sphinx to produce documentation, I'll have the Sphinx command installed in Komodo.  This allows me to double-click the command icon in Komodo and rebuild the documentation.  The command text is just the one-liner to execute the sphinx build.

Similarly, the command to run epytext is a Komodo command that executes the one-liner to build API documentation.

I could put the "daily build" master unit test suite in Komodo.  For my really big project, this is a shell script that runs numerous unit tests, creating and destroying test databases and starting and stopping servers.  It isn't a pleasant or quick thing to run, so I don't actually try to run this in Komodo.  I probably could, but I usually want it running quietly in the background.


Posted: Friday - April 24, 2009 at 08:21 AM
       

Author: Steven Lott
Technorati Tags:
Technorati Cosmos: Technorati Cosmos
Technorati Watchlist: Technorati Watchlist
Add this entry to: