"programming" versus "scripting"
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
"programming" versus "scripting"
I see "Scripting" quite frequently nowadays, but when I look at a "script" I see what used to be called a "program".
Am I just getting grumpy in my old age, or is there a difference?
I have a similar problem with the term "macro". Nowadays I have to use the term "macro" to refer to any named procedure or program that combines several operations of the host platform into a "black box" that can be used.
I grew up with proper macros as in the DEC PDP-6 (Macro-6) and the IBM 1401 (Autocoder), and have never forgiven MSoft for appropriating the term "macro" as a term for parameter-less subroutines (grin)
"macros" used to offer compile-time parameters and conditional statements. Nowadays they can refer to little more than a sequence of commands grouped under a label. Yes, Audacity, I'm talking about you. Audacity macros are basically a list of user-menu commands written out one after another.
This post about conditional compilation is the closest thing to a real "macro" that VBA has. IMNSHO
What are your thoughts on "programming" versus "scripting"?
Can you come up with an example of a program that cannot be called a script or, for that matter, a script that cannot be called a program?
Cheers
Chris
Am I just getting grumpy in my old age, or is there a difference?
I have a similar problem with the term "macro". Nowadays I have to use the term "macro" to refer to any named procedure or program that combines several operations of the host platform into a "black box" that can be used.
I grew up with proper macros as in the DEC PDP-6 (Macro-6) and the IBM 1401 (Autocoder), and have never forgiven MSoft for appropriating the term "macro" as a term for parameter-less subroutines (grin)
"macros" used to offer compile-time parameters and conditional statements. Nowadays they can refer to little more than a sequence of commands grouped under a label. Yes, Audacity, I'm talking about you. Audacity macros are basically a list of user-menu commands written out one after another.
This post about conditional compilation is the closest thing to a real "macro" that VBA has. IMNSHO
What are your thoughts on "programming" versus "scripting"?
Can you come up with an example of a program that cannot be called a script or, for that matter, a script that cannot be called a program?
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- Administrator
- Posts: 78236
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: "programming" versus "scripting"
The distinction is rather blurry, but roughly speaking, a programming language creates a new, compiled application, while a script is being interpreted inside an existing application.
So VB6 is a programming language and VBA is a scripting language, although they share the same syntax to a large extent.
So VB6 is a programming language and VBA is a scripting language, although they share the same syntax to a large extent.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 545
- Joined: 18 Jan 2022, 15:59
- Location: Re-routing rivers, in Hof, Beautiful Bavaria
Re: "programming" versus "scripting"
Hello Chris,
Just my experience so far with “scripting” as apposed to "programming". But I am right at the start of my “scripting career”
( Having read what Hans said I am not sure if I am now scripting, but just programming another language )
I started learning writing things in PowerShell to make things get done quickly that otherwise took a long time manually, about a week ago, .. reluctantly**. (I am working on a long Windows 10 Debloat script thing ) ( **Reluctantly mostly because I got a lot better things to do. But a very useful ( IMO ) windows project by some smart people has been left hanging, almost finished, as they progressively got fed up with Microsoft and have moved on to other things. Seems a shame to drop it, so I am trying to pick it up).
In various development meetings and informal discussions it was often said a Statement something along the lines of ….” This ain’t programming, its scripting….”
The person saying it was responded with God like admiration, something like, “yes, good point , I love you Sir …. etc.
That statement made sense to me at the time , or rather it just had a gut feel to me in ignorance of too many facts, suggested to me that that was a reasonable statement. Maybe as prominent people said it, then it has to be. (If I’d have said it, I would have been thrown out for being a naive idiot, I expect, and told not to keep exposing my ps1 files in a powershell window****).
So far, my conclusion, ( and I stress so far as I only just started) is, that it seems to me to look something like a mixture of
_ the simple line by line Basic I learnt when computers first started, ( but with more complicated code lines),
and
_ the Object orientated VB and VBA that hit me when I came out of a very long computer and technology coma a few years ago when I bought my first PC
As far as I can tell so far, you can chuck a lot of single commands like the single commands, line by line, you might do those lines one at a time in a PowerShell or Command window, in a simple text file. Save it as .ps1 instead of .txt then more or less all you have to do is expose that file in a powershell window****, and it all runs one line after the other. But within that ps1 file you can do more complicated things that resemble very much to me what I do with VBA coding
Further more I can turn the script into a .exe, that runs a GUI and looks very similar to what you end up with as a Visual Basic Form or a VBA UserForm
Having just read what Hans said, I can see that a VBA UserForm and my .exe "PowerShell script evoked” form is working similarly in that, Excel seems to be there when a VBA User form is there, and a PowerShell window seems to be there even when I launch my .exe
So possible the difference is at the more academic level, how it works, rather than what it is to work with.
For a upper level Programmer he would probably list both under his known programming skills in his CV I expect.
( I am not going to tell the people the following, but the situation in which the phrase, ….” This ain’t programming, its scripting….” , was said , made it a bad statement, I think, ( hence I would have been chucked out if I had said it ). In the same breath the person said learning writing the coding, he was finding more difficult than many other languages. So really he was discussing Programming PowerShell script, maybe.
Alan
Just my experience so far with “scripting” as apposed to "programming". But I am right at the start of my “scripting career”
( Having read what Hans said I am not sure if I am now scripting, but just programming another language )
I started learning writing things in PowerShell to make things get done quickly that otherwise took a long time manually, about a week ago, .. reluctantly**. (I am working on a long Windows 10 Debloat script thing ) ( **Reluctantly mostly because I got a lot better things to do. But a very useful ( IMO ) windows project by some smart people has been left hanging, almost finished, as they progressively got fed up with Microsoft and have moved on to other things. Seems a shame to drop it, so I am trying to pick it up).
In various development meetings and informal discussions it was often said a Statement something along the lines of ….” This ain’t programming, its scripting….”
The person saying it was responded with God like admiration, something like, “yes, good point , I love you Sir …. etc.
That statement made sense to me at the time , or rather it just had a gut feel to me in ignorance of too many facts, suggested to me that that was a reasonable statement. Maybe as prominent people said it, then it has to be. (If I’d have said it, I would have been thrown out for being a naive idiot, I expect, and told not to keep exposing my ps1 files in a powershell window****).
So far, my conclusion, ( and I stress so far as I only just started) is, that it seems to me to look something like a mixture of
_ the simple line by line Basic I learnt when computers first started, ( but with more complicated code lines),
and
_ the Object orientated VB and VBA that hit me when I came out of a very long computer and technology coma a few years ago when I bought my first PC
As far as I can tell so far, you can chuck a lot of single commands like the single commands, line by line, you might do those lines one at a time in a PowerShell or Command window, in a simple text file. Save it as .ps1 instead of .txt then more or less all you have to do is expose that file in a powershell window****, and it all runs one line after the other. But within that ps1 file you can do more complicated things that resemble very much to me what I do with VBA coding
Further more I can turn the script into a .exe, that runs a GUI and looks very similar to what you end up with as a Visual Basic Form or a VBA UserForm
Having just read what Hans said, I can see that a VBA UserForm and my .exe "PowerShell script evoked” form is working similarly in that, Excel seems to be there when a VBA User form is there, and a PowerShell window seems to be there even when I launch my .exe
So possible the difference is at the more academic level, how it works, rather than what it is to work with.
For a upper level Programmer he would probably list both under his known programming skills in his CV I expect.
( I am not going to tell the people the following, but the situation in which the phrase, ….” This ain’t programming, its scripting….” , was said , made it a bad statement, I think, ( hence I would have been chucked out if I had said it ). In the same breath the person said learning writing the coding, he was finding more difficult than many other languages. So really he was discussing Programming PowerShell script, maybe.
Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
I agree that the distinction is blurry, but to my mind, that is the fault of the users, who prefer "information" to "data" because it sounds more imposing.HansV wrote: ↑22 Jan 2022, 16:34The distinction is rather blurry, but roughly speaking, a programming language creates a new, compiled application, while a script is being interpreted inside an existing application.
So VB6 is a programming language and VBA is a scripting language, although they share the same syntax to a large extent.
When I was younger I worked in a language centre where we took in (computer) language specifications and churned out compilers and interpreters. Alan's point has value here. Fifty years ago there were, as I recall, compilers for BASIC which was known for its interpreters.
Waterloo produced compilers and interpreters, I think that they had an interpreted FORTRAN.
Code: Select all
I = J + K
The IBM 1401 was emulated (or simulated, here we go!) on CDC-3300s and, I guess, other mainframes, as The Seven Dwarfs strived for market share back in the late 60s. CDC interpreted the IBM 1401 Autocoder programs that, the year before, were limited to two 1401-compilations because machine time was so scarce.
I think that this is why I find the terms programming/scripting so frustrating. It's a language that I use to communicate my algorithm of a solution to a machine platform that has promised to spit out a numeric value at the end of the process.
In short: I still can't find any situation where the use of the term "scripting" shows any advantage over the term "programming"
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
Alan, I leaped onto this statement.DocAElstein wrote: ↑22 Jan 2022, 17:27( Having read what Hans said I am not sure if I am now scripting, but just programming another language )
I suspect that for you, as for me, there is no real distinction between the terms "programming" and "scripting".
As far as you are concerned, you are submitting instructions in a well-defined language, to a machine that will obey your instructions.
"Machine" used to mean, to me, a large plastic-and-metal thing that generated a lot of heat.
Then I learned that a machine could be a software platform such as an assembly language or the FORTRAN language etc.
Then I learned that what I thought of as machine/assembly language was run on a still smaller machine which was programmed (by hardware engineers(1)) in MicroCode.
Then I learned that microcode was half-adders and the like.
Then that half-adders were Nand and Nor gates soldered together ... and at that time I sat for the exam and passed.
(1) Who as an inevitable result were instantly turned into programmers!
Cheers, Chris
P.S. On your resume for the job application, make sure that you sprinkle "programming" and "scripting" in equal amounts, for then your resume will look much more impressive than mine
"I see that Alan has been programming AND SCRIPTING" for a year now, but this guy Chris only does programming. Let's hire Alan".
C
An expensive day out: Wallet and Grimace
-
- PlatinumLounger
- Posts: 4023
- Joined: 24 Jan 2010, 07:23
Re: "programming" versus "scripting"
I would have thought that scripting is a subset of programming. If you script, you are programming, and a script is a particular form of a program. But a script is acting on another software object (say Excel, HTML, or Outlook, for example), whereas a program may be also standalone - calculating a payroll of catching criminals for instance.
Any script (in the software sense anyway) is a program, but not every program is a script.
Any script (in the software sense anyway) is a program, but not every program is a script.
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
Thank you, Geoff. Something for me to think about. I had phrased my question in terms of either/or, without considering subsets.GeoffW wrote: ↑23 Jan 2022, 00:01I would have thought that scripting is a subset of programming. If you script, you are programming, and a script is a particular form of a program. But a script is acting on another software object (say Excel, HTML, or Outlook, for example), whereas a program may be also standalone - calculating a payroll of catching criminals for instance. Any script (in the software sense anyway) is a program, but not every program is a script.
In terms of your scenario, I still think of "platforms", what I used to think of as "machines". I used to say "I program in COBOL on a Burroughs 5500" or "I program in Autocoder on an IBM 1401", but over the years I have tended towards "I program in Word/VBA". That is, the machine on which I program is "Microsoft's Word/VBA", regardless of the brand of laptop. Strictly speaking "I program in Windows10/Word2003/VBA". Back in the day, of course, every COBOL was different, so "I program in Burroughs5500/COBOL".
Today, then, "You program in Windows10/Excel2003/VBA", but neither of us "programs in Payroll". We just run the payroll program.
The payroll program, by the way, is written in FORTRAN, so whoever wrote the payroll program "programmed in CDC-CYBER/FORTRAN".
In short, how would you script, or how would you program, on a payroll program? I still can't find a use for "scripting". But perhaps i am being stubborn. As usual.
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- Microsoft MVP
- Posts: 1313
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: "programming" versus "scripting"
I'll also agree with the sentiment that there's very little if any difference between "programming" and "scripting". I'd propose a distinction that probably few other tech people think about in this topic:
There are lots of programs (but fewer than there used to be) that support only "scripts" or "macros" that behave like a human operator clicking keys and/or buttons in the program's user interface. Examples include WordBasic, WordPerfect 5, and text editors such as UltraEdit. I would call this "scripting".
Platforms that support objects, conditional compilation, recursion, access to APIs, and other features not directly related to the platform's function can reasonably be called "programming" languages.
As a counterexample, though, one of the great resources for PowerShell (in my opinion, a programming language) is called the Scripting Blog, run by the Scripting Guys.
There are lots of programs (but fewer than there used to be) that support only "scripts" or "macros" that behave like a human operator clicking keys and/or buttons in the program's user interface. Examples include WordBasic, WordPerfect 5, and text editors such as UltraEdit. I would call this "scripting".
Platforms that support objects, conditional compilation, recursion, access to APIs, and other features not directly related to the platform's function can reasonably be called "programming" languages.
As a counterexample, though, one of the great resources for PowerShell (in my opinion, a programming language) is called the Scripting Blog, run by the Scripting Guys.
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
Thank you, Jay; I was starting to think that "scripting" might be just that: Like primitive "Job Decks" in the good old days, where a set of up to a dozen cards were handed in as a Job, and each card held a specific instruction to mount a tape, load a program deck, label the output and so on. Little more than a shopping-list that, years before, would have been written on a form and handed to a human in a white lab coat.Jay Freedman wrote: ↑23 Jan 2022, 20:40... like a human operator clicking keys and/or buttons in the program's user interface. Examples include WordBasic, WordPerfect 5, and text editors such as UltraEdit. I would call this "scripting".
In today's world, then, I would call a set of instructions a Script if it was merely a one-to-one representation of a sequential list of commands that I could otherwise have selected one after another from the menu system in Audacity or Word or Excel.
Significantly, Scripting would then mean "commands", but would involve no decision-making, because decision-making was carried out by the brain of the user/operator, based on the outcome of the previous command.
Which is what makes me thing that Programming must involve decision-making.
Crudely put, if the stored instruction set can include decision-making constructions such as if/then/else and for/next, then I would say that it is a Programming Language, but that if the host can obey only imperative instructions, then it is a scripting language.
My earlier example of
Code: Select all
I = J + K
I think too that this means that all versions of DOS which offered an IF-statement could be called programming languages.
I agree with this on the grounds that long before we get objects, conditional compilation, recursion and so on, we will find that we have conditional statements.Platforms that support objects, conditional compilation, recursion, access to APIs, and other features not directly related to the platform's function can reasonably be called "programming" languages.
I once wrote an interpreter for a single-instruction computer whose instruction was "Subtract And Store", but adopted the ICL-1900 series idea of the program instruction counter being a word in memory (00019 in the ICL 1900 series) and since I could combine SUBS instructions to effect a move-instruction, I could modify the Instruction Counter, so the interpreter supported conditional branching and hence could be said to support a programming language.
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
And then I thought about the word "script". This is not a new word. It has been around for a long time. In particular it brings to mind "scriptorium" where Irish Monks used to make copies of the bible, and it brings to mind "scrolls" which were long narrow pieces of parchment? or vellum? written in serial fashion.ChrisGreaves wrote: ↑22 Jan 2022, 16:06I see "Scripting" quite frequently nowadays, but when I look at a "script" I see what used to be called a "program".
Am I just getting grumpy in my old age, or is there a difference?
I have in my mind an idea that a scroll was held between two hands and unwound from one hand while being wound on the other hand. Very much like a reel-to-reel tape recorder. This meant that a script was in no way a random-access device; you couldn't jump about from "here" to "there". You had to plod serially through the material, or laboriously wind back-and-forth.
With that thought in mind I like my current theory more and more:-
A script is a set of instructions laid out and executed in a serial manner, and executed once from Start to End.
A program is an ordered set of instructions with the (programmer's) ability to work in a non-serial fashion, especially by reverting to an earlier instruction ("branching back"), and on occasions effecting a decision about whether or not to branch back.
In terms of storage media, anything on a scroll would be a script, but when leaves were bound together in a book, the book could hold either a script or a program.
Chris
An expensive day out: Wallet and Grimace
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: "programming" versus "scripting"
Hi, My twopenneth..
Just a thought.
Would it be worth thinking a script as being that which is delivered to actors whereas the programmers perhaps could be thought of as the playwrights?
Hmmmm
Lisa
Just a thought.
Would it be worth thinking a script as being that which is delivered to actors whereas the programmers perhaps could be thought of as the playwrights?
Hmmmm
Lisa
-
- UraniumLounger
- Posts: 9216
- Joined: 13 Feb 2010, 01:27
- Location: Deep in the Heart of Texas
Re: "programming" versus "scripting"
So does that mean that William S. of the Globe, who died in 1628, was a programmer?
Bob's yer Uncle
Intel Core i5, 3570K, 3.40 GHz, 16 GB RAM, ECS Z77 H2-A3 Mobo, Windows 10 >HPE 64-bit, MS Office 2016
(1/2)(1+√5) |
-
- PlatinumLounger
- Posts: 5401
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: "programming" versus "scripting"
What you are calling a "script" might better be described as a "recipe", if you mean a sequential list of instructions.
FOR otherwise you would have to remove any non-linear features from your so-called "script", and THEN we'd be back with Dijkstra's "GOTO statement considered harmful"... [March 1968 Communications of the ACM (CACM)]
FOR otherwise you would have to remove any non-linear features from your so-called "script", and THEN we'd be back with Dijkstra's "GOTO statement considered harmful"... [March 1968 Communications of the ACM (CACM)]
John Gray
Venison is quiet deer, and quite dear.
Venison is quiet deer, and quite dear.
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
There is merit in thought. Most thoughts, at any rate.
If we go outside the the arena of computing, then (as a few posts here suggest) a recipe can be thought of as a program - I am thinking here of puff pastry where we have to execute a roll-and-fold ten(1) or more times for the French milles feuilles(2) or flaky-pastry. Or else a recipe that says "keep adding <ingredient> until <some condition is met>". I had a great sense of loss when my second wife left me, because she took the knitting machine, and I had only that week worked out how to program the thing in DOS-MASM.
When we get into drama, we have the playwright, and the play usually has dialogue and stage directions ("Chris enters left and moves stage right") which, as John Gray points out, would upset Dijkstra no end.
There are Stage Managers who override the dramatist's instructions and declare that "we are not going to have any blood on MY stage ....".
Dustin Hoffman in "Tootsie" (a script with at least two wonderfully illogical dialogues) played the part of a method actor who ignored the playwright's directions a great deal of the time, which, he said, wrestling his mind back to script/program, is the opposite of every computer I've ever met. Most of my problems with programming computers is that they do exactly as I tell them
Oh yes, I nearly forgot the footnotes:
(1) Two raised to the power ten being roughly ten raised to the power three.
(2) Poissy, September 2016, around 4pm. I am in the pastry shop hunting for my evening dessert. Each afternoon I choose a pastry (a) that I haven't tried before and (b) that is difficult to pronounce. I settle on a milles feuilles, turn to the lady and in French say "Please, I'd like a "thousand flakes". Is that how it is pronounced - Thousand Flakes?"
"Yes", says the cheerful young miss, "but, dear sir, I am desolated. Today is Friday".
"Friday? What's Friday got to do with it?"
"Well sir, you see, on Friday we put only nine hundred and fifty flakes, it being a fast-day".
I love her still.
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
If we go by the number of scribbled corrections, amendments, enhancements, fixes, optimizations and other changes in his scripts, Yes.
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
Eh?
Are you suggesting that Dijkstra was "into" programming? I thought he died long before javascript
Cheers
Chris
PS> Although if he was Dutch, then he obviously had some connection with Indonesia.
C
An expensive day out: Wallet and Grimace
-
- Administrator
- Posts: 78236
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: "programming" versus "scripting"
Uh, JavaScript is from 1995, while Edsger Dijkstra died in 2002.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
Good Grief!
Cheers
Chris
An expensive day out: Wallet and Grimace
-
- PlatinumLounger
- Posts: 5401
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: "programming" versus "scripting"
Looks like Chris is 'off script' again!
John Gray
Venison is quiet deer, and quite dear.
Venison is quiet deer, and quite dear.
-
- PlutoniumLounger
- Posts: 15498
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: "programming" versus "scripting"
OK. Try this: (related to "Footnotes: A sixth option")
It dawned on me today that when I am processing a word-processing document, the document is presented to me in the form of a scroll. Indeed we "scroll down" or "scroll up" using the PgDn/PgUp keys.
And hence (in Word2003 at any rate) we are offered two basic locations for "notes" - at Foot or at End. These two options apply according to our view, whether we see this Word2003 document as a book (at foot of page of a book) or as a scroll (at the end of the scroll).
I do not say that Microsoft's terminolgy defines a book or a scroll, as much as that centuries-old distinction carries over into word-processing terminology.
Cheers
Chris
You do not have the required permissions to view the files attached to this post.
An expensive day out: Wallet and Grimace