Live data from Hacker News

Ask HN: Why did Visual Basic die?

news.ycombinator.com

451–460 of 535 posts

Re: Ask HN: Why did Visual Basic die?

#451

Earlier quoted context omitted.

This doesn't match my experience, if anything the other way around. CSS back then was a lot harder than it is now. There's still memes around this, but even something as common as centering an item with CSS was not trivial at all. Now we have flex and it's easy, but back then it was very much not. VB didn't work on the same paradigm - it was a more WYSIWYG environment. You drew a button on the form, set some properti…

can vouch on this, since originally I really prefer WYSIWYG UI (VB, C# winforms, wpf) over web early. However security-wise it's hard to enforce when using them, since they don't really operating using client-server by default, having your backend logic prone to be reverse engineered. This doesn't happen in web apps, since backend logic stays on the server. Whipping a html UI over the already server-client architectu…

I opened VS and looked at WPF again the other week. It was a surprisingly pleasant experience. Though my C# is sooooo rusty now (and not in a crab-like way).

I wonder if there's a market for "WPF for Golang"? ;)

Re: Ask HN: Why did Visual Basic die?

#452
post #200

I actually wrote a long article on this [1]—and had a chance to interview some of the team that built the original version of VB that was sold to Microsoft. (Alan Cooper and Michael Geary; Michael actually frequents HN pretty regularly!) My opinion is that it was a confluence of a few factors: - Microsoft was very worried about the threat of Java/Sun, and rotated hard into .NET and the common language runtime as a re…

Vb.net was a bit weird yes but visual basic did need work. Vb6 did not have multithreading which was really starting to hurt its efficacy by 2002. You could work around it by using events as much as possible but there were still some things that were blocking. Also the events were not even on a separate thread either leading to the need to pepper DoEvents everywhere. This was a dealbreaker for vb to ever become a ser…

VB was probably 80%+ line of business CRUD apps. What would you write in VB that needed multi-threading? You're not writing trading systems or games in it.

Re: Ask HN: Why did Visual Basic die?

#453
post #357

Earlier quoted context omitted.

The web and the way MS handle the web killed it. Microsoft was pushing everyone towards these horrible activx components. Many moved to PHP or Adobe Flash. I was using MS Access back in the day to solve business problems - it was like a VB6 DSL focused fully on data-driven applications. It was extremely time efficient thanks to that focus - what took me days to build took a VB developer (or PHP developer) months. Tha…

In my experience, ActiveX was not what they pushed. They pushed Asp.Net Webforms which used VBScript for the template language. The ViewState monstrosity made it an awful experience. Specifically how it send way more data than needed to and from the server on each request. I shiver when I think of it.

The ActiveX era pre-dated ASP.NET.

When the web was new, it was so clearly not designed for apps that pretty much everyone agreed it was absurd to use it that way. The UX and DX was just such a horrifically huge downgrade. Instead, HTML was for documents and linking, and apps would be given a rectangle (maybe the entire rectangle) through which they could appear in the browser. Netscape partnered with Sun for Java applets. ActiveX was therefore a response to that.

ActiveX made a lot of sense for Microsoft at the time. Firstly, it let the enormous base of Windows devs put stuff into a web page almost overnight. Secondly, it leveraged existing tech that was already designed for embedding one app's UI inside another app (OLE), and for shipping widget libraries to visual designers (OCX). Thirdly, ActiveX was a lot faster and more efficient than Java applets, being based around tightly written Win32 code. Finally, people weren't so focused on security back then and anyway, Microsoft had recently been investing in adding code signing to Windows. It appeared to them at the time that code signing would be sufficient to stop abuse. We know in retrospect it didn't quite work out that way for them, although it's been pretty successful on Macs.

And in fact ActiveX did see quite wide usage, albeit mostly as IE's answer to Netscape's plugin interface. But it didn't take off in a big way because:

1. ActiveX apps were native code and native code is very low level and thus very large compared to JavaScript and HTML. Performance is great because the CPU eats it directly with no intermediate translation layers, but you pay for it in code size. Back then bandwidth and CPU were both tight, but HTML/JS were light on both at the cost of UI latency and primitive controls. People picked low startup time followed by high latency and primitive controls.

2. The UI they picked for code signing was a (standard at the time) popup modal dialog. It had very poor usability, being filled with tons of complicated words, often asking you to approve software from a company you'd never heard of (i.e. products/websites did not use the same name as the company that produced them) and worse, malicious web pages could put you into an infinite loop where if you clicked cancel they'd just immediately ask you again, forcing you to click yes. Which was equivalent to downloading and running an unsandboxed program. Back then browsers went years between updates so once they shipped that mistake, it was very hard to fix quickly and so the reputation of ActiveX became very poor.

3. They had no way to sandbox native code at this time, the Windows kernel just didn't support it at all and it probably wouldn't have occurred to them anyway.

The first problem was fundamental to the approach. The second problem was an unforced error.

They could have tried to switch over to a sandboxable bytecode; VB used what they called "P-code" on an interpreter already. But they didn't. Java was becoming too popular, too fast, and they lost confidence in their own tech stack. Instead Gates threw the company into a crash effort to clone Java. By the time .NET had the ability to do ActiveX controls they'd already moved on from that approach and were trying to make DHTML work instead.

Re: Ask HN: Why did Visual Basic die?

#454
post #441

Earlier quoted context omitted.

Vb.net was a bit weird yes but visual basic did need work. Vb6 did not have multithreading which was really starting to hurt its efficacy by 2002. You could work around it by using events as much as possible but there were still some things that were blocking. Also the events were not even on a separate thread either leading to the need to pepper DoEvents everywhere. This was a dealbreaker for vb to ever become a ser…

Electron seems successful regardless of lack of multithreading on the language level? I don't buy this one.

Correct, nobody cared about "true" VB multithreading. Besides VB supported multi-processing very well, much better than the JS world does today. You could call objects between threads no problem. Behind the scenes it was using DCOM, so if you passed an object from one thread to another, the other thread would get a proxy that'd do RPCs to the first thread. So there was no true shared memory multithreading, but for VB users what they had instead was in some way even better, it was basically web workers but more transparent. Specifically, it meant that object calls couldn't run in parallel to UI updates or other logic so there was no need to think about locking.

Re: Ask HN: Why did Visual Basic die?

#455
post #323

Earlier quoted context omitted.

You may be confusing Visual Basic .NET with Visual Basic 6 and its predecessors. C# actually predates VB.NET by about a year. VB.NET may be syntactically similar to VB6, but under the hood they were so different that migrating projects to VB.NET essentially meant a complete rewrite.

Visual Studio had a built-in migration utility which could get you 80-90% there. However if the original VB6 was spaghetti code written without Option Strict and Option Explicit enabled you had much bigger problems. The biggest breaking change was the removal of the global Printer Object so any printing code needed a complete rewrite.

My recollection is that the migration tool was really just a tool that would fill your VB6 code with comments telling you that you had to rewrite stuff. Trouble spots were largely related to error handling On Error Goto and error handling blocks had to be refactored into proper Try...Catch blocks, which affected a lot of code, and another trouble spot was all File I/O had to be rewritten/redone, same with any drawing code; Resource files had to be recreated, etc; I don't even think it could load the FRX files but I might be misremembering. I felt it simply wasn't worth even bothering to try to directly convert to VB.NET, and since those programs I wanted to move forward I had to pretty much rewrite anyway, I decided to use C# instead and just make new versions.

Re: Ask HN: Why did Visual Basic die?

#456

For anyone looking for a modern alternative to Visual Basic, you might want to take a look at Xojo. Xojo's a rapid application development platform (both a language and an IDE) that you can use to develop desktop apps (for macOS, Windows, Linux), Web apps, mobile apps (for iOS and Android), as well as console apps. It's been around for more than 20 years, and some of you might remember it from back when it was called…

Pascal is still around as well with a great IDE Lazarus. https://www.lazarus-ide.org/

Re: Ask HN: Why did Visual Basic die?

#457
post #185

Earlier quoted context omitted.

Access was an app you had installed on your workstation but never opened because in the backend every late 90s early 2000s desktop app was using it as its data backend. Between Excel (with no functional API to use for storage) and a "real database" (your users now need to ask IT to deploy SQLServer) was a use case of app just needs to store persistent data for a single user.

So basically the SQLite of its day?

Acess allowed you yo build small forms/apps fast.

Those business apps made "by that one person" that allowed few other to input data concurrently (back then no google sheets / shared Excel... which are horrible and have no user defined GUI) and then to make reports.

Also data manipulation when it didnt fit Excel (I know access has 2gb limit, but it was a lot).

Re: Ask HN: Why did Visual Basic die?

#458

Earlier quoted context omitted.

Excel is literally 2D programming. Us mortal developers who can only put lines below one another are incapable of comprehending it, so we only get to ask the wise finance people how their enigma works. On a serious note, I dread excel. If your PC is set to german, excel will translate the VBA keywords to german. But if you want to type them, you have to do that in english and then have excel translate them. I don't w…

I have grown a respect for Excel in the last decade or so. It's slow, it's clunky, and it's far from perfect, but I think it's among the most approachable language out there. A lot of people using Excel, even some of the more advanced stuff like if statements and logic, don't even realize that they're writing programs, and I think that's genuinely awesome: people are able to utilize the power of programming by accide…

> I cannot speak to Excel's ability to use other languages.

I find it's an overblown issue. Those of us that prefer functions in English can just set Excel to use it. When someone sends you a file it displays in your chosen language. And having the default being localized makes it usable for the majority of people who don't speak English.

Re: Ask HN: Why did Visual Basic die?

#460

Earlier quoted context omitted.

Honestly it's harder to put together a quick GUI application in anything than it was in the VB6 days. By losing VB6, we've lost a lot of power and ability to do GUI things quickly.

What's the bottleneck to build a modern VB6? Just curious.

There are VB like tools. These days they're all SaaS though. Oracle APEX is one well known one, there are plenty of others out there.

There are at least three massive problems faced by anyone who wants to hew closer to the VB6 model:

1. Deployment tech.

2. Getting people to pay for it.

3. Developer culture.

In order:

Deployment. There are tools and UI toolkits today that support VB6/Delphi-like development, but they aren't web based. For example, you can also do VB6 like development using Java or Kotlin + JavaFX + Scene Builder (or Swing and one of the visual form designers for it). This leads to the question of how to deploy the result. Unfortunately, for the past 15 years or so the answer has been pretty much "you can't".

In the VB6/Delphi era the answer to deployment was "take your EXE and stick it on a shared Windows network drive". For internal business distribution this worked fine. Java had JRE+Java Web Start, which also worked fine inside businesses. Unfortunately neither approach works anymore: Windows is no longer ubiquitous, tools don't produce standalone EXEs anymore, users don't know how to handle zips and folders (these skills have atrophied). Also security has got tighter so throwing EXEs around is harder, and people expect software updates to work smoothly. Java dropped WebStart and never replaced it with anything good enough, so the tooling actually regressed with time too.

This isn't fundamental and is fixable. I spent the last couple of years fixing the tooling situation [1]. You can now deploy desktop apps as easily as you do for a web app. Conveyor does signing, packaging for Win/Mac/Linux, and integrates auto-update as part of the packaging process. It will even generate icons and a download page for you and then upload the results. You do still need code signing certificates, however, and getting those isn't as easy or cheap as it is for SSL certs with LetsEncrypt.

A related issue is database and server side logic hosting. VB6 development assumed it was OK to just connect directly to a database using its native protocol and that e.g. every employee would have a DB user. People are more protective of their databases these days and would find this level of simplicity to be radical. I've experimented with that too and given a talk on it at KotlinConf [2]

Payment. VB6/Delphi were developed in an era when people expected to pay hundreds or even thousands of dollars for each version of their IDE/compiler. There were no subscriptions but in practice new versions would come out every couple of years or so, so if you wanted to keep up you'd need to budget a few hundred dollars a year. Skipping versions was common.

Nowadays, people's payment expectations are different. They expect programming languages and platforms to be free and open source. They take absolutist positions on it, saying things like, "it's not open source so I can't ever use this". This rule vanishes if something is a proprietary SaaS however. This kills the incentives to develop better tools for standalone "business crapware" development as mentioned elsewhere in the thread - apps have to be tied to a subscription SaaS or else you can't get paid to work on it. In turn that makes it hard for people to learn by just experimenting locally. For programming languages, every new language that comes along in the past 15 years or so is essentially either a hobby project of celebrity employees (e.g. Go), or a way for rich tech firms to solve tech debt and productivity issues (e.g. Kotlin, Rust, TypeScript), or commercialized by selling long term support (Java). The closest to a real commercial language is Kotlin and that's very indirect, it incentivizes IDE sales, as IDEs are still something people are sometimes willing to pay for (but most use whatever's free).

It's possible that the pendulum will swing back here.

Developer culture. Part of why devs are so hardline on stuff being free is that they want to add it to their CV and learn tech that they can take with them to their next job. This means going where the crowd is. If you wanted to do something VB6 like you'd have to do things very differently to how they are done today (e.g. probably not web based) and that would mean people would stay away just out of fear that they'd stray too far from the herd.

Still, despite these problems, there are ways you can do that. Like I said, take Java/Kotlin+JavaFX+Scene Builder+Conveyor and you have something similar to the highly productive 90s era platforms. You do of course need the confidence to learn tech that some consider old fashioned, and which isn't as widely used as React or whatever.

You could even just go all-in on the Apple platform! Swift+Xcode+their Interface Builder still works.

[1] https://conveyor.hydraulic.dev/

[2] https://www.youtube.com/watch?v=jKeHKe9ttas

Post reply on HN