Good read: What's wrong with VBA (1 Viewer)

vba_php

Forum Troll
Local time
Today, 06:20
Joined
Oct 6, 2019
Messages
2,880
I found the section on "reflection' quite educational. apparently whoever wrote that article is pretty educated themselves. Hopefully this comment is a good contribution here, but I suspect that Gent can't see it as he's probably put me on his ignore list...
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:20
Joined
Apr 27, 2015
Messages
6,319
Not knowing any other languages, I cannot see where VBA can mutilate a brain to render it incapable of learning another.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:20
Joined
Apr 27, 2015
Messages
6,319
Being proficient in php Adam, do you have any Pearl's to share?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:20
Joined
Feb 28, 2001
Messages
27,131
Having programmed in not less than four different assembly languages, FORTRAN II and IV, BASIC (at least 8 different flavors), ALGOL, PASCAL, PL/1, Ada, and a couple of scripting languages, I have to say that I have seen a bunch of ways to get from point A to point B in programming. It is my experience that FROM THE OUTSIDE, no end-user will probably have any clue as to which language was used to make the product as long as it was well debugged before release.

You can achieve the same end result in any compiled (or assembled) language as in any other language. The differences are solely internal. Sure, this one can do true inheritance, polymorphism, abstraction, reflection, ... you name it. And that one can't do ANY of them. All it means is said in the old song: "You take the high road and I'll take the low road and I'll reach Loch Lomond before you."

We talk about features in a language. Or in a programming / development environment. Or an Integrated Development Environment. Or whatever you are selling these days. If you have a lot of stuff in your tool kit AND it applies, you'll work faster and be more productive. If you have to invent the tools to make the tools, you'll take a lot of time. If you have the tools but have to customize them first for this job, you are somewhere in the middle of the two extremes. But what did that difference do to/for you?

The difference probably changed your speed of coding and composition, which changes your flow time which changes your costs. But here is where it stops making a difference.

For any project worth its development cost, the boss already knows what will be used. If this boss is worth a toot, s/he will have already obtained a work-flow estimate and will know how much the project will cost. So if the project got approved using language XYZ, every last one of the "language features" arguments was just made moot because they were folded into an approved project that assumed their existence. And it has been that way since project-oriented programming was a "thing" to discuss.

An author named Barry K Boehm wrote some books on project management and software project engineering from an economic viewpoint. In a research-based work from the 1960s or 1970s using data from not less than 60 different projects, he estimated that language feature differences contributed 10% to at most 15% of the cost of a project and maybe less in some cases. The far more important language factor was whether the programmers were familiar with the language being used, whatever it was.

The design phase, testing phase, and documentation phases were all far more expensive because testing and documentation were labor intensive but not language dependent. Design was expensive because it was a "choke point" on project flow that idled workers waiting for approved designs. And it was not language-dependent, either. Only the coding/implementation phase was language dependent.

OK, granted, when you are a one-man project team, a LOT of that stuff is off-the-cuff done catch-as-catch-can (or not at all). Documentation is often scrimped upon in that case. Testing is limited due to limited imagination of what your end-users will do to the project to break it. Design is often shot from the hip. But EVERY ONE of those phases has nothing to do with what language you used and what language features you used.

The referenced article makes it clear if you read through it: Bad programming shouldn't be laid on VBA, it goes strictly to bad programmers.

And regarding the "corrupted minds" quote: As important a person as Dijkstra was, I would have told him to his face that his comments about corrupting the mind of the programmer were based on narrow modes of thought. He and Nicklaus Wirth condemned GOTO statements and a few other things. But those condemnations on purely theoretical grounds ignore the fact that most projects don't operate in a theoretically pure environment. Insensitivity to environmental factors was one of the things that Barry Boehm listed as being MORE important than language features in terms of final program cost.

In other words, their condemnation was based on looking purely at the mathematical theory of the project but not about the financial reality of the project. Tunnel vision. Folks who worry about whether a language has feature X or Y or Z? Dealing with tunnel vision.
 

