Friday, May 7, 2010

Goodbye, VB

I have known you since we were both pups, clicking away on my Commodore 64, one key at a time. (And who doesn't love the GOTO command?? So efficient!)

We spent hours creating silly applications in high school programming class on those cheezy Apple computers.

Sure, I got friendly with C++ in college on that horrid Sun Microsystems server, but you paid the bills when that psych major needed a windows application written for his senior thesis, and when those professors called at 10pm asking for help reformatting their manuscripts with Word Perfect for DOS macros.

You were reborn with new utility in Microsoft Office VBA, where I used you to help a company write some insane macros to help run their business. You also shined when I used you in the customization tools for Solomon IV, back in the day when we were both new to ERP.

Together we went on to build n-tier distributed web applications, eCommerce integrations, and custom desktop apps. When I came back to the Dynamics GP world after many years, your last classic version and I were reunited with VB 6 eConnect integrations that processed thousands of transactions faster than your newer .NET incarnation.

I then held your hand patiently as you shuffled along in GP's Modifier with VBA, and you occasionally stumbled or mumbled. And I held my nose as I watched you stuffed unceremoniously in that horrible VB Script window in Integration Manager, with no debugger, no syntax highlighting, and no Intellisense. The shame!

I finally, belatedly, met the new you after your .NET makeover, enjoying your new neighborhood of the .NET Framework, while still enjoying the familiarity of your friendly With and ReDim statements.

But a funny thing happened. A friend said that there was something about C# that just seemed to make it easier to read. Silly!, said I in retort. How could I possibly code faster or more efficiently or with more ease than with my pal, my buddy, my coding accomplice, good old VB.

I knew C++ and C# syntax, but why bother? They couldn't be better, just different. Just to show them, I dabbled in C#, writing a small GP VS Tools AddIn. What's the big deal? Sure, it works, but look how long it took me to remember to stop typing Dim and put the variable type in front! And seriously, semicolons are like white on white spread collars and bell bottoms! Every line? Can you not tell when a command ends?? Seriously???

So I tried another project, again to prove that there really was no difference. And then another.

And that's when things got really weird. When I came back to visit you to maintain some older code, things just didn't look right.

Sometimes your compiler let me leave off parentheses after a method, and other times it would add them on for me. Methods and properties became hazy. And why were your class constructors so odd? And then your code suddenly started to look messy, with all of those Dim and End If and As statements. It seemed like you had changed, or perhaps you just suddenly looked older to me.

Really it was me. After taking the red pill, things just weren't the same. Your code that was once simple and clear to me seemed convoluted and cluttered. C#, to my surprise, did seem cleaner and easier to read. It seemed more consistent and now made more sense. My cluttered code became simpler, more logical, cleaner, more efficient. Thinking in C# seemed to produce better classes, methods, and functions. Projects were being completed faster than I anticipated, with more code re-use and consistency across projects. Probably alot of coincidences, but it seems that my friend was right--there is a difference.

And then I noticed that you have been subjugated to the "Other Languages" option in Visual Studio 2008, which made me sad, but was perhaps another sign. And now I must move forward, alas, and leave you behind.

You've served me well, so I don't know what to say. I'm sure I'll be seeing you occasionally in code maintained for a few more years. And so I say goodbye, for now...

Coming soon! V++B#!

2 comments:

  1. One of the great blog postings. I hope this is in your favorites list.

    ReplyDelete
  2. Steve,

    Thats an entertaining post :)

    ReplyDelete