VB - yesterday, today and tomorrow!

VB - yesterday, today and tomorrow!

  • Comments 72

A couple of weeks ago, I was doing a couple of on-line chat sessions with our worldwide MVPs.  This was the first time I was doing one of these sessions and going in I wasn’t sure how effective or productive such sessions would be.  It was incredible to see the level of participation and questions that kept flowing in non-stop for the 2 hours that I did this.  Clearly, there is a lot of enthusiasm for people to have a 2-way dialog with us that I really enjoyed and appreciate.  I am actually waiting for when I get my next opportunity to do one of these sessions.

 

A couple of the people in that session had some questions for me around our commitment to VB in the .NET world.  I was a little surprised by these questions.  That made me think more and I wanted to share with you my thoughts on this.

 

When I’m with VB developers, I hear things like “all the samples are in C#”, and when I’m with C# developers, I hear “VB At the Movies, the VB Power Pack – what about us?” I guess we must be doing something right J.

 

Getting back to the question though, let me talk about how serious we are about Visual Basic – we’re 120% committed to the language and the product not just today but for a long, long, long time to come, as we have been in the last decade now.  I know that when we moved from VB6 to VB.NET, we broke compatibility and that is a sore point with some of our developer customers.  It was a huge decision that we did not take lightly at that time.  The trade-off clearly was making a leapfrog jump in innovation as we moved to the .NET platform versus ensuring full compatibility.  We are bringing back some of the features that our VB developers have come to love like Edit and Continue in Visual Studio 2005.  Nevertheless, I do understand that people need to go through a migration process to make the jump from VB6 to VB.Net.  We have provided a variety of things including migration wizards, prescriptive guidance, etc. to make the migration simpler and will continue doing more here.

 

Today, we have well over 100 people in my division devoted to Visual Basic (program management, dev, test, user education, support). VB, by using the .NET framework, gets great performance, and we have a number of customer success stories including Seattle Avionics, Stampin’ Up!, Analog Devices (ADI), Ontario Air Ambulance, Delaware Department of Education, Partnership for Strong Families and many more.  We know you’ve noticed because we’ve seen a substantial increase in the number of you using Visual Basic .NET over the last year.

 

I think that some of the questioning comes because many Microsoft employees with blogs show code in C#, and the framework, as originally shipped, was largely written in C#. Well – we’ve said all along that you get to make the language choice for targeting the .NET platform - if you are a VB developer, VB.NET is absolutely a great choice.  Here at Microsoft, we do the same thing. While many of our product developers are C++ developers and now code in C++ and C#, our internal systems have typically been written in VB6, and now are being written in VB.NET. In fact, some of our core applications which are used to manage our personnel, office space and annual performance reviews, are Windows Forms applications written in Visual Basic on the .NET platform.

 

But it goes further than that. In Visual Studio 2005, we’re using VB for some of the framework classes, and there are portions of the VS IDE written in VB. Bet you can’t guess which ones from the beta J. You see, we really do mean it when we suggest you pick the language that you’re most comfortable with – that’s what we’ve done internally and VB is absolutely a core part of our bet and strategy.

 

For another take on this issue, check out Paul Vick’s blog article: The “Native” .NET Language?

 

