Posted
by
Soulskill
on Saturday July 25, 2009 @09:22AM
from the what-language-do-the-binars-speak dept.

snydeq writes "Fatal Exception's Neil McAllister questions whether Scheme, a dialect of Lisp taught as part of many first-year CS curricula and considered by some to be the 'latin of programming,' is really the best first language for a young programmer. As he sees it, the essentially write-only Scheme requires you to bore down into the source code just to figure out what a Scheme program is trying to do — excellent for teaching programming but 'lousy for a 15-year-old trying to figure out how to make a computer do stuff on his own.' And though the 'hacker ethic' may in fact be harming today's developers, McAllister still suggests we encourage the young to 'develop the innate curiosity and love of programming that lies at the heart of any really brilliant programmer' by simply encouraging them to fool around with whatever produces the most gratifying results. After all, as Jeff Atwood puts it, 'what we do is craftmanship, not engineering,' and inventing effective software solutions takes insight, inspiration, deduction, and often a sprinkling of luck. 'If that means coding in Visual Basic, so be it. Scheme can come later.'"

Java is also a very nice first language. I know personally that I loved the built in UI stuff (started in C++). Stay the crap away from Flex (no concept of threads, a lot of voodoo beneath the hood, etc).

I think started in a garbage collected space and then moving to manual memory management is a good path as well.

How about teaching people to write algorithms ? You know, the kind we used to learn on the 60s-80s, which could be used to program in ANY language (from Assembly to Pascal/Cobol/Fortran), and not today's verbalized Pascal that people call algorithm ?

That was the first "language" I learned and, having learned 20+ languages after that (including some obscure ones lines Forth and Lua), even today I thank my teacher for giving me such a good understanding of programing without relying on any specific language's concepts.

I would say that learning manual memory management first is more beneficial than learning to be lazy ant let the GC do all the work, and, the day you need to use a language which doesn't clean up in your path, write memory leaking piece of feces. Of course, it means that when you need to write in java, you'll be sorely missing the freedom to decide WHEN the garbage is collected.

It's a bit like the difference between living in your mom's basement and having her come and clean up you room randomly when you're

It's a bit like the difference between living in your mom's basement and having her come and clean up you room randomly when you're not at home (or when she thinks you are not, but are in fact, having a good time with your girlfri... I mean, inflatable doll)

Call me perverted, but as a Java programmer, I AM THE MOM, and the program is the permanent teenager. And I don't want that teen to fuck $whoever in the basement, without me knowing - no, without me _asking for it_. Garbage collection is just an automated facility (think of a roomba) to help me control the mess the goddamn kid creates (used condoms and smelly sneakers).

nahhh.. in my analogy, the GC is your mom. the programmer is the one with the smelly condoms and the used sneakers.

This is/. after all, so I guess I should have used a car analogy:

Interpreted Script languages (Python, etc) are like an original VW beetle. It won't be fast, it doesn't have anything shiny or particularly exciting in it, the motor is at the wrong end, but it will get you where you want to go... in its own time

C/C++ is like a sports car with a manual clutch and not many gadgets assisting your driving. It's fast, deadly, but if you learned driving on the afore mentioned beetle, you'll be able to drive where you want to and have lot of fun making it do exactly what you want.You most definitely don't want to learn driving in THAT, but once you're used to the beetle, you'll want something fast, better.. more sexy. The fact that the beetle and the really fast car are so different in look and feel will ensure that you won't just rush in, and so will be more careful about the idiosyncracies of your new vehicle.

Java is more like a sporty limousine. Lots of flashing lights, automatic gear, ABS, EBD, and other stuff with weird acronymes. In Theory, it can drive up to 200mph, but every time you try to get that fast, the motor automagically loses power. If you try to make it slide around a corner, all the nifty lamps light up, things start to blink and kick in, and the car just drives as if on rails. If you learn to drive in THAT, you'll have a hell of a time with the fast but deadly car, and will probably crash it more often than not, because you're used to fast cars but expect them to do everything for you.

okay.. the analogy is probably a massive fail and I'm burning Karma as if there was no tomorow here, still.. I stand to my point : start with something really easy, and when you want to play with the big kids, use a language which keeps the hand-holding to a minimum.

Being a professional software developer who works in Java, and a former nightclass teacher of Java I can say without reservation that Java is NOT the best first language. Java forces you to use Object constructs from the get go. These things get in the way of communicating the principles that you want to teach. Say you want to discuss IF statements, instead of writing this:

a = 5if a>7:
print "a is bigger than 7"else:
print "a is smaller or equal to 7"

How different is this? Well, first of all you have the concept of a class, which you can either gloss over or explain in full. Students don't know off the bat what is important and what isn't, so the class details obscure the point being made about conditional constructs. Second, the System.out.println lines introduce several ideas, such as Classes (again), the differences between classes and instances (objects) and what methods are. The first example is Python, the second Java. In summary, Python is a far better language to start with because you can teach concepts in isolation.

Java is still my favourite professional language, and to be sure it isn't a knarly twisted mess like C++, but it still isn't the ideal language to introduce students to.

