Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Scripting vs Programming

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,46730
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Scripting vs Programming
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
 Scripting vs Programming - 5/7/2007 7:19:06 PM   
  rudrarup


Posts: 58
Score: 0
Joined: 5/26/2005
From: Pune
Status: offline
What is the difference between scripting and programming?
How is a script different from a program?

_____________________________

Be content. Have the sporting spirit.
Trishanku.
 
 
Post #: 1
 
 RE: Scripting vs Programming - 5/8/2007 4:51:38 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
Larry Walls touched o n this exact issue in an interview one time. His background is as a linguist so he approached it from the etymology of the words. Basically his conclusion is that the line between the two is more blurry than most people think (you can embed an interpreter on a chip in a device so is a scripted language interpreted then or compiled). Essentially it comes down to ease and flexibility of change. Scripts change quickly and easily whereas programs require more effort. The classic definition is it is a program if it is compiled and it is a script if it is interpreted. This is a good starting point, but not the final definition in my opinion.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to rudrarup)
 
 
Post #: 2
 
 RE: Scripting vs Programming - 5/9/2007 1:03:51 AM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
I prefer to be even more basic than that.

If you can open the file in Notepad and it's readable then it's a script.  If it's a bunch of gobbledygook with weird characters everywhere, it's probably a program.  :)

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Scripting vs Programming - 5/9/2007 1:59:11 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
That definition works for me too. Of course it begs the question of an encoded vbscript.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ginolard)
 
 
Post #: 4
 
 RE: Scripting vs Programming - 6/1/2007 9:14:47 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
quote:

The classic definition is it is a program if it is compiled and it is a script if it is interpreted


In practice a "script" is directly editable in notepad (or similar), a program is not. If you open an exe in notepad you will see little black squares. If you open a script, you will see the code.

That's the main difference...as I see it.

Now you can expand the definitions with sophisticated phylosophical theories. I'm sure Wikipedia is full of it.

_____________________________

Fred

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: Scripting vs Programming - 6/1/2007 10:26:54 AM   
  dm_4ever


Posts: 2726
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I am not a programmer and recently took a intro C++ class to see what it was like...it helped to understand things better.

One thing scripting and programming languages seem to have in common is Sequence (the order of your code), Selection (If and Select/Switch type statements), and Iteration (Loops)...so the line is very blurry in my eyes.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to rudrarup)
 
 
Post #: 6
 
 RE: Scripting vs Programming - 6/5/2007 1:34:46 AM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
Another point

Programmers think scripters are amateur programmers with no ambition.

Scripters think programmers are elitist tossers.



_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to dm_4ever)
 
 
Post #: 7
 
 RE: Scripting vs Programming - 6/5/2007 12:12:05 PM   
  TNO


Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I think of it more like this:

              -----Programming-----
            |                                |
Scripting(JS/VBS)   Compiling(C++/VB)

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ginolard)
 
 
Post #: 8
 
 RE: Scripting vs Programming - 6/5/2007 6:42:59 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
              -----Programming-----
            |                                |
Scripting(JS/VBS)   Compiling(C++/VB)
           |                                |
            -----Helpdesk Staff----
           |                                |
              -----Cleaners-----
           |                                |
             -----Amoeba-----
           |                                |
           -----Project Managers-----

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to TNO)
 
 
Post #: 9
 
 RE: Scripting vs Programming - 6/7/2007 9:21:42 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
If VBScript could be compiled in executable then we would be programmers.
I still don't undrstand why this can't be done since that's what Wscript.exe just does everytime you launch a script.

Well, programmers say, "translating to VB is very easy". I tried once, I never got even through the "Hello Wold" test. :(


_____________________________

Fred

(in reply to ginolard)
 
 
Post #: 10
 
 RE: Scripting vs Programming - 6/8/2007 2:03:56 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
WScript.exe does not compile the script to an executeable. It is a scripting host. It is the executeable.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Fredledingue)
 
 
Post #: 11
 
 RE: Scripting vs Programming - 6/8/2007 8:09:50 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
Correct me if I'm wrong, but isn't wscript.exe "interpretatting" the script into a binary form before executing it?

_____________________________

Fred

(in reply to ebgreen)
 
 
Post #: 12
 
 RE: Scripting vs Programming - 6/11/2007 1:45:59 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
I don't believe so. I think it essentially reads through the script and executes the commands that are in it. I could be wrong, but in theory if it were compiling to a binary then I should see a new binary appear using filemon and I don't think I ever have.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Fredledingue)
 
 
Post #: 13
 
 RE: Scripting vs Programming - 6/11/2007 3:25:39 AM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
