Comments on the survey #2: Refactorings
The survey had little room for comments, so here are mine, starting with refactorings.
Delphi’s refactorings are crap. They leave you with non-compilable code more often than not.
A few examples of brokenness off the top of my head:
- Class Completion got broken in CDS 2007. It usually completes stuff into the wrong class.
- Class Completion mangles your visibilities if you ever try to use strict private or strict protected.
- Delphi’s refactorings still don’t work across units if you don’t have every single unit explicitly added to your project file, so a Rename will usually break the build.
And that’s just the brokenness, not the suckiness. Extract Method still won’t do functions, but that’s just an annoyance. Automatic variable declarations usually get the wrong type, but that doesn’t break code that already compiled. What’s utterly unacceptable is that there are cases where the “refactorings” actually make previously-working code stop compiling.
Pretty much our entire team just ignores Delphi’s refactorings, because we know they’ll usually break our code. Please, please, please, put some effort toward making the refactorings work. In this day and age, we should not have to refactor by hand.
February 22nd, 2008 at 7:44 am
I have submitted QC tickets for most of these behaviors.
http://qc.codegear.com/wc/qcmain.aspx?d=56993
http://qc.codegear.com/wc/qcmain.aspx?d=58322
http://qc.codegear.com/wc/qcmain.aspx?d=58323
So go forth and vote.
February 22nd, 2008 at 7:47 am
The rename issue is so big that I give it up soon. However, it is so often that I need to rename something across projects.
I guess that’s why Castalia still has chances to sell more copies. But why cannot CodeGear make default refactorings better? Wish they could do things well in Tiburon.
February 22nd, 2008 at 11:21 am
ModelMaker Code Explorer is cheap and does everything above perfectly. Since the choice seems to be:
1. Complain and complain for years hoping this ever gets fixed in the IDE and in the meantime not using refactorings.
2. Spend $99 Euro and get Code Explorer.
The choice seems a no brainer to me. The efficiency improvement when using this tool (I have not tried Castalia but it may be similar) is well worth the money.
Of course, using this does eliminate the fun one can have by bashing CodeGear for years and years
February 22nd, 2008 at 9:48 pm
the brown menu on the left overwrites about 10 characters of left of the center content on a 1024 screen
February 22nd, 2008 at 9:49 pm
Felix: That’s an IE bug that I haven’t worked around yet. For now, you can either use FireFox, or look at the blog’s front page — it’s fine there.
February 22nd, 2008 at 9:50 pm
Useful for renaming a variable inside a procedure. I think that is about all I use it for myself tho.
February 23rd, 2008 at 6:43 am
Rename usually works fine within a single source file — as long as you’re not renaming an overridden method.
For variables within a single method, I usually use SyncEdit instead. Rename leaves that stupid refactoring window to clutter up my screen; SyncEdit doesn’t.
February 24th, 2008 at 8:18 pm
Wonder if anyone tried the design pattern in Delphi… The generated codes template seemed to be fine for .NET but I doubt some of them are actually not working as expected for Win32…
February 26th, 2008 at 7:45 am
[…] already talked about the lack of refactoring tools for Delphi. Visual Studio, on the other hand, has two big things going for it here. #1, it has a handful of […]