Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

251–260 of 421 posts

Re: Why do people still use VBA?

#251
I find myself thinking about Excel, and spreadsheets (electronic tables) as a whole, and the fact than only few people outside of it actually understand how oldies got it really well with reactive-functional programming in the spreadsheet language. It is what React/Angular is struggling to get right with more than dozen releases so far.

Also so many people fail to understand why the spreadsheet is so convenient to end users, and as a result of this failure - provide sub-par UIs which actually make thing more difficult, not easier.

Sometimes one has to make a step back and understand that grannies did things right, even though they didn't have graphical UI - business was still running back in these early days, and actually what businesses need for most of the time is tabular view with options to do reactive functional calculations on top of it. Ask your SME friend and he'll confirm it.

Re: Why do people still use VBA?

#252
post #226
post #184

– It’s built in. – The IDE is built in. – The syntax is beginner-friendly. – It’s stable and doesn’t change every six month. – It’s well-documented. – No build steps, it just runs, and fast. – It’s resource-efficient (CPU, RAM). – You can easily create dialogs and forms using the built-in visual GUI builder. – You can break into the built-in debugger from your Office document. – If you want to get fancy, it has inter…

Is it still something you can code with your mouse? I remember having to deal with it on my first job because the team knew nothing about coding. They had “recorded” macros by clicking around and never seeing a line of code. It was incredibly brittle: any change to the table, even adding a comment, would break it, but it allowed them to automate a task.

We used some weird testing tool from HP I think. It could record you clicking around in an application and generate a VBScript. You could then go in a modify the generated code, add parameters and fix the brittleness. It meant that you could get a ton of coding done in a very short about of time.

Re: Why do people still use VBA?

#253

VBA is a lovely language, that supports object-oriented programming (with composition... no inheritance). It has deep access to and control of Excel. It's mature and stable (Microsoft is no longer significantly changing it). "Real programmers" hate on it largely because of all the amateur spaghetti VBA code written by the business people (that the programmers are occasionally asked to debug).

I mean I think it's fair to look askance at any environment that includes misfeatures like `On Error Resume Next`.

Options are good. Resuming on error can be just as much a feature or flow control paradigm as using exceptions for flow control.

VBA gives users options. If you want a straitjacketed 1990s predeclared OOP language, you can use Option Strict and Option Explicit and forbid Goto statements and On Error statement. If you can deal with ambiguity, you don't need to.

And of course even a a language with misfeatures is better than the VP of the IT Dev Silo giving you the choice of spending $2m and a year or doing your work by hand.

Re: Why do people still use VBA?

#254

Earlier quoted context omitted.

VBA is the ultimate agile programming language. The company's IT aka Bureaucracy Department is stuck with Scrum, Squads and what not. And meanwhile in the other departments people are just getting things done with Excel/VBA. Nothing has changed. In the last century this also happened and it was called islands of automation. In my bubble back then it was considered a good strategy, let departments first play around, a…

I was talking about this with a friend the other week... I think what IT depts really need to do is let people go crazy with Excel/VBA, but write a script to monitor activity on xls files on the network over the long term. If there's an xls which has been in regular use for more than 18 months, and it contains macros, then it can be assumed it performs some important role and should be properly documented and checked…

Or, you know, just ask people what they're using Excel for, and seeing if there's a way you can help them improve on it.

Re: Why do people still use VBA?

#256

Earlier quoted context omitted.

VBA is the ultimate agile programming language. The company's IT aka Bureaucracy Department is stuck with Scrum, Squads and what not. And meanwhile in the other departments people are just getting things done with Excel/VBA. Nothing has changed. In the last century this also happened and it was called islands of automation. In my bubble back then it was considered a good strategy, let departments first play around, a…

I was wondering what would be replacing Excel/VBA after 3 decades as a citizen developer alternative. I could not think of something that even comes close. Any ideas?

I'm very optimistic about Project Jupyter style notebooks. I believe, without any evidence, that they have much greater potential thoughout IT, devops, whatever.

Example: Imagine a CI/CD pipelines using notebooks.

I hate Jenkins/Hudson style build systems so much I could just spit. I just want to run a shell script.

(Alas, I haven't had the gumption to try this idea out yet. Soon.)

Re: Why do people still use VBA?

#257

Earlier quoted context omitted.

VBA is the ultimate agile programming language. The company's IT aka Bureaucracy Department is stuck with Scrum, Squads and what not. And meanwhile in the other departments people are just getting things done with Excel/VBA. Nothing has changed. In the last century this also happened and it was called islands of automation. In my bubble back then it was considered a good strategy, let departments first play around, a…

I was wondering what would be replacing Excel/VBA after 3 decades as a citizen developer alternative. I could not think of something that even comes close. Any ideas?

There have been countless attempts, but the web seems strangely resistant to a low barrier to entry, high level GUI building tool.

Even though it's a visual environment, everything is strongly text based, from HTML to CSS to JSON payloads.

Re: Why do people still use VBA?

#258
post #172

Earlier quoted context omitted.

> or even access to the repo for that abomination (access to a what now?). Did someone give the analysts access to a repo? Because I'd hazard ~80% of the companies I've seen don't allow "non-development" users access to the corporate version control system.

I'd be happy to put up a repo for them, if they ask . Problem is, they often don't. And not to make too big a deal out of it, but using github, gitlab or anything along these lines, is mostly free, not exactly rocket science, and private repos exist.

> I'd be happy to put up a repo for them, if they ask. Problem is, they often don't.

No doubt. But that requires them knowing you exist, and what to ask you for.

The companies I've seen do this well (1) make it self-serve (anyone can click a link, without knowing who to reach out to) & (2) remove as many dumb organizational roadblocks as possible (e.g. company-wide repo visibility and search, no job role filtering to who can use tools, etc).

> but using github, gitlab or anything along these lines, is mostly free, not exactly rocket science, and private repos exist.

Putting internal files on an external third-party service under a personal account?

It solves the technical issue, but it creates some security/data issues.

Re: Why do people still use VBA?

#259

16 years ago I developed some apps with MS Access that interacted with MS Outlook. It was rather easy given the integrated IDE, debugger and being able to create forms and call a CLI app (zip). I contemplated suggesting my managers to build something serious with some web tech -- also ubiquitous and easy to deploy PHP -- and it looked a lot more complicated right away! Later, I used to be Django developer, and I thin…

> The only inconvenience I recall was some functions had tedious API, arrays/lists were hard, had to be created like kinda Collection.new(...).

Imagine what people would do if VBA was a better language and had a better IDE that wouldn't scream at you every time it found a syntax error in your code-in-progress.

Re: Why do people still use VBA?

#260
post #110

Earlier quoted context omitted.

They won't be able to read our media, and if so they won't be able to decode the excel format.

Excel format is just a zipped collection of XML files

That's the new one. The old one is 90% direct dumps of C++ structs.
Post reply on HN