When I was an undergrad in the mid-80s, Pascal was the language of choice for teaching algorithms, data structures etc. We were also taught assembler and microcode as we learned about microprocessor architecture. Once we had been indoctrinated with solid programming discipline, we were introduced to C. Pascal and assembler were a great foundation and made the transition to C very straightforward.

Sorry, but I started with Pascal and then Delphi. And it blocked me. Because I always walked around C/C++, and never really learned it.I loved it, back then. But frankly, ObjectPascal, as a language, and Delphi, (as in:) the libraries, are extremely outdated today. After years of Java, PHP, Python and Haskell, I found myself crippled by their lack of features. And only C and C++ beat it in lack of elegance. But C/C++ at least have more features.

I recommend starting out with Python, and maybe the WebDev area (which is much fun right now, with HTML5, JS, SVG, CSS3, Firebug, etc, in Firefox 3.5).And then go straight for the full package:C and Java (forget C++, it tries to be C and Java, but fails to beat both) on the practical side, andHaskell and Ocaml on the fun and educational side. (With Haskell, you're in for a ride, but it is totally worth it.)

There is no walking around it, by clinging to simple languages for years. The nice thing is, that when you learn the most advanced languages, you automatically learn to program in a better way in less elegant languages (like using full OOP and functional programming styles in C and JS.)

Yeah and the mirror is surely the reason your face seems ugly.Instead of blaming tools, blame your incompetence. I started with Pascal/Delphi myself, had to switch to C and C# later, doing a bit of Java right now. In no way is Pascal really lacking features and Delphi Language is pretty much as powerful, as any other modern OOP language is. The syntax is different than the syntax of a curly brace language but then again, Delphi Language comes from a different language family (Algol) so it is to be expected.

I think most of the comments here are missing the point. A first prepgramming language should be about doing "stuff" with as little programming drivel as possible.

Alice is a language designed for people new to the idea of programming. If your subject is under 14 it is definitely worth looking into. For someone older, stanford has a great intro to programming clas online. It is cs106 with Dr. Sahami. The first couple of lessons are with karel, and then. It eases into java.

Alice is a language designed for people new to the idea of programming

There are a lot of languages designed for people new to programming, and many of them are better known and more widely supported than Alice. And I'm still far from convinced that a functional language is the best way to start. A lot of standard tasks are complicated by the functional approach. Alice at least is based on Standard ML which is not a pure functional language (more along the lines of LISP than, say, Miranda, the language I

I wrote: And I'm still far from convinced that a functional language is the best way to start. A lot of standard tasks are complicated by the functional approach. Alice at least is based on Standard ML which is not a pure functional language (more along the lines of LISP than, say, Miranda, the language I learned functional programming with), but I'd still avoid it for a few reasons, most notably the fact that the only GUI binding available for it is GTK+ which is a very complicated environment that I would

I agree, anyone who says that learning language X will screw up a person for lifetime is an idiot. The only people who would be "screwed up" are people who aren't good at programming in the first place. And on another note, Java and C# are pretty damn good languages, and even VB.net is supposedly pretty good if you actually give it a chance. I haven't tried it myself, but it's orders of magnitude better than VB6, which is what most people think of when they diss VB.

Nowadays I would suggest $_language_of_choice as firs language as it is $_reasons[0], $_reasons[1] and $_reasons[2] language. Then extend it with $_arbitrarily_superior_language.Just don't start with $_other_language[0], $_other_language[1], $_other_language[2] or $_other_language[3] as it will screw the person up for lifetime.

Please, I get so tired of arguments like this.

As long as:

the language (and the associated tools) are available

it has all of the fundamentals of programming (looping, flow control, data structures, variables, etc)

and it grabs their interest

who cares what languages they learn? If they enjoy it and it allows them to learn how to program why should it matter what language they start out with?

Because <my language> is better than <your language>! And here on Slashdot, we need few reasons to enjoy a good language war. So go away with your "reason" and "logic"! We've got a pointless battle to fight!

And for the record:

1) Java and C# suck because they require N levels of nesting before they can type "Hello World".

Not all 15 year olds are gamers. My first script was for an eggdrop. I also knew several young kids on IRC who scripted for mIRC. Scripting is great because it yields quick results, allows you often to see others code, and gives functional results.

With the ADD world we live in, the investment needed to see results in a 3D graphics world is going to be a hard sell.

I think that -- like any other question in pedagogy -- there is no right answer that applies to everyone. But I still find the reasoning in this article absurd.

You have to look at the source code to figure out what a Scheme program is doing? Isn't this true in.... every language? Even if the "source code" consists of little blocks you're dragging and dropping together?

In my opinion you should start ingraining the OO paradigm as soon as possible. I would say Java for its relative simplicity, but Java hides a lot of the nitty gritty details that you get exposed to when dealing with a language like C or C++. So then C++ might be a happy medium. You get exposed to all the object-oriented concepts, but are also forced to learn about memory management, linking, etc. Plus, as a little bonus, its widely used in industry. I think this can be appealing to new programmers in a

I agree...
My first language was Q-BASIC, then javascript, PERL, then *shudder*Java*shudder* and finally PHP

