June 2014

Volume 29 Number 6

Don't Get Me Started : VB6 and the Art of the Knuckleball

David Platt | June 2014

David PlattTwo years ago in this column I wrote about the astonishing longevity of Visual Basic 6 (msdn.microsoft.com/magazine/jj133828). I got more comments on that column than anything I’ve ever written—145 at last count and still arriving as I write these words. Clearly, I touched some very strong feelings.

I’ve often wondered at the staying power of Visual Basic 6 (VB6). A student of mine once called VB6 the “unkillable cockroach” of the Windows ecosystem. So when I heard a Boston sports announcer comment on the 17-year career of a beloved Red Sox knuckleball pitcher and say, “After the apocalypse, all we’ll have left is cockroaches and Tim Wakefield,” it hit me: VB6 is like a knuckleball.

The knuckleball is a tricky pitch in American baseball. Unlike a fastball, which speeds past batters before they can swing, the slower knuckleball confounds opponents by fluttering and dancing randomly through the air. The pitcher throws the ball with almost no spin, holding it in his fingernails and pushing it forward (see bit.ly/1jDB3a4). The motion puts much less stress on the arm than other pitches. The few pitchers to master the knuckleball have enjoyed much longer careers than their fireball-throwing counterparts. VB6 is like that. Its simplicity subjects programmers to less stress, resulting in longer careers.

The analogy gets better. Many, perhaps most, fastball pitchers consider the knuckleball unsporting, a circus stunt unworthy of a “real pitcher.” Check out the comments from my first VB6 column, and you can see this meme at work: “VB6 is a toy, not a real programming language, and people who use it are not real programmers.” I once said the same thing myself, back in my C++ COM days, for which I now apologize.

You can rarely complete a major project using only VB6. While many programming operations are far easier in VB6 than in raw C++, other operations (background threads, say) are essentially impossible. My rule of thumb for VB6 development has always been, “If you can’t do it in 10 minutes, you can’t do it at all.” I always advise VB6 development teams that they need one C++ programmer to write COM objects to accomplish the few operations that Visual Basic can’t.

Similarly, a knuckleball pitcher needs to throw fastballs about 20 percent of the time to keep hitters honest, especially with runners on third base, where a passed ball can score a run. Catchers often struggle with the hard-to-catch knuckleball (as Bob Uecker famously observed, “The way to catch a knuckleball is to wait until it stops rolling and then pick it up.”).

I’ve never met anyone who majored in computer science intending to become a VB6 programmer. Most of the VB6 guys I know started as subject matter experts, learning Visual Basic as the easiest way to start computerizing their problem domain knowledge. Similarly, few pitchers start their careers throwing the knuckleball. Blogger Peter Duffy writes that most start throwing it when they can’t perform as conventional pitchers, “out of desperation; a way to salvage what is left of a lifelong dream.” (bit.ly/1lazWvS)

When a knuckleball works, it’s unhittable. But if the pitcher’s fingernail slips and the pitch doesn’t dance, he’s toast. The ball sort of hangs slowly in front of the batter and gets smacked out of the park. Likewise, VB6 is great when it works. But it’s hard to debug when it seriously breaks because you can’t see under the hood (“0x80014005 — Unknown Error”).

Knuckleball pitchers and VB6 programmers share another notable trait—they stick together. The documentary film “Knuckleball!” (bit.ly/1jfv5JU) shows retired knuckleballers—Jim Bouton, Charlie Hough, Phil Niekro—helping Tim Wakefield to mentor R.A. Dickey, today’s only active big league knuckleballer. It worked: Dickey won the Cy Young Award as the National League’s best pitcher in 2012. Now Dickey is helping Red Sox AAA knuckleballer Steven Wright try to break into the major leagues this year. I find the same collegiality in the VB6 community, especially now that Microsoft isn’t driving it.

I recently taught .NET programming to some scientists, who needed to write programs for controlling their instruments. Despite my best efforts, the complexity of Windows Presentation Foundation, Model-View-ViewModel and the Microsoft .NET Framework severely distracted them from their science. I wish, and they wish, that a simpler tool existed for .NET development. I wish I could have taught them to throw a knuckleball.


David S. Platt teaches programming .NET at Harvard University Extension School and at companies all over the world. He’s the author of 11 programming books, including “Why Software Sucks” (Addison-Wesley Professional, 2006) and “Introducing Microsoft .NET” (Microsoft Press, 2002). Microsoft named him a Software Legend in 2002. He wonders whether he should tape down two of his daughter’s fingers so she learns how to count in octal. You can contact him at rollthunder.com.