Khan Academy Chooses JavaScript As Intro Language
jfruh writes "Slashdotters (many of whom cut their teeth on much-maligned BASIC) have long debated what language kids should learn programming in. Khan Academy, the wildly popular producer of educational videos, has come up with an unorthodox choice: JavaScript, not least because of its ability to keep kids' attention with something fun and graphical."
Well, Javascript is not basic, and they can test their programs in any browser, but... why not scratch?
Well this is going to fuck up a previously up modded comment here, but I had threading and sockets in my Intro to Java course freshman year of college and am very glad I did. Not sure what is so complex about type casting in a statically typed language, its fairly necessary. You don't fully understand them there either, but that only comes with experience anyway.
On the other hand it was an advanced intro course, and I already spent a lot of time screwing around in Q-Basic in high school, in which had done none of those things. But the non-advanced intro class still had threading and sockets and what not, they just waited until the second semester to introduce them.
A libertarian shat on my carpet once. Claimed the free market would sort it out. -Ford Prefect(8777)
I think that's the right choice. All you need is a web browser & text editor. It's easy to get immediate results. It has a C-style syntax, so it will help them with other similar style languages like C++, Java and PHP. Can you really imagine starting kids off with C++ or Java? You could argue for Python (it's what Udacity is using), but I think it's dissimilar enough from other languages that it could cause confusion.
Taking guns away from the 99% gives the 1% 100% of the power.
- Appreciating data-types, their limitations and the perils of using casting them incorrectly helped me a lot in understanding about things I need to be careful about
- Are they going skip the concept of Pointers ? It's not wise to use them unless necessary but to be aware of the concept was very rewarding for me
- How will they teach multi-threaded programming? We're not quite there yet in JS.
Your first language doesn't have to support every programming feature. BASIC certainly didn't support any of these (except data-types to a very, very minor degree) and many of us did fine with it. While data types are important at the beginning to do anything in many languages, we don't really teach pointers or threads (if a language even supports them) until later, so I don't see this as a big problem here.
I'd say for the purposes of Khan Academy, they need something easy that will keep people's attention (as it's mostly aimed at youth who have no real obligation to keep on paying attention unless it's interesting) ... and so, given it's graphical nature, this sounds like a good choice. Their second language can be more fully featured.
I was given the assignment of teaching an intro computational physics class at a university two years ago using C. The students came in knowing no programming (or Linux), and I was supposed to get them comfortable writing C codes to simulate things in two hours a week.
The trouble with C is that graphical output requires a bunch of advanced concepts; I wanted to give them a way to animate their simulations just using the things they already knew (which, at that point, were basically math, for, if, and printf/scanf)
One of the first things they learned was shell I/O redirection (the | operators), so I wrote a command-line filter that read text in from stdin and translated it into animations, with support for various graphics primitives in 2D and 3D along with some interactivity (rescaling/translating on the fly by keystroke input into the animation window). So they could code up a simulation of some thing (a double pendulum, say), and watch it go in front of them. To my surprise it was a lot faster, even over remote X, than I thought it'd be. The huge advantage is that it let them get pretty graphics using nothing other than printf on their end.
Some of the stuff they made by the end was pretty impressive: vibrating 3D meshes showing the oscillations of a stretched membrane, the resonance between Jupiter and the asteroid belt developing, and the like.
Ask 100 programmers what 'best practice' is and you will get 100 answers.
Want to start a flamewar? State that _any_ OO language isn't a 'real' OO language like other OO language.
Personally I don't think it matters what a persons first programming language is, as long as their second programming language is some sort of Assembler. OK I will allow Assembler 3rd, C second.
John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
I'm a fan of learning JavaScript as a first language, it can be presented in a nice way. One of the best parts of js is closures, it really gets them right. I put together some interactive js lessons to teach closures a little while ago, give them a try and let me know what you think.