Why I Love Visual Basic 2008

All the "professional" programmers who don't work for Microsoft will laugh me to scorn on this one. "Don't you know C++ is the most powerful language in the Universe?" "Don't you know you want Java for anything web based?" "You can't do CGI without Perl!" You know what? Screw you guys, you're morons.



Do I know other languages?

I was a professional programmer from 1984 to 1992 and 2004-2006. I started studying programming at CMU in 1980, doing Pascal on a Decsystem KL-20. I've owned everything from a Commodore Vic-20 hooked to a TV (2.5 KB of RAM), to Dell desktops with flat-screen monitors and multiple USB 2.0 ports (2.0 GB of RAM). I've written software in the following languages:

LanguageVersions
AdaGNAT
Algol-60Decsystem-10 Algol-60
AssemblerASM (PC)
Debug (PC)
Macro 11 (PDP-11)
VAX Macro (VAX 750, 780)
BasicAPBasic
Chipmunk Basic for Mac
Commodore 64 Basic
DEC Basic for RSX-11M
EBasic
Envelop
FreeBasic
Honeywell GCOS Basic
GWBasic
Just Basic
MaxBasic
QBasic
QuickBasic
TI 99-4/A Basic
TSRBasic
VAX Basic
Vic-20 Basic
Visual Basic 6
Visual Basic.Net
VB 2003
VB 2005 Express
VB 2008 Express
VB 2010 Express
VBA
XBasic
XBLite
C and C++Bloodshed Dev-C++
Borland C/C++
Leonardo
LCC-Win32
MingW-32 C
Mix Power C
Pelles C
Small C
COBOLDecSystem-10 COBOL
Microfocus COBOL
VAX COBOL
CORAL-66VAX Coral
FortranDEC Fortran IV
DEC Fortran-77 for RSX-11M
F
G95
Salford Fortran-95
VAX Fortran
WATFOR
HTML-CSS-Javascript(Windows)
JavaEclipse
J++
Modula-2Shareware Modula-2 for DOS
PascalBloodshed Dev-Pascal
Borland Delphi
DecSystem-20 Pascal
Free Pascal
SURPASS
Turbo Pascal 1.0
Turbo Pascal 3.0
Turbo Pascal 5.0
Turbo Pascal 5.5
PIL (Pitt Interpretive Language)Decsystem-10 PIL
Simula-67Decsystem-10 Simula
Snobol-4Decsystem-10 Snobol
VBScript(Windows)

Although I have to admit I've only used Macro-11, VAX Macro, Dec Basic, Fortran IV, Fortran-77, COBOL, and HTML-CSS-Javascript professionally.



What's wrong with the other languages

In brief:

LanguageWhy It Sucks
AdaOnly the Defense Department uses this. It's a compromise language. 'Nuff said.
Algol-60Not a bad language in and of itself, but obsolete and hard to get.
AssemblerNo programmer in his or her right mind would write software in assembler if they didn't absolutely have to. It's like using an abacus when you could be using a calculator with transcendental functions. Strictly for masochists.
C and C++Unreadable code. Sorry. I don't want to have to learn to "think in C." I prefer a language where I can concentrate on the details of the PROBLEM, not the details of the LANGUAGE. C and C++ are basically just a way for programmers to show each other how cool they are and what weird, unreadable code they can write. Look, I can hack the Pentagon in 15 characters! Yeah, but nobody can tell how the hell you did it.
COBOLTedious, suitable only when writing for businessmen or other hard-core non-programmers.
CORAL-66Specialized and almost unknown outside England.
FortranActually, Fortran is a pretty cool language, however the C and Pascal geeks may sneer at it. For sheer maniacal calculating speed, nothing beats Fortran. Period. I just like VB 2008 slightly better.
HTML-CSS-JavascriptJavascript only comes in interpreters, not compilers. It is inherently slow. Verbose, too.
JavaSee Javascript.
Modula-2Like Pascal, but more verbose.
PascalDecent, but verbose, and leaving out the exponentiation operator is just stupid. Same comments for C, Java, Javascript, and any other language where some idiot thought it would be cute to have to write

Y := exp(2 * ln(X));

or

Y = pow(X, 2);

instead of

Y = X^2

I mean, good grief, people, how hard is it to include a bloody exponentiation operator? Fortran had one back in 1957!
PERLSee C/C++. Unreadable, hard-to-maintain code again. And it's interpreted, not compiled. Slow.
PIL (Pitt Interpretive Language)Limited, and I think only one copy of the compiler exists.
Simula-67Okay, so you can write "coroutines" instead of "subroutines" and they can call each other back and forth. Whoop te do.
Snobol-4Great if you want to write telephone books. Not good for much else, though.
VBScriptInterpreted, thus inherently slow. See Javascript.



Why Visual Basic 2008 Rocks

1