vba_php

Forum Troll
Local time
Today, 06:20
Joined
Oct 6, 2019
Messages
2,880
Being proficient in php Adam, do you have any Pearl's to share?
you didn't block me? hey thanks! :) I must have lucked out in that regard. What do you mean by "Pearl's"? I'm not following. Like PHP code snippets? Sort of like Javascript fiddles?
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:20
Joined
Apr 27, 2015
Messages
6,319
As in Pearls Before Swine apparently. Docs contribution contained several pearls, do you have any to share?
 

vba_php

Forum Troll
Local time
Today, 06:20
Joined
Oct 6, 2019
Messages
2,880
As in Pearls Before Swine apparently. Docs contribution contained several pearls, do you have any to share?
Well I looked that one up, but didn't get much out of the read:

https://en.wikipedia.org/wiki/Pearls_before_swine

but based on that page and doc's long post, maybe I can say something else regarding PHP in a technical sense:

PHP is considered OOP when it gets to the advanced stages of scripting and the needs of a web app become more complex. However, I would say I've used simple-stupid statements and "procedural" stuff a lot more than anything OOP related because the web apps that I've built don't really warrant a need for anything OOP related. For instance, I've made good use of:
Code:
$_SERVER[]
$_POST[]
$_GET[]
along with many other simple operations in the language:
Code:
echo()
basename()
strlen()
! (bang - checks "IF FALSE")
isset()
array(1, 2, 3, etc...)
/* */  (block comment)
 // (line comment)
then there are resources in PHP that could be borderline OOP, but not really. stuff like:
Code:
session_start()
set_cookie()
but using OOP with that stuff really depends on how much complexity is needed due to user demand and transaction processing. The only thing I've implemented that used OOP-related *anything* was the PHPMailer from Github, and that required the use of class instances, similar to what we use when we create an "oMailItem()" object in MS Outlook via VBA coding. Aside from that, I don't have much else to say. Doc covered all the non-technical stuff pretty well. If the guy in the article is actually talking down about VBA I would say to him that he's way off base. I consider VBA a very simple language to learn and understand, especially for beginners because it's so close to MS's basic from back in the day (and maybe qBasic too?).

Web languages are incredibly painful to learn, more or less because the syntax and symbolism required is unnecessarily complex. Microsoft is not too guilty of it, but PHP certainly is. So are the javascript extension libraries like React and jQuery. Then you have the js frameworks which are terrible in this regard too....node.js and angular. But that's what you get from incredibly intelligent people who work at google and facebook that create stuff like that.

Visual Studio, IMO, is absolutely horrible in terms of it's ease of use. It's integrated with almost any language you can think of, from C++ to Python to ASP to C# to Sharepoint Server, etc....it's virtually endless. I would say if I had to choose a true OOP language that was not guilty of very much in terms of causing problems or causing negative feedback to come programmers who have used it (and being fairly easy to use), it would be Python. And from what I've read, it's been at the top of the list for in-demand languages in the last few years due to it's massive amounts of library resources.

Hopefully this is somewhat related to what you're talking about?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:20
Joined
Feb 28, 2001
Messages
27,131
didn't get much out of the read

In reference to "pearls before swine" it is a statement not too far different from "they have eyes but cannot see; they have ears but cannot hear." I.e. a metaphor for something that is wasted on a particular audience or a joke that goes over someone else's head.

In a way, I really do understand Adam's comments from a previous watercooler post about not telling management everything because they will misuse it. This is another case of "pearls before swine" but it is career-shortening (and job-shortening) to call the boss a "swine" - even if his nose IS unusually flat. Which is where selective political correctness becomes an asset. But I digress...

Thanks for the kind words, John. I try to actually have SOME useful content in my long-winded posts. But you never know with me.
 

AccessBlaster

Registered User.
Local time
Today, 04:20
Joined
May 22, 2010
Messages
5,913
These two statements kind of stand out for me.

