topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 3:21 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Scripting vs. Programming  (Read 41342 times)

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,299
    • View Profile
    • Donate to Member
Scripting vs. Programming
« on: July 21, 2006, 04:01 PM »
Does a well-defined, efficient script merit the title of a program (merely a non-compiled one)?  Here at DonationCoder.com we have brilliant coders and scripters. I'm seeing more and more amazing things using AutoHotkey, PHP, and Perl scripts that are as useful as many programs I've used. What's the difference between the two?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #1 on: July 21, 2006, 04:13 PM »
a script is a program, i dont see how you could argue otherwise.  someone writing a script is programming.

if you wanted to differentiate things further you could talk about the complexity and size of the script.  the smaller and simpler, the less comparable it is to a large complicated program.

some programming languages are made for short scripts and are not as suitable for first class object oriented efficient execution, and are designed more for quick and dirty short macro commands in a program.  you wouldn't call someone who writes 3 line macros in ultraedit a "coder", but its a continuum.

there was a time when there was a clear distinction between the "real" programming languages like lisp/c/pascal/asm and scripting languages, which were program-specific simplistic macro systems, or things like the dos .bat language.

but the scripting languages of today, which include perl, python, ahk, are full fledged first class programming languages.

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 633
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #2 on: July 21, 2006, 06:27 PM »
I let's think about it this way:
Programming = Cooking.

Scripting = Short order cook
Application Coding = fine food chef

Easy.  :D
Insert Brilliant Sig line here

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #3 on: July 21, 2006, 06:37 PM »
My opinion is that, as for the languages, it works something like this:
-A scripting language is easy, a programming language is usually complex.
-A scripting language is fast which means you can code something interesting in just a bunch of lines. A programming language takes a bunch of includes, libraries, and at least some tens of lines to make something interesting.
-A scripting language is usually very limited, it's aimed at something very specific.Taking the example of ahk, it's mainly aimed at user interface. A programming language will allow you to do almost anything, if you have enough patience ;).

IMO, the main difference is in the last detail i mentioned. The more limited it is, the easier it can be handled and learned.

Basicly, it's like Rover said.
Fast food vs. Restaurant food.
Fast food is good, cheap and easy, but it's not exactly the best place to have a business meeting   :huh:

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #4 on: July 23, 2006, 02:30 AM »
Hmm. I think of a "script" as something that
A: requires some other app to run it (in the case of AHK it can bundle that thing with the script itself, so it blurs the lines...)
B: Is not compiled, therefore the "executable" version is human readible
C: Generally does not have its own GUI

AHK scripts often fit into all of the above whereas PHP apps, for example, often do not. I suppose for me a script is less a stand-alone useful thing, it is usually something that operates directly on other things - other apps or files. But ultimately it's hard to draw fine and absolute distinctions. To each their own, or something. ;)

- Oshyan

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,885
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #5 on: July 23, 2006, 08:59 AM »
If it's code you are writing, you are doing some sort of programming, in my opinion.

Others may disagree with my idea of web designers that hand code html in notepad as doing some sort of programming. But consider this: it's code they are writing....and it's not always easy to do. You try making a knockout looking website that validates, looks right in most browsers, and only use notepad to do it, and you will see. I think it's about time that the programming community give good web designers some of the credit they deserve.

On the assumption that scripting is easy and programming languages aren't, I would have to disagree. I have seen some very complex Javascript and some really simple VB & Delphi apps that only took a few lines of code to make, if any at all (simple Delphi example & complex Javascript example).

if programming = cooking then

  • html & css = prep chef or mom's home cooking
  • scripting languages = sometimes a short order cook, sometimes a chef in a smaller restaurant
  • low level programming languages = being both the farmer that grows the food as well as the master chef that cooks it
  • high level programming languages = all of the above, depending on the skills of the programmer and what they are creating

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #6 on: July 23, 2006, 09:21 AM »
I wouldn't call HTML-in-notepad programming. I can see why you could argue it's a form of programming, after all HTML is a language with syntax rules - but I think calling it programming is stretching it. Once you throw javascript or similar into the equation, it's a different thing, though.