The VBScript engine does two passes on the source code. Evidence: a syntax error
in the last line will be caught before a run time error in the first line. I can't prove but
believe that the first pass will generate an intermediate form of the script to make
the second - interpreting/executing - pass more efficient. One argument: the VBA
interpreter has this functionality (you can choose Compile or Run from the menu).
This intermediate form is not binary = native x86 code but more akin to the MIL
of the .Net languages or the byte code of Java.

In my opinion, "scripting" is to "programming" what "essay writing" is to "writing a
(scientific) book". The aims/goals are different: An essay should present the most
important facts in an easy to read way; a script should do its job correctly but
may skip some of the pedantic things necessary for a 'heavy duty' program in
exchange for being easy/easier to write.

Some people believe that French is especially suited to write essays, so let's assume
- for the sake of the following argument - that it is somewhat easier to write scientific
books in Chinese. VBScript/Javascript/Perl ... are better suited to scripting (simple/no types,
Eval/Execute, many defaults); C/C++/... are good for programming (strict type system,
compile time checks, flexibility). But modern languages blurr this difference: Java or
the .Net languages are compiled (to an intermediate language) but can generate/compile/
execute new code at runtime.

I think, the most important rule is:

Quidquid agis, prudenter agas et respice finem

(Whatever you do, do it carefully/wisely, and consider the end/result)

< Message edited by ehvbs -- 6/11/2007 10:23:25 PM >

(in reply to ebgreen)
 
 
Post #: 14
 
 RE: Scripting vs Programming - 6/11/2007 5:13:38 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
Why am I not in the least bit suprised that you know Latin?  

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to ehvbs)
 
 
Post #: 15
 
 RE: Scripting vs Programming - 6/11/2007 10:27:45 PM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi ginolard,

because you are a wise guy?

(I may know some Latin, because in Gemany there was a theory, that pupils would learn
all other languages better, if they were first exposed to Latin. Evidently my English is
a counter example to that theory)

ehvbs

(in reply to ginolard)
 
 
Post #: 16
 
 RE: Scripting vs Programming - 6/12/2007 9:34:15 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
quote:

ORIGINAL: ebgreen

I don't believe so. I think it essentially reads through the script and executes the commands that are in it. I could be wrong, but in theory if it were compiling to a binary then I should see a new binary appear using filemon and I don't think I ever have.


I think that the second "interpretation" ehvbs talked about is binary and even must be binary to be executed.
If Wscript had to always take a text input and return a result, like, say, your browser return a webpage when you enter an address, it would take ages to execute functions and loops.
Take our examples of sorting function: functions which are run 10,000 times on a list of 10,000 words: Obviousely Wscript doesn't re-read the cod in text format everytime or you will have to wait until tomorrow.
The script may not run "as an executable" but it may run as binary datas being streamed via Wscript Host to the proceessor.





_____________________________

Fred

(in reply to ebgreen)
 
 
Post #: 17
 
 RE: Scripting vs Programming - 6/12/2007 10:35:27 AM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Some good arguments & facts here:

  http://blogs.msdn.com/ericlippert/archive/2004/03/08/86177.aspx

(in reply to Fredledingue)
 
 
Post #: 18
 
 RE: Scripting vs Programming - 6/13/2007 1:40:02 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
That is a good read. Thanks for the post. So it looks like VBScript gets compiled to an IL, but I don't consider that the same as

"If VBScript could be compiled in executable then we would be programmers.
I still don't undrstand why this can't be done since that's what Wscript.exe just does everytime you launch a script. "

Which was the initial discussion around script compilation.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ehvbs)
 
 
Post #: 19
 
 RE: Scripting vs Programming - 8/27/2007 8:03:10 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
Philosophy (the love of wisdom or the love of knowledge)

Programming is programming, writing code, the type of code/language is not an issue.

To me a script has an almost singular purpose a small tool to use, where an application has many purposes.

If you can write a computer program you are a programmer, no matter what kind of program it is IMHO.

I worked in COBOL on Mainframe/UNIX systems for a long time, decided to learn about PC/Servers/Networks in the process I found out they are all computers, DANG!
People think networking is complex, Routers are computers with an almost single task, route packets (data) to the right place, but they are not scripts?

I've been told by programmers "I wish I knew about PC's" I know they didn't want to know about the hardware they wanted to know VB or C, another language.

Programming is knowing not just a specific language but programming constructs.

The verbs/syntax may be different but they achieve the same goal
COBOL CODE

      

VBS CODE

      

Is one programming and the other scripting because one is COBOL and the other VB Script?

< Message edited by mcds99 -- 8/28/2007 7:40:38 AM >


_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to ebgreen)
 
 
Post #: 20
 
 
Page:   [1] 2   next >   >>
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Scripting vs Programming Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts