The Rise and Fall of Visual Basic

After 28 years, are we are finally seeing the beginning of the end for one of the world’s most popular languages?

I have a confession to make. Before I became a respectable developer working with modern curly-bracket languages like C# and Java (and that hot mess of a platform we call JavaScript), I was a dedicated fan of the wildly popular misfit Visual Basic.

My infatuation started honestly. As a preteen I learned to program with the BASIC language. But not just any BASIC. I started off in Microsoft’s groundbreaking QuickBASIC environment on the ancient DOS operating system. I still remember writing code in white text on its cheery blue background.

For programming in 1988, QuickBASIC was magical. You could write code without clunky line numbers, catch syntax errors as you type, and launch your program straight from the development environment, no command-line nonsense required. And when you were finished, you could share your program with your friends using one of these bad boys:

Max PixelCC0

These days, QuickBASIC is just another curiosity of the distant past. Or is it? An innovative project called QB64 has created a modern QuickBASIC replica. It runs on Windows, MacOS, and Linux, with no emulator required. When you run a program in QB64, it performs a clever sleight of hand — first it translates your BASIC code into C++, and then it compiles it.

Classic VB and the Visual Era

QuickBASIC was an impressive feat for the ancient days of text-based computer systems. But the game changed when Microsoft released Windows, and catapulted PC users into a graphical world of buttons and clicks. At the same time that Microsoft released Windows 3.0 — the first version that was truly successful—they also launched Visual Basic 1.0.

Here was something entirely new. You could create buttons for your programs by drawing them on the surface of a window, like it was some kind of art canvas. To make a button do something, all you had to do was double-click it in the design environment and write some code. And you didn’t use cryptic C++ code, with piles of classes, complex memory management, and obscure calls into the Windows API. Instead, you wrote friendly-looking VB code, like a civilized person.

All the graphical pizzazz was impressive, but the real secret to VB’s success was its practicality. There was simply no other tool that a developer could use to sketch out a complete user interface and get coding as quickly as VB. And though historians love to talk about the visual part of Visual Basic, it’s signature ability had nothing to do with graphical widgets. Instead, VB became famous for a legendary feature called edit-and-continue, which allowed developers to run their programs, find problems, fix them, and then keep going with the new code. This was a sharp difference from almost every other programming environment known to humanity, which force developers to recompile their work and start over after every change.

The original Visual Basic thrived for roughly a decade. What started as a friendly environment for beginners grew into a tool that was capable enough for serious programmers. By the release of VB 6 — the last version of classic Visual Basic — it was estimated that there were ten times more coders writing in VB than in the unforgiving C++ language. And they weren’t just mocking up toy applications. Visual Basic wormed its way into company offices and even onto the web through ASP (Active Server Pages), another monstrously popular technology. Now you could create web pages that talked to VB components, called databases, and wrote HTML on the fly.

All of this happened with virtually no structure, unless you chose to create one yourself. This was the unwritten theme of Visual Basic — it gave you the freedom now that you’d regret later.

The Problem with Classic VB

Classic VB had a bad reputation in many circles. Object-oriented fanatics often complained that VB lacked support for inheritance. (It was an odd criticism, considering that inheritance is often a great way for less skilled developers to shoot themselves in the foot — exactly the sort of feature VB didn’t need.) In fact, classic VB was no object-oriented slouch. By the end of its life, it supported interfaces, polymorphism, and class libraries, all of which it borrowed from COM, a core piece of component technology that’s hardwired into every version of Windows.

The real problem with classic VB was that it was too successful. It was so effective in lowering the barriers for new programmers that literally anyone could use it. Careless newbies, bored company workers, and summer students trampled in, solving challenges that would have been much more difficult on any other platform, and spraying spaghetti code everywhere.

In other words, because VB was easy enough to use even if you weren’t a trained coder, it was used by plenty of people who weren’t trained coders. And VB did nothing to encourage them to correct their bad habits.

VB.Fred and the .NET Solution

Fast forward to 2002, and Microsoft was doing what Microsoft does best — disrupting its own developer ecosystem by introducing a completely new way of doing things.

This time, the project was a massive rearchitecting of COM, the component technology that underpinned Windows (and, indirectly, classic VB). It was a bet-the-company moment for a software megalith that had already made several such gambles.

Microsoft called this reboot .NET for a number of dubious reasons, including the fact that Internet technologies were still newish and still exciting, and because .NET included a web services feature that Microsoft was dead-set on promoting. It was heavily influenced by Java, and packed full of tools for communicating with databases, building web sites, writing multithreaded programs, making connections over sockets — pretty much every use case a business developer could imagine.

The only problem was that to get all these new features, Microsoft had to throw away almost all of classic VB.

The new version, called VB.NET, looked kind of the same, if you squinted hard. But it had plenty of breaking changes both big and small. On the big side: Old VB programs would be trapped in the old programming world, and a stunningly poor migration wizard did little to change that. On the small side: Classic VB programmers had to change the way they counted array elements. No longer could they start at 1, like ordinary people. Now they had to start at 0, like official programmers.

Also on the big side: There was no more edit-and-continue feature.

Developers are known complainers, and VB developers are a particularly complainy bunch. It wasn’t long before a group of influential VB developers had christened Microsoft’s new programming environment as VB.Fred to emphasize that, whatever it was, this new language wasn’t Visual Basic.

What Doomed Visual Basic

You might assume that the .NET changes cracked the foundation of VB and set its inevitable decline in motion. But that’s not what happened. In fact, even though VB.NET plunged off in a new direction, and made breaking changes that orphaned perfectly good classic VB code, it became massively popular. That’s because VB.NET gave something that classic VB developers never had before — respect.

