Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video



  • Youtube Video

    Today I want to talk to you about why visual basic is the worst possible programming language for your project. Okay, so first of all NIT maybe you're not aware of this, but we tend to exaggerate sometimes and okay this is one of those times.

    Visual Basic isn't actually the worst language, but it is a really bad language for your project and the reason that we get so
    adamant about it is because it's the worst language that anyone ever actually chooses. You see the problem is is that there are worse languages some people know like COBOL or Fortran or Delphi - these would all be worse than Visual Basic; like actually worse they'd be tragic. Well Fortran has some good places, but COBOL, Delphi no way. Then there's a bunch of languages that nobody knows that would probably be pretty horrific - now that the languages not that any of these languages aren't particularly bad except for COBOL: that's actually that bad. But the general problem of the languages is that they're either old or they use an archaic style or they have some major limitations or there's no implementations of them that are any good or they're really expensive and just make no sense or they lack frameworks. There's all kinds of reasons, but if you were looking at like Fourth or SmallTalk or Common Lisp these might be even worse than Visual Basic for your project - mostly because nobody knows them. You can't get support.

    Visual Basic takes a unique place it being the one language that's so awful and yet is used so often, and that's why we get so adamant about avoiding it. Because we know if we get people to avoid it they won't consider the other options that are worse and the option that someone will actually consider will be better. So that's why we get that way; not because it's actually that bad of a language. In reality Visual Basic is not a horrible language it's simply that it's not a good choice and we have an opportunity to protect you from making that bad choice.

    Real quick let's give some history. Programming languages go back to roughly 1950. Now technically there were languages before 1954 there would have to be because computers had to run, but the first real popular high-level language
    was Fortran from IBM in 1954 believe it or not. 1954 till now that's like 63 years and Fortran remains a viable language that does some good stuff. Very few people use it, but it is a good language with some benefits - especially in scientific computing. Which is what it was meant for Fortran is held up very well. In 1959 COBOL arose. COBOL was really meant for accounting and financial systems and generally is an awful language; it's design is terrible. By 1964 people who wanted to do something better and didn't want the scientific kind of mathematical complexities of Fortran started proposing a new language that was designed to make it easier to do other tasks. All the things that weren't scientific computing or accounting go for the big low-hanging fruit in the early computing. But by 1964 we wanted to do a lot of other things including work on smaller computers and different types of environments that we hadn't considered previously because, I mean, computers were new - we were doing new things. And that big language and it's the number three language of the early years unless you include Algol which was kind of important but really fell by the wayside pretty early so okay we could maybe include that in one of the granddaddy languages, but by 1964 we had our third really big language and that
    was basic beginners all-purpose symbolic instruction code basic was designed not to actually be so much of a beginner
    language but to be a more versatile language but it was intended to be used in university for learning programming.

    So it did have a bit of that beginners connotation in it for for real, but mostly I think they put that in just because they wanted to have a cool acronym. BASIC was developed at Dartmouth in 1964, as I said, so it's been around for a long time and it's gone through a lot of iterations since then. So has Fortran. Fortran today is very dissimilar to Fortran when it originally came out. BASIC in the 1980s it became the language for the personal computer space. There were other languages out there but very few got the acceptance that basic did. So we found it during the 8-bit personal computer era starting with things like the Apple two and the Commodore VIC-20 and 64 and the Ataris, the early Macs, the early Windows PC and that Windows the early DOS PCs they all had BASIC as either built in or it came with the system or was assumed that you would be using it at some point. Even through the 16-bit era with things like the Atari ST and the Commodore Amiga is still BASIC was the common language that they all use. You couldn't share applications between them - their basics were not all the same, but in this sounds terrible. But the basics were basically the same.

    BASIC is not a bad language coming from that era Microsoft Windows kind of grew up with this 8-bit and 16-bit and 32-bit and eventually 64-bit history behind it, and unlike other operating systems, for some reason, partially because Bill Gates personally was involved in early basic programming language interpreters for these platforms so there's a real tie from
    actual founders so that Microsoft started before they made operating systems they were a BASIC company. They made BASIC interpreters so they have a lot of emotional and historical ties to the language, and there's nothing wrong there, that's great that was a great place for them to start and it did really well for them. And BASIC work too great for them over the years they've always provided their own BASIC interpreters since day one.

    Now as Windows grew up they needed more and more power from basic to do the things that they needed to do to compete with new languages and new paradigms that are coming out on other platforms eventually BASIC gave way to Visual Basic which was still BASIC just with a lot more stuff added to it (and it was compiled instead of being interpreted) and made it more powerful that ran its course up to Visual Basic 6. And by the end of the Visual Basic era of the VB was as we called it was actually a pretty solid language and pretty popular and very useful, as long as you worked in the Window space and mostly if you wanted to build desktop style applications, but a lot of people wanted to do that so it was a great language for that.

    VB also branched off into the VBA family (Visual Basic for Applications) which is used by things like Microsoft Office for
    automation and VB Script which was used for things like operating system automation tasks as a replacement
    script for a shell language and VB Script also became one of the first languages used in the ASP frameworks for
    building server-side web applications.

    So VB was really important up through the later 90s coming into the 2000s. Some changes came and the big one was the
    move from traditional BASIC to the .NET family where Visual Basic became Visual Basic.NET and became one of a
    number of languages that shared the common .NET runtime. It's really big and infamous sibling is C#.

    Now BASIC does just fine and can do more or less everything the C# can, but a bunch of things have changed over the
    years. And BASIC has sort of become left behind. So it starts around 2001 to 2002, we started to diverge from where
    basic makes sense for a lot of internal bespoke software development projects. So this is kind of a big era for Microsoft
    and Microsoft themselves are part of the ones distancing themselves from BASIC. This is not, you know, the IT industry is
    not trying to leave Microsoft behind. Microsoft is with us here: they want VB to go away. They [Microsoft] don't hate it and they are kind of emotionally tied to it and they kind of wish it would drag along, but they also know it's expensive for them to support. And if they could get rid of it their lives would be a little bit easier. VB is no longer providing any real benefits to Microsoft as a company, or to their customers so Microsoft would like it if it just went away and they could focus on C# and some of the other languages that they have like F#, which is also an excellent language that runs on the common .NET runtime.

    So one of the things we want to talk about is what makes BASIC different. One of those big things is that when it was originally designed it was based off of Fortran. Fortran had an early syntax that's a little bit on the weak side and didn't have the benefit of years and decades of language research to make something that was a lot smarter and easier to use.
    Fortran syntax tends to be a little bit archaic: it's great for its era. It was the best of its era it led the charge in making modern software and operating systems and programming languages. So we can't fault Fortran in any way. Fortran did an amazing job.

    COBOL came after it and didn't learn from it. They didn't learn anything from it. COBOL is a train wreck of syntax. BASIC, when they came out said well let's go back and look at Fortran and make something that mostly mimics Fortran when it can and when it makes sense, and they did and that worked. So if you have programmed in Fortran it is easy to move to BASIC or vice versa. They share a common background syntax in a lot of ways.

    Now over time that entire syntax family, the Fortran - BASIC family is now considered "archaic", and it's really clunky in the
    modern world. The big thing that replaced it was the C family in the late 1960s. C is a programming language takes a
    completely different approach to syntax and uses a lot of parentheses and brackets and it's a little bit more programming language looking, but it's a lot more modern and if you spend time actually programming it tends to be a lot more readable and useful - you're spending less time staring at the screen trying to figure out what it does and a lot less time scrolling around because of just a lot of text sprawling on the screen. The C family of syntax ended up, over time, waiting it out; it took a long time the 70s and 80s still had the Fortran basic world with heavy influence, but C just became more and more popular. Especially as more other languages began to grow off of it. We can get into some historical context there about
    languages about how C gave birth to C# and Objective-C ins and C++ and Java and eventually, in some ways, JavaScript and a lot of other things just all came from the C family.

    That general modernization of the language of programming languages took over and we now see basic as a throwback. It's a bit of a vestige. It has just hung on. That's kind of the basics. That's why C# is seen as so much better than Visual Basic, even though they both run on the common .NET framework and have the opportunity to use the same modules. C# is not technically more powerful than VB, but it is more expressive, and easier to pass on to someone else to maintain than VB. And that's where things get really important; so the reasons that VB are not considered great is that it no longer has any benefits with up until VB6.

    VB was unique in what it offered so basic was really really important you just couldn't turn to someone else and get to the VB advantages. You could use some tools like Delphi and thing which is based on Pascal and get a lot of the VB advantages, but it never got to the same level. VB was the king of making desktop applications in the Windows world for a
    very long time, but once C# was brought in. And so C# wasn't just brought in to potentially replace VB and run alongside it. Microsoft in the .NET world leads with C#, and this is where they do their development. This is where they do their research first. Everything is done around C# and then copied to VB or copied to F# and so forth. All of the real effort goes into C# and of course they make everything available for vBV.NET, but it is still a second class citizen. They push C# as their agenda and have since day one of having .NET in C#.

    Living in the Microsoft world makes us need to make the shift to C#. This is not a new thing. This is more than a decade and a half old. We've had lots of time for the world to adjust to this. It is time for people who have been working in this
    space to look to C#; if you need to stay in the completely Microsoft world your languages for the last 15 years have been C# and F#. Some other ones have come and gone like Microsoft's own Java platform, J#, which was not very popular and did notdo very well and made very little sense because it was basically a really weird copy of C# that no one understood. That's gone but VB.NET needs to go away like that too and is really only maintained for legacy support and it's important to understand that. That's why you see so much of it still today is that there's loads of VB.NET code floating around out there. Microsoft can't just abandon it and stop supporting it and stop updating it, because there's a lot of companies that
    are invested in it and need to keep it going. And that makes perfect sense for Microsoft. We're not discussing whether
    or not you should keep maintaining your VB.NET code, of course you probably should unless it's awful. As long as it
    works and does what you need, keep maintaining it. That's completely logical, but if you're going to be building something new, if you're going to be building a new bespoke application or a new internal application that you have control of those languages, never deploy it on VB. It's time to move past that.

    C# allows your developers to move faster to be more expressive they get their ideas across more quickly to the computer and more quickly to each other and it is easier to get better. People who are providing support, and this is one of the biggest things that people don't understand when we say stop using VB, it's because of the the human interactions and the ecosystem around it. There's a bunch of key factors that have changed in the 1990s. You could get really good at Visual Basic developers, in fact a lot of the best people who were into the desktop space were working on VB, so if you wanted the people who are most passionate about those things that's how you get them is by using VB four, five, and six. By the
    .NET era that had changed. Passionate Microsoft developers have primarily started to move to C# and some of the other languages today. C# and F# over time that became more and more and now we are two or three generations of developers into the C# and F# eras. So we no longereven have the first generation of whatwere the early adopters into Microsoft's
    new way of doing things. We are well established that the people that we deal with today going into C# they're mentors were mentored by people who did C# natively and didn't come from the VB era.

    The COBOL Effect

    So we have this ecosystem of C# and F# being where the serious development takes place and VB mostly exists for old timers who were supporting old software or for shops that are confused about how software languages work and think that VB is going to be easier and either do no research or can't tell why the others are better. These are all bad signs
    because of this ecosystem you have the COBOL effect, which is a term I made up - you can't look that up, the COBOL Effect as I define it is the problem that arose around COBOL that somewhere around the early 1980s everyone had moved away from COBOL, it was a ridiculous language that was extremely expensive to maintain, because you had to your people who are no longer getting to do the cool work of making awesome new software, but instead were only hiring people to maintain boring old accounting systems and we're forced to work in a language that they hated because everyone hates COBOL it's just that hated language. So you're stuck hiring people who are doing work they don't want to do, in a language they don't want to work with and their language and their experience is not building them towards the exciting things they wish they were doing. In order to get people to do this you only could hire one of two groups either people who weren't good enough to do other types of work and generally that makes them very expensive even if they're cheap to pay they're not worth very much, so COBOL was expensive to maintain if you want to get people who were really good and worked in COBOL you'd have to pay through the nose because no one who was good had to work in COBOL so the only people willing to do it that were good we're doing it because the money was so big that they're willing to put up with a language that was awful and doing projects that were boring. This created very very expensive high cost / low quality code around COBOL -
    mostly you had a large group of low-cost people who weren't doing a good job making code that needed to be fixed by a
    small group of high cost people all of which you could have replaced with half as many medium cost people in a
    different environment.

    So the COBOL fact brings us to VB today people who are doing visual basic pretty much by and large are not passionate developers. In the rare case that they are they're probably old-timers who are looking towards retirement maybe not for another 10 years but you still don't want to be investing in new code in something that's going to have a hard time getting
    someone to support it in under 10 years. This is a form of technical debt, in fact this is where the term technical debt
    comes from is in software not an IT we use it in IT but we have adopted it from the software world or bad or old code is
    a form of technical debt and investment that you have to overcome later because you're investing against your future. With VB you're going to find it very difficult to hire passionate trained developers. People who love to program will have naturally migrated away from VB either over time because they've had 15 plus years to do this or they're going to have grown up in a world where VB was not really considered a viable or cool option - it was just an old vestige left around and they would no more work in VB than they would in COBOL or Fortran or something else and I say that being so enough that when I went to school it was Fortran that we learned and my first language was BASIC so trust me, I understand this emotional tie, too.

    The languages we grew up with I miss programming and BASIC I miss programming and Fortran. Both were great languages at in their time for the things we needed to do today they just don't make sense for really anything so this is important to understand it's not that VB is a terrible language it's not that it used to be a terrible language it's that it's
    a terrible choice of languages and we need to avoid it for business not technical purposes we want to be able to
    get good developers who do good work who can pass off their work to other developers to support cost-effectively
    and designed for the future rather than for the past when to avoid technical debt and invest in ways of building
    software that simply makes sense. So don't take it as an emotional "oh it's terrible that people have done VB in the
    past", that's not how it is it's simply the VB for the last 12 to 15 years has not made sense and every day it makes
    less sense than it did previously it is time to move past and pick new languages all of that is compounded by the fact
    that VB only exists on the .NET platform and the .NET platform while technically open and available on different operating systems and in different places is still extremely limited and focused on the Windows ecosystem this means that even within the .NET world people who are doing the most passionate work which is typically F# if people are doing
    nearly the most passionate passionate work will tend towards C# will still be win a subset of developers who are mostly tied to Windows which is a pretty big subset of overall developers. If programming is your passion and your lesson vendor-specific you are more likely to work in languages like Java, JavaScript and NodeJS, Ruby, Python, and so forth and Google Go now being very large these languages are platform agnostic and so if your focus is programming rather than being Windows focused you're much more likely to do one of those languages.

    So you already have a sort disadvantage in hiring developers when you move to .NET in any way whatsoever
    because you're picking a platform that ties them to something arbitrarily that a developer would not naturally want to
    be tied to give that's not the thing they're passionate about they're passionate about being able to make the
    code of being able to make the software with the code so once you have a double subset of moving to the .NET platform
    and then moving to that tiny subset of VB within that platform you have people who have embraced windows but embraced Windows only in a legacy context that gives you a really bad potential subset of people who are experienced with VB. Of course anyone who's done C# anyone who's done F#, they're gonna have no problem writing VB code for you from a technical standpoint, but are you going to want to pay them are they going to be happy doing that work not very likely you're going to have to pay a premium to convince them to work on that that. That code it's not the only factor, of course, if you're the only job in town that you're just the right fit for them that won't be the thing that stops them 99.9% of the time, but it will be a negative factor and there's no reason for you to have that negative factor. VB doesn't offer some benefit it is not easier to use it's not easier to read, it's not faster to develop, it's not there's no positives to VB there are
    solid negatives that get worse every day and that's why we're so adamant about not choosing Visual Basic, because
    there's just always a better choice: a choice that's cheaper, a choice that doesn't cost more, a choice that uses the
    same platform, a choice that gives you platform agnosticism, lots of great things stay away from VB it just doesn't make sense for your project.



  • @scottalanmiller Wall of text crits you for over 10,000!

    I'm curious why you chose to do this topic for a video. I don't know that I've heard VB enter a development context in the last 10 years if not longer.



  • @kelly said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    @scottalanmiller Wall of text crits you for over 10,000!

    I had to run away while editing that. I'll get it fixed up at some point 😉



  • @kelly said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    I'm curious why you chose to do this topic for a video. I don't know that I've heard VB enter a development context in the last 10 years if not longer.

    In some circles (read: communities) I've seen it hover around the number one recommended environment for the SMB to write in house software 😞



  • @scottalanmiller said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    @kelly said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    I'm curious why you chose to do this topic for a video. I don't know that I've heard VB enter a development context in the last 10 years if not longer.

    In some circles (read: communities) I've seen it hover around the number one recommended environment for the SMB to write in house software 😞

    Wow, there are no words... I can see suggesting VBA for limited tasks, but VB...



  • @kelly said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    @scottalanmiller said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    @kelly said in Why Visual Basic Is the Worst Programming Language for Your Project SAMIT Video:

    I'm curious why you chose to do this topic for a video. I don't know that I've heard VB enter a development context in the last 10 years if not longer.

    In some circles (read: communities) I've seen it hover around the number one recommended environment for the SMB to write in house software 😞

    Wow, there are no words... I can see suggesting VBA for limited tasks, but VB...

    Yes, VBA definitely as it is the sole automation language extension for some programs. And even VBScript can have a place. But VB proper is very different from those. Microsoft themselves are not even including it in VS Code, their most modern development environment!



  • Edit done, you can actually read it now.



  • Worth noting that this was recording some time ago. Now Microsoft's new development platform, Visual Studio Code, has C# and F# support, but support for VB.NET has been dropped in it. This is the first time that MS has actively started to remove VB support from part of its ecosystem. Traditionally it was just kept on the back burner or given as an "extra" example. But now, for the first time, it is actually being left out.