Having a grasp of OO concepts makes it easier to learn other OO languages. Depending on what your trying to program your options are different(Desktop app, vs web app)
My recommendation as a first language would be PHP. The nice thing about scripted languages is no compile time! So you can write your code and test it instantly. PHP also provides nice error handling to help you debug.

No. New programmers should be looking at a problem and thinking "How can I solve this" not "Where can I find a third-party library or toolkit that solves this?" That doesn't teach them the language, it teaches them Google.

No. New programmers should be looking at a problem and thinking "How can I solve this" not "Where can I find a third-party library or toolkit that solves this?" That doesn't teach them the language, it teaches them Google.

To be fair, implementing graphics by raw interface with the windowing system is so difficult that a newbie attempting it will give up in minutes, and giving up programming certainly does not teach the language.

I seriously don't see how a third party library to visualize your computations impairs the teaching of the language.

To be fair, implementing graphics by raw interface with the windowing system is so difficult that a newbie attempting it will give up in minutes

I didn't mean they should be writing their own implementations of Pygame, I meant that new programmers shouldn't be doing anything so complex that it requires them to use anything other than the standard library. Learn the language, then play with the extras.

You recommend making a 15 year old who has never programed before interface directly with the low-level OS APIs?

No, I recommend making a 15 year old who has never programmed before start with;print "Hello world";
Learning the standard library of the language, learning the language itself, not jumping into using an external toolkit.

It seems like TFS is dealing with the fact that there are at least two distinct, and at times temporarily opposed, aspects of being educationally good.

