Scripting vs Programming

Change Page: 12 > | Showing page 1 of 2, messages 1 to 20 of 25
Author Message
rudrarup

  • Total Posts : 57
  • Scores: 0
  • Reward points : 0
  • Joined: 5/26/2005
  • Location: Pune
  • Status: offline
Scripting vs Programming Monday, May 07, 2007 8:19 PM (permalink)
0
What is the difference between scripting and programming?
How is a script different from a program?
Be content. Have the sporting spirit.
Trishanku.
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: online
    RE: Scripting vs Programming Tuesday, May 08, 2007 5:51 AM (permalink)
    0
    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
     
    #2
      ginolard

      • Total Posts : 1347
      • Scores: 23
      • Reward points : 0
      • Joined: 8/11/2005
      • Status: offline
      RE: Scripting vs Programming Wednesday, May 09, 2007 2:03 AM (permalink)
      0
      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

       
      #3
        ebgreen

        • Total Posts : 8227
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: online
        RE: Scripting vs Programming Wednesday, May 09, 2007 2:59 AM (permalink)
        0
        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
         
        #4
          Fredledingue

          • Total Posts : 572
          • Scores: 2
          • Reward points : 0
          • Joined: 5/9/2005
          • Location: Europe
          • Status: offline
          RE: Scripting vs Programming Friday, June 01, 2007 10:14 AM (permalink)
          0

          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
           
          #5
            dm_4ever

            • Total Posts : 3687
            • Scores: 82
            • Reward points : 0
            • Joined: 6/29/2006
            • Location: Orange County, California
            • Status: offline
            RE: Scripting vs Programming Friday, June 01, 2007 11:26 AM (permalink)
            0
            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
             
            #6
              ginolard

              • Total Posts : 1347
              • Scores: 23
              • Reward points : 0
              • Joined: 8/11/2005
              • Status: offline
              RE: Scripting vs Programming Tuesday, June 05, 2007 2:34 AM (permalink)
              0
              Another point

              Programmers think scripters are amateur programmers with no ambition.

              Scripters think programmers are elitist tossers.


              Author of ManagePC - http://managepc.net

               
              #7
                TNO

                • Total Posts : 2094
                • Scores: 36
                • Reward points : 0
                • Joined: 12/18/2004
                • Location: Earth
                • Status: offline
                RE: Scripting vs Programming Tuesday, June 05, 2007 1:12 PM (permalink)
                0
                I think of it more like this:
                 
                               -----Programming-----
                             |                                |
                  Scripting(JS/VBS)   Compiling(C++/VB)
                To iterate is human, to recurse divine. -- L. Peter Deutsch
                 
                #8
                  ginolard

                  • Total Posts : 1347
                  • Scores: 23
                  • Reward points : 0
                  • Joined: 8/11/2005
                  • Status: offline
                  RE: Scripting vs Programming Tuesday, June 05, 2007 7:42 PM (permalink)
                  0
                                -----Programming-----
                              |                                |
                  Scripting(JS/VBS)   Compiling(C++/VB)
                              |                                |
                               -----Helpdesk Staff----
                              |                                |
                                 -----Cleaners-----
                              |                                |
                                -----Amoeba-----
                              |                                |
                              -----Project Managers-----
                  Author of ManagePC - http://managepc.net

                   
                  #9
                    Fredledingue

                    • Total Posts : 572
                    • Scores: 2
                    • Reward points : 0
                    • Joined: 5/9/2005
                    • Location: Europe
                    • Status: offline
                    RE: Scripting vs Programming Thursday, June 07, 2007 10:21 AM (permalink)
                    0
                    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
                     
                    #10
                      ebgreen

                      • Total Posts : 8227
                      • Scores: 98
                      • Reward points : 0
                      • Joined: 7/12/2005
                      • Status: online
                      RE: Scripting vs Programming Friday, June 08, 2007 3:03 AM (permalink)
                      0
                      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
                       
                      #11
                        Fredledingue

                        • Total Posts : 572
                        • Scores: 2
                        • Reward points : 0
                        • Joined: 5/9/2005
                        • Location: Europe
                        • Status: offline
                        RE: Scripting vs Programming Friday, June 08, 2007 9:09 AM (permalink)
                        0
                        Correct me if I'm wrong, but isn't wscript.exe "interpretatting" the script into a binary form before executing it?
                        Fred
                         
                        #12
                          ebgreen

                          • Total Posts : 8227
                          • Scores: 98
                          • Reward points : 0
                          • Joined: 7/12/2005
                          • Status: online
                          RE: Scripting vs Programming Monday, June 11, 2007 2:45 AM (permalink)
                          0
                          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
                           
                          #13
                            ehvbs

                            • Total Posts : 3320
                            • Scores: 110
                            • Reward points : 0
                            • Joined: 6/22/2005
                            • Location: Germany
                            • Status: offline
                            RE: Scripting vs Programming Monday, June 11, 2007 4:25 AM (permalink)
                            0
                            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 on Monday, June 11, 2007 11:23 PM>
                             
                            #14
                              ginolard

                              • Total Posts : 1347
                              • Scores: 23
                              • Reward points : 0
                              • Joined: 8/11/2005
                              • Status: offline
                              RE: Scripting vs Programming Monday, June 11, 2007 6:13 PM (permalink)
                              0
                              Why am I not in the least bit suprised that you know Latin?  
                              Author of ManagePC - http://managepc.net

                               
                              #15
                                ehvbs

                                • Total Posts : 3320
                                • Scores: 110
                                • Reward points : 0
                                • Joined: 6/22/2005
                                • Location: Germany
                                • Status: offline
                                RE: Scripting vs Programming Monday, June 11, 2007 11:27 PM (permalink)
                                0
                                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


                                 
                                #16
                                  Fredledingue

                                  • Total Posts : 572
                                  • Scores: 2
                                  • Reward points : 0
                                  • Joined: 5/9/2005
                                  • Location: Europe
                                  • Status: offline
                                  RE: Scripting vs Programming Tuesday, June 12, 2007 10:34 AM (permalink)
                                  0

                                  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
                                   
                                  #17
                                    ehvbs

                                    • Total Posts : 3320
                                    • Scores: 110
                                    • Reward points : 0
                                    • Joined: 6/22/2005
                                    • Location: Germany
                                    • Status: offline
                                    RE: Scripting vs Programming Tuesday, June 12, 2007 11:35 AM (permalink)
                                    0
                                    Some good arguments & facts here:

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

                                      • Total Posts : 8227
                                      • Scores: 98
                                      • Reward points : 0
                                      • Joined: 7/12/2005
                                      • Status: online
                                      RE: Scripting vs Programming Wednesday, June 13, 2007 2:40 AM (permalink)
                                      0
                                      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
                                       
                                      #19
                                        mcds99

                                        • Total Posts : 519
                                        • Scores: 4
                                        • Reward points : 0
                                        • Joined: 2/28/2006
                                        • Status: offline
                                        RE: Scripting vs Programming Monday, August 27, 2007 9:03 AM (permalink)
                                        0
                                        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
                                         000001 IDENTIFICATION DIVISION.
                                         000002 PROGRAM-ID.  HELLO2.
                                         000003 AUTHOR.      BILL ROGERS.
                                         000004 ENVIRONMENT DIVISION.
                                         000005 DATA DIVISION.
                                         000006 WORKING-STORAGE SECTION.
                                         000007 01 WS-NAME PIC X(25).
                                         000008 PROCEDURE DIVISION.
                                         000009 MAINLINE.
                                         000010     DISPLAY 'Type your name: '.
                                         000011     ACCEPT WS-NAME.
                                         000012     DISPLAY 'Hello ' WS-NAME.
                                         000013     STOP RUN.
                                         


                                        VBS CODE
                                         DIM WS-NAME
                                         WS-NAME = inputbox("Type your name: ")
                                         wscript.echo "Hello " & WS-NAME
                                         wscript.quit
                                         


                                        Is one programming and the other scripting because one is COBOL and the other VB Script?
                                        <message edited by mcds99 on Tuesday, August 28, 2007 8:40 AM>
                                        Sam

                                        Keep it Simple Make it Fun KiSMiF
                                         
                                        #20

                                          Online Bookmarks Sharing: Share/Bookmark
                                          Change Page: 12 > | Showing page 1 of 2, messages 1 to 20 of 25

                                          Jump to:

                                          Current active users

                                          There are 0 members and 1 guests.

                                          Icon Legend and Permission

                                          • 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
                                          • Read Message
                                          • Post New Thread
                                          • Reply to message
                                          • Post New Poll
                                          • Submit Vote
                                          • Post reward post
                                          • Delete my own posts
                                          • Delete my own threads
                                          • Rate post

                                          2000-2012 ASPPlayground.NET Forum Version 3.9