In the .NET world, VB and C# were on equal footing. Every line of VB code could be translated to an equivalent line of C# code, and vice versa. Both languages had the same capabilities, used the same components, and compiled to exactly the same form (something called intermediate language). VB was finally free of the ugly duck syndrome.

But there was a problem with being just another respectable programming language. The enthusiasm that had made VB the language of choice for so many people was gone. Not because VB had changed, but because C# had.

Just as VB acquired the same power as C#, C# picked up the same conveniences as Visual Basic. For example, .NET’s type safety and memory management features meant that C# developers never needed to worry about memory leaks, just like VB developers.

In other words, C# now had the guardrails to protect hobbyists, students, and new programmers without surrendering its power. All of a sudden, VB was no longer something special. It was just another tool in a capable programmer’s toolkit.

The State of Visual Basic Today

Today, Visual Basic is in a strange position. It has roughly 0% of the mindshare among professional developers — it doesn’t even chart in professional developer surveys or show up in GitHub repositories. However, it’s still out there in the wild, holding Office macros together, powering old Access databases and ancient ASP web pages, and attracting .NET newcomers. The TIOBE index, which attempts to gauge language popularity by looking at search results, still ranks VB in the top five most talked-about languages.

But it seems that the momentum has shifted for the last time. In 2017, Microsoft announced that it would begin adding new language features to C# that might never appear in Visual Basic. The change doesn’t return VB to ugly duckling status, but it does take away some of its .NET status.

Truthfully, the trend to sideline VB has been there for years. Serious developers know that key parts of .NET are written in C#. They know that C# is the language of choice for presentations, books, courses, and developer workshops. If you want to speak VB, it won’t harm the applications you build, but it might handicap your ability to talk to other developers.

One place where Visual Basic should have had a natural fit is the educational market. But even there it remains a black sheep. Modern languages like C# and Python are now easy and safe enough for beginners to pick up as their first language. If you need something simpler for young children, the market is crowded with graphical programming tools like Scratch. And curly-bracket languages like C#, C, JavaScript, and Java also have another appeal. Because they share their syntax, a person who learns one can feel quickly at home with another.

With web development, Microsoft is staring into the void of a lost opportunity. Who wouldn’t be tempted by a version of VB that was as easy to use as VB 6, but could be compiled to JavaScript, and paired with an HTML form designer? Yes, it wouldn’t be a suitable tool for building the next Google Maps, but it could have resurrected Visual Basic’s appeal, letting business developers, students, and hobbyists create simple online apps without the clunkiness of JavaScript. Instead, Microsoft created a VB-powered product called LightSwitch that disappeared with the death of the Silverlight browser plug-in. If Microsoft builds another coding-for-the-masses product, it’s more likely to be a low-code template-driven tool like PowerApps.

Visual Basic has been threatened before. But this time feels different. It seems like the sun is finally setting on one of the world’s most popular programming languages. Even if it’s true, Visual Basic won’t disappear for decades. Instead, it will become another legacy product, an overlooked tool without a passion or a future. Whether we’ve lost something special — or finally put an old dog out of its misery — is for you to decide.

Originally published on Young Coder.

3 Responses

  1. Greg says:

    I think for a long time C# was open source while VB was not. I think maybe this was a factor in the decline of the popularity of VB. VB is so straight forward and easy to follow in comparison to C#. If Microsoft would drop VB I might would abandon .NET altogether and rely on Python. Unless Iron Python is kept updated, I might would abandon Visual Studio also. C# is like reverse Polish code or something in comparison.

    • Matthew says:

      In the past C# wasn’t open source, but it was ECMA-standardized. As you say, VB did not receive the same focus in this (or other) initiatives. It’s interesting, though, to compare which languages are easier to read than others. Some C# developers find VB hard to read because it’s so much more verbose–if you’re not used to reading all the End thises and End thats, it can take you longer to identify different block structures in VB code. But it does seem that Python is now touted as the “readable” language, which used to be VB’s claim to fame.

  2. Noel says:

    from wikipedia: In 1988, Alan Cooper created a visual programming language (code-named “Ruby”) that allowed Windows users to build “Finder”-like shells. He called it “a shell construction set.”[13] After he demonstrated Ruby to Bill Gates, Microsoft purchased it. At the time, Gates commented that the innovation would have a “profound effect”[14] on their entire product line. Microsoft decided not to release the product as a shell for users, but rather to transform it into a professional development tool for their QuickBASIC programming language called Visual Basic, which was widely used for business application development for Windows computers.

    Cooper’s dynamically installable control facility, which became famous as the “VBX” interface, was a well-known component of “Ruby”. This innovation allowed any 3rd party developer to write a widget (control) as a DLL, put it in the Visual Basic directory, and Visual Basic would find it, communicate with it, and present it to the user as a seamless part of the program. The widget would appear in the tool palette and appropriate menus, and users could incorporate it into their Visual Basic applications. The invention of the “VBX” interface created an entire new marketplace for vendors of these “dynamically installable controls.” As a result of Cooper’s work, many new software companies were able to deliver Windows software to market in the 1990s.

    The first book ever written about Visual Basic, The Waite Group’s Visual Basic How-To by Mitchell Waite, is dedicated to Alan Cooper. In his dedication, the author calls Cooper the “Father of Visual Basic.” This nickname has often served as Cooper’s one-line resume.[15]

    In 1994, Bill Gates presented Cooper with the first Windows Pioneer Award for his contributions to the software industry. During the presentation, Gates took particular note of Cooper’s innovative work creating the VBX interface.[16]

    In 1998, the SVForum honored Cooper with its Visionary Award.[17]

Leave a Reply

Your email address will not be published. Required fields are marked *