Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

241–250 of 421 posts

Re: Why do people still use VBA?

#241

Earlier quoted context omitted.

"let people go crazy with Excel/VBA" Many years ago a company I worked for used to send out a spreadsheet to its suppliers which they would complete with the products they offered and then when it was received back there was a button in the spreadsheet that would automatically upload the data to a central database. When I first saw this I was curious how it worked and did a bit of investigation - turns out there was…

I have this great new product called "DELETE FROM products WHERE provider != 'mycompany'"

Little Bobby tables!

Re: Why do people still use VBA?

#242

Let's face it: IT is the bureaucracy department of modern times which can keep itself 95% busy with self inflicted problems and has 5% service orientation. Processes are opaque for outsiders and typically not helpful. I really had to lough when I read the following description of the IBM BPM but this sums up a good part of the issue: "...while IBM BPM does come with a REST API, this REST API is borderline useless to…

There's a sentence in the article which says that this is an explicit policy decision of the company. > It is supposedly “Against the technology strategic vision of the company” to allow “end-users” access to high level programming languages.

A physical world analogue wouldn't be far from a renovation company declaring "flathead screwdrivers are against technology strategic vision of the company" and their use is therefore strictly banned. Construction workers would of course use letter openers and butter knives to turn the flathead screws they inevitably encounter in their work, and that would be just fine.

Re: Why do people still use VBA?

#243
post #226

Earlier quoted context omitted.

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.

This sort of programming is very powerful. It lets people who have no idea what big O is or how to make a fully automated CI/CD system with testing and all of the bells and whistles just get something done. Just to make a dialog and automate something. That type of programing is very powerful. Many times a huge mess to clean up but very powerful and gets things done. We sometimes lose sight of that. Computers are to…

Yes.

In an ideal world this is how first draft of software would be done. And professional software engineers only come in when it's time to make it secure, fast, less brittle, scalable, available to more users, etc.

Like finding the screen that takes forever to load because there's a hidden O(n^2) in there and replacing it with an O(n log n), etc.

Re: Why do people still use VBA?

#244
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…

Yes and:

- embedded database via Access Data Objects (ADO).

There's still no modern equivalent. The ADO notion was lost in the transition from workgroup (file sharing) to client/server (ODBC).

ORMs, ActiveRecords, builders (eg JOOQ), templates, etc. are all partial solutions. Abstractions with sharp edges and traps.

(Yes, I'm working on it.)

Re: Why do people still use VBA?

#245
The real "holy shit" moment in that link is the fact that this org was still all-in on Lotus Notes well past the turn of the century.

The writing was absolutely on the wall about Notes well before the Y2K panic. Staying on that platform when the world was passing you by, even if you couldn't get exactly the same functions in Outlook/Exchange or whatever else you slotted in, was foolish and honestly constitutes professional malpractice for whomever made that call.

Re: Why do people still use VBA?

#247
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…

All true, but the fascinating thing about the article is that it's the Subject Matter Experts demanding to use something other than VBA to be more productive, and the IT people saying no VBA is the only thing allowed because...reasons.

Often those SMEs are data folks, and if they are allowed to develop in $TOOL_DU_JOUR, and that app becomes business critical, the IT folks will be stuck supporting it. And if that thing doesn't become well supported, or it isn't easy to find someone who can support it, that's a problem.

I've run into this quite a bit at my workplace. Some business group writes an app in Excel using VBA + an add-in and it becomes the core part of some workflow. But IT didn't know about it, nor did they know about the (for example) 32-bit ancient Excel add-in that it requires, which then breaks when an Office upgrade happens...

Now IT is stuck where a routine upgrade broke some weird edge case thing and needs to maintain a downlevel version of Office for a small group until they can re-develop their business-critical tool in something else.

Use-known-stuff rules up front -- in this case which may well be VBA -- alleviate a lot of these long-term problems.

Re: Why do people still use VBA?

#248
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.

It’s also the ultimate discoverability tool.

People struggle with not knowing how to describe a task they can do but not with code. The record gets you very close very quickly. If you’re fluent in adjusting selection logic you’re usually going to have it pretty easy.

Re: Why do people still use VBA?

#249

The article linked within the article, "Your Organization Probably Doesn't Want To Improve Things," is interesting because I know *exactly* what the author's problem is. The problem is they're an intelligent person falling short of their potential. As understandable as it is, raging against people around you for their shortcomings isn't going to help you or them. You've got to do the hard and scary work of grinding y…

No matter what lofty heights you achieve you're never really free of external constraints.

That's true, the stupidity of the workplace will always exist.

But like I know that pain. I've been there before. After getting into FAANG there's still plenty of meaningless work but at least the people are smart.

Re: Why do people still use VBA?

#250

Let's face it: IT is the bureaucracy department of modern times which can keep itself 95% busy with self inflicted problems and has 5% service orientation. Processes are opaque for outsiders and typically not helpful. I really had to lough when I read the following description of the IBM BPM but this sums up a good part of the issue: "...while IBM BPM does come with a REST API, this REST API is borderline useless to…

One of my first full time software engineering jobs was working on the trading floor of a bank, sitting next to the currency traders.

I was hired by the head of Market Risk Management, whose job was to make sure the bank didn't lose too much money on any given day. He hired me because he did not trust the officially approved IT department to write the code to implement his algorithms. One example: they got something wrong because they did not understand mathematical precedence operations, like multiplication over addition.

So one need was to get all the trades as input to the market risk calculations. This was early 2000s, and I installed Apache with Perl CGI on a PC under the desk, and created a little app for the traders to enter trades and track their positions. The traders started favoring this to the official IT solution because it was easier to use and see their positions.

All of this to say, yes, figuring out how to bypass IT is an important function in a lot of corporate environments.

And back to Excel: the traders used it for all of their calculations and simulations. We tried to work with them by giving them tools that plugged into Excel so they could leverage it along with what they were already doing.

Post reply on HN