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.'"
From an HCI perspective (Score:4, Informative)
Re:Python and Pygame (Score:3, Informative)
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.
According to research, its Algol 60 (Score:3, Informative)
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.
Re:Scheme is the best teaching language (Score:5, Informative)
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...
language probably matters to some extent (Score:3, Informative)
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.
Re:Lisp/Scheme != latin of programming (Score:4, Informative)
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)
Re:Pascal (Score:1, Informative)
Grandparent (apparently) has bad Karma, no $&@#$&% modded the comment down, it started there.
Re:Assembler (Score:3, Informative)
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)
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)
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)
# 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)
For logic programming, we were taught Prolog.
Re:Pascal (Score:4, Informative)
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)
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)
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)
So... you recommend Python?