VBA is a gateway language..
What if we wrote code for it to be read instead? Code that’s easy to understand, is easier to maintain and to extend without breaking things. .
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:20
Joined
Jul 9, 2003
Messages
16,271
Well I looked that one up, but didn't get much out of the read....

Pearls before Swine
My understanding of the significance of this statement is when you apply it to a discussion with somebody who will not listen.

For example, capitalism. Although capitalism has many faults, it has proved itself the most successful way of running a country.

However there are people that will argue that communism is better than capitalism and there's nothing you can do or say that will change their minds.

To say anything to them, to enter into any discussion with them, to attempt to correct their thinking is what is meant by "Casting Pearls before Swine."

Sent from Newbury UK
 

vba_php

Forum Troll
Local time
Today, 06:20
Joined
Oct 6, 2019
Messages
2,880
However there are people that will argue that communism is better than capitalism and there's nothing you can do or say that will change their minds.
like the russians or the chinese?
To say anything to them, to enter into any discussion with them, to attempt to correct their thinking is what is meant by "Casting Pearls before Swine."
if that's what Gent meant, then my posting in this thread about the technicalities of PHP and OOP is totally useless. :(
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:20
Joined
Apr 27, 2015
Messages
6,319
Actually, I thought your posts AFTER my "before swine" comment were on point. The one you made before it was not. It missed the point so I used a play on words. Steady now, lets not take ourselves too seriously...

Great discussion so far. I got out of it pretty much what Doc said although he caught some things I didn't. I was somewhat disappointed though. To me the author was saying "Hey all you VBA users, we agree that VBA isn't all what we want it to be, but it isn't as bad as THEY say it is. But if you want what it takes to cure its inferiority, we have it and you can buy it!"

Not having a programming background,VBA seems perfect. VBA does everything I want it to do and I cant fathom what I am missing out on. Read the comments about inheritance, polymorphism and reflection but it is hard to visualize how that would make life any better for me.

The fact is, MS Office is the only thing I use that requires programming. It allows me to get the suite members to play nice together and since it is one just about EVERY computer I come across, what more do I need?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:20
Joined
Feb 28, 2001
Messages
27,131
like the russians or the chinese?

Naw, both countries have started down the road to economic capitalism by allowing people to start their own businesses. That is a slow movement and still at a low level, but it is one movement that cannot be stopped without major street riots.

Politically, the capital is information, and where people can see TV signals from other countries, the movement towards freedom is also inexorable. Look at the major street riots in Hong Kong. Make no mistake about it - the information-flow barriers are falling and folks are seeing reasons why "the western cultures" aren't so bad after all.

there are people that will argue that communism is better than capitalism

In a country of cookie-cutter / assembly-line automatons who lack ambition, communism IS the best government. In fact, probably the ONLY possible government.

When you throw in those pesky humans who like to think for themselves (or not, as the case may be), some of the inherent assumptions of communism start to fall apart. At that point, capitalism takes over.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:20
Joined
Feb 28, 2001
Messages
27,131
i constantly ask myself why web languages even exist

They were originally designed to allow a web browser to paint text and pictures on your screen using linear (one-pass) operations. The HTML or Hyper Text Markup Language is simply a way to sneak formatting into a data stream so that you can take the file that was sent to you and quickly paint your screen according to what was commonly done back when HTML was first created. And part of that was designed to take advantage of what Windows did/does. You start EVERY window with a blank "canvas" and proceed to drop background info, text, etc. using WINDOWS primitives.

Things changed when more primitives and more complex non-primitive features commonly became available, leading to XML, Java, and the myriad of other ways of getting a screen from point A to point B while preserving its interactive capabilities.

Web languages exist because of history and the fact that they served a purpose at a time when screen utilities were in short supply - but Windows itself had primitives that could be relied upon to exist. Does that help?
 

AccessBlaster

Registered User.
Local time
Today, 04:20
Joined
May 22, 2010
Messages
5,913
Wow that made my head hurt, I need another cup of coffee after that read. :p
 

Users who are viewing this thread

Top Bottom