It's free. Did you hear that? It's FREE. Download it off the internet. Complete compiler, integrated development environment, libraries out the wazoo, the whole schmear, and you pay THE COST OF THE ELECTRONS TO DOWNLOAD IT.

Salford Fortran-95 is a great language, if you want power, speed, and elegance. It costs $600. See the difference?

2

VB can produce executables for the .NET framework. Cool enough. It can produce native Windows apps. Cooler still. It can even produce console apps, if it's sheer speed you're after, for a numerical simulation or something. Talk about versatile. Want to do that with Power Basic? You need to buy two separate compilers. Screw you, Power Basic. Go Microsoft!

3

It's fully object-oriented, which is good if you like designing classes. Classes can sure help; I use them a lot. But you can also TOTALLY FREAKIN' IGNORE the object-oriented aspects if you like, and your programs will still run fine. YOUR CHOICE--not the compiler designer's. I love that.

4

The GUI rocks. An unbelievable variety of prewritten controls are available. The datagridview control is in and of itself a good reason to get this language. Want to present something in the form of a table? Use a dgv. Simple. Easy.

Want to access a file--or several files? Built-in Windows file dialogs. Let the user change colors? Built-in Windows color dialogs. And more. And more. It just does so much stuff for you it's incredible. No reinventing the wheel. Talk about Rapid Application Development! VB is it!

5

The editor rocks. "Intellisense" completes stuff for you and gives you the available options--not just for VB intrinsics, but for classes you just wrote yourself a minute ago! When it gets annoying, you can turn it off.

Syntax is highlighted in different colors. Different routines are automatically offset with horizontal lines--a feature you can turn off if you don't like it.

It will "pretty-print" stuff as you write, aligning everything at the proper tab stop--another feature you can turn off if you don't like it.

It will fill in things for you--and yes, again, you can turn that feature off if you want. But I find it very, very pleasant to write

    Pu[Tab] Pr[Tab] X As Dou[Tab][Enter]

and have the VB code editor automatically expand this to

    Public Property X() As Double
        Get

        End Get
        Set(ByVal value As Double)

        End Set
    End Property

6

The code is unbelievably powerful and compact WITHOUT BEING UNREADABLE. Do loops, for loops, while loops. Every common math operator including exponentiation, plus those cool +=, -= etc. things from C++.

Want to see what I mean by compact? Suppose you're writing an atmosphere simulation with twenty levels. You want to initialize a bunch of properties for each layer: specific heat at constant pressure cp, mass m, pressure P, initial temperature T, etc.

With an old language, even one with structured variables, you'd have to write something like:

    For i = 1 to 20
        Layer(i).cp = 1007.0#
        Layer(i).m = LayerMass
        Layer(i).P = Layer(i).m * EarthArea / g
        Layer(i).T = 254.0#
    Next i

Well, in VB 2008, you can make this:

    For i = 1 to 20
        With Layer(i)
            .cp = 1007.0#
            .m = LayerMass
            .P = .m * EarthArea / g
            .T = 254.0#
        End With
    Next

Nice, wouldn't you say? And maybe a bit easier to read?



VB 2008 Drawbacks

Does VB 2008 have drawbacks? Sure it does. First of all, the help system sucks. It's hard to figure out how to install the help files to disk. If you get help online, it takes forever to come up. And it's not very helpful when it does.

But you know what? If you have internet access, you can find out anything you want about VB by typing it into Google. Every aspect you can think of has been discussed on the web, and I don't mean just by Microsoft. There are free tutorials, forum questions and answers, etc. Easy to find, easy to use.

Another drawback is that "intellisense" can be pretty annoying when you're trying to change more than one line of code. Use the arrow keys and it will scroll the goddam intellisense list of options, not the editor screen. You have to hit [Esc] to move around, sometimes more than once. I put up with it only because it's marginally less annoying that continually switching intellisense on and off.

Some bunch of bloody morons at Microsoft decided to eliminate all the preset print routines VB used to have. You can't just print to the printer any more; you have to set up an incredibly elaborate series of hand-written routines to control every aspect of how the printer operates. A total pain in the butt. Gives you very powerful control of the printer, but hey, geniuses, sometimes I JUST WANT TO FREAKIN' PRINT SOME TEXT, okay? I wish I knew who had come up with this idea so I could slash his tires.

The immediate window is gone, so you can't just use VB as a calculator the way you can with nearly any other kind of Basic. There is an "output window" so you can use "debug.print" and so on, but that's no substitute. For this reason, and this reason alone, I keep a copy of Just Basic available. Plus I wrote a super-calculator of my own called Expressions. In VB, of course...



Conclusion

But all in all, I find myself using VB for nearly everything. I simply don't need any other compilers. I don't need C, I don't need Pascal, I don't need Java. I don't even need Fortran, nice though Fortran is for number-crunching. VB is it. My favorite language. Period.



Page created:07/19/2010
Last modified:  02/14/2011
Author:BPL