Cute things CAN be done in javascript... it's just not a suitable language for doing that kind of stuff. But it's done nevertheless.
http://www.pouet.net...prod.php?which=13121
http://www.pouet.net...prod.php?which=18327
(heck, google "Javascript site:pouet.net").
- carpe noctem

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,299
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #7 on: July 24, 2006, 05:06 PM »
Thanks for the explanations. But is there a point at which a script becomes a program? f0dder makes a good point with javascript. The line is gray from my standpoint.

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #8 on: July 25, 2006, 01:18 AM »
Definitely gray at this point.

- Oshyan

dodowolf

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #9 on: July 25, 2006, 01:47 AM »
I would think programming include scripting. And in fact, as long as you could write down a concept, or a method of calculating using any type of langauge, it would be programming. Scripting is another way of saying "writing in a language which uses interpreter instead of compiler".

2cents

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 633
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #10 on: July 25, 2006, 09:20 AM »
I was thinking about the origins of scripting.  I think that Unix shell scripting would be among the first scripts.  I'm open to correction on that.

As I think about things in that light, scripts are special purpose, automation tools.  Think "Read from the script."  They tend to much less user interactive.  The purpose is to automate a routine or tedious task.  ie: start my web server with all of it's command line parameters.

There seems to be a fuzzy line where a script can become an application when you start adding more options and/or user control. 

I must be up to 4 cents by now.... :two: :two:
Insert Brilliant Sig line here

mukestar

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 68
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #11 on: July 28, 2006, 02:01 PM »
ive just got a black and white way of looking at it

If it contains variables its programming

I.e html is just mark up , its not programming
 

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #12 on: July 28, 2006, 06:07 PM »
Mukestart that's actually a really interesting distinction. As a non-programmer I can't claim a deep enough understanding to say whether that's really legitimate, but somehow it makes a little bit of intuitive sense to me. ;)

- Oshyan

mukestar

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 68
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #13 on: July 28, 2006, 06:37 PM »
I actually got it from my old boss, we had a web designer trying to chat up the receptionist and was telling her he was a programmer, and my boss shouted across the room

"Your not a F****ng programmer, you wouldn`t know a variable if it bit you on the arse"

Oh happy days

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #14 on: July 28, 2006, 06:48 PM »
lol

gjehle

  • Member
  • Joined in 2006
  • **
  • Posts: 286
  • lonesome linux warrior
    • View Profile
    • Open Source Corner
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #15 on: July 29, 2006, 11:45 PM »
html & css = w3c conform text formatting

scripts get interpreted
java gets interpreted
c# gets interpreted
pascal gets interpreted
perl gets interpreted

well, um, per defintion calling a perl scripter not a coder also means that java is not programming, or c#

if one takes a step back and looks at the principle, it's all programming
instructing the machine to do something or instructing something that instructs the machine is just another layer of abstraction
aslong as you write something that looks like code i'd say you're a coder/programmer

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #16 on: July 30, 2006, 04:30 AM »
In school I learned that every (part of a) program could be seen as following the principal "input-process-output". A function/method/procedure/sub is called with parameters (input), does something with them (process), and has thus changed the data, sometimes explicitely "return"ing it.

This uhmm metaphor can be extended: not only do functions call each other, programs can call each other; and to extend it even more: computers can "call" other computers to get a certain task done.

And when we are willing to accept that "The Internet" is a giant program, then a one-liner such as
echo There are $(dpkg -l *glib*|grep ^ii|wc -l) \"glib\"-packages installed.
should be considered a program too.

So what my teacher was getting at was not the looks, but how it was used: it's a program if it does something (anything!) with given data. No mentions of "professional" or "compilation".

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #17 on: July 30, 2006, 03:26 PM »
housetier: somehow, I don't see that oneliner as a program... but it's one of those fuzzy feelings. I don't see a person using VB to make a buttonclick change a textfield's color as "Programming", either.

