His book Secrets of the JavaScript Ninja got me to love JavaScript. He wrote the framework that made JavaScript a pleasure and now he is educating young people. I only have one man-crush and it is on John Resig.

JavaScript is completely unsuitable to teach CS. It may have some suitability for a scripting-language course, but doing algorithmics, interfaces, architecture, clean design, etc., can only fail with JavaScript.

Why, exactly is this the case? Why can't you teach algorithms or architecture or clean design in Javascript? Interfaces are tricky, sure; at best you have to resort to something like duck typing in asserts if you want to be sure that something implements an interface, but the rest seems completely doable in JS.

The problem is that novice programmers will struggle with the language most of the time and will not see the things actually taught. A language for teaching must stand in the way as little as possible, be clear, orthogonal, little clutter, etc. The best for teaching algorithms and data-structures I have seen so far was Haskell. After the students have actually understood the concepts, and have seen one language, move to C and teach them about the other side, but keep using the same data-structures and algor

I disagree with Kahn calling these Computer Science courses, but I have to admit that I am at a loss as to what to call them.

When you figure it out, you should be able to apply the same term to any grade school course the subject of which they hand out graduate degrees. Math, English, Biology, Physics, History, etc. These beginner courses provide the lingua franca (programming languages) which we use to *begin* teaching Software Engineering (well the parts that aren't just pure engineering principles).
If you want the academic, abstruse term, how about "Fundamentals of Algorithmic Expression".

Different educational institutions have different goals. If you want to go be a programmer and hack source code to make games, apps, real world things, etc. than traditional University education is probably not for you. Unless you are writing a physics engine from scratch, your use of math is probably limited and often CS degrees require a lot of math. Remember that the S in CS stands for science. This is where the University education plays a role. They want to mould students to become scientists, researchers, and professors. A good portion of the science and research material requires strong mathematical backgrounds and im my experience doesn't require the ability to be a super elite programmer. Hell, lots of great ideas are proven and tested with MATLAB scripts. This also applies to the concepts such as runtime analysis and algorithm complexity that are core to developing and proving new approaches and systems. I applaud Khan for it's attempt, but unless there is a heavy math focus later in the curriculum, then they should advertise it as a programming class, not a CS class.

Different educational institutions have different goals. If you want to go be a programmer and hack source code to make games, apps, real world things, etc. than traditional University education is probably not for you.

Real world things? Like database engines, operating system kernels, compilers, enterprise distributed systems, parallel computing, algo-trading, animation/rendering engines that must run in uber-clusters? Yeah, sure, a CS education is not probably not for you &lt/rolls eyes>

Unless you are writing a physics engine from scratch, your use of math is probably limited and often CS degrees require a lot of math.

Been working on software (both commercial/enterprise, systems development and for the defense sector), and in each I've had to constantly use CS-related mathematics to do my work. Even on the commercial sector, I've had to use num

I'm afraid that attempting to explain to unwashed masses the difference between Computer Science and Programming (and web page design) is equally futile to explaining the difference between hacker and cracker (and a script kiddie).

Computer science is about processes and structures, not computers, and not programs. LISP is still the ideal vehicle for learning about the important parts.

On a personal note, a friend of mine had a CS 101 intro course some years ago that was Javascript based. It was absolutely terrible. I know that it was terrible, because I ended up re-teaching him each of the concepts using random old textbooks that I had lying around. He had no problem learning concepts in other languages (Fortran, BASIC, C, even some MIX when I used Knuth) and then applying them to back to the Javascript that he had to do the problems in.

I know that Javascript wasn't entirely to blame there, but it sure didn't help. But why try to polish that particular turd?

Scripting languages should not be taught to first year students for a variety of reasons. I think in my opinion the primary one is that scripting languages do not expose the connections between information structures and the algorithmic complexity of those structures in enough detail to provide a good foundation to learn other concepts such as machine organization and operating and compiler theory.

We learned ALGOL68 back in the day. I still think its clarity is unsurpassed. Understanding that "REAL a;" means "REF REAL a=LOC REAL;" and that "REF REAL a=HEAP REAL;" is something very different makes you appreciate the difference between a constant and a variable with a storage location behind it. Coming from BASIC and FORTRAN that was a real eye opener.No wonder most newer languages like the PASCAL and C families are derived from it.

I'd definitely recommend C as a starting point for anybody serious about learning how to program. You can do high level stuff (pointers, functions). low level (bit manipulation) and everything in between. Also C is the starting point for so many other languages. The knowledge picked up could be extended to Java, C++, C# pretty quickly.
If C is considered too cumbersome, Python would be an excellent choice. The clean coding style required definitely builds good habits. But, God Forbid, don't start with

will. The language does not require a semicolon there and it is not a mistake to omit it. This is a deviation from the "type of whitespace doesn't matter" style of C style languages, but since it allows the semicolon in these places, what's the problem? You can make the type of whitespace irrelevant if you always use semicolons, or you can make whitespace "semantic" by omitting them.

the problem isn't that it helpfully adds semicolons where you forgot to add them. that would be great if it's all that it did. however, the problem is that it sometimes adds semicolons just when you don't want it to add them. what's worse is that it's impossible to know the difference between the two unless you're familiar with the language spec.

for example, like to word-wrap long lines in your code? be careful, javascript might just put a semicolon before your line break. in C all whitespace in code is equ

JavaScript can be an ugly language to work with, but the interactive editor [khanacademy.org] they have looks really good and nicely works around all the issue one frequently runs into when using raw JavaScript (catches missing semicolon, catches typos of function names, allows editing color values via GUI, automatically runs the code on each change, etc.).

This really doesn't sound like "computer science" when you read the description. Where are algorithms, data structures, computability, complexity theory, etc? Programming != computer science. Even if they really meant that they were teaching programming, teaching a fad language used at an application level (not same as high level language) is not really the best way to teach programming. And what does "drawing", "animation", and "user interaction" have to do with programming or computer science?

Yep, and it's there for the same reason as other entrenched bullshit is still around -- Not because it's any good at all, just because it's what we have available to work with. As someone who uses JavaScript as well as nearly all other "popular" languages, from C++ to Perl, to PHP, Assembly, I must say, JS is my least favorite to work with -- Let me just repeat that: I MAINTAIN PHP CODE, AND THINK JS IS WORSE!

It's a crappy language, with designs that needlessly screw performance, that was never intended

What does childhood have to do with it? I thought Khan Academy tought serious academic subjects? This doesn't sound like a serious subject, it sounds like overly broad introduction to something not really at all like computer science.

What does childhood have to do with it? I thought Khan Academy tought serious academic subjects?

Like basic spelling? I guess it, along with application development doesn't meet your personal criteria for a "serious academic subject". Probably too useful and productive in real situations. After all, it's not a "serious academic subject" unless it involves studying dead people is it?

Do you people have CS degrees and know what they are, or are you just going around calling people elitist?

Yes, there is a typical curriculum that one expects from a decent university CS program, and no, it does not include "animation". I'll take an algorithms course any day over learning how to draw from the guy who created jQuery.

Nothing much... what's your point? Is it that what people want to learn is drawing, animation and user interaction? If so, they want to do a programming course, not a CS one. Just like the academy is teaching a programming course, not a CS one.

It also has a number of rather large disadvantages: requiring an understanding of closures, no real notion of classes (objects are just glorified key-value stores), implicit variable scoping, implicit insertion of semicolons (in ways that can actually cause errors in some cases), and the confusing (ab)use of the plus operator for string concatenation... and that's just the language itself. As soon as you start adding in the brain damage that is the DOM, it quickly becomes one of the worst programming languages you can possibly use to teach young minds, posing a very real risk of turning them off to programming rather quickly as soon as they try to step outside the narrow confines of the lecture material.

Want to make someone swear off programming for good? Make them write any sort of complex web-based text editor using ContentEditable. It makes my i386 assembly days seem sane by comparison; you spend more than 99% of your time working around bugs in one browser or another, and less than 1% of your time actually writing code that actually does something useful.

Let me tell you where I'm coming from... I hated JavaScript... HATED IT... for ten years, I endured it. A while back, I decided to finally wrap my head around it and actually study it the same way I studied languages like Java, C, and Objective C. Once I dropped the notion that it wasn't a class based language and that I needed to think differently in order to use it, I found it remarkably freeing.

In fact, I grew so accustomed to it that I actually find class based languages constricting.

Yes, it does have some dangerous gotchas, so the trick is to avoid those areas of the language, and then use static analyzer like JSLint for backup. It also helps to "use strict" on all your scripts

The true irony is once I've come to enjoy the old dog, I've decided to move out of development. Maybe next lifetime:)

