Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Khan Academy Chooses JavaScript As Intro Language

timothy posted more than 2 years ago | from the thus-speaks-khan dept.

Education 355

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

cancel ×

355 comments

Sorry! There are no comments related to the filter you selected.

The reason seems obvious to me (5, Informative)

Anonymous Coward | more than 2 years ago | (#39210099)

No additional tools needed. Everyone watching a Khan video already has a JS environment.

Re:The reason seems obvious to me (4, Funny)

Anonymous Coward | more than 2 years ago | (#39210469)

KHAAAAAAAAAAAAAAAAAAAAAAAANNNNNNNNNNNNNNNNNNNNNNNNNNN!

Lameness filter encountered. Post aborted! Filter error: Don't use so many caps. It's like YELLING.

Re:The reason seems obvious to me (3, Insightful)

moderatorrater (1095745) | more than 2 years ago | (#39210689)

Exactly. The ability to go straight from learning to doing is absolutely critical for teaching programming. If I hadn't picked up my older brothers TI-85 when I was in junior high and started fiddling with his programs, I might not be doing programming today.

Scratch (3, Interesting)

gmuslera (3436) | more than 2 years ago | (#39210111)

Well, Javascript is not basic, and they can test their programs in any browser, but... why not scratch?

Re:Scratch (0)

lavacano201014 (999580) | more than 2 years ago | (#39210191)

That's more of a jigsaw puzzle than any real programming - sure it helps get the idea down but doesn't really teach *progamming*

Re:Scratch (1)

Anonymous Coward | more than 2 years ago | (#39210867)

I suspect you haven't spent any time with Scratch scratch.mit.edu. True, it has a "graphical syntax" but it is a bona fide programming language. It even teaches concurrent and event-based programming. So what makes it not "really teach *programming*"? Is it because it doesn't do it in the context of your favorite language that makes it not "real"? Perhaps you are not in it's target demographic. Having taught 400 elementary and middle school kids the elements of Scratch for two hours at KTU (http://kidstechuniversity.vbi.vt.edu/program.php) last Saturday, I can tell you that they get it. In fact, I think their teachers were the most excited (mostly because *they* didn't think they could program the computer to do what they wanted).

Re:Scratch (2)

NonUniqueNickname (1459477) | more than 2 years ago | (#39210775)

Scratch is a nice intro to variables, events, loops, branches. But sadly, there are no methods/functions in Scratch. You cannot structure code, you cannot reuse code, any attempt to increase the scale of your Scratch project will result in frustration and very bad habits. It's alright to play with Scratch for a week or so. After that either give up on programming or move to the real deal.

Seems like a practical choice (-1, Troll)

Anonymous Coward | more than 2 years ago | (#39210123)

There's no barrier to entry -- if you can watch khan academy videos, you have a javascript interpreter.

I just wish Kim Kardashian's ass didn't have a barrier to entry :(

Logo! (3, Insightful)

Anonymous Coward | more than 2 years ago | (#39210155)

Silly mongols, you should use logo. You can even get physical, pen-wielding turtle periferals to show how what you code can make something real move.

Ok, it really isn't good for much of anything beyond geometric drawings with nested for loops, but it has immediate, visible results using a subset of normal coding logic.

Re:Logo! (3, Informative)

MindStalker (22827) | more than 2 years ago | (#39210617)

Try scratch. Its basically logo with drag and drop commands and better graphics. I recently retried logo and found the modern version of it highly confusing with its attempt to be heavily threaded.

Re:Logo! (4, Insightful)

Samantha Wright (1324923) | more than 2 years ago | (#39211017)

Scratch not so darling [slashdot.org] . Maybe for the first couple of videos, but then what? Personally, I think the decision to go with JS was a good compromise. This should prove to be the exact opposite of going with Java, which actively drove students away by being too formal for a first date.

Re:Logo! (0)

Anonymous Coward | more than 2 years ago | (#39210657)

Actually, Logo could do a lot more than drawing - it was basically an adaptation of LISP, so it could do all kinds of things. I learned list processing and functional programming in Logo (I was the only one in my class who showed an interest in programming so I got to play with the BBC Model B lots :) )

fd(50); rt(90); (1)

tepples (727027) | more than 2 years ago | (#39210759)

Actually, Logo could do a lot more than drawing - it was basically an adaptation of LISP

Logo is Lisp without a lot of the parens. So is JavaScript. Add a turtle graphics library that draws to a canvas, and JS is the new Logo.

function square(w) {
fd(w); rt(90);
fd(w); rt(90);
fd(w); rt(90);
fd(w); rt(90);
}

Re:fd(50); rt(90); (2)

Tsingi (870990) | more than 2 years ago | (#39210905)

Actually, Logo could do a lot more than drawing - it was basically an adaptation of LISP

I googled logo javascript [google.ca] , and got lost of hits.

Javascript (5, Funny)

Thanshin (1188877) | more than 2 years ago | (#39210167)

alert("Khaaaaaaaaaaaaan!");

Re:Javascript (0)

Anonymous Coward | more than 2 years ago | (#39210911)

your heart must not be *truly* klingon.

Since when is JavaScript an unorthodox choice? (1, Troll)

jholyhead (2505574) | more than 2 years ago | (#39210177)

Everywhere I've looked for the last year, people have been using JavaScript to teach programming. Codecademy anyone?

I personally think it's a horrible choice. If you don't know enough about computers to install Python, you probably don't know enough about computers to learn how to code.

Re:Since when is JavaScript an unorthodox choice? (3, Insightful)

0racle (667029) | more than 2 years ago | (#39210281)

By that, no one would do anything, you weren't born knowing how to do anything. You have to start somewhere.

Re:Since when is JavaScript an unorthodox choice? (0)

Anonymous Coward | more than 2 years ago | (#39210423)

I think the point is that the lessons can direct people to download Python and then proceed to teach in the language. I suspect the main issue is that Python on Windows is a bit of a kludge compared to Mac/Unix/Linux where it's usually preinstalled. At least Javascript can be run in any browser with or without server-side interaction

I learned with good old PHP and I still love it for hacking together ideas where you don't give a crap about defining variables or single-type arrays. It taught me about database interaction and object oriented programming fairly easily. The downside is that you need a server running it, but it's really very handy if you do (e.g. XAMPP). Python is probably my next choice if I need to script something quickly and failing that I'll revert back to good old C/C++.

Re:Since when is JavaScript an unorthodox choice? (1)

crazycheetah (1416001) | more than 2 years ago | (#39210683)

You don't need a server running your PHP code. As an experiment to prove it to someone, I've even used GTK in PHP without any server running at all. I quickly decided that in most of the cases I've ever looked at, there are significantly better choices, but it is definitely possible to use it just like any other interpreted language outside of a web server.

Re:Since when is JavaScript an unorthodox choice? (1)

erroneus (253617) | more than 2 years ago | (#39210303)

That's an interesting assumption; that a programmer needs to know something about computers.

In actuality, I too believe programmers SHOULD have an A+ level of understanding of computers and networks. The problem is, many programmers simply don't. They know what they know which never ceases to amaze me as to how little that actually can be. But can they code? I guess... maybe... it's hard to for me to have respect for a coder who doesn't understand the environment beyond what they learn from books and manuals.

Re:Since when is JavaScript an unorthodox choice? (0)

Anonymous Coward | more than 2 years ago | (#39210893)

Depends on what you're programming to a degree.

If you don't have an understanding of the parts of the computer/network that you're going to be interacting with while programming, I don't understand how it's even possible to make something that actually works well and consistent (unless you're lucky...).

On the flip side, I can't think of a time that knowing about setting up web servers or other servers is going to help with the programming at all (unless you're setting up the environment where this is going to be run/tested on as well, but that leaves the scope of the programming at certain points). Knowing how to make HTTP requests and the like to interact with that web server is definitely important to the programming, but knowing how to set up this weird extension or that weird extension or whatever on different web servers isn't something that's going to largely benefit a programmer...

Given my view on that, in my current job, I'm the IT guy and the programmer (small company so I'm all there is for either of those, and I'm also the only real customer support line), so I need to know both, because I do both. But they never really overlap at all, and tend to just get in the way of each other time-wise.

Re:Since when is JavaScript an unorthodox choice? (5, Insightful)

drinkypoo (153816) | more than 2 years ago | (#39210319)

I personally think it's a horrible choice. If you don't know enough about computers to install Python, you probably don't know enough about computers to learn how to code.

That's a pretty stupid thing to say, you must really be trolling or be really dumb. I was introduced to programming with BASIC, and procedural programming with LOGO, and just look at me now, I can't code shit! *ahem* Seriously though, people were learning programming before "installing" was something you could do on your personal computer.

Re:Since when is JavaScript an unorthodox choice? (0)

Tsingi (870990) | more than 2 years ago | (#39210933)

I personally think it's a horrible choice. If you don't know enough about computers to install Python, you probably don't know enough about computers to learn how to code.

That's a pretty stupid thing to say, you must really be trolling or be really dumb. I was introduced to programming with BASIC, and procedural programming with LOGO, and just look at me now, I can't code shit! *ahem* Seriously though, people were learning programming before "installing" was something you could do on your personal computer.

Not everyone has the intrinsic to be a programmer.

Re:Since when is JavaScript an unorthodox choice? (0)

Anonymous Coward | more than 2 years ago | (#39210599)

My 13 year old daughter learned javascript in a text editor in a few minutes. (hello world anyone?) It's simply ignorant to say you have to install something before you can learn to code.

Re:Since when is JavaScript an unorthodox choice? (1)

NickFitz (5849) | more than 2 years ago | (#39210643)

The first computer I used was a PDP 8/e. As a result, I think that if you don't know enough about computers to enter the bootstrap in binary using the toggle switches on the front, set the program counter to the start, and hit the RUN switch to start the computer loading the language interpreter from the high-speed punched tape reader, you probably don't know enough about computers to learn how to code.

Re:Since when is JavaScript an unorthodox choice? (1)

Samantha Wright (1324923) | more than 2 years ago | (#39211065)

Your signature is inspiring. Also, if you would like to relive your PDP-8 days, click here for a comprehensive re-enactment [pdp8online.com] . (The part of Digital Equipment Corporation will be played by Larry Ellison for the duration of this production.)

Re:Since when is JavaScript an unorthodox choice? (2, Interesting)

Kagetsuki (1620613) | more than 2 years ago | (#39210731)

That an JavaScript is an extremely "loose" langauge with a lot of quirks. Context of "this" changing randomly? Check. Accidentally redefining functions? Check. Variable raises (AKA variables not defined yet somehow exist before their defintion)? Check. The vaguest duck typing system of any language ever? Check. Awful, awful class definition syntax? Check. Total lack of a reasonable debugging environment? Check. Almost complete lack of ability to deal with binary (or even non-text) information? Check. I mean the list goes on and on. As for a "programming" languages go it's just a horrible mess. Even with node.js it's difficult to consider it a general purpose langauge. Tell me JS is a good language for learning compiting and programming paradigims and I'll spit on you.

As far as practicality goes? It's pretty practical. If you know JavaScript enough to use jQuery and AJAX you can do something to make money.

Re:Since when is JavaScript an unorthodox choice? (0, Flamebait)

dave420 (699308) | more than 2 years ago | (#39210815)

You not having a clue how to code JavaScript doesn't mean JavaScript is a bad language, merely that you are out of your depth with it and simply don't understand how it works.

Re:Since when is JavaScript an unorthodox choice? (4, Insightful)

TheVelvetFlamebait (986083) | more than 2 years ago | (#39211075)

If you don't know enough about computers to install Python, you probably don't know enough about computers to learn how to code.

Coding is not a computer skill, it's a logical skill. It's about translating abstract intentions into a well-defined precise logical language. The skill is knowing how to efficiently turn your ideas into instructions that a machine can carry out. That's why it's so transferable between platforms and languages, because it's really a skill that's independent of a computer. It would be more than possible, for example, to teach someone who's never seen a computer to write pseudocode.

Gee... (0)

MobileTatsu-NJG (946591) | more than 2 years ago | (#39210181)

I bet somebody says 'khaaaan', but uses the word 'obligatory' in a vain attempt to excuse its lack of funny.

Re:Gee... (0)

Anonymous Coward | more than 2 years ago | (#39210385)

You.

Re:Gee... (1)

Samantha Wright (1324923) | more than 2 years ago | (#39211097)

Personally, I'm waiting for the obligatory xkcd so I can really start grinding my teeth. It will presumably be posted in one of the side-conversations about Python, since there isn't really a strong one about Javascript.

Javascript is already for kiddies anyway (-1)

Anonymous Coward | more than 2 years ago | (#39210189)

Javascript is a baby language for unskilled and sloppy programmers, so it'll fit right in. Javascript fagets need to learn a grown-up language. They only write in Javascript because there faget asses can't hack it in something better.

Re:Javascript is already for kiddies anyway (4, Insightful)

sehlat (180760) | more than 2 years ago | (#39210279)

Javascript is a baby language for unskilled and sloppy programmers, so it'll fit right in. Javascript fagets need to learn a grown-up language. They only write in Javascript because there faget asses can't hack it in something better.

Cue trolls and linguistic snobbery. If you can get the kids et. al. interested in learning, 90% of the battle is won. The other 10% is debugging. :)

Re:Javascript is already for kiddies anyway (-1)

Anonymous Coward | more than 2 years ago | (#39210399)

They should get kids interested in a serious programming language instead of babby faget language like Javascript. Why not start them off right instead of starting them off faget?

Faget Vulcan pet teddy-bear person.

Re:Javascript is already for kiddies anyway (1)

Tsingi (870990) | more than 2 years ago | (#39211027)

They should get kids interested in a serious programming language instead of babby faget language like Javascript. Why not start them off right instead of starting them off faget?

Faget Vulcan pet teddy-bear person.

JavaScript is an awesome language. I'll concede that it isn't the best language to start with if you want to write structured code, but if you are skilled it is very powerful.

That's not to say that a kid with smarts just starting out can't do a lot with a little code. Instant gratification.

Re:Javascript is already for kiddies anyway (1)

GNious (953874) | more than 2 years ago | (#39210511)

Hope you don't mind me quoting you ... :)

https://plus.google.com/106639317314065291577/posts/irsF5UAvfsE [google.com]

Re:Javascript is already for kiddies anyway (1)

sehlat (180760) | more than 2 years ago | (#39210567)

No problem. I'm honored.

Re:Javascript is already for kiddies anyway (0)

Anonymous Coward | more than 2 years ago | (#39210295)

As opposed to unskilled and sloppy trolls (eugh!) who cannot spell faggot.

Re:Javascript is already for kiddies anyway (1, Insightful)

mwvdlee (775178) | more than 2 years ago | (#39210323)

Javascript fagets need to learn a grown-up language.

Why bother learning a grown-up language if you're unable to act like a grown-up?

Re:Javascript is already for kiddies anyway (-1)

Anonymous Coward | more than 2 years ago | (#39210465)

Sounds like the talk of a dumb babby javascript faget.

Re:Javascript is already for kiddies anyway (1)

Rosy At Random (820255) | more than 2 years ago | (#39210541)

Yes. You do.

Re:Javascript is already for kiddies anyway (1)

amicusNYCL (1538833) | more than 2 years ago | (#39210581)

Javascript is a baby language for unskilled and sloppy programmers, so it'll fit right in.

Just out of curiosity, which language do you prefer when you're creating interactive web application interfaces?

Re:Javascript is already for kiddies anyway (0)

Anonymous Coward | more than 2 years ago | (#39210715)

Dart!

Queue the GNU hate machine (-1)

Anonymous Coward | more than 2 years ago | (#39210209)

Hey Man! You should be teaching those kids something completely non proprietary like Common Lisp.

Re:Queue the GNU hate machine (1)

astropirate (1470387) | more than 2 years ago | (#39210663)

How is Javascript proprietary??

Sane choice (2, Insightful)

acak (2362174) | more than 2 years ago | (#39210211)

This move should be vindicated in the near future. But I do have some qualms:

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

... (insert other features here)

If they switch to another language to teach stuff which JS doesn't support, they might lose their audience and so blind side a large set of them.

Re:Sane choice (5, Insightful)

tedgyz (515156) | more than 2 years ago | (#39210287)

Since when do you teach complex casts and threading in an intro course? For crying out loud, I know engineers with 5+ years experience that still don't fully grok multi-threaded issues.

Re:Sane choice (3, Interesting)

capnchicken (664317) | more than 2 years ago | (#39210549)

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.

Re:Sane choice (1)

CubicleView (910143) | more than 2 years ago | (#39210565)

I grok the hell out of those multi-threaded issues... we're talking about /.'s layout yeah?

Re:Sane choice (1)

Bonker (243350) | more than 2 years ago | (#39210547)

- 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

This is a fairly serious issue, but one that can be brought up after the basics of computer programming have been instilled. Most languages are either loosely typed, duck-typed, or have robust conversion features these days. Kids who learn to mangle a string in Javascript will pick up quickly on 'You have to use a 'to_str' method in some other languages'.

The place where this will really catch them is math... but again there are robust solutions in almost all languages.

- 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

Pointers in anything other than the very lowest-level-touching-the-metal code are an abomination. They cause far more confusion and grief than they ever help. Yes, there are situations in which the best way to address a problem is to pass a pointer around. However, in this day and age of multi-gigabyte ram sticks, I'd rather bloat up a program's ram usage with maybe unnecessary copies of large objects than dick around with pointers.

- How will they teach multi-threaded programming? We're not quite there yet in JS.

Threading and thread safety are not really beginner concepts, nor are they really required for the majority of code work in the real world.

However, JS approaches the issue obliquely by being bolted onto the threading model of the underlying interpreter. In a browser, which is probably what most of these kids will be learning on, you have to worry about concurrency of the browser instance. If I run a script in this named window, is it going to affect anything in that named window? No, that's not really threading, but it's the same mental concept.

Likewise, beginners are not going to be writing their own output handlers, which is the obvious usage for threading. The advanced ones are going to be playing with painting on HTML5 canvas elements while maybe playing sounds at the same time. They'll be using the browser's already threaded output for those functions.

Event-based cooperative multitasking (0)

tepples (727027) | more than 2 years ago | (#39210975)

in this day and age of multi-gigabyte ram sticks

Multi-gigabyte RAM sticks don't fit into a cell phone quite yet.

Pointers in anything other than the very lowest-level-touching-the-metal code are an abomination.

What are handles in managed languages, such as Python, JavaScript, Java, C#, and VB.NET, other than pointers? Try doing anything with a null in Java, for example, and you'll get a java.lang.NullPointerException.

Likewise, beginners are not going to be writing their own output handlers, which is the obvious usage for threading.

The other obvious use for threading is non-blocking I/O, and that's not quite as necessary in JavaScript because multitasking within an HTML DOM context uses an event-based cooperative model, which as you point out is supported by threaded constructions in the interpreter. An AJAX request, for example, includes a closure that's called upon its completion, and user interactions with a document fire events on DOM elements.

Re:Sane choice (1)

tlhIngan (30335) | more than 2 years ago | (#39210993)

This is a fairly serious issue, but one that can be brought up after the basics of computer programming have been instilled. Most languages are either loosely typed, duck-typed, or have robust conversion features these days. Kids who learn to mangle a string in Javascript will pick up quickly on 'You have to use a 'to_str' method in some other languages'.

If only that were the case - you start seeing a lot of reimplements of functions like "to_str()" and the inverse (strtoi/strtoul/etc) because what was transparent to them before, suddenly they can't do it and don't realize it's a library function. So they promptly end up rewriting those functions and it ends up carried along to finally end up on The Daily WTF.

Or worse, you just fuel the language wars... "Javascrpit is cool - Java/C#/C/C++ all suck because it's so hard to take a string and treat it as a number so you can add to it. You have to do write functions to do it for you".

Re:Sane choice (4, Interesting)

dougmc (70836) | more than 2 years ago | (#39210661)

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

JavaScript not found (1)

HeyBob! (111243) | more than 2 years ago | (#39210219)

Funny, a search for JavaScript on Khan Academy has no results!

http://www.khanacademy.org/search?page_search_query=JavaScript [khanacademy.org]

Re:JavaScript not found (2)

tedgyz (515156) | more than 2 years ago | (#39210341)

That's because you are searching for the answer to the question. Try this search:
http://www.khanacademy.org/search?page_search_query=programming [khanacademy.org]

Someone who wants to learn programming doesn't search for javascript. That's like searching for "42" when you want to know the answer to life, the universe, and everything.

Re:JavaScript not found (5, Funny)

drosboro (1046516) | more than 2 years ago | (#39210447)

Someone who wants to learn programming doesn't search for javascript. That's like searching for "42" when you want to know the answer to life, the universe, and everything.

So wait - javascript is the ultimate answer to programming?

Crap. I quit.

Re:JavaScript not found (1)

ArsonSmith (13997) | more than 2 years ago | (#39210705)

No it's the answer to the ultimate question about programming. The trick is to find out what that question is.

Re:JavaScript not found (1)

HappyHead (11389) | more than 2 years ago | (#39210781)

Of course, the problem there is that the entries that search returns which actually contain a programming language at all are entirely done in python, so still no javascript.

keep the kids ignorant and unable to compete (0, Informative)

Anonymous Coward | more than 2 years ago | (#39210225)

Nothing better than toy programming languages to keep the kids from ever learning the concepts that they will need in order to do software as a career.

Call it "Boomer lifetime employment assurance".

Re:keep the kids ignorant and unable to compete (1)

Anonymous Coward | more than 2 years ago | (#39210481)

If they're stupid enough to believe that their first language is the only language they need, they're bad programmers anyway.

Starting people with BASIC, or JavaScript, or anything else cannot rot the mind of a good programmer. Yes, I know some famous guy said BASIC destroys them. He was a teacher. It was his job to set them straight if they had any bad ideas. If they couldn't be set straight, they were stupid, not the language.

Re:keep the kids ignorant and unable to compete (1)

Anonymous Coward | more than 2 years ago | (#39210855)

We're talking about kids here, not college courses and careers!

I see this as analagous to giving kids Legos to learn how to build stuff. Put some blocks together... it makes a bridge.. cool! Do the Lego joints have the appropriate tensile strength to support actual loads? OMG, they probably don't.

But they'll think building bridges is cool, so someday in the future they might take a real engineering class instead of basket-weaving, and then maybe, just maybe, we might get some smart folks to make it real career instead of a generation that will outsource everything because no one in the country cared to figure it out.

We're not asking 10-year olds to build production code after watching a Khan Academy video...

Could be worse. (0)

John Hasler (414242) | more than 2 years ago | (#39210247)

They could have selected PhP.

Pretty much all the problem with JS (1)

i kan reed (749298) | more than 2 years ago | (#39210259)

Come from the fact that its syntax and features are set in stone, and every change either takes the w3c 10 years to establish a standard that's actually obeyed, or a massive browser feature war that leaves us with unimplemented blink tags. If the language itself could have evolved even as fast as slothful Java, it wouldn't seem so unintuitive as a first language.

Re:Pretty much all the problem with JS (1)

Meatbucket (2039104) | more than 2 years ago | (#39210659)

The fact that it doesn't change much over the years ensures they won't have to re-write the online textbook any time soon then. I see this as a bonus Javascript as a programming language 1) it is the most accessible (no compiler or other software needed, just run it in a browser) 2) it is easy (no pointers or explicit variable types) 3) it is graphical (it's much more entertaining to show programming through visual output with graphics then with text) 4) it is practical (you can use it to write a website, it is a skill relevant to the workplace) 5) it is a language that will not be thrown away (it works with html5 which is the future standard for web apps) 5) it does not change much, teaching material will not have to be re-written every year I don't see why anyone would see a problem with teaching this to children, it's a great starter language

Re:Pretty much all the problem with JS (0)

Anonymous Coward | more than 2 years ago | (#39210885)

But the best part about JavaScript is how easy it is to expand and portability.

Don't like having to get an element by ID every single time because it is such a chore typing it? Throw it under a something like "gebid", easy to remember, much much smaller. camelCaseIsJustTerribleWhenItGoesOnAndOnLikeThis makesYouWantToPunchADolphinAndDolphinsAreCute.
You can do this with pretty much anything in the language that you would need to do, including emulating other languages and even running binaries. (as long as you aren't trying to boot WinXP / Ubuntu and the other larger OSes similar, you should be fine)
And with a decent setup, people can even code in realtime and see the results next to the code as they do it. Livecoding is such a useful and easy to perform feature of JS.

Now the only problem is dealing with the CSS kiddies and CSS in general due to it being so AWFUL, EVEN NOW, and accessibility morons at W3C trying to break Canvas even more by throwing on a ton of bloat, probably.
Seriously, what the hell is with CSS, it could be a billion times more useful if it just had a few format changes, actual decent inheritance control and, you know, features that it was supposed to replace from the whole Tables For Layout days. Some of that only JUST appeared in CSS3 for crying out loud! (and it wasn't because of the IE wars either, before anyone tries to use that tired excuse, W3C in general are what is wrong, too many Coulds, Mays and not enough MUSTS. See the entire input capture system of JS in every browser)
And before you come in with a bunch of lines of obtuse CSS to perform such a simple task, you don't use a supercomputer to do 2+2.
Yes, I mad, mad that idiots like that managed to get that horrible mess of ideas standardized.
The web isn't a damn newspaper! Stop living in the limitations of print damn it!

I'd be quite happy seeing CSS scrapped. So terrible. It only recently picked up, but everything before is still there and still terrible, and some, just completely inconsistent and pointless.

Khan Academy and Python (0)

Anonymous Coward | more than 2 years ago | (#39210309)

Khan Academy already has like 30 Python videos up.

Good (1)

Anonymous Coward | more than 2 years ago | (#39210311)

Good choice, as far as I'm concerned. The thing I like best is that you don't need a compiler, a special IDE, a runtime, or anything apart from pretty much any browser that's been built since about 1995 to get going.

(Except if you're on iOS, of course. Then you're just fucked as far as programming goes.)

WITTY SUBJECT LINE (0)

not already in use (972294) | more than 2 years ago | (#39210325)

Yes, what a wonderful idea. Teach people a language that doesn't use classical inheritance, that constantly violates the principle of least astonishment, and that google is trying to replace (and is hopefully successful in doing so).

Re:WITTY SUBJECT LINE (1)

trongey (21550) | more than 2 years ago | (#39210611)

Because every program requires inheritance, least astonishment isn't controlled by the programmer, and everything Google does is good.

Re:WITTY SUBJECT LINE (0)

not already in use (972294) | more than 2 years ago | (#39210803)

Because every program requires inheritance

My bad, I was under the impression that people might desire marketable skills.

least astonishment isn't controlled by the programmer

Oh, you're right. Javascript semantics are totally reasonable and consistent. It's the programmers fault that there appear to be a million nuances.

everything Google does is good.

What would a wildly successful company who's invested heavily in javascript know about its shortcomings? You got me man, you got me.

Re:WITTY SUBJECT LINE (0)

Anonymous Coward | more than 2 years ago | (#39210873)

Sorry, you gave a sidewise compliment to Google. On NuSlashdot, that's instant grounds for a -1 Overrated/Disagree. You should have put something in there about how IE10 is more standards compliant than any other browser because IE has the most market share and is therefore the standard. Get it?

Strongly typed? (0)

Anonymous Coward | more than 2 years ago | (#39210329)

Yes Mr Khan, way to turn our youngsters into savages just like those who use VB and call themselves a programmer...

Old News (4, Informative)

DudemanX (44606) | more than 2 years ago | (#39210339)

The video the article uses as its source is from October.

The article also incorrectly states that this is Khan Academy's first programing language. There are a few intro to Python videos on the site already.

python? (1)

d3matt (864260) | more than 2 years ago | (#39210373)

he's already got several videos up with python... why the switch I wonder...

GO.AT (-1)

Anonymous Coward | more than 2 years ago | (#39210393)

interest in having [slashdot.org], Users With Large election to the so on, FreeBSD went United States of Of America (GNAA) operating systems, by BSDI who sell later seen in discussions on EFNet, and apply www.anti-slash.org same worthlees Has brought upon Percent of the *BSD Been the best, website Third, you Trying to dissect Available to OS. Now BSDI is in ratio of 5 to won't vote in = 1400 NetBSD more stable Lay down pa4er Is mired in an Population as well the next round of posts. Therefore bottoms butt. Wipe election to the and, after initial Join GNAA (GAY best. Individuals BSD's acclaimed real problems that if I remain Well-known already dead. It is all parties it's insisted that Share, this news discussions on of all legitimate the mundane chores by the politickers other members in

My post to the original Slashdot discussion (2, Interesting)

KrackerJax (83403) | more than 2 years ago | (#39210425)

I got modded down as Flamebait, so I feel a bit vindicated now :)

Post from Saturday July 25 2009:
"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."

Javascript isn't the problem (1)

Viol8 (599362) | more than 2 years ago | (#39210517)

Learning the unmitigated mess known as the document object model is. And then you have you worry about CSS if you want to do anything fancy. So in effect you have to learn 3 languages (2 above + HTML) , including how they interact and obtuse DOM system before you can do anything useful. And then we have HTML5 and the god awful canvas object interface. I feel sorry for the kids, BASIC would be a better choice.

Re:My post to the original Slashdot discussion (2)

grumbel (592662) | more than 2 years ago | (#39210823)

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.

Not really. The default "development tools" of your browser are complete shit, half the time you won't even get an error message when something went wrong and printf-style debugging isn't all that easy either and of course you need to have a HTML to even start doing Javascript, which adds a another layer of complexity. So as a beginner you are confronted with a lot of "stuff doesn't work" without even a hint on what went wrong. Of course you can fix that by using browser add-ons, predefined HTML pages and a bunch of other stuff, but at that point you could simply use another language.

Now don't get we wrong, I absolutely agree that something graphic is extremely important to keep the children interested, I just find that Javascript is a lot more frustration then fun. I personally probably go with something like Python/Pygame.

AutoIT (2)

fluffythedestroyer (2586259) | more than 2 years ago | (#39210435)

Autoit [autoitscript.com] is a good scripting language. Not too hard yet not to easy since you gotta know, like every other language, what you do. I know almost nothing in programming and I found AutoIT very fun and very good scripting language. Well very good is a wierd term for me since I didn't use other scripting language. From what I read on their forums [autoitscript.com] and their pdf tutorials [autoitscript.com] (available on their forums) is it helps you learn good basic programming behavior from the start.

Re:AutoIT (0)

Anonymous Coward | more than 2 years ago | (#39210725)

I used Autoit for a very specific project I was working on a year ago and while it is easy to use it only real works well in the very limited domain of gui automation. To really be general purpose would require much more robust object support. You would be better off teaching kids bash scripting as even that smokes Autoit in flexibility.

that's what I started my son with 8 years ago (5, Insightful)

a2wflc (705508) | more than 2 years ago | (#39210459)

Since then he's gotten pretty good with Java, C#, C, and python and played with F#.

The key part of the title is "intro language". Seems like some comments are expecting kids to come out of this and write the next Office suit, or Google competitor, or missile guidance system. I think javascript is a great way to see if a kid wants to do more.

Ouch... Javascript is broken in a number of ways.. (1)

HizookRobotics (1722346) | more than 2 years ago | (#39210543)

Javascript is broken in a number of ways. Just watch this video: WAT [destroyallsoftware.com] .

The fact that commutativity does not hold for "[] + {}" is just wrong! I understand the need for "pretty graphics" and "instant gratification", but a different language would have been appreciated. Heck... a background in python would at least set them up for a lifetime of scientific computing.

Re:Ouch... Javascript is broken in a number of way (0)

Anonymous Coward | more than 2 years ago | (#39210977)

I agree that JavaScript has its problems, but none of them matter for an entry-level programming course.
And it has a few valuable benefits. 1) Everyone has it. 2) IO can be rich and simple. 3) You don't need to worry about pointers. 4) You don't need to worry about type-safety.* 4) It is useful to learn as a practical language also.
* While important, it's a complex subject and best taught later. Just like memorising kanji won't work for most people unless they can already understand Japanese to some extent, you can't expect to teach someone type safety without teaching programming first. It's a question of motivation really.

The right choice (4, Interesting)

XxtraLarGe (551297) | more than 2 years ago | (#39210571)

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.

Re:The right choice (1)

hcs_$reboot (1536101) | more than 2 years ago | (#39210945)

Paradoxically, I think Javascript closure is something that should appear more natural, to the beginner.

Re:The right choice (1)

evil_aaronm (671521) | more than 2 years ago | (#39211109)

Amen to this. Perl's like that, too, to some extent: write code, save file, run script, see immediate output. Lather, rinse, repeat.

Unlike the inexcusably broken Xcode 4.3, which won't even run - not even doing anything, just sitting there! - longer than five minutes on my machine.

LOGO (0)

Anonymous Coward | more than 2 years ago | (#39210625)

In my school district we have a summer course coming up for programming geared towards kids. They are using LOGO. Once upon a time I thought that a graphical language like Labview G would be a good choice.

I think you could teach Java to high schoolers reasonably well. I don't know what is appropriate for the Elementary and middle school aged kids. I don't like the choice of LOGO but it's better than nothing. I've tried to teach my kids a bit of C but they weren't interested in learning from Dad.

Scripting (1)

virgnarus (1949790) | more than 2 years ago | (#39210695)

I'm not a programmer, but I remember hearing many times throughout the years that learning scripting like Javascript is a no-no as a first language because it lacks certain concepts that are crucial to learning a "full" programming language, and sets them in a rut to write code that works well for scripting but is not best practice otherwise. Is this dubious wisdom people have been feeding me?

Graphical feedback is a good idea... (4, Interesting)

Entropius (188861) | more than 2 years ago | (#39210713)

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.

Sushi cook (1)

jones_supa (887896) | more than 2 years ago | (#39210755)

I guess it's a practical choice then. JavaScript is widely used and they can move their skills to the AJAX and Metro world.

For the more nerdy types, the "if you want to be a sushi cook you will have to start as a kitchen cleaner" route could be offered as an interesting alternative route. There you would begin with C and assembly...to learn a bit how processors work (machine language, registers, stack) and how to write lean code. Raspberry Pi would be the hardware and, you would have a dedicated mentor to guide you through. Just a fancy dream...

Bad idea... (4, Insightful)

xyourfacekillerx (939258) | more than 2 years ago | (#39210757)

Teaching programming to children isn't even about teaching PC's or teaching a particular language, it's about imparting the ideas behind turning "what we want the computer to do" in our imagination (the kids will later call this algorithms) into instructions for the computer. BASIC and others are languages were designed as introductory because they can be used without much regard for external environment, allowing a natural focus on the fundamentals of all programming in general.

The child then develops an intuitive understanding of what s/he will later describe as algorithms, data structures, and programming languages, or platforms, in general; they develop the theoretical foundations subconsciously via exercise, habit and practice, (and for the gifted, introspection and critical thinking), so they can be taught these concepts formally with ease later on. At that time, the choice of programming language isn't much of an issue.

But this? JavaScript requires the teaching of an environment and pre-existing objects like DOM that have nothing to do with the above goals and will certainly diminish the natural intuitive development of the appropriate concepts involved with programming. They are not learning how to translate their imagination into instructions as a general practice; they are learning how to manipulate specific pre-determined objects outside the scope of theoretical concerns. This is bad for them. This will limit them.

As an aside, let's face it, this is motivated by business. 1) JavaScript will be a heavily used language in the immediate future, 2) Khan prepares students to use JavaScript, 3) Khan's students are equipped with business-world skills and succeed, 4) Khan claims statistics reflect it competes well in the education market place, 5) Khan gets money.

Meanwhile Khan's students have to learn the basics of programming the hard way. Like a GED student picking up calculus at age 35 struggles with it, so will those students.

Speedware (1)

Oswald McWeany (2428506) | more than 2 years ago | (#39210837)

Anyone who is anyone knows that real programmers use Speedware.

ugh... I shudder just typing that- even though it was in jest...

If... (1)

CosaNostra Pizza Inc (1299163) | more than 2 years ago | (#39210943)

If the goal is to groom students to be web app developers and nothing else, then Javascript with HTML/CSS are perfect choices for a first language. For a more general curriculum, I'd suggest a more general purpose language like python or Java.

A better choice: QML (1)

hardaker (32597) | more than 2 years ago | (#39210967)

The QML language is amazingly simple to learn and contains javascript snippets to drive the complex stuff. It has much better concepts of variable bindings than HTML/Javascript alone and is significantly faster (and runs on pretty much everything).

I recently taught a child QML and had her create a Mahjong game for her mother in a couple of weeks. I did some of the harder javascript logic, but she did most of the entire game from scratch. Oh, and she learned git in the process and the concept of simultanious development during the portions I was working on the javascript to create the game board structure (she had to tell me the algorithm though).

side note: she would have done the harder code too, but we were short on time for the present to get delivered

I may sound like a broken record, by Python? (4, Insightful)

lattyware (934246) | more than 2 years ago | (#39211007)

I don't get why Python isn't the choice here. Javascript, I find, is a horribly ugly language, harder to understand and code in than most, and with more quirks, special cases, and generally horrible-to-work in language design choices than pretty much any other language in common use today.

Python does it right for learning. It teaches good practices (indentation, code readability), it aims to not surprise the user, it's a well designed language which is very good at being consistant, and in general is nice to learn in. Not only that, but it avoids the low-level stuff (which isn't that relevant when you are first learning to code) and instead teaches you the higher-level concepts which are more important. It's also got a large, well documented standard library, and is interpreted, so you can use it as a prompt, and don't have to worry about compiling. It's also cross platform, free and open.

I'm not going to lie, I don't like JavaScript, and I've never got why people like it. I can understand using it - it's the only real choice for scripting on the web - but to use it out of choice, or teach in? I don't get it. Fun and graphical? Not really - then it requires an understanding of HTML and CSS too, which is either going to be done wrong or be too much.

My main problem is the line

Resig admits JavaScript, as a language, has its warts and issues, but so do all languages.

- This is true, but some languages try really hard to avoid them, and some fix them. Python is an example of both - Python 3 fixes a number of issues with the language, and in general, with the process of PEPs and not being afraid of pushing the language forward, Python has turned into an extremely polished language with very few issues. JavaScript on the other hand, is full of them - and there is no real effort to fix them, as far as I know of, at the moment.

Perfect choice (1)

Hentes (2461350) | more than 2 years ago | (#39211053)

Javascript is easy, has a similar syntax to other C-like languages, no compiler/environment needed as a browser is enough, enables embedded scripting thus giving instant feedback. A good language for beginners.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>