This is a vitally serious subject for the future of programming. The Professionals meets Mission Impossible ?
Class Modules and Properties in VB5 and beyond (for all the Office 97 tools and standalone VB5 and 6) give you encapsulation, multiple instantiation of objects with proper object identity and a useful object browser. It's true that there is no class inheritance (implementation inheritance).
Now VB sure ain't uniform like Smalltalk - but the great news is that it's less strongly typed than Java - I trust that really encourages many of the people around here. ;-)
RefactorMercilessly most definitely can and must be done in VB. But we find the lack of uniformity and internal simplicity in VB makes it far more difficult for many of us to conceive the most simple thing for DoTheSimplestThingThatCouldPossiblyWork. This is a vital cognitive issue to have a grasp of, not just for future language and tool designers but for current XP coaches.
Familiarity with any language and environment does I believe matter a lot for DoTheSimplestThingThatCouldPossiblyWork to lead to dramatic C3 type results. What does the panel think on that ?
Familiarity with VBA and VB is a much longer and tougher road to travel. Yet the rapid feedback factor with VBA in Excel, say, can still be used to great advantage once the team knows its way around.
I think there is no difference here between Visual Basic and any other language. If you refactor your code to make any action occur in as few places (classes, functions, or even macros) as possible, it is not a big deal to change functionality and therefore the design. I have really loved my own unit tests in this respect. I can copy whole pieces of functionality (mostly classes, but single functions and subs as well) to a new application and immediately see if it works. This way, programming becomes more "assembling pieces together" instead of "building everything from scratch". In fact, you library of functions and classes grows along with your needs. -- WillemBogaerts
It would be fairly easy to develop a refactoring browser for VB, altho it might be considerably weaker than the Smalltalk one. Also something like the KentBeck testing framework, altho the one that Rational sells might do the trick. One difficulty might be following the OnceAndOnlyOnce rule without implementation inheritance [VbDotNet has this]. Interfaces-only can give a decent object model, but seems to lead to a lot of cutting-and-pasting.
For those interested the VbUnit TestingFramework is available. -BradTaylor
I believe that it should not take very long for XP to become a key influence on the standard way of writing business software. Big M might not be so slow to respond to this, given the trends outlined in books like CodeComplete, and VB is indeed their development flagship, at least while a clean-room Java and JVM is still blocked by the courts. But it's certainly possible to be wrong on the timing of perfectly rational trends. -- RichardDrake
Anyway, you don't need a tool to refactor. I've done heavy refactoring in C++, and was refactoring Smalltalk programs for half-a-dozen years before having a refactoring browser. The main requirement for refactoring is a nose (to detect CodeSmells) and a mind. A specialized browser is very useful, but not essential. --RalphJohnson
Working with accountants tied to an external reporting driven closing cycle almost demands ExtremeProgramming techniques. First version can speed up the closing cycle, while later version either speed it up even more or improve the efficiency or maintainability of the code. When the programmer decides to RefactorMercilessly, non-programmers can maintain portions of the code where magic numbers (spreadsheet coordinate references) are involved. -- ScottHamilton
This is a group of people making a good stab at ExtremeProgramming in VbClassic and VisualBasicForApplications, using VbLiteUnit as a UnitTesting tool.
Question about "When to clone a method" moved to CloneMethod.
This page mirrored in ExtremeProgrammingRoadmap as of April 29, 2006