On the other hand, scripting languages (whether we're talking perl, python, LUA, bash scripts or even .BAT files) can certainly be used for programming - and even shell scripts can do pretty complicated things. So why isn't the above oneliner "programming" to me? What does it lack?

Good question. I think it has something to do with variables, algorithms, program flow control, etc. When those are lacking, it just isn't programming to me. Hell, I don't think of writing RegExes as programming, although one could probably argue it is.

It's not really meant as patronization; but I think there's some usefulness in being able to differ between "I wrote a little program" vs. "I wrote a little script"... but there's a zillion shades of gray :)
- carpe noctem

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,299
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #18 on: July 31, 2006, 10:37 PM »
Good point. I can write simple scripts, but I couldn't write a program to spell my own name.

Unless it was a script.  :P

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #19 on: August 01, 2006, 06:16 AM »
but I think there's some usefulness in being able to differ between "I wrote a little program" vs. "I wrote a little script"

Where is the difference? And much more importantly: What's the use? (Many songs have been writting about this question, it seems kinda fundamental)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #20 on: August 01, 2006, 06:23 AM »
but I think there's some usefulness in being able to differ between "I wrote a little program" vs. "I wrote a little script"

Where is the difference? And much more importantly: What's the use? (Many songs have been writting about this question, it seems kinda fundamental)

I guess time and effort spent, as well as some brief idea of the use? But of course some people write long scripts, and other people write short programs, and people use X when they should have used Y etc...

*shrug* :P
- carpe noctem

rkarman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 27
    • View Profile
    • Arca Eclipse (chatserver for ares)
    • Donate to Member
Re: Scripting vs. Programming
« Reply #21 on: August 13, 2006, 07:50 PM »
If it contains variables its programming

so we figured it all out, all scripting is programming. html & xml are not

euhmm... and now ...
what is xslt & sql?


(just to finish the full classification  ;))
« Last Edit: August 13, 2006, 07:59 PM by rkarman »

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Scripting vs. Programming
« Reply #22 on: January 20, 2007, 09:53 AM »
Unless someone convinces me otherwise, "programming" has to have variables and I don't care a cat's whisker... er, uh, present company excepted, if it is compiled or interpreted.  That is unless, of course someone wants to call it "scripting."
« Last Edit: October 19, 2010, 04:30 PM by CodeTRUCKER »

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Re: Scripting vs. Programming
« Reply #23 on: January 20, 2007, 11:03 AM »
I skimmed through this thread and it seems people have confused script, scripting, programming, and compiled.

Script is a segment of code that performs a specific function.  A script can be written in any language, whether compiled or scripting.  Not sure there is a length restriction but the idea is it performs one thing.

Now the confusion comes in when a scripting tool uses the term script for everything.  If scripting tools wanted respect in the development world they would have dropped that and opted for a different terms and stuck with the more main stream definitions.

Scripting is a method for which a script or program runs through an interpreter at the time the functionality of the program is requested.  This is what converts a set of instructions to something a computer can actually perform.

Scripting Language is one where the code is run through an interpreter at the time the functionality of the program is requested.  This is what converts a set of instructions to something a computer can actually perform.

Compiled means the higher level code is pre-interpreted (used this phrase to better associate with scripting) down to code that the processor (or framework) can understand.  Compiled is usually down to single unit.

Program (IMO) is a script, algorithm, collection of scripts, scripts with binding code that has an interface*. 
* - interface may not always take the place of a User Interface.  An interface could be invisible to a user as in the case of a background program.  Lets say we had a program that sat on a server monitoring a folder for files and everytime it saw a new file it processed the file (maybe pushed data into a database) - no interface but still a program.

Application.  See program.

As we move forward the umbrella of the word program (I prefer Application) must be expanded to accept the cutting edge stuff developers are doing (i.e. PHP, AJAX, Javascript, Ruby).

I defined the things above using very non-technical terms so anyone can understand it so its definitions may not be 100% technically correct as they are just trying to convery an idea.
« Last Edit: January 20, 2007, 11:30 AM by Veign »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Scripting vs. Programming
« Reply #24 on: January 20, 2007, 11:09 AM »
Scripting is a method for which a script or program runs through an interpreter at the time the functionality of the program is requested.  This is what converts a set of instructions to something a computer can actually perform.

Never heard the term used in that way.. I think you meant to say "Interpretting."
Interpretting is when the interpreter executes the script.

The only use of the term "scripting" I am familiar with refers to the human process of writing scripts.