Datasheet

This is a problem with the developer rather than Visual Basic. The development environment gives you
the tools you need to build a good or bad interface. It’s up to the developer to learn how to use the tools
wisely. The fact that it’s more difficult to build GUIs in some other languages may force developers to
spend more time on design, but that’s time you should spend no matter what language you are using.
Verbosity
Many C++ and C# developers think Visual Basic is too verbose and that code is easier to read and write
if it doesn’t include as many characters. Though Visual Basic does require more typing, it is also more
self-documenting. If the goal were to write programs as tersely as possible, all developers would use
assembly code. Only a tiny part of application development is spent actually typing code. Far more time
is spent reading code and looking for bugs.
In any case, Visual Studio’s excellent IntelliSense makes it unnecessary for programmers to type out
most class, variable, property, and method names in their entirety. Usually, you only need to type a few
characters. If Visual Studio can figure out what choices might match (as when you’re accessing an
object’s properties), it provides a list. If you’re starting a new line, you can press Ctrl+spacebar to get a
list of possible matches. Then you can quickly select one without additional typing.
I teach introductory Visual Basic courses where I always stress IntelliSense and, after a few weeks with
the students, Ctrl+spacebar. It’s particularly effective if you name controls and variables consistently.
For a text box, type txt and press Ctrl+spacebar to get a short list of the available choices. After a few
weeks, the students become experts at using Ctrl+spacebar.
Power and Flexibility
Probably the silliest disadvantage to Visual Basic (but perhaps the one that has the most impact on
developers) is the perception that Visual Basic is less powerful than Java, C++, and C#. Although those
languages are more difficult to learn, they are not significantly more powerful. They all run on the same
hardware and can all do more or less whatever the hardware supports. In fact, C# and Visual Basic are
practically identical, aside from their syntactic differences.
The fact that many pre-.NET Visual Basic developers were self-taught and that many came to Visual
Basic via Visual Basic for Applications (VBA) makes Visual Basic seem more ordinary to many man-
agers, and lends an extra mystique to Java, C++, and C#.
Salaries for Java, C++, and C# programmers also tend to be higher than those of Visual Basic develop-
ers. This is probably partly because of the perception that those languages are more powerful, the fact
that they are more difficult, and the fact that there are far more Visual Basic developers available in the
job marketplace.
All of these facts sometimes lead management to prefer those languages to Visual Basic, although there
really isn’t much justification on the basis of power or flexibility.
Advantages
Visual Basic does have some legitimate disadvantages, but it has many advantages as well. The follow-
ing sections describe some of the most important advantages Visual Basic has over other common pro-
gramming languages.
9
Chapter 1: Language Selection
05_053416 ch01.qxd 1/2/07 6:28 PM Page 9