Sometimes Less is More

I’ve made no secret that I loved CodeRush for Delphi.  I still mourn the loss of Mark Miller from the Delphi community.  CodeRush was, by no means perfect.  Some of the issues I had with it may have been due to Delphi bugs, undocumented APIs, or bugs in CodeRush itself.  All I know is that I was much more productive with it, than with the standard IDE, and unfortunately, that still holds true today.  CodeRush, circa 1997 has great code navigation and smart templating.  Compare that to XE2 today:

If you create an FMX application and in the main form, type in pr and hit Ctrl+J to use the template this is what you get:

procedure MyProcedure();
begin
end;

What is in Italics is selected so you can replace it.  This leaves a little to be desired.  For one thing, pressing Ctrl+C to invoke code completion won’t even do anything, so the code won’t compile because there isn’t a preceding method prototype.  Add the fact that the entire unit is a form and the method generated by the template is not even for the form class, and it’s almost comical.  The template appears to be completely ignorant of the context in which it was expanded, and you might expect a modern IDE to ask for the scope of the new method, and automatically insert the declaration into the type or implementation section using the appropriate scope.  This kind of functionality actually makes you wonder if anyone at EMB is dogfooding the product.

Then there is code navigation.  You can use the Ctrl + Up/Dn Arrows to jump between method declaration and implementation.  Sometimes it gets a little confused if you use overloaded methods, but this works pretty well, but how do you jump to the implementation or interface section?  The standard IDE doesn’t provide such functionality, and this is a common activity when creating or changing method prototypes.  So common, in fact, both CnPack and GExperts have provided this functionality in additional to method searching.  As someone new to the IDE, you likely wouldn’t know you have to install third party products for such basic functionality, and when looking at the purchase price of XE2 it seems you get a whole lot less, even though these third party add-ins are free.  The downside to these tools is that they also use their own code parsers, so many of them have a limited understanding of new language features, and require even more code to continuously run in the editor to provide the additional capabilities.  I really wish EMB would provide a CodeDOM for the development of such add-ins and incorporate some of this functionality into the standard IDE.

The examples I’ve given are only the tip of the iceberg.  I have QCed a number of these issues, including bugs in code completion that result in AVs at run-time because it inserts invalid code.  Since then, XE2 has shipped, and 4 updates have been issued, but the bugs I reported in QC still remain.

Software is one product in which quality matters more than most.  It affects the day to day experience of the user.  While quality has definitely improved in the Galileo IDE since CodeGear was spun off, and has continued under EMB, IMHO there is still much to be done.  I often wonder what the state of the IDE would be, if the D7 IDE had not been replaced with the Galileo IDE, and instead all that effort for the new IDE and to add new features like UML modelling which few people use, had been put into making the existing IDE even more RAD.  When the stock IDE has the same basic functionality it had 15 years ago when it was branded as RAD (where R stands for Rapid), can you still call it RAD 15 years later in computing time?

Personally, I would have rather have better IDE navigation, templating, and refactoring productivity features than half baked features like ErrorInsight, which gives so many false positives, I normally just ignore it.  I certainly hope that EMB considers an a la Carte pricing model at some point, and concentrates of fixing issues with the IDE as well as fleshing out FMX for the next release.  For now, I’ve passed on the XE2 update offer for my personal use until some of my QC issues are fixed.  Perhaps QC votes should be changed into dollars, so you can vote with your pocket book ;-)

If it comes down to a question of doing it well, or not doing it at all, sometimes less is more.

