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:
  • by williamhb ( 758070 ) on Saturday July 25, 2009 @10: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.
  • Re:Python and Pygame (Score:3, Informative)

    by Eudial ( 590661 ) on Saturday July 25, 2009 @10:56AM (#28818649)

    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.

  • by St.Creed ( 853824 ) on Saturday July 25, 2009 @11: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 FishWithAHammer ( 957772 ) on Saturday July 25, 2009 @11:20AM (#28818865)

    This is very, very true. We lost a ton of kids in my 100-level programming class because they couldn't "get" Scheme.

    That was a fun class. Got to learn a new language and do almost no work that semester...

  • by hedrick ( 701605 ) on Saturday July 25, 2009 @11: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 DrVxD ( 184537 ) on Saturday July 25, 2009 @11:38AM (#28818999) Homepage Journal

    in fact Lisp itself is built in C

    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.

  • Re:Assembler (Score:2, Informative)

    by Anonymous Coward on Saturday July 25, 2009 @11:39AM (#28819011)
    I always found such statements idiotic. It's the same for the people who found pointers and references hard to grasp. If that is the case, maybe you're in the wrong field. I started by hand-coding machine language (I was too poor back then to afford an assembler). I never found OO difficult in the slightest. Assembly teaches you much more than any other language. It teaches you how things really work. After that, OO SHOULD be cake.
  • Re:Pascal (Score:1, Informative)

    by maxume ( 22995 ) on Saturday July 25, 2009 @11:40AM (#28819017)

    Grandparent (apparently) has bad Karma, no $&@#$&% modded the comment down, it started there.

  • Re:Assembler (Score:3, Informative)

    by Dogtanian ( 588974 ) on Saturday July 25, 2009 @11:55AM (#28819147) Homepage

    BASIC is another good choice

    No it's not, it's a godawful choice.

    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 languages sooner. With respect, anyone suggesting it be taught to a newcomer should be shot. :-/

    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.

    VB's raison d'etre in the first place was that when it came out, many people had grown up using traditional BASIC a few years earlier, because *that* had been easy to learn. They'd migrated with BASIC through (I guess) familiarity, and because they "grew" and stayed with Visual Basic as it grew up it remained the sensible choice. But that's an advantage for existing users, not for newcomers, as it's really not that simple any more.

    though it's been much maligned by many.

    For very good reasons, too.

  • Game Maker (Score:2, Informative)

    by Anonymous Coward on Saturday July 25, 2009 @12:13PM (#28819277)

    If your young, you probably just want to make games. I'd recommend game maker...it starts out as drag and drop so that you can learn the basics, but easily extends into its coding language, which is similar to Java, but much easier to use!

  • Re:Assembler (Score:3, Informative)

    by rabbit994 ( 686936 ) on Saturday July 25, 2009 @12:24PM (#28819367)

    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.

  • Re:Python then C/C++ (Score:3, Informative)

    by jadavis ( 473492 ) on Saturday July 25, 2009 @12:43PM (#28819511)

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

  • Re:Pascal (Score:3, Informative)

    by CodeArtisan ( 795142 ) on Saturday July 25, 2009 @01:15PM (#28819787)
    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.
  • Re:Pascal (Score:4, Informative)

    by Hurricane78 ( 562437 ) <deleted @ s l a s h dot.org> on Saturday July 25, 2009 @01: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.)

  • Re:Assembly (Score:4, Informative)

    by MpVpRb ( 1423381 ) on Saturday July 25, 2009 @02: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:Pascal (Score:4, Informative)

    by Stealth Potato ( 619366 ) on Saturday July 25, 2009 @02: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:Pseudo Code (Score:4, Informative)

    by Inner_Child ( 946194 ) on Saturday July 25, 2009 @05:02PM (#28821519)

    So... you recommend Python?

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...