In principle, yes. In practice, it's a heck of a lot harder to properly document and verify the expected behavior of code if you have to write complex regular expressions just to get a complete list of all the different possible keys. I've fixed bugs in Perl code (which obeys that same design principle) where some subtle misbehavior was caused by a simple typo in the name of a key—an error that went undetected for months, yet would have been

Name a language that is easier to get started in. You already have a browser that runs Javascript, regardless if you're on MacOS, *nix, or Windows (or whatever system you use most likely), now all you need is a text editor, which is built in on most systems. I don't know of any other language that doesn't require you to download and install some sort of compiler, interpreter, SDK, or whatever, all of which are barriers to entry. Plus, you have the advantage of using one of the most widely used languages on a platform that can distribute your code very easily and very portably.

You may not like Javascript--and granted, as a language, it's got plenty of warts. (Note that you can fix a great deal of these warts on modern browsers by simply including a "use strict" declaration at the top of your code). But it's a great language to start out in, if for no other reason than that the start-up cost is very close to negligible, and it's a useful language that enjoys a level of ubiquity that most other languages only dream of.

I don't know of any other language that doesn't require you to download and install some sort of compiler, interpreter, SDK, or whatever, all of which are barriers to entry.

You are allegedly learning "computer science" or at the very least "computer programming". Being able to perform rudimentary tasks, such as file download and software installation on a computer is a reasonable prerequisite.