14 Responses to “Sometimes Less is More”

  1. Marius Says:

    I never liked Coderush, it made delphi slow (and i certainly don’t like geexperts and cnpack, it seems it installs a toolbar in every windows making my delphi view even smaller and uglier). I often had a wager with my collegea using codegear and he lost big time every time. Coderush (or other tools) are far from perfect and you have to invest heavely in them before you become productive with them.

    The current code navigation (i’m on XE btw) is indeed a problem, specially the right button -> find which often goes bananas, but i have little problems with the ctrl-up/dn. As you found out some of the code templates in delphi are a joke, other are fine (it seems as long its just local stuff its mostly ok like the try tryf etc)

    IDE’s… Funny thing is that FMX does not support the inline form designer (which is what i like with my 3 monitor setup), not sure why FMX does not support the new form designer…

    As long as they keep up this upgrade cycle things can only get better (though i’m still very disappointed in all the XE2 updates, still feels like a ‘beta’, sry)

  2. Mason Wheeler Says:

    1993? But Delphi wasn’t released until 1995…

  3. Larry Hengen Says:

    @Mason,

    Thanks for catching that! I first came across CodeRush for Delphi when Delphi 3 shipped. I have updated the article…since that would have been 1997.

  4. Mark Says:

    I’m also a CodeRush user - I purchased it for Delphi 3 after being impressed by a presentation on it by Mark Miller himself.

    I’m still using it with Delphi 7 and CodeRush is one of the main reasons why I’ve taken so long to upgrade to a newer version of Delphi - I’ve recently purchased XE2, so I’m now looking for a CodeRush replacement.

    I’ve looked at CnPack and GExperts, but neither has really impressed me so far from what I’ve seen. Castalia looks like it could be a fairly good replacement although it’s still missing a few things that CodeRush has. One thing I haven’t found is many reviews on Castalia, so I’m wondering if anyone else has an opinion on it?

    You can find it at:
    http://www.twodesk.com/castalia/

  5. Edwin Yip Says:

    You have said what is in my mind : ” I often wonder what the state of the IDE would be, if the D7 IDE had not been replaced with the Galileo IDE” ;)

    You can try ModelMaker Code Explorer, it’s the tool I can’t live without, along with Gexperts, CnPack, IDEFixPack and DDevExtions…

  6. Larry Hengen Says:

    @Edwin,

    I think your suggestion to use so many additional tools makes my point. The IDE has not evolved in 15 years to the extent developers would expect, so they’re having to compensate for it’s shortfalls by purchasing additional add-ins. It’s great that they’re available, but each one has it’s own cost in terms of performance, and bugs. Incorporating more base functionality (more bang for the IDE buck) is what I’m advocating.

  7. Norton F. Says:

    I too was a heavy user of CodeRush before i jumped to Delphi 2007 and initially felt quite a loss. But then I discovered ModelMaker Explorer which has the most amazing navigation (I am amazed Embarcadero have not stolen some of the ideas) and other shortcuts. I also heavily added and customized the inbuilt Delphi templates to replicate the text shortcuts that i had in CodeRush.

    I’ve never looked back.

  8. Warren p Says:

    I still have a Delphi 7 IDE with CodeRush installed, and I don’t find it that useful.

    If you want to see what the current state of the art for IDE extensions looks like, Delphi isn’t your game anymore. The best thing out there these days is Resharper+VisualStudio2010. You can navigate from this code to its implementation (not its interface) even if Bar is an interfaced method:

    var
    Foo:ISomething;
    begin
    Foo.Bar;
    end;

    Now that’s smart. It finds implementors of ISomething and jumps to its implementation (or implementors, if there are multiple it gives you a list and lets you choose). Now that’s amazing.

    One of my co-workers has written his own IDE extension for Delphi 2010/XE/XE2, that handles most of what he really liked in CodeRush, and it’s impressive. For one thing, it has code-parsers that work when the built-in ones fail, letting you navigate quickly to anything’s definition. I think that castalia is “not enough” for me, and neither unpack nor gExperts have much I can’t live without.

    Warren

  9. Marjan Venema Says:

    Couldn’t agree more. The IDE shows many signs of not being dogfooded. And certainly not being dogfooded with any non-trivial projects and project groups. If you would care to list the QC numbers of the IDE issues you have reported, I’d be happy to vote for them!

  10. Larry Hengen Says:

    @Warren,

    I would love to get a look at what your co-worker wrote. Any chance of him releasing the binaries or creating an open source project based on his code?

  11. Larry Hengen Says:

    @Marjan,

    Here is a list of my QC #s you might want to vote for:

    100190
    99403
    97158
    96783
    61439

  12. nedko Says:

    Indeed, every bit of it is true. I jumped from D2006 to XE and the IDE has not been improved at all. All old bugs, clumsy templates, buggy or missing refactoring and bloatness. Thank God IdeFix, CnPack and GExperts are there for us.

  13. TheDelphiGuy Says:

    CodeRush is the reason I still use Delphi 7 as my main Delphi IDE. Without it, Delphi feels like it’s been lobotomized. And when I need to add some new trick, with the RushAPI it’s almost two clicks and filling a couple of event handlers. Using the OTAPI takes a lot of boilerplate, a lot of time, and a lot of pain. It feels exactly like programming a Windows device driver in C++ felt like back in the ol’ days.

  14. Kerry Neighbour Says:

    I agree with most here, especially TheDelphiGuy. I still use D7 and Coderush, and will not move on until I can get similar functionality in the newest Delphi. I was interested to the see the comments on ModelMaker - I will certainly have a look at that product - at least for navigation purposes, although GExperts is fairly good for that..

    One thing that I REALLY use Coderush for is generating a Procedure template (type proc, then shift space), then generating the method definition (Ctrl-M), then jumping back to the procedure (Ctrl-M again). I would do this dozens of times a day. If I could get some way to do this at least in XE2 then I would think about moving on. If anyone thinks another package or even some inbuilt thing in XE2 can do this, then I would LOVE to hear about it.

    So many programmers are staying with D7. Surely EMB knows this, and understands why? Why not listen to us and start fixing up the IDE?

Leave a Reply