by richx · 5y ago · 0 comments
32bit VB6 programs are still able to run on modern Windows 10 machines, even on x64. The hours that would've been lost on porting everything to the newest macOS can be spent on new features or customer wishes. With the .NET Framework it's even possible to seamlessly use VB and .NET in the same program which combines old and modern technology. It's officially unsupported but it works and even gets bugfixes sometimes.
1: https://www.hanselman.com/blog/dark-matter-developers-the-un...
But new tech should be the last resort.
If nothing stable, decades old, and well documented can solve the problem then reach for hot new-ness
That would mean it's okay to use Angular today, but dev trends (and Google's support "policy") would advise against that.
Rails/Django, then ASP.Net MVC/Laravel/whatever Java was was a massive step forward. If you didn't use it, you were hamstringing yourself. People switched to Rails in droves.
As were using ORMs. You'll still get people quibble about this, but never having to go through the tedium of updating 101+ SQL statements when you add a column in a pain you young'uns will never know...
JQuery was actually another example. Cross browser Ajax statements were annoying, plus just manually adding individual HTML nodes in HTML was laborious.
Apparently they are all now learning Elixir after a short migration wave over to Clojure.
C++, Java and ASP.NET over here for the last 20 years.
I think it's a little more nuanced than that. Usually the older technology is more stable and better documented. But not always. Sometimes the new hotness is the new hotness precisely because it's better in these kind of categories.
- paper
- text files / spreadsheets
- desktop apps / local db
- SSR web apps / single database
- SPA or mobile app / cloud storage
The only thing that challenges that is the reality that around a decade ago smartphones with tiny screens and no filesystem access eclipsed desktop computer, and we're still reeling over how much more expensive that makes development.
In descending order of importance.
When choosing between any technology choose the one that is most stable.
If multiple options are on a stable release, choose the one that is best documented.
If multiple stable releases have excellent documentation, choose whichever is oldest.
I don't think this framework is always (or even often) right. But it works for me
But my private NVBC (NecroVisualBasiCon) repo has some great stylings that I tap into at least once a year.
Nevertheless, when are they going to relase Office with Python bindings included?
There are basically three VB ecosystems.
Visual Basic which many refer to as VB6 and it represents the last version every released.
VBA which is Visual Basic for Application and lives on to this day as an embedded language for Microsoft products like, Word, Excel, Outlook etc.
VB.Net which is an implementation of the Visual Basic language running on the .Net Framework.
Somewhat clunky and slow but it does work.
If I could record a macro that was “close” and examine it, the ecosystem was very productive. Once I wanted to go beyond that, it seemed like there was an undocumented chasm to cross.
Almost everything in VBA can be found with a simple Google search, and Microsoft's technical documentation online has gotten very good.
Things like destroying [iff present] and recreating Excel charts from scratch, including generating all the series labels, shapes, etc., updating elements in a word doc from an excel sheet, generating on-slide progress indicators in PowerPoint.
The biggest problem with it is really that the tooling around it is decades old so it hurts your productivity. Maintaining VBA code bases is a painful experience, the IDE sucks and the language has enough quirks and shortcomings that it forces you to take long detours to accomplish what would be very simple tasks in more modern languages
The loving part of VBA is its interoperability across the Office suite, but there's no reason why that couldn't be done in, say, Python
Oh, I almost forgot. VBA classes are absolute misery.
The loving part of VBA is its interoperability across the Office suite, but there's no reason why that couldn't be done in, say, Python
I agree with you, but Python and pretty much every code environment is missing a few things that create a pretty high barrier to entry:
For a whole lot of cases, VBA is not even needed. People put data into cells, operate on it with formulas in other cells that drop output into still other cells which are then used to get output.
Input can be almost anything these days.
Formulas have a well defined, easy to understand syntax that work across a wide variety of operators. Simple copy / paste operations make sense, often with the intended data mapped right in. (given people are a little organized)
Output can be almost anything these days too.
And it's live. Make a change, see it happen.
That's real power! People don't have to know much to make it all work either.
I have been using Excel to transform business data for years, model business and a lot of other things, and as a rapid prototype system. I can write code too. Often I do, but the more specific and or variable the task is, like a one off need to solve yesterday, the more attractive just banging it out in Excel becomes.
Should one get super crazy, have one of those outputs from Excel be a working program. No joke. A script file is one of my favorite outputs. Mash the data up in Excel, and once the plan of attack is clear, execute the script and watch it run on the real system.
Check this thing out:
https://github.com/tilleul/apple2/tree/master/tools/6502_ass...
It's a perfectly usable, and I would suggest one of the easiest, assemblers I've ever seen! I ran it on my mobile. Crazy.
I just used it to knock out a little routine for a retro-game project I'm working on and was kind of stunned at how lean, accessible, functional this really is.
For Clarity: Replacing VBA with something else costs more than the value add at present, and it's because Excel is the gateway drug into VBA. By the time people reach for VBA, they already are familiar with a lot of it.
edit: I'd certainly rather be writing VBA than js, which is what the seem to be replacing that type of automation with, not python.
VBA and VBE being replaced with Python would require so much work... and there is a crazy amount of code out there doing an equally crazy amount of work too.
All the points I put here are why doing that replacement work doesn't really add much value.
Which is why VBA is still a thing.
Any examples that you've come across?
http://www.cpearson.com/Excel/VBAArrays.htm
Imagine how painful your experience would be writing any decently complex reusable code in VBA without knowing about all of the edge cases covered by Chip in that module