What's the difference between a programming language and a scripting language? Is there even a difference at all? Larry Wall's epic Programming is Hard, Let's Go Scripting attempts to survey the scripting landscape and identify commonalities.
When you go out to so-called primitive tribes and analyze their languages, you find that structurally they're just about as complex as any other human language. Basically, you can say pretty much anything in any human language, if you work at it long enough. Human languages are Turing complete, as it were.Human languages therefore differ not so much in what you can say but in what you must say. In English, you are forced to differentiate singular from plural. In Japanese, you don't have to distinguish singular from plural, but you do have to pick a specific level of politeness, taking into account not only your degree of respect for the person you're talking to, but also your degree of respect for the person or thing you're talking about.
So languages differ in what you're forced to say. Obviously, if your language forces you to say something, you can't be concise in that particular dimension using your language. Which brings us back to scripting.
How many ways are there for different scripting languages to be concise?
How many recipes for borscht are there in Russia?
Larry highlights the following axes of language design in his survey:
It's difficult to talk about Larry Wall without pointing out that Perl 6 has been missing in action for a very long time. In this 2002 Slashdot interview with Larry, he talks about Perl 6 casually, like it's just around the corner. Sadly, it has yet to be released. That's not quite Duke Nukem Forever vaporware territory, but it's darn close.
While interesting, I have to admit that I have a problem with all this pontificating about the nature of scripting languages, and the endlessly delayed release of Perl 6. Aren't Mr. Wall's actions, on some level, contrary to the spirit of the very thing he's discussing? The essence of a scripting language is immediate gratification. They're Show, Don't Tell in action.
In fact, my first programming experiences didn't begin with a compile and link cycle. They began something like this:
As soon as you booted the computer, the first thing you were greeted with is that pesky blinking cursor. It's right there, inviting you.
C'mon. Type something. See what happens.
That's the ineffable, undeniable beauty of a scripting language. You don't need to read a giant Larry Wall article, or wait 8 years for Perl 6 to figure that out. It's right there in front of you. Literally. Try entering this in your browser's address bar:
javascript:alert('hello world');
But it's not real programming, right?
My first experience with real programming was in high school. Armed with a purchased copy of the the classic K&R book and a pirated C compiler for my Amiga 1000, I knew it was finally time to put my childish AmigaBASIC programs aside.
I remember that evening only vaguely (in my defense: I am old). My mom was throwing some kind of party downstairs, and one of the guests tried to draw me out of my room and be social. She was a very nice lady, with the best of intentions. I brandished my K&R book as a shield, holding it up and explaining to her: "No. You don't understand. This is important. I need to learn what's in this book." Tonight, I become a real programmer. And so I began.
What happened next was the eight unhappiest hours of my computing life. Between the painfully slow compile cycles and the torturous, unforgiving dance of pointers and memory allocation, I was almost ready to give up programming altogether. C wasn't for me, certainly. But I couldn't shake the nagging feeling that there was something altogether wrong with this type of programming. How could C suck all the carefree joy out of my stupid little AmigaBASIC adventures? This language took what I had known as programming and contorted it beyond recognition, into something stark and cruel.
I didn't know it then, but I sure do now. I hadn't been programming at all. I had been scripting.
I don't think my revulsion for C is something I need to apologize for. In fact, I think it's the other way around. I've just been waiting for the rest of the world to catch up to what I always knew.
The reason why dynamic languages like Perl, Python, and PHP are so important is key to understanding the paradigm shift. Unlike applications from the previous paradigm, web applications are not released in one to three year cycles. They are updated every day, sometimes every hour. Rather than being finished paintings, they are sketches, continually being redrawn in response to new data.In my talk, I compared web applications to Von Kempelen's famous hoax, the mechanical Turk, a 1770 mechanical chess playing machine with a man hidden inside. Web applications aren't a hoax, but like the mechanical Turk, they do have a programmer inside. And that programmer is sketching away madly.
Now, I do appreciate and admire the seminal influence of C. In the right hands, it's an incredibly powerful tool. Every language has its place, and every programmer should choose the language that best fits their skillset and the task at hand.
I know, I know, I'll never be a real programmer. But I've come to terms with my limitations, because I'm a scripter at heart.
Sigh... stop hiding behind your ignorance, Jeff.
You have to know C if you want to call yourself a real programmer.
Bill on January 27, 2009 1:48 AMYou are a progammer if you are paid to write progams to facilitate end-user tasks; you're a scripter if you write utilities to help you administer your system.
Frank on January 27, 2009 2:08 AMYou scripters out there know in your hearts that you are wannabe programmers, but you are not up to it!
Craig on January 27, 2009 2:14 AMI don't consider the likes of PHP, Python, or Ruby as scripting languages. I consider them interpreted languages. Python can be compiled to bytecode, does that make it a compiled language? Ruby can interact and run on the JVM, does that then qualify for a compiled language?
Jeff, you yourself use C# and VB for most of your programming, does that really make you a scripter?
Whether the language is compiled or interpreted, static or dynamic typing, or any of the qualities Larry Wall mentioned - if it's turing complete it's a language.
Python and Ruby are not scripting languages. They are interpreted/dynamic languages (not the same thing). They are capable of scripting however.
I fail to see how strongly typed languages help in any meaningful way. Steve Yegge has excellent write ups on the difference between static/dynamic and strong/weak typing.
Josh on January 27, 2009 2:53 AMControl. That's what differentiates a scpriting language from a programming language. Scripting langs assume a lot of things when performing some job. While most programming languages allow you to control many of the parameters of the system.
Learning scripting langs is plain simple. Thats why you have a script kiddie and not a programming kiddie :) !!!!!!!
Ravi. on January 27, 2009 2:56 AMFor the record you can go straight from BASIC to C as a child, although I was 10 when I started at it, and 14 before I felt comfortable enough to start trying to make full Win32 apps. In this case I think Jeff had a terrible book, introducing complex concepts like dynamic memory allocation too early from the sounds of it...
C is just like any other language, and memory allocation is just another function call.
jheriko on January 27, 2009 3:31 AMI am aq thoughtful person, but I don't see any difference between scripting and programming. The basic idea behind either is that you must teach an obedient moron how to do some task. The only possible difference that I see is that a script takes advantage of the fact that others before you have already instructed the moron in certain areas.
Personally, I grew up on Atari BASIC, survived Pascal, drudged through the occasional FORTRAN, and thrived on C. Some people call KR a bible more or less ironically; I think of it more literally than that.
MSchmahl on January 27, 2009 3:48 AMFrom the last linked article about C:
What's the main difference between hams who know Morse code and programmers know C?
The C programmers actually have a point.
Seriously, strip away all the elitism and see what's left. Morse code is nearly useless, but C is still darn important whether you're using it or not.
My BASIC to C learning process was painful too but I still don't think learning Java instead of C at university is necessarily the way to go...
Dave on January 27, 2009 5:33 AM@Max
You should read the following article:
http://www.mindview.net/WebLog/log-0025
It highlights the difference between a strongly typed language like Java and a 'scripting' (or weakly typed) language like Python. Compilers only catch a few errors out of many. A pass by a compiler is not guaranteed to be a correct program.
And for a language like Python that IS weakly typed, a lot of the time the same errors in a Java program are not errors in a Python program. If it can accept the message, it will perform the correct action. If it can't, an exception will be thrown.
The introduction of generics into Java means that in some cases, a strongly typed language can not cover all bases as tersely.
I'd much prefer to write a complex system in Python than Java. Python gives you all the language constructs you need, but doesn't tie your hands up when you want to do something complex. Exceptions in Python are cheap - with correct handling and unit tests, you can build a more secure program with infintely less resources, time, and effort.
`Josh on January 27, 2009 5:49 AMI must preface this with the fact that I am NOT a professional programmer. I probably don't know what I'm talking about.
That being said, I don't know C either. As far as compiled languages go, C++ is the first one I ever really did anything with. I know why people want programmers to learn C - Jeff has pointed it out before. It's so they won't do things like build a string one character at a time, not knowing how inefficient it is and why. I think c++ teaches the same principles. You have to know how memory allocation works. You learn that there is no such thing, fundamentally, as a dynamically sized array -- you have to MAKE it dynamic. So on and so forth.
C++ just meant that I didn't have to poke my eye out with lines like:
float *fp = (float *)malloc(sizeof(float));
Instead, I had:
float *fp = new float;
It does the same thing. I KNOW what both lines do. Do I want to write the fist line? No. Do I want to look at it? No, no, no!
But like I said, this is just an opinion. I don't have a career to base it on like a lot of you other guys do.
Matthew Morgan on January 27, 2009 6:05 AMLeave it Jeff to post a tiny little joke that sparks a religious war...
Dude, you should go into politics :)
Jasmine on January 27, 2009 8:39 AMYou should have used an Atari ST with Pure C, it was so damn fast and easy to use - i never looked back to Basic again.
Now i'm comfortable with C#, which has the advantage, that the compiler finds errors before they occur - most script-language are far more complicated to handle if you want to keep the error rate low.
I use scripts only for very short tasks up to 20 lines, but never for any serious program - it's far mor easy to write in C#, and much more reliable when running - no typos, no wrong types, so sophisticated.
Script-languages are past, when compiler-cycles took minutes - but that's more than 20 years ago ...
Hehe, you're asking for a religious war here, Jeff... Thumbs up to not giving in to the religious fanatics.
I also took the path starting at BASIC then moving on to C to become a real programmer and had the exact same depressing experience.
I was drawn into programming at age 13 by hacking MS Gorilla (part of DOS) to give me more points and continued to other graphical things. When I then had to code in C and work my ass of to even print hello world, I started questioning if programming was for me (I was 15 by then). But eventually I pushed through and when I got to use OWL and other GUI libraries I was hooked again. Now, at 31 years of age, I still need to see something to get that nice feeling. And scripting languages let me do that with minimum amount of work - guess that's why they tickle my fancy. I'm still glad I have a solid C background (it does come in handy), but I can't say I enjoy using it as much.
Java is a pretty good tradeoff though.
Linus on January 27, 2009 9:27 AMNice post. Good observations about perl.
Ian Kelling on January 27, 2009 10:00 AMIf modern languages are Turing complete, those are what? Assembly?
For example, they have a very limited set of phonems and they don't have numerals, but one, few or many, or something along thesse lines.
http://en.wikipedia.org/wiki/Pirah%C3%A3_language
http://en.wikipedia.org/wiki/Rotokas_language
This is a myth ... the languages do have the ability to count but not count in an abstract way ... ask someone how many of one specific object they have and they can answer exactly but the words they use are specific to that object and do not have values above what would ever be found, so there is no phrase for a million monkeys because that is outside practical experience ... all languages were once like this but Sumerian (or perhaps another earlier language) came up with the concept of abstract numbers, and also invested mathematics as a consequence ... calculation can be done without abstract numbers but it is difficult (like complex maths is difficult with roman numerals)
They are simpler styles of language (but just as complex internally) comparing them to C rather than C# would be better ....
Jaster on January 27, 2009 10:27 AMI learned Perl in '97 and never strayed. Perl is for getting stuff done, Java is for people who dream about UML diagrams.
Steve on January 27, 2009 11:16 AMHere is an experiment - write a non-trivial application or a module in a strongly-typed compiled language, and press Build. You'll immediately receive dozens of type-related errors and warnings.
An equivalent program in a weakly-typed scripting language still contains all those errors, except now they are impossible to determine.
Hence, scripting languages are far more inferior, and require a lot of unit testing and immediate execution - simply because there is no way to know _at any step of development_, if the program will behave as expected.
Max on January 27, 2009 12:17 PMPersonally I always took the distinction between scripting and programming is whether you are directing a set of applications or libraries to do the 'heavy lifting' or whether you are creating the core.
The presence of a repl doesn't denote scripting - common lisp is a dynamic typed (with optional type annotations), compiled (in professional implementations), 'real' language with a read/eval/print loop. Python feels like a real language as it supports modularisation, but it is also light enough for easy scripting, whereas JavaScript doesn't quite feel 'real' unless you're using something like XBL and producing components which then can be scripted. I feel that 'real' programming languages support the publication of interfaces which 'scripting' languages can use.
Static typing and a compiler don't denote 'real' programming - much of real world Java is gluing libraries and databases together and directing frameworks, so is acting as as scripting language..
Pete Kirkham on January 28, 2009 1:10 AMWhether you are writing a script or a program, at the end of the day, you solved a problem using computational logic.
I will say we all, so-called programmers, have been scripting as when we have need without even realizing the difference. Whether it was a small bash script or a perl script to mine the data, it has always been handy to apply for small to-do tasks. BASIC is a nice 'programming-language' and Python 3.0 is hardly a pure scripting language now and can challenge any 'real' programming language in terms of capabilities.
SO, i really can't see a divide. Maybe theoretically there was a line dividing it, but that has been crossed so often that its extinct like the dodos.
If you still feel you can see the line, maybe you can see some dodos sitting on your porch as well. :)
P.S: Why does the captcha over here ALWAYS asks me to type orange. Hey Jeff, is it sbout the colour of the fruit ;)
Mohit Nanda on January 28, 2009 1:44 AMWhether you are writing a script or a program, at the end of the day, you solved a problem using computational logic.
I will say we all, so-called programmers, have been scripting as when we have need without even realizing the difference. Whether it was a small bash script or a perl script to mine the data, it has always been handy to apply for small to-do tasks. BASIC is a nice 'programming-language' and Python 3.0 is hardly a pure scripting language now and can challenge any 'real' programming language in terms of capabilities.
SO, i really can't see a divide. Maybe theoretically there was a line dividing it, but that has been crossed so often that its extinct like the dodos.
If you still feel you can see the line, maybe you can see some dodos sitting on your porch as well. :)
P.S: Why does the captcha over here ALWAYS asks me to type orange. Hey Jeff, is it about the colour of the fruit ;)
Mohit Nanda on January 28, 2009 1:45 AMSo is asp.net dynamic compilation of the website model mean it's scripted? When php, a scripting language, compiles on the fly make it a compiled language?
1980's Rubbish.
Scripts are short mini programs that can be written in any language. Think of the Transaction Script pattern of communicating to a database, or an installation script, etc.
frangiplasticator on January 28, 2009 1:53 AM“My mom was throwing some kind of party downstairs, and one of the guests tried to draw me out of my room and be social. She was a very nice lady, with the best of intentions.”
Is this perhaps a reference to the movie The Graduate?
Johannes on January 28, 2009 3:33 AMA hint is that to be a programmer, the language you program in is of secondary importance.
To be a good programmer you should know C. C is pretty close to the basics of how computers work. There is no hand holding and you do raw memory access. The only native types are the native types to the processor, and by native we mean native. If your processor is big-endian, then your longs are also byte-ordered big-endian.
To be a good programmer you should know C#/Java. These similar languages run under a virtual machine and have garbage collectors that deal with the mundane task of managing memory. They are strongly typed and very object oriented and smooth out many cross platform issues because your code compiles to an intermediate language that is compiled on the fly when it's executed.
To be a good programmer you should know lisp. Lisp will blow your mind with the types of programs you can write when you're not worrying about strings versus integers all the time. Lisp is logic, and a different way of looking at the world.
To be a good programmer you should know Python. Python is incredibly easy to chew through data and text in lists and manipulations.
Well I could go on. No I don't mention all languages, and you could substitute perl for python, and where would we be without javascript, etc. The point is all of these languages have their uses, they all have their strengths, and they all have their weaknesses.
What does saying 'Im a scripter at heart' mean anyways? Does that imply you don't like disciplining yourself and just want to hack out a 'hello world' wherever you go? To impose that on a language gets dangerously close to the pit of despair - the one Microsoft seems to create because Bill Gates always wanted a novice to be able to click a button and run the program^H^H^H form in under 10 minutes.
Donkey.bas on January 28, 2009 4:31 AMHaha. My experience was similar. I'm a little younger, but I think only by one 'generation' of languages: Started with GWBasic/QBasic, then tried C++ and hit the same wall. Got back in with Visual Basic, then HTML/Javascript, then college (lots of languagues) but stuck with PHP. Then Java, and finally settled on C# for most of my professional work. But I still use others when the client requires it. Next languauge, will probably be Ruby, as it is another big change in my style--keep my mind open and such.
There definitely needs to be a progression though. I went to DeVry University because they taught in lots of languages. I assumed, beginner VB, then intermediate Java, finally advanced C++, or something like that. Unfortunetly, DeVry missed the important step of progression, and just taught beginner everything which was useless to everyone except the multitude of business that ask for every one of those.... *sigh* However, that (progression from 'simple'/scripting languages to more advanced, formal languages) is the way I think programming should be learned, in theory.
Mufasa on January 28, 2009 9:56 AMJosh: Python is strongly, dynamically typed; it is not weakly typed. Java is strongly, statically typed. It's actually easier to argue that C is a weakly typed language than Python! Weak typing generally refers to a language's support for Type coercion. Static vs dynamic refers to whether variables have pre-determined types.
Bob on January 28, 2009 12:57 PMYay, I love the Commodore 64!
I had an Amiga 2000 after the C64. I started programming in C with the Manx C compiler that I had bought from my pocket money (it was expensive!) and a book in German about programming in C on the Amiga. (German is not my native language!).
Contrary to Jeff, those were not the most unhappy hours of my programming life. I liked C, and still do. I'm now a Java programmer.
Jesper on January 29, 2009 5:01 AMI don't think my revulsion for C is something I need to apologize for. In fact, I think it's the other way around. I've just been waiting for the rest of the world to catch up to what I always knew.
If you still have the KR book, you can quickly re-read it to learn that the design of the C language is all about the design of the compiler in a small memory footprint and low processing power capabilities.
And that is why I program in Pascal instead of C. The Pascal language was originally targeted at teaching, so the language is significantly more focused on people than machines. Fortunately, as Pascal has grown, its human focus has not prevented it from being just as powerful as C allowing things like pointers, libraries etc.
I can code in C, but frankly I always find it a painful experience with everything involving backward foreign thinking with very unusual gotchas lurking around every corner. C++ is even deeper down that anti-human rabbit hole, but C# is definitely an improvement (not surprising considering one of its chief designer spent much of his earlier career working with Pascal and Delphi)
I personally have troubles with scripting languages simply because they are too unfocused. It could be argued that they are even MORE designed around the unfocused human thought process, but like anything that can be a bad thing when taken too far. Some times you WANT to enforce a little structure. After all, computers aren't as forgiving as the human brain when you leave things out and scripting languages make leavings things out too easy to do and too hard to find without getting to that point.
Xepol on January 29, 2009 11:34 AMblockquote class=commenti
a id=comment-62771 name=comment-62771/
p class=numcommstrong9/strong/p
pstrongDeveloper level One:/strong/p
pString oop= req.getParameter(”oop”);br/
User user = new User(oop);br/
if (user.isGeek())br/
hash.put(user.getId(),user);br/
elsebr/
user.dispose();/p
pstrongDeveloper level two:/strong/p
ptry{/p
p User user = new User(req.getParameter(”oop”));br/
user.isGeek() ? hash.put(user.getId(),user); : user.dispose();br/
} catch(GeekException e){br/
e.printStackTrace();br/
}/p
p——————————————/p
pstrongScripter level one:/strong/p
pfunction isNull(nomeForm){/p
pif (nomeForm.nome.value==null)br/
return true;br/
if (nomeForm.nome.value==”)br/
return true;/p
preturn false;br/
}br/
…/p
p…/p
pstrongScripter level two:/strong/p
pvar FormChecker = new Class({br/
‘version’: ‘0.0.2#8242;,/p
p Implements: [Events, Options],/p
p options: {br/
id: ‘’,br/
form:'’,br/
mandatory:null,br/
},/p
p initialize: function(options) {/p
p this.setOptions(options);br/
this.id = this.options.id;br/
this.form = this.options.form;br/
this.mandatory = this.options.mandatory;br/
this.hash = new Hash();br/
},/p
p someElsIsNull: function(){br/
var check = false;br/
mandatory.each(function(elem, index){br/
check = check || $defined(elem.get(’value’));br/
if (check)br/
this.hash.include(el.id,el);br/
}.bind(this));br/
return this.hash;br/
}br/
…br/
});/p
pvar formCheck = new FormCheck({”id”:”checker”,”form”:$(’myForm’),”mandatory”:[$(’nome’),$(’cognome’)]});br/
var checkHash = formCheck.someElsIsNull();br/
…/p
p —————–br/
D1=dohbr/
D2=Uhubr/
S1=dohbr/
S2=uhubr/
D2+S2=Rock’n Roll Baby
/p
p class=commentdataa title=Permalink di questo commento href=#comment-62771#/a - empostato da stronga rel=external nofollow href=http://www.moonkiki.comNunzio Fiore/a/strong - 29 Gennaio 2009 - 20:42/em/p
/blockquote
SORRY FOR PREVIOUS POST AN ERROR DURING CUTPASTE
Developer level One:
String oop= req.getParameter(”oop”);
User user = new User(oop);
if (user.isGeek())
hash.put(user.getId(),user);
else
user.dispose();
Developer level two:
try{
User user = new User(req.getParameter(”oop”));
user.isGeek() ? hash.put(user.getId(),user); : user.dispose();
} catch(GeekException e){
e.printStackTrace();
}
——————————————
Scripter level one:
function isNull(nomeForm){
if (nomeForm.nome.value==null)
return true;
if (nomeForm.nome.value==”)
return true;
return false;
}
…
…
Scripter level twp:
var FormChecker = new Class({
‘version’: ‘0.0.2#8242;,
Implements: [Events, Options],
options: {
id: ‘’,
form:'’,
mandatory:null,
},
initialize: function(options) {
this.setOptions(options);
this.id = this.options.id;
this.form = this.options.form;
this.mandatory = this.options.mandatory;
this.hash = new Hash();
},
someElsIsNull: function(){
var check = false;
mandatory.each(function(elem, index){
check = check || $defined(elem.get(’value’));
if (check)
this.hash.include(el.id,el);
}.bind(this));
return this.hash;
}
…
});
var formCheck = new FormCheck({”id”:”checker”,”form”:$(’myForm’),”mandatory”:[$(’nome’),$(’cognome’)]});
var checkHash = formCheck.someElsIsNull();
…
—————–
D1=doh
D2=Uhu
S1=doh
S2=uhu
D2+S2=Rock’n Roll Baby
Thanks Jeff. I knew I wasn't the only one, but it is nice to hear form someone as well-respected as you.
How to Program C (Deitel Deitel), required reading for a college course, is what killed my love for the language. I now stay way from any Deitel book I come across.
Tod Birdsall on January 30, 2009 2:41 AMI've learnt to program the other way around. I started with 8086 assembly language. I had to express my ideas in terms of what was available in the instruction set, and that taught me how to program. My only tools were Notepad and Turbo Assembler.
As the complexity of my programs grew, writing and debugging them became increasingly painful. I often gave up and left some programs unfinished. But, fortunately, I was exposed to C. Understanding how function calls were implemented in C and then learning function pointers gave me a deep insight of what could be done with the language. Back then, the world polymorphism hadn't entered my vocabulary, but I've been doing polymorphism all the time.
Then, I learnt C++. Oh, wait. It wasn't that easy. What I had actually learnt was the syntax of C++ and not much more. Object-orientation as a concept was really difficult to grasp. My algorithm-oriented mind had to be reshaped to understand classes that encapsulated complex things and presented nice interfaces. It was a difficult but important step.
But after my first three painful months with C++, I came to appreciate what the language offered me. First of all, I could always write C-style programs if I wanted to. Then, if I had to deal with classes and hierarchies of things, I could use the features offered by the new language. And finally, I could mix both styles (although I seldom did that).
Since I had been using function pointers all the time, understanding vtables was easy. Just like C functions handle the use of the stack to allocate local variables and pass parameters, C++ vtables handle the use of function pointers to determine at runtime which method is actually going to be called (if you think of overriden methods as different methods).
To my dismay, today most programmers don't share my enthusiasm for these low-level details. In fact, most programmers haven't even been exposed to them. As somebody who has had to manage memory manually and declare virtual methods as such, I believe that a good understanding of what happens under the hood is essential to be able to write good programs consistently. Even if most of your programs are going to rely on a runtime or an interpreter, you're going to understand what is actually happening in the environment in which your programs run.
Eduardo Len on January 30, 2009 12:24 PMA good number of the pieces of software that Coding The Wheel points out (obviously, and especially, microsoft software) are now written in, or have major portions of them written in, managed languages. I don't see this trend dying off in the near future. c/c++ for the mainstream is on the way out; it holds on due to legacy software, and because it was the only realistic development language on the pc for a long time. I see a lot of people that don't want to put up with it's crap anymore. Much of it is redundant an unnecessary. I manage my own memory as often as I do my own laundry: sometimes there's a spot that just doesn't want to come out, but %99.9 of the time it would be a redundant task doing it myself.
Steve-O on January 31, 2009 1:48 AMC, assembly coders , that's not programming.
Real programming is the microcoding of the CPU instruction sets!
Have the best of both worlds and check out Groovy!
Elmar on February 3, 2009 6:54 AMLong time reader, first time commenter. Finally an article that expresses what I have been trying to say for so long. Scripting gives you the instant gratification and spark if you will to become interested in learning more and more. I am a huge fan Jeff, great stuff.
Drew on February 3, 2009 12:14 PMI really love your blog and all of the new things that have been added.
che on February 15, 2009 10:11 AMI really love your blog and all of the new things that have been added.
che on February 15, 2009 10:12 AMIt's really funny.
I also started with BASIC in 1973, i think. In '75, i bought my first computer. All i could write in was 8080 assembly. In octal. By 1981 i knew some 37 computer languages, and was introduced to C.
By comparison to assembler, C was a scripting language. I could do almost all the stuff i could do in assembly, but i didn't have to type all that line noise out. (Yes, C is line noise by most reasonable standards.) But in C, i could write something in an hour that would have taken most of a day. Compiles were fast.
And today, with machines 10,000+ times faster, compiles are irrelevant. I mean, Perl compiles your code in that first sub second of execution. C compiles fast too.
What makes Perl a scripting language is that there are fewer distracting opportunities for optimization.
I started scripting with PHP.
Then I learned to program in C#. Wow, what a difference. Programming compiled code is not much more difficult (it's actually easier in terms of library support) but you can do soooo much more with the code. Working a purely OOP language that's strongly typed was different to say the least. Especially when I had to learn how to decode data at a binary level create a custom UDP server/client.
My understanding of the computer systems as a whole grew by a magnitude of 10 in a short time and I can't wait to go back and refactor my PHP code to include a few of the OOP tricks I learned. Not to mention that, if I am challenged by some constraint of web functionality (IE using Dropbox public folder for more than storing files) it's easy for me to visualize a C# or compiled PHP script I could run locally to enrich/enhance the functionality however I choose.
If you don't like the idea of C#, strongly typed or compiled languages. Try Lua. It's a desktop scripting language that's dynamically typed (like PHP and JavaScript) and it's interpreter supposedly takes only 150KB of space. That'll probably be my next language.
Evan Plaice on March 3, 2009 10:55 AMI begin my script-life with PHP and i think it was bad idea, because and BASIC, and ALGOL, and PASCAL more simple for start.
sorry, bad english)
Scripting is programming. Scripting languages are an (ill defined) subset of programming languages.
Simon Willison on February 6, 2010 11:13 PMThat is why most programmers don't go straight from BASIC to C. Most learn structured programming through beginner languages like Turing and Pascal. Turbo Pascal in particular was very engaging at the time because of its graphics libraries. Of course, after a while you'd start to hit the performance walls and would have to learn to write inline asm. Once you've had to deal with direct memory references then pointers are mundane.
As for the comment about web applications being updated every day, I think that has very little to do with scripting and very much to do with uneducated and undisciplined monkeys having to put out constant patches because their concept of testing is constrained to a couple of unit tests.
Aaron G on February 6, 2010 11:13 PMThe thing you must understand is that Duke Nukem Forever is *written* in Perl 6.
As soon as one is production-ready, the other will be. *ahem*
Clinton Pierce on February 6, 2010 11:13 PMIf you tried to learn C in high school from KR2 you aren't that old. :-)
I've worked on C programs that has daily releases. The fact that you compile it doesn't force you to have semi-annual releases. That's an unrelated decision.
As to the immediacy of the reward, assuming that I don't have to do a complete rebuild (normally true) my edit, compile, run cycle is not significantly longer than your edit, run cycle. That quarter second it takes to compile a file while I save it just isn't long enough to matter.
Wittgenstein thinks you're a schmuck.
anon on February 6, 2010 11:13 PMWhy don't you hire a fella to do all the hard programming stuff for you? That way you can blog all day long!
Platon on February 6, 2010 11:13 PMThis analagy gets blurry...
If write some Python code, I'm a scripter.
But then again what if I run that thru Jython/IronPython... then do I become a programmer?
Same code, different output and coding cycle.
Clinton on February 6, 2010 11:13 PMI have done a fair amount of both programming and scripting. The bottom line is, programming is worth doing if your application requires it, and it's not if it doesn't. You should always aim to use a scripting language unless you absolutely have to program to meet the performance requirements of your application. And once you cross that bridge you should really be doing cost/benefit analyses regarding your hardware, too, because it might be cheaper to just upgrade.
Brandon Thomson on February 6, 2010 11:13 PMI grew up with Commodore 64 BASIC as a kid, and tried learning assembly on the 64 (and later, C on my first PC) to no avail. Then in high school I was exposed to Turbo Pascal (which fit on a single DOS floppy at the time) and absolutely loved it! Pascal lives on now in the form of Delphi, and Java and VB are also supposed to be pretty easy to learn, and even what I've seen more recently of C++ seems easier than I thought it would be, but I don't like a huge IDE or SDK taking up hard drive space when I don't usually need (or have time to learn) something that powerful every day. I'd prefer something simpler and more lightweight when I just want to tinker with small personal projects. Something more modern and structured than the 8-bit BASICs I grew up with, but still quicker and easier to just "dive into" with less planning than Pascal or C++.
So after reading this article and all the comments, I am now reading more about Python and Lua because they sound the most like what I'm looking for, and I'm also more interested in learning PHP, Perl, and Javascript than I used to be. I still want to learn Java, C++, C#, Delphi, and maybe some form of Lisp (and maybe even VB if it would help get me a job) when I have more time to sit down with them longer, but in the meantime I'd still like something new I can play around with and see some immediate results.
Brandon on February 6, 2010 11:13 PMWow, some great informations here, thanks for putting them up.
Languagelearnin on January 5, 2011 9:03 AMThe comments to this entry are closed.
|
|
Traffic Stats |