Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

The Best First Language For a Young Programmer 634

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.'"
This discussion has been archived. No new comments can be posted.

The Best First Language For a Young Programmer

Comments Filter:
  • Pascal (Score:4, Insightful)

    by El Lobo ( 994537 ) on Saturday July 25, 2009 @09:25AM (#28818375)
    I always considered Pascal (or Delphi) a great language for beginners. Powerful enough, structured, type safe and very elegant. From there, jumping to other languages is quite easy.
    • Re: (Score:3, Interesting)

      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.

      • Re: (Score:3, Insightful)

        Get a Commodore 128 emulator, and start programming a game in BASIC. That's how I started, until I realized that BASIC is too slow so then I switched to C.

        • Re:Pascal (Score:4, Insightful)

          by morcego ( 260031 ) on Saturday July 25, 2009 @12:59PM (#28820139)

          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.

      • Re: (Score:3, Insightful)

        by sammyF70 ( 1154563 )

        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

        • Re:Pascal (Score:4, Funny)

          by Massacrifice ( 249974 ) on Saturday July 25, 2009 @04:41PM (#28821825)

          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).

          • Re:Pascal (Score:4, Interesting)

            by sammyF70 ( 1154563 ) on Saturday July 25, 2009 @05:10PM (#28822065) Homepage Journal

            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.

      • Re:Pascal (Score:5, Insightful)

        by Hairy1 ( 180056 ) on Saturday July 25, 2009 @03:51PM (#28821415) Homepage

        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 = 5
        if a>7:
              print "a is bigger than 7"
        else:
            print "a is smaller or equal to 7"

        you need to write something like

        public class Example{

            public String main( String[] args ) {
                int a = 5;
                if( a> 7)
                {
                      System.out.println("a is bigger than 7");
                } else {
                    System.out.println("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.

    • Re: (Score:3, Informative)

      by CodeArtisan ( 795142 )
      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.

      For logic programming, we were taught Prolog.
    • Pseudo Code (Score:3, Interesting)

      by proc_tarry ( 704097 )
      They are new programmers.

      If they want to understand the logic of computers, then they should write pseudo code first.

      Do this until they are not new programmers.
    • Re:Pascal (Score:4, Informative)

      by Hurricane78 ( 562437 ) <deleted&slashdot,org> on Saturday July 25, 2009 @12:29PM (#28819901)

      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, and
      Haskell 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.

      • Re:Pascal (Score:4, Informative)

        by Stealth Potato ( 619366 ) on Saturday July 25, 2009 @01:53PM (#28820505)

        C and Java (forget C++, it tries to be C and Java, but fails to beat both)

        I'll readily agree that C++ is an awkward and complicated language that is absolutely not suitable for beginners, but how can it try to be Java? C++ predates Java by over a decade.

    • Re: (Score:3, Insightful)

      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.

      • Re: (Score:3, Interesting)

        by julesh ( 229690 )

        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

        • Re: (Score:3, Funny)

          by julesh ( 229690 )

          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

  • by Seth Kriticos ( 1227934 ) on Saturday July 25, 2009 @09:27AM (#28818395)
    I personally started out with Pascal in the mid nineties, and it was nice back then (before Delphi came around).

    Nowadays I would suggest Python as firs language as it is fairly easy, clean and powerful general purpose scripting language. Then extend it with C/C++.

    Just don't start with VB, PHP, Java or C# as it will screw the person up for lifetime.
    • by nathan.fulton ( 1160807 ) on Saturday July 25, 2009 @09:33AM (#28818443) Journal
      Just don't start with VB, PHP, Java or C# as it will screw the person up for lifetime.

      I strongly disagree with this. Refusing to learn a new way of doing things will screw the person up for a lifetime. But the blame for that is on the person who is now screwed up, for being lazy.
      • by i.of.the.storm ( 907783 ) on Saturday July 25, 2009 @11:13AM (#28819281) Homepage
        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.
    • by SirLurksAlot ( 1169039 ) on Saturday July 25, 2009 @09:51AM (#28818605)

      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:

      1. the language (and the associated tools) are available
      2. it has all of the fundamentals of programming (looping, flow control, data structures, variables, etc)
      3. 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?

      • Re: (Score:3, Funny)

        by Abcd1234 ( 188840 )

        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".

        2) Assembly/C sucks because they're too low-level.

        3) C++ sucks because it's horribly byzantine.

        4) Scheme/Lisp/Haskell sucks because they're confusing.

        5) Python/Perl/Scripting

      • Re: (Score:3, Informative)

        by jadavis ( 473492 )

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

        Looping is not fundamental to programming languages. It's an iterative construct that is not necessary in declarative languages -- and not necessary in most languages, actually.

  • 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.
  • by Gorobei ( 127755 ) on Saturday July 25, 2009 @09:31AM (#28818429)

    for the professors, that it. By removing all the syntax, etc, you can be introducing functions, lexical scope, binding, etc in the first week. Data structures and recursion in the second.

    Result: most students quit by week two, and you are left with a fairly teachable remainder.

  • Python and Pygame (Score:3, Interesting)

    by pcraven ( 191172 ) <[moc.ylimafnevarc] [ta] [luap]> on Saturday July 25, 2009 @09:32AM (#28818441) Homepage

    For a 15 year old? Python with the Pygame toolkit. There are other toolkits besides Pygame, but that one works well.

    • 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.
      • so you suggest kids should be writing their own pygame versions? somehow i don't believe they'll learn anything.
      • Re: (Score:3, Informative)

        by Eudial ( 590661 )

        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.

        • Re: (Score:3, Insightful)

          by Norsefire ( 1494323 ) *

          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.

  • by fuzzyfuzzyfungus ( 1223518 ) on Saturday July 25, 2009 @09:33AM (#28818449) Journal
    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.
  • > After all, as Jeff Atwood puts it, 'what we do is craftmanship, not engineering...'

    It would seem that Mr. Atwood has never done any engineering.

  • Assembly (Score:5, Interesting)

    by MpVpRb ( 1423381 ) on Saturday July 25, 2009 @09:39AM (#28818497)

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

    Then learn C, it is the most widely used in both commercial and open source.

    Then learn C++, it is a better C.

    Then learn Java, it rules the web.

    Then learn Python, it has some very clever ideas.

    Finally...never stop learning

    • Re:Assembly (Score:4, Insightful)

      by JaredOfEuropa ( 526365 ) on Saturday July 25, 2009 @10:48AM (#28819085) Journal

      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.

      • Re:Assembly (Score:4, Insightful)

        by SirLurksAlot ( 1169039 ) on Saturday July 25, 2009 @11:14AM (#28819293)

        Java might be good but I have no experience there.

        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).

    • Re: (Score:3, Insightful)

      by hattig ( 47930 )

      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.

      Then when the first language is too slow, or doesn't al

    • Re: (Score:3, Funny)

      by ahabswhale ( 1189519 )
      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.
      • Re:Assembly (Score:4, Informative)

        by MpVpRb ( 1423381 ) on Saturday July 25, 2009 @01:48PM (#28820471)

        C is not the most widely used commercial language and it certainly does not lead the way in open source

        So...What is Windows written in?

        What is the Linux kernel written in?

        What are KDE and Gnome written in?

        Autocad...Photoshop...MS Office?

        AFIK, they are all C or C++

        • Re: (Score:3, Insightful)

          by julesh ( 229690 )

          So...What is Windows written in?

          What is the Linux kernel written in?

          What are KDE and Gnome written in?

          Autocad...Photoshop...MS Office?

          AFIK, they are all C or C++

          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

    • Re:Assembly (Score:5, Funny)

      by Draek ( 916851 ) on Saturday July 25, 2009 @02:53PM (#28820993)

      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.

      Or perhaps teaching "from the bottom-up" isn't such a good idea.

  • by williamhb ( 758070 ) on Saturday July 25, 2009 @09:40AM (#28818511) Journal
    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.
  • by kulakovich ( 580584 ) <slashdotNO@SPAMbonfireproductions.com> on Saturday July 25, 2009 @09:41AM (#28818519)
    http://www.alice.org/index.php?page=what_is_alice/what_is_alice [alice.org]

    "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."

    kulakovich
  • Alan J. Perlis said: "A language that doesn't affect the way you think about programming is not worth knowing". (personally I would remove the 'about programming' bit).

    I think the same applies to a first programming language. It has to expand the learner's view of the universe. Getting a language which panders to the learner's universe does not do them any good.

    • by SpinyNorman ( 33776 ) on Saturday July 25, 2009 @10:02AM (#28818713)

      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*.

  • Fast and free (Score:4, Interesting)

    by proslack ( 797189 ) on Saturday July 25, 2009 @09:44AM (#28818539) Journal
    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.
  • PHP (Score:4, Interesting)

    by Phrogman ( 80473 ) on Saturday July 25, 2009 @09:44AM (#28818541)

    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.

    • Re:PHP (Score:5, Insightful)

      by jjohnson ( 62583 ) on Saturday July 25, 2009 @10:01AM (#28818695) Homepage

      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.

    • Re: (Score:3, Insightful)

      by kamatsu ( 969795 )

      The problem is the vast majority of PHP code in the world is bad. It can very easily teach bad habits.

  • 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).

    PS. The environment was an interactive "command line" and BA

  • Start simple? (Score:3, Insightful)

    by SpinyNorman ( 33776 ) on Saturday July 25, 2009 @09:48AM (#28818581)

    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!

  • by ceoyoyo ( 59147 ) on Saturday July 25, 2009 @09:56AM (#28818651)

    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.

  • by Teckla ( 630646 ) on Saturday July 25, 2009 @09:57AM (#28818655)

    There are lots of good choices for a first programming language these days, but I thought I'd chime in and suggest Lua for consideration.

    Lua is free.

    The Lua interactive interpreter makes exploring and learning the language a pleasure (much like the Python interactive interpreter).

    There are excellent and up-to-date free tutorials for Lua available online.

    Lua integrates easily with C, giving you trivial access to any low level OS features you need.

    The language is a pleasure to use. It just feels right.

    Give it a shot. You won't be disappointed. :-)

  • 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.

    • Re: (Score:3, Interesting)

      by Gravis187 ( 1605621 )

      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

      • Oh brother! (Score:3, Interesting)

        by tjstork ( 137384 )

        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

    • Re: (Score:3, Interesting)

      by Blakey Rat ( 99501 )

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

      MBA "drones" build things all the time. You just don't understand what, because they use human beings as their construction material.

      You learn to program by diving in and doing it. The more you practice and study, the better you get at it.

      You learn some things, but not others. You'll never learn how to write maintainable code this way.

      GM was very good at shackling some very brilliant engineer

  • Teach him C (Score:3, Interesting)

    by jrothwell97 ( 968062 ) <jonathan@not r o s w e l l.com> on Saturday July 25, 2009 @09:59AM (#28818669) Homepage Journal

    Buy him a copy of C for Dummies and have done with it. C is kind of like the Latin of programming, except it's easier to learn than Latin.

    I would have suggested BASIC around a decade ago, but I can't think of a modern BASIC implementation that's neither horrendously complex for a new programmer or insanely outdated.

  • ... 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

  • http://scratch.mit.edu [mit.edu] designed explicitly for this

    • Re:scratch (Score:4, Interesting)

      by kjenks ( 846750 ) on Saturday July 25, 2009 @11:11AM (#28819265)
      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.

  • JavaScript/HTML (Score:3, Interesting)

    by KrackerJax ( 83403 ) on Saturday July 25, 2009 @10:03AM (#28818721)

    One not-so-obvious candidate: JavaScript and HTML.

    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.

    • Re: (Score:3, Interesting)

      by chdig ( 1050302 )
      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. :-)

  • by St.Creed ( 853824 ) on Saturday July 25, 2009 @10:17AM (#28818847)

    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).

    ------
    This was found in a (Dutch language) PDF: http://www.utwente.nl/elan/huidige_studenten/overig/OvO/OvO-inf/Eindverslag%20INF.pdf [utwente.nl] (see page 8 for the German criteria, and page 9 for the results). See the original research (*) here: http://subs.emis.de/LNI/Proceedings/Proceedings22/GI-Proceedings.22-12.pdf [subs.emis.de] (German language document)

    (*): [LH02] I. Linkweiler, L. Humbert. Ergebnisse der Untersuchung zur Eignung einer Programmiersprache fÂur die schnelle Softwareentwicklung â" kann der Informatikunterricht davon
    profitieren?, Didaktik der Informatik, UniversitÃt Dortmund, 2002.

  • by hedrick ( 701605 ) on Saturday July 25, 2009 @10:25AM (#28818905)

    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.

  • by nurb432 ( 527695 ) on Saturday July 25, 2009 @10:29AM (#28818933) Homepage Journal

    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.

    Python is also be a good starting point. Approachable, and 'legit'.

  • by Antony T Curtis ( 89990 ) on Saturday July 25, 2009 @11:03AM (#28819199) Homepage Journal

    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.

  • by Rockoon ( 1252108 ) on Saturday July 25, 2009 @11:11AM (#28819263)
    Seriously.

    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.
  • by dirtyhippie ( 259852 ) on Saturday July 25, 2009 @11:53AM (#28819587) Homepage

    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.

  • by jlar ( 584848 ) on Saturday July 25, 2009 @12:21PM (#28819827)

    Personally I would recommend C++ or Fortran since that should quickly kill their interest in programming. And I really don't want more competition from bright young people.

  • Comment removed (Score:3, Interesting)

    by account_deleted ( 4530225 ) on Saturday July 25, 2009 @03:28PM (#28821261)
    Comment removed based on user account deletion

Genius is ten percent inspiration and fifty percent capital gains.

Working...