The one is engagement/excitement/comprehensibility: If somebody is disinterested in, or hugely frustrated by, a subject on first contact, they will have minimal motivation to continue. Unless you simply plan to beat it into them, introductory material needs to grab the audience(this doesn't mean that everybody must be your audience, of course). In many cases, this means a (temporary) sacrifice of rigor or correctness; think of intro physics, where you start with simplified Newtonian scenarios, or math, where you generally start by talking about addition/subtraction/multiplication/division, not sets and number theory.

The second value is that of being correct and rigorous, or at least not impeding later development in completeness and rigor. You obviously cannot learn everything all at once; but there are some simplifications that make it easy to fill in the gaps later and others that actively retard that effort. This can happen either because the simplifications are hugely different than the reality, and harden people in the wrong ways, or because, in an attempt to be "engaging" the intro stuff promises that the subject will be "fun", "relevant", and "exciting" to everyone, every step of the way. Fact is, that isn't true. Most subjects have, at some point or another, patches of sucky grunt work. Promising people that they are precious flowers who will never have to soil their hands with such is a good way to make them drop out when they hit those patches.

First, learn assembly, it teaches you how the machine works. (You should probably also learn electronics and digital logic)

I think you want to pick a first language with which the kids can get some fun results fairly quickly, and keep their interest. Assembly is not ideal for this. With that said, by all means teach them how a computer works, right from the start.

My dad taught us programming, back in the days when building a computer meant heating up the old soldering iron. He started with explaining what a computer does, the components (registers, memory, i/o) and the instructions you could use to tell the computer what to do. So he taught us about assembly without actually teaching the language, but even so it proved valuable to know more or less what goes on inside a computer at the lowest level. He then got us started off on Basic (which was pretty much the only option), taught loops, conditional statements, functions / subroutines etc.

Any modern langauge can teach these basics, and I think they are still a good fundament. From there you can move on to object orientation and using mroe complex libraries and APIs to access the higher functions of the machine. I actually like the idea of starting with C (or just program C-style in C++), then adding object orientation on top of that by moving on to C++. Java might be good but I have no experience there.

Another option is PHP. It is a lot less finicky; of course the OO aspects are rather poor but one should ask if they are teaching their kids programming fun, or preparing them for a career. PHP (or a similar language) is nice because it is a language well suited for building simple, active web sites. With any luck, your kids will quickly find a few ideas for websites that he can then implement himself... and nothing is better for keeping someone interested in learning to program is having their own project to complete. Once their first efforts go on-line, teach them about structure, web design, and security. Yes, by al means do code reviews, but keep it fun... show them how they can do things better.

Whatever language you pick, I'd start kids off by keeping them away from IDEs and letting them code in Notepad (do not make them use vi; be mindful of child abuse laws)and a command line compiler (where applicable), just to teach them what goes on under the hood. Once they get to a level where they will want to use more complex libraries, GUIs etc, get them an IDE.

As an afterthought, do introduce them to the whole open source thing. Nothing stimulates more than a thriving scene of fellow developers.

Java's strong/weak point is its memory management. You'll never have to deal with/learn garbage collection or pointers.

Whatever language you pick, I'd start kids off by keeping them away from IDEs and letting them code in Notepad (do not make them use vi; be mindful of child abuse laws)and a command line compiler (where applicable), just to teach them what goes on under the hood. Once they get to a level where they will want to use more complex libraries, GUIs etc, get them an IDE.

I disagree with this. There is nothing more frustrating than trying to learn to program and getting compile/runtime errors from a command line.
Without an IDE: "What the hell? What did I do wrong on line 53?"With an IDE: "What the hell? Oh! The syntax highlighting tells me I didn't define the variable, I'll remember that for next time."Using notepad is a horrible way to write code! I'd rather start them off with the IDE to get them familiar with the language first. Once they're familiar they can move on to command line compiling/building, at that point they'll have a good enough understanding of the language to focus on the command line tools (be it gcc and make or javac and ant or whatever).

Assembly as the first language? 99.99% of first learners who aren't doing a mandatory course in school would walk away.

The first language has to be PICK UP AND GO. It is allowed to be a horrible abstraction of what the computer can do. It should be limited, to not confuse with abilities. It should allow creativity to be expressed. It should be easy to see results, no complex build system, nothing inbetween the programmer, the code, and running the code.

I agree with your last statement but the rest of your post I can do without.

Assembler is great but it's a horrible choice for a first language. It was fine as a first language 30 years ago when people had simple expectations for software. I'm not saying to never learn it, but it's unnecessary as a first language.

C is not the most widely used commercial language and it certainly does not lead the way in open source (the open source movement started with Java). Both those categories belong to Java.

Off-the-shelf packages like these are atypical, and represent I believe less than 1% of code that is written commercially. They are dwarfed by the number of payroll systems, account management systems, workflow tracker systems, management information systems, intranets, extranets, web services, etc. Most of these are written (depending on how old

First, learn assembly, it teaches you how the machine works. (You should probably also learn electronics and digital logic)

Better yet, first make them learn Lambda calculus, then make them understand the Church-Turing thesis. Only when they fully grasp the nuances of an Universal Turing Machine should they even *touch* an actual computer and program in Assembly.

In my opinion, two issues compound each other. The first is that because functional programming is seen as very pure and simple, there is a myth that Scheme programs do not need much documentation. The second is that Scheme functions do not declare return or argument types. This means that in order to read someone else's code, if structures of any complexity are used, you can have to manually walk the full call depth of each function, possibly many calls deep, just to know what kind of structure it returns in the end. That makes it painful to work with someone else's code, compounding the other well-known problem with computer science education: in the course, you're usually writing your own code from scrach; in the real world you usually have to deal with code your colleagues (or even third party projects) have written.

"Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a freely available teaching tool designed to be a student's first exposure to object-oriented programming. It allows students to learn fundamental programming concepts in the context of creating animated movies and simple video games. In Alice, 3-D objects (e.g., people, animals, and vehicles) populate a virtual world and students create a program to animate the objects.

In Alice's interactive interface, students drag and drop graphic tiles to create a program, where the instructions correspond to standard statements in a production oriented programming language, such as Java, C++, and C#. Alice allows students to immediately see how their animation programs run, enabling them to easily understand the relationship between the programming statements and the behavior of objects in their animation. By manipulating the objects in their virtual world, students gain experience with all the programming constructs typically taught in an introductory programming course."

ANY first programming language introduces new concepts. When you're starting out even something like the concept of a variable takes a little getting used to. Maybe you can relate it to memory store/recall on a pocket calculator, but with a name. Later you can introduce arrays of variables, non-numeric variables, etc.

You seem to have forgotten what it was like in the beginning to know *nothing*.

My first year as a CS major I took "symbolic logic" to supplement to required Pascal, Fortran, and Assembly Language courses. After all that, I always thought of the symbolic logic class as the "Latin of programming". Personally, I think any language which is free and gives quick results would be suitable for beginners...Python, for example.

Its not consistent, its not even well designed I expect, but its a remarkably easy way to learn to manipulate a computer. Learn a bit of HTML first, some CSS, then work on OO PHP and you can accomplish a lot. People will dismiss PHP but there are a lot of very large websites built using it - ones that lots of kids will be familiar with.Follow it up with a second language once you have gotten the basics down pat - Python is likely a very good choice.

I was just going to write this comment myself. The biggest advantage of PHP is that you go from zero to tangible results very quickly. No programming language is going to be interesting to teenagers if they can't instantly do something useful with it, and to a teenager, cool web stuff is the useful thing that they're most likely to be trying to do.

I say fortunate because there was nothing in the way; no distractions like GUIs to dilute the experience. Just BASIC on the command line.

It doesn't really matter whether the youngster uses BASIC, Pascal, or XYZ. It should just be a simple language so the concept of logic and process flow is what is learned, rather than getting bogged down in arcane concepts of the language itself (or some pig of a GUI, like "Visual" this, or "Visual" that).

The best first language is anything simple that lets you jump right in and understand the basics like variables, loops, arrays, etc, without getting bogged down in an over complex or restrictive language. It doesn't need to be the worlds best language - it's to get you started. You could do far worse than start with a BASIC interpreter (instant feedback, no compiler/linker to deal with) at a very young age.

Those of use who started out at the beginning of the personal comnputer (not PC) phenomemon in the late 70's started out simple. After putting away your soldering iron, you got out pen and paper and started hand assembling machine code. And we liked it!

At the same time c.1978 a highschool math teacher and a bunch of us took adult education classes at the local university (Durham, UK), where they taught us PL/1, and some of us found a way to hang out at the university after that and started playing with BASIC, then taught ourself C. The big excitement was going from the batch-mode PL/1 class with jobs submitted on punched card decks, with printed green bar fanfold output (maybe just a syntax error) delivered some time later, to being ONLINE sitting in front of a terminal. Whoopee!

The best first language for a young programmer is english with possibly a little bit of boolean logic, because then he could search Slashdot and find one of the Ask Slashdot stories about what the best first language for young programmers is that appear every couple of months or so.

People that knock the hacker ethic are a bunch of MBA drones that could never really build a damned thing themselves.

You learn to program by diving in and doing it. The more you practice and study, the better you get at it. GM was very good at shackling some very brilliant engineers and turning them into process drones. Look at where it got them. Great things are built by individuals and the more steps you have in the way of people being individuals, the worse you will get. Products have to be owned by the engineers that make them and they are personal works of art.

At the end of the day, the managers, bean counters, and all of these other people with their measurements, metrics and fancy charts are so much fluff, a tax on the capable in society... by really a bunch of leaches that could barely feed themselves as they lack the mental self sufficiency to do anything other than to try and ride the labor of others. We condemn socialism in society there's no real difference between the PM in a three piece suit and the lowest of the homeless people. Neither add any real value to society, its just that, the PM knows how to use PowerPoint and the homeless guy does not.

This comment is amusing to say the least. I have both a CS degree and an MBA, so I see both sides.

First of all, I agree with the comment about diving in and doing. You can memorize the syntax of a language all day long, and until you apply the language to a problem, its useless.

That (and some of the stuff in your link) is about all we agree on. I read you comment and I know EXACTLY your type. You are bitter because you have barely moved through the chain. You wonder why you work so hard and make "littl

That (and some of the stuff in your link) is about all we agree on. I read you comment and I know EXACTLY your type.

Stop.

You really think you know my type? You, just like every of your type, have it in your head that everyone has a a great desire to be just like them, or to do what they do.

Honestly, I really don't. I have no desire to be like you at all. Like, I don't need to have people beneath me to affirm myself. I don't need to have power to be satisfied with what I have done. I have myself, my two

... that doesn't need an IDE, require objects or lots of definitions and has a printable form will do fine.

The reason I exclude the above three attributes is that they lengthen the learning curve to getting a "hello world" program written and working. If a newbie's first exposure to programming is spending hours in a classroom without producing any output, the teacher will start to hear CLICKing noises after the first five minutes as the children switch off (metaphorically speaking). After that, they're l

I'm a father of three and a college professor teaching computer programming, and I've found that Scratch is a very good "language" for teaching programming. It shows programming concepts such as looping, variables and interfaces in an immediately accessible and kid-friendly manner. It includes multimedia and event-driven programming capabilities. It uses the best features of immediate feedback of success and visible results to encourage exploration and fun.

Programming in Scratch helps kids

start simple and do complicated things later

create an animation for telling a story, playing an interactive game, or a video to share on the web

jump right in and understand the basics like variables, loops, arrays, etc, without getting bogged down in an over complex or restrictive language

learn to program by diving in and doing it

impress their friends

During the directed learning that takes place in a Scratch-oriented curriculum, the teaching team can introduce another programming language to show how syntax-oriented programming languages can perform the same tasks as the graphics-oriented systems. Any programming language can serve as that second language.

I find it a bit ironic that the best language for teaching programming languages isn't a language at all.

Pretty much every browser in existence supports JavaScript, so with nothing more than a simple text editor and your browser of choice you can be off and running. As far as beginning programming is concerned, JavaScript easily encompasses any programmatic constructs you'd need.

The best part is that the students can easily display the results of their test programs in HTML, either dynamically generated or just by manipulating some divs, textboxes, tables etc that they've written on their page. Additionally, an instructor could write a 'playground' bit of HTML and JavaScript, so all output variables are bound up and easy to access. At that point the student is free to focus on what really matters, his/her first logic routines. When the student has created his first masterpiece, sharing the accomplishment with parents/peers is as simple as sharing a link to their HTML file.

I think this has the potential to engage students much faster than observing console output or fighting with a front end like windows forms in VB or Swing in Java.

For some reason, the parent has been modded "flamebait", so I've got an urge to defend and second the motion for Javascript as a great language to learn on.

First, JS is what powers the web, and is both a simple language to understand the basics of, and a complicated one to continue learning from. Along with HTML it can be easy to prototype ideas and have instant results, which can be very helpful for inspiring young programmers.
Secondly, it's object-oriented in a very different and arguably more powerfu

I don't associate Scheme with 'the hacker ethic'. I don't strongly associate any language with hacker sensibilities. I do associate Scheme with the intellectual rigor required for a programmer who really has a clue about programming.

I think Scheme is an excellent language to teach college students who think that they know how to program because they managed to smoosh together a bunch of working PHP code and make a website. I think it is a poor language to teach high school students who are learning their first language.

The association of technical knowledge with competence irritates me. A competent painter needs to know about brushes and mixing paint, the difference between oil and acrylic, and a whole host of other technical details. But that's not how you get a good painting.

One of my reasons for feeling that Scheme is a good language for people who think they know how to program is that such people frequently know all about paint but do not have the depth of understanding to be a good painter. Scheme is a language that forces you to think about programming differently than you did before. And if you understand it you are on the path to being a good programmer rather than just a code monkey.

But I would not recommend it as a first language. I would recommend Python for that. Clean, concise, expressive and powerful. It's my favorite language for a reason.:-)

In Germany, researchers into didactics (teaching) of computer science (Informatik) have done some work on this topic. I recently found it when I was looking into materials for the computer science course in the Netherlands (seeing if I could do better).

Based on 15 criteria, they ranked 27 languages, ranging from Scheme to Haskell, ADA to Ocaml. The worst language for teaching was, by far, APL (scored a 5, which is the worst), followed closely by Perl. The best language for teaching was Algol 60 (1,50). Second best Python (1,66), 3rd place Ruby (1,88) and scraping in at a 4th spot was Pascal (2,14).

So to summarize: better dust off your Algol 60 books and compilers:P

Failing that, Python and Ruby are nice as well for just teaching programming (although if you want to show the distinction between imperative and functional programming I'm not altogether sure that Ruby would be enough).

I've actually had this experience. I've mentored someone from about 12 - 15. He's going to be one of the best programmers of his generation if he sticks to it.

First, I agree that at this age finding things he wants to do is more important than the specific technology. But I would argue that the technology does matter to some extent. There's a lot of time between 12 and college. Someone who spends a lot of it programming is going to get at least as much experience before college as in college. I'd like to see it go in the right direction. When I taught computer science 111, I sometimes had to tell kids who were self-taught in Basic to forget everything they knew. I'd hate to see that happen to someone who had invested lots of time.

I think it's the job of the mentor to encourage -- with a light enough touch not to discourage -- use of good programming techniques. That means talking about program structure and design, proper data structures, and any other concepts needed for what they're doing. (In my case the kid likes doing multi-threaded network services, so I had to teach him synchronization much earlier than you'd typically do that.)

I haven't programmed in Scheme, so my judgement on it is probably not reliable. I did do a lot of work in Common Lisp. While in many ways I liked Common Lisp more than more recent languages, I think a language like Java or C++ is more likely to push you to think about structure. C++ seems a bit low level. I'd be willing to accept either a high level language like Perl or Python, or something lower level like Java or Visual Basic (using the newer features of the language so that it's essentially the same as Java -- although C# might be a better choice).

For someone who is just going to be playing around there's a lot to be said for Perl/Python. But if they're going to be doing anything big enough where structure matters, I'd probably start with Java or maybe C#. Of course you can certainly start with Python and them move to Java.

In my case, the student I worked with started with Visual Basic, moved into a more structured form of Visual Basic, and then to Java. By now he's also done PHP and C++. It's also all been his choice. And in fact the real answer may be that when working with teenagers unless you want to spoil the fun there's a limit to how much you can or should actually determine what they do. So you may end up supporting them in whatever language they pick. But if someone is likely to be a professional, I'd probably try to get them into a structured language like Java fairly soon for at least some of their work.

And that there my friends is the crux of the problem. This is why we are now swimming in code bloat from every angle. Sorry to disagree with your view of the world, but *proper* programming IS engineering.

Now, to get back on topic, how about something like Squeak? Using squeak land, you can 'trick' the kids into learning a real language. Of course i learned by sitting in front of a 8080 i built from scratch from reading intel data books that i wanted to actually do something other then sit there, but i realize that isnt for everyone.

I learnt BASIC first, on the Sinclair ZX-81 and then the Sinclar Spectrum.Soon after that, I learned to program using Turbo Pascal, and I translated a lot of my BASIC programs to Pascal on my Dad's PC.At school, I learned to program on a BBC Micro using BASIC and 6502 assembler and a little while after that I learned to how to program using 808[86] assembler.C++ was the next main language I learned to use but between Turbo C++ and Turbo Pascal, I preferred Turbo Pascal, especially how well it managed dependencies and the sheer speed of compilation. I was a very loyal Borland customer, purchasing nearly every version of Turbo/Borland Pascal for DOS (excluding 5.5)...And then I went pure 32bit programming in 1994 and left the Borland world behind... Used Watcom C++ and Virtual Pascal. Found the GNU compiler. For the last 10+ years, I have almost exclusively been programming using GNU compiler in C and C++.

To answer the poster's question: I would recommend Pascal as a good learning language for learning structured programming.But to graduate to C and C++ after the basics are well understood and good practices have been learned.

The best way to learn to program is through social interaction about the subject within a culture dedicated to a wide array of programming topics.

Languages like scheme, lisp, haskel, perl, ruby, python... these are often domain-focused, where it would be hard for the budding programmer to get into some areas of programming that might keep them interrested. For example, graphics or sound.

Languages like C# and VB.NET have a more generalized culture, where you could get into just about anything and actualy find other people doing the same stuff via online forums (in the old days it was through BBS's and FidoNet.)

So I recommend a general language, without much meaningfull limitations, that has one or more high traffic public forums online dedicated to it.

Scheme isn't remotely write-only - instead it changes how one thinks about programming for the better. If you really want to see write-only, let me introduce you to my good friend perl without strictures.

For saying this, but the answer is right there is you RTFS....Good old VB6. The VB6 IDE was nothing if not simple, you drag and drop whatever elements you wanted, go "clicky clicky" to bring bring up code view and really butt simple for making little apps. Once the kids have gotten to make their own programs for awhile THEN you can move them up to more complex languages. But nothing excites a kid more than "I made this!" and VB6 is nothing if not simple to make little apps.

And their are plenty of places like vb6.us [vb6.us] and a1vbcode [a1vbcode.com] and find tons of heavily commented code snippets to show them how to make anything from a little GUI for keeping up with videos to slot machines. And with VB6 it is beyond simple to play with code like that and see what makes it tick.

So while a lot of the "real programmers" will be screaming bloody murder because I dared to bring up old VB6, the simple fact is it is really good at the niches it was designed for. It is really good at cranking off an app quickly and it is really easy to get started with. Both are requisites IMHO for teaching kids programming. After all, if they can't see that they can make the PC "do stuff" pretty quickly they are gonna get bored and not want to continue long before they get to the good stuff. And with VB6 you can have it popping off little message boxes and other little tricks within the first hour of picking it up.

Hah! You kids and your damn punch cards. When I learned programming, we had to use pointy sticks to press individual zeros and ones into a clay tablet. Assembler? Compilers? Hah again! We learned to bake our code tablets in the sun, because there was always a line to get them kiln-dried.

It teaches you how a computer really works. That way you can become a 'real' programmer instead of an IDE user.

Really? Seriously?

I don't think assembler is the best way to instill the magic and excitement of getting the most complex machine in your house to do what you want it to. And, that's what a fifteen year old newb needs. If you start with assembler, you're assuring that it will be months before he has learned enough to be able to take a program that he's written to a friend or parent, and have that person say, "Cool!". And, it will be even longer before he can use even a fraction of the modern technology that computers now have; things like GUI's, and networking. More often than not, it will only cause frustration.

Back in the day, assembler might have been the right option. But today, I think that's a recipe for killing that spark of creativity and excitement that draws people into programming, and gets them to slog through the nitty-gritty stuff.

Since we're talking about learning languages here, I think we need to remember to balance "excitement of programming" with actual learning.

Assembler is a terrible first language because it doesn't really teach programming so much as learning how a particular CPU works. You could theoretically get away with something like MIX because it's just a simple emulation of assembly, but real assembly language programming is something that really shouldn't be attempted until normal programming is learned.

I don't know if you meant old-school 8-bit-style BASIC or Visual Basic.

If you meant the former then, WTF? There were technical reasons why it was popular and (to some extent) its use was justified on early microcomputers. These technical issues no longer apply, and it's entirely unsuited to programming on a modern scale.

And traditional Basic was *notorious* for fostering bad programming habits; I for one certainly suffered from that, and I really wish I'd used more

If it's Visual Basic, then I'm certainly not convinced that for someone coming to it from scratch it's ultimately any easier to learn than (e.g.) C# or other C/C++ derived languages. It retains much of the syntactical clunkiness of old-fashioned basic, and its syntax isn't used much anywhere else, closing off the leveraging effect you get with C-style languages- learn one of those, and you partly know the others. Ironically, this will also make other languages appear more intimidating and locking that person into Visual Basic further.

Agreed, At my college they thought us VB.Net as introduction to OOP programming. We also did C++ and you could do C#. Reason they did.Net is while it wasn't technical school, they did want to teach us a language that was in wide use. However, there is really no other language with similar syntax so when you did some C++, you got to relearn syntax ALL OVER AGAIN.

If you want to teach someone something marketable for first language and there are plenty of.Net jobs out there, C# is much better choice.

I agree that Visual Basic is as bad a choice for a first language as any other complex programming platform.

What made old skool BASIC good was that it was limited in ability. Admitted data structures were limited to arrays, which was a problem. However a medium-complexity basic like Blitz Basic 2 on the Amiga allowed the creative side to be expressed, without having to wade through complex APIs like you would with a modern language.

And the best way to learn programming to a young person (under 16) is to allow their ideas to be expressed and implemented, be that writing your first football league tracking application, to a simple game, to a text adventure, and so on. If that means using BASIC, e.g., RealBasic, then so be it. It needs to be pick-up-able.

I bet there are people saying Haskell and ML on this thread, for some academic reasons. The last thing a young person wants to be doing is learning how to manipulate data structures, functionally, with all the brain-fuckery that involves, and only to get a sorted list at the end. That isn't exciting, it's not even something to be slogged through, it's tedious and will actually put them off, totally.

10 Print "I am god!" : goto 10run

instant result.

It's sad that computer magazines don't have programming in them any more, unlike the 80s. Game type-ins promised rewards to typing, and learning was osmotic.

Start them with Objects... I had a hard time getting into OO programming because I started with a very low level language.

I started on Fortran. It was horrible. Then I got a home computer with BASIC and advanced to assembly language.

25 years later, I still am at the assembly language stage for programming. But I use different processors and tools. The language is not as important as the tools that support that language. Visual BASIC is great because it gives a simple easy-to-use way to create programs in a Windows environment. Its structural limitations are irrelevant. It is the cost and sophistication of the development tools that is more important.

Now that you can buy a microcontroller for $1.50 that has more power than the original IBM PC, development tools like IDEs are the most important consideration. Computer science was important when computers cost a million dollars: it is meaningless today when they cost a few dollars.

I detest C because I can't debug it on the IDE that controls my $1.50 microcontroller. I can read it and write it fine. I can work with it fine. But I hate it because it's too abstract. I have no idea of what exactly the CPU is doing.

OOP is just science fiction; it's advantages are imaginary. If your application is so advanced and complex that you need OOP to create a program to do it, then it's time to completely rethink the idea of what a computer does.

Computer science is the process of reconfiguring complex concepts to fit into the limitations of the machine. Computer science becomes irreverent when you realize that the more complex the problem, the easier it is to solve by redesigning the computer to fit the problem. Not reducing the problem into small enough processes that will fit into the machine.

It is cheaper and faster to design a custom arrangement of 1000 $1.50 microprocessors to match the needs of complex problem than it is to write and debug the software that will 'solve' the problem on a $5000 standard Von Neumann computer. Microcontroller programmers are cheap and easy to recruit: OOP software development teams are expensive.

This is the new reality of the 21st-century. OOP is the last gasp of the 'big iron' boys.

I wouldn't recommend Assembly. Most of the "under the hood" things are not the job of the programmer anymore. That's why we have compilers.

If I could choose now, I'd learn Python first, for basic algorithmic programming, followed by C, to get a grip on what's really happening at runtime. After that, you're not dependent on language anymore.

I wouldn't recommend Assembly. Most of the "under the hood" things are not the job of the programmer anymore. That's why we have compilers.

And that's why we have so much of shitty inefficient code around. Even when you program in a high-level language, you still have to realize how the code you write works on the machine level. I've seen PHP programmers throwing around calls to array_diff/array_unique, chaining them without mercy, without thinking about performance - because they think that those function are some magic black boxes and never consider a performance hit. "Oh, it's a C function, C is fast anyway from what I've heard". Like a good

a good programmer should know all the chain, from Java/Python/Scheme/Whatever down to the machine code.

Yes, but you don't start with assembly language. You start with something conceptually simple, like Python. I started with Basic on the Commodore 64. Before a year was up, I was doing shit in 6502 assembly because interpreted Basic was too slow. Not a chance in hell I could've picked up assembly straight off without some understanding of a higher level language. Throwing assembly at someone is like throwing a pile of parts and fasteners at someone and telling them to build a combine harvester.

The problem with assembler, little Anonymous Coward, is that it doesn't let you do anything without a significant amount of work, and what you can do is unlikely to impress a fifteen-year-old kid just getting into programming.

Being able to print a few lines to the screen won't impress that kid and make him want to keep programming. Give him a language that can easily create GUIs, so he can see his stuff in action. To do this, I'd recommend an object-oriented language, maybe Python (though I personally detest it) or C# (which is a very nice language with very nice tools).

Errr...no. Lisp originally dates back to the late 1950s; C didn't emerge until the early 1970s. The first working Lisp implementation was writtien in IBM 704 machine language; A Lisp compiler (itself implemented in Lisp) was implemented in 1962 - fully 10 years before the birth of C.

Python is better than Perl because for beginners would takes weeks just to learn all the different possibilities

You don't need to learn them all - you just need to learn ONE to start with, then others can be added as the newbie's level of competence grows.
The biggest barrier to programming is a steep learning curve - too much time spent before something tangible can be produced. Any language that lets someone just type stuff, then press "run" is a good start - maybe even Python.

The point of IntroTo Programming courses is to instill a comprehension and sense of awe at the ability to control the actions, operations, and functions of physical machinery by using symbols, that are non-physical. It is by using your brain to amplify your body (robotics) or by using your brain to build and control a machine that can vastly amplify your brain (a pocket calculator).

Intro To Programming needs to skip language and process at the beginning and first teach how electricity can be used to create and manipulate symbols. This is multi-stage process that teaches how to use electricity to represent binary numbers, then using binary numbers to represent decimal numbers, using decimal to represent CPU instructions, using instructions to make programs, and using programs to control machines that amplify the users physical and mental abilities. And finally, how to use the imagination to create new structures of symbols to create programs.

Install the sense of god-like awe at the ability to manipulate physical reality by rearranging symbols, and the mundane details of language structure are of minor importance to both the student and the teacher.

What a bloody nightmare. I learned Pascal in high school. Two years later when I learned C, I found myself wondering why the fuck anyone would inflict Pascal on people trying to learn programming. I later ended up maintaining a piece of business software written in Turbo Pascal (and later, stuff written in fucking Delphi) and found myself entertaining fantasies of building a time machine and choking Anders Hejlsberg to death in his bed in 1980 before he could inflict his monstrosity on the world.