Namaste!

 

Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
  • You know why this is so sad and frustrating to hear?

    I consider myself an open-minded developer and feel comfortable writing in several languages. I am SURROUNDED by developers at work who would continue using VB3 if our manager would let them. You know the kind, the "if it ain't broke, don't fix it" kind of people. Mind you, people that work in I.T. thinking like that - which just boggles my mind.. In a career where things change every 6 months.. they hate change!!

    Can you imagine in the year 2004, a duh-veloper setting up a BRAND NEW file download with a vendor using a flat-file format (as in, fixed width or delimited? When both sides are VB6? No XML.. In fact, I got one guy who goes on and on about how XML is a fad and that the tried-and-true mainframe formats "just work".. yeah, after you write a "write-once-use-once" parser for this PARTICULAR download. ugh.


    Anyhow, I pushed hard with my manager to adopt C#. Here are some points:

    PROS:
    - If developers are thrown into something new, it will force them to learn the "right" way to do things - no falling into old habits.
    - C# has very few "assumptions", you have to spell everything out (curly braces, semi-colons, array bounds, etc)
    - There seems to be a LOT more help and samples in C# (both with MS and on Usenet)

    CONS:
    - All the opposites of the above obviously.
    - There will be a learning curve (but there will ALREADY be a learning curve because VB.NET is different enough from VB6)

    So - alas, he didn't buy it. So now we have "point 'n click" developers (you know the kind, that started from excel formulas, then wrote a department Access database and are now VB developers) that are doing the same bad coding, because VB.NET lets them get away with it.

    In general, I have always been really turned off by VB because A) it was so loosely typed (use of variants - EVERYWHERE!!) and B) because of assumptions..

    For example - right now, off the top of your head.. when you declare an array in VB6, is it 1-based or 0-based? What about an enum, if you don't declare it?? Not sure? Neither am I - and I spent several hours debugging an app one day because I thought one thing (I assumed) and the program was doing something different.. (one or both of those used to be/is 1-based... I hope I'm thinking of the right thing?)

    Point is, "assumptions are the root of most all software bugs" is what I always say. And with C# - there is just no assuming anything. Yes, you have have to type a little bit more - but it's for the greater good. It's for the good of the developer that will be modifying your code 2 years from now.

    (sigh) This post made me so sad.. I wish VB would just go away, technically, it just propagates laziness and shortcutting.. which for software development.. that just shouldn't be tolerated.

    But I know VB is here to stay, I think I've accepted it now. :-)

  • To tell the truth, drebin, your post was sad and frustrating for me to hear. :-) I feel that people trash VB.net simply because VB6- was a 2nd class language. I agree that arrays in VB are a bit strange: dim foo(6) gives you a zero based array of length 7! But every language has its quirks, you just deal with them. Bad code can be written in any language.

    VB.net gives you all the benifits of .net, like 1st class threading, a good event model, good exception model, and a great set of base classes.

    My language of the heart is and probably always will be C++. But when I don't need MC++'s power for easy IJW access to Win32 or direct access to the data, I choose VB.net.

    Personally I don't see any reason for c# to exist and am very happy that MS is not blindy pushing it.
  • Best quote I've seen today: "Bad code can be written in any language" - nice!! :-)

    I agree, VB.NET is *MUCH* better than VB6, but there are many things I still don't like. VB.NET is still very wordy (with if/end if, instead of curly braces, etc) and it doesn't "encourage" a developer to become better, it encourages them to get away with as much as possible - so long as it still compiles.

    I guess I have more of a problem with the "typical" VB developer - it's almost a lifestyle choice or something.

    And for people that don't like C# - how can not LOVE the simplicity and clarity of semi-colons and curly braces!! There is just nothing to assume or explain - it's just so clear (for me).. :-)
  • One word: Reflector
  • Isnt that the point, that you choose the .Net language that is right for you, as they are of equal power?

    Kind of makes VB.Net bashing pointless, dont you think?
  • Well, curly braces don't tell you what you are enclosing at first sight. If you are in the process of looking at someone else's code, End If and End With makes for better readability.
  • i agree with qwerty's comments, VB.Net is being bashed because of its predecessor VB6. but i think the team did a great job of cleaning out the weird or stupid things that made VB developers write bad code. and with option strict/explicit its 100 times easier to find mistakes in code. my personal policy is to always have it on, i even use option explicit when i'm writing a quick VBS program. but these options aren't required, of course, so people can still do non-obvious things.

    of interesting note, while VB might be more verbose, which uses more lines of code? out of the box C# puts curly braces on their own lines adding an extra line per block. neither is bad, just unique to the language.
  • Will the circle be unbroken...
  • > portions of the VS IDE written in VB

    None of the C# Express assemblies reference the VB runtime libraries - so I suspect C# Express doesn't contain the portions written in VB.

    What did surprise me was the vast number of assemblies that were managed. Many more than in VS.Net 2003.
  • I'm not sure converting all VB developers to C# will make the world a better place to program. C# does not define how to program, how to naming variables and functions or how to split your code up layers, objects etc. I think the problem is not the VB.Net language itself, but the lack of "strict programming policy". drebin, I believe the best way to control programmers (and yes, I'm a VB programmer myself (v1.0->.Net) are to tell them that this is our coding standard (naming convention, not rules etc) and that you have to follow it!
  • ArildE,

    That's all well and good in an academic setting - but in the real world, if you've seen the truly horrible.. I mean REALLY bad code that I have.. you'd see there is not hope.

    So for the bad VB developers (the "point-n-click developers" as they are called) - I was sort of hoping VB.NET would thin the herd. Maybe it would be too hard to learn, and then they would go do something else half-assed for a living.. but Microsoft made it too easy and they are migrating!!

    Mgmt asked me and a coworker to come up with some standards and conventions.. we ran them by everyone and published it to the all the developers.. we got a bunch of "yes's" - and to this day, no one follows it... It ends up coming across petty if you try to enforce it.

    I realize that there will always be bad developers - but VB just makes it soo easy.. it's a powerful language that almost encourages people to take shortcuts (which is good for MS, bad for companies).. like the Option Explicit/Strict thing.. In what other language do you not have to declare variables?!! Alright, there are a couple - but those are curly brace languages (so that makes it better somehow?).. Anyhow... :-)
  • Oh yeah. I have seen truly horrible VB code many times (including some of my own “ancient” code) and I have also introduced code standards that no one (except me) would use. I have also heard about R&D department managers that talk big about their code standards and in the same sentence (almost proudly) mention that they don’t use it.
    I can see your point in switching to C# (or any other language for that matter), but without any guidance on how to make good code, a bad developer will more or less stay bad. In the big picture, bad code is made because of ignorance and/or attitude. Since producing readable, maintainable and bug free code is actually a part of a company’s face to the world, it should be taken more seriously by both management and developers. Why make e.g. a coding standard if its usage is “optional”? To push things to extremes, it should be: “Use it or you’re fired!” (I don’t mean that programmers should be “dictated” how to program, but some basic rules should be mandatory)
  • To be honest if you have 'pont and click' developers in your team I'd wonder about your companie's recruitment policy. All the developers I work with are professional VB developers who have been involved in enterprise aplication writing for at least a couple of years.

    As for curly braces...oh...when will people understand. I've seen a lot of ex-BCPL coders who transferred to C++ writing a hell of a lot of messy code. The good C++ code-monkeys write good code, the good VB code monkeys write good code, the bad of both brands write nausea-inducing code...The good workman does not give all the credit to his/her tools!

  • Ooops type in 'company's' I'm not illiterate you know! ;o>
Page 1 of 5 (72 items) 12345