I felt that same way about "semantic whitespace" 12 years ago when I first learned python. The idea just reminded me of too many crawling horrors like RPG and FORTRAN on punch-cards (#include <std_you_kids_get_off_my_lawn.h>) but seriously, an hour into it and you don't even notice it any more. It's really just enforcing what you should be and probably already are doing in C/Perl/C++/Java etc.

If you haven't really given python a go, I'd really encourage you to do so and don't let the "whitespace thi

I had to use "semantic whitespace" pre-Python on Occam. It was very painful because I was using VI and it insisted on optimizing and sticking in tabs if I shifted lines, and I had to hunt down the settings to fix this (back then docs on vi were scarce to nonexistent). Emacs similarly wanted to put in tabs by default and I just didn't have the patience at the time to come up with an Occam mode for it. My overall impression was that the spacing was an interesting idea _experimentally_ but that actual pract

The good news is that our documentation and editors are much better these days, so those pains are much lessened in today's working environment.

I hear you with respect to the rabid fandom. I try to avoid evangelization, but also approach such discussions with my preferences and biases stated up front. I dig python, you may not, and I'm totally cool with that!:-)

Semantic whitespace is the ultimate consequence of the myth of human-readable code.

Myth? Myth?Myth?

Yes, myth. I cannot read code without an editor -- it's just a series of hexadecimal codes until such time as the editor maps it to a character set. And those hexadecimal codes have to be interpreted from a series of bits by a computer, reconstructing them from binary digits according to the endianness used by the system. And those bits are determined by reading the polarity of tiny magnets.

Well, if you define abstraction as myth, then all computing tasks are built on layers upon layers of myth. As a pro-Romanticist, I rather like your definition, frankly. There are even more layers of myth above your editor, as either the GUI or the character renderer turns those characters into a raster format to be fed across a signal line to the monitor, which will cause photons in a narrow but well-defined band of frequencies to be emitted, whereupon those photons are focused on your retina, activating r

CoffeeScript. Granted, it introduces an additional dependency (CoffeeScript) on what is otherwise the simplest and easiest development platform. Which leads me to the following:

You already have a browser that runs Javascript, regardless if you're on MacOS, *nix, or Windows (or whatever system you use most likely), now all you need is a text editor, which is built in on most systems. I don't know of any other language that doesn't require you to download and install some sort of compiler, interpreter, SDK, or whatever, all of which are barriers to entry. Plus, you have the advantage of using one of the most widely used languages on a platform that can distribute your code very easily and very portably.

You may not like Javascript--and granted, as a language, it's got plenty of warts. (Note that you can fix a great deal of these warts on modern browsers by simply including a "use strict" declaration at the top of your code). But it's a great language to start out in, if for no other reason than that the start-up cost is very close to negligible, and it's a useful language that enjoys a level of ubiquity that most other languages only dream of.

^^^ This. This is the reason (a really good reason) to use JavaScript as an introductory programming language with virtually zero barrier of entry (in terms of development env. setup.)

Obviously, people will complain - argh, real devlupers use <insert toolchain> with <insert IDE/editor/whatever>. And on a real CS-oriented, full-blown and complete programming course, this is true. But we need to notice that Khan's materials are not full-blown courses, but tutorials with the explicit aim of being as accessible to the masses as possible.

Whether this (and/or the choice of JavaScript) will turn people unsuitable for programming into legions of useless code monkeys is a non-issue. After all, the typical CS programs at brick-n-mortar universities have been producing useless code monkeys since the dot-com.

What a system of programming tutorials as implemented by Khan's academy will do, however, is to make the learning of programming more accessible to those that already have the potential of being good developers. Perhaps this could reach them early on before they finish their secondary education (or allow currently enrolled CS-students to use them as add-ons to their formal curriculum.)

JavaScript is a god-awful language, but its development setup makes it a decent first-language. Yes, it does not have true OO, but neither did BASIC. And good and bad developers will become so whether they use JavaScript, BASIC or Haskell (yes, there are atrocious Haskell programmers.)

Name a language that is easier to get started in. You already have a browser that runs Javascript, regardless if you're on MacOS, *nix, or Windows (or whatever system you use most likely)

Not if you haven't installed a full UI, you don't.Most non-GUI browsers don't do javascript.

I don't know of any other language that doesn't require you to download and install some sort of compiler, interpreter, SDK, or whatever, all of which are barriers to entry.

The shell you use is also a full language with an interpreter. No installation needed in linux/unix, because there will always be a shell. Even on embedded systems.And I've seen programs written in shell that are quite large and advanced.Why use shell? Ease of maintenance, more than anything.If you have a bottleneck, singling out that part for a compiled program that can be called with parameters or piped from a s

Why do you need one that's easy to get started in? Khan Academy labeling itself as "advanced topics simplified for busy people"? Does it teach physics and calculus the same why by skipping the hard stuff?

Real Programmers must spend their first year writing Pascal code to create hypothetical schedules for students at a university, followed by implementing every data type in a fat textbook from "Associative Array" to "Weight-Balanced Tree." Second year, the same thing - in Scheme. Final year, same thing - in assembler - and with runtime complexity proofs.

Congratulations, the both of you remaining are done.

What is this? Use of libraries? Graphics? User interaction? Heresy I say!

You NEED to teach assembler at some point or you end up with graduates who are unable to understand the basic computing model. That doesn't mean they ever need to use it in a job but if they don't know it they will be impaired and possibly end up like the useless sorts of programmers who don't think efficiency is important or that you can solve it by getting faster computers.

With the exception of COBOL those might be fine things to teach kids. They get the basics down without corrupting their ideas. It's pretty easy to go from basic to something like Java because you just relearn everything and the better structures mean you like it more and don't have to unlearn all the crap you learned. You just learn an entirely different form. You're not going to corrupt somebody's ideas by having them write out a factorial program in assembly.

Actually, I have, in fact, taught students Assembly language as their first language.

It was a bit of a fluke of scheduling as they were first year engineers and had to cover C++, MATLAB and microcontrollers (i.e. assembler) in the first year. Due to the number of students and sizes of the labs, some of them happened to get assembler first.

It's actually not a bad way to start It depends very much on the student.

Some of them click with high level languages and can get going straight away. Som

I completely agree. BASIC was my first language. C was my second, and before I could fully learn it I delved into Assembly.

It wasn't until Assembly that I met the man behind the curtain, we shook hands and he imparted his "wizardry" to me. I went back and mastered C in a week. All other languages became simply syntax rules and a new API -- A few weeks work to get proficient in the language and then just having API docs available. I can more quickly understand the high level languages like Haskel, C++,

Smalltalk? Are you kidding? GTFO! Smalltalk is the ugliest thing in the world, ugggggh. Please don't force messaging on newbies, that shit is awkward as hell. Smalltalk is what lead to this annoying world we live in where you have to write so much obj-c. Uggggh.

LOGO, then BASIC then whatever you want but that's the way I'm planning to teach my son. LOGO gives instant gratification and BASIC is well, as easy to understand as a Turning complete language can probably be.

I like Javascript, it offers some very elegant ways to solve complex problems, but it's definitely not a language for a beginning programmer.Javascript makes it very easy for a programmer to hang himself and requires a lot of self-discipline and knowledge of what features to use and which to ignore.

I rarely use Perl or Python, but those would probably be far better languages to start with.Java and C# are rather clean too, but perhaps a bit too complex to start out with.