Slashdot Mirror


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

34 of 355 comments (clear)

  1. The reason seems obvious to me by Anonymous Coward · · Score: 5, Informative

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

    1. Re:The reason seems obvious to me by Anonymous Coward · · Score: 4, Funny

      KHAAAAAAAAAAAAAAAAAAAAAAAANNNNNNNNNNNNNNNNNNNNNNNNNNN!

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

    2. Re:The reason seems obvious to me by moderatorrater · · Score: 3, Insightful

      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.

    3. Re:The reason seems obvious to me by SQLGuru · · Score: 5, Informative

      If a million monkeys are given a million typewriters...

      Typewriter repairman would still be a viable career choice.

    4. Re:The reason seems obvious to me by Dogtanian · · Score: 3, Funny

      My brother was taking a BASIC programming course in the early 80's. I picked up his book and the rest is history...

      Can't have been a very useful BASIC book then, if most of it was about history instead of computer programming.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
  2. Scratch by gmuslera · · Score: 3, Interesting

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

  3. Logo! by Anonymous Coward · · Score: 3, Insightful

    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.

    1. Re:Logo! by MindStalker · · Score: 3, Informative

      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.

    2. Re:Logo! by Samantha+Wright · · Score: 4, Insightful

      Scratch not so darling. 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.

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
  4. Javascript by Thanshin · · Score: 5, Funny

    alert("Khaaaaaaaaaaaaan!");

  5. Re:Javascript is already for kiddies anyway by sehlat · · Score: 4, Insightful

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

  6. Re:Since when is JavaScript an unorthodox choice? by 0racle · · Score: 3, Insightful

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

    --
    "I use a Mac because I'm just better than you are."
  7. Re:Sane choice by tedgyz · · Score: 5, Insightful

    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.

    --
    "No matter where you go, there you are." -- Buckaroo Banzai
  8. Re:Since when is JavaScript an unorthodox choice? by drinkypoo · · Score: 5, Insightful

    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.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  9. Old News by DudemanX · · Score: 4, Informative

    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.

  10. Re:JavaScript not found by drosboro · · Score: 5, Funny

    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.

  11. that's what I started my son with 8 years ago by a2wflc · · Score: 5, Insightful

    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.

  12. Re:Sane choice by capnchicken · · Score: 3, Interesting

    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)
  13. The right choice by XxtraLarGe · · Score: 4, Interesting

    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.
  14. Re:Sane choice by dougmc · · Score: 4, Interesting

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

  15. Graphical feedback is a good idea... by Entropius · · Score: 4, Interesting

    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.

  16. Bad idea... by xyourfacekillerx · · Score: 4, Insightful

    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.

  17. I may sound like a broken record, by Python? by lattyware · · Score: 4, Insightful

    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.

    --
    -- Lattyware (www.lattyware.co.uk)
  18. Re:Since when is JavaScript an unorthodox choice? by TheVelvetFlamebait · · Score: 4, Insightful

    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.

    --
    You know, there is a difference between trolling and pointing out the flaws in your reasoning. Just saying.
  19. Re:Scripting by HornWumpus · · Score: 3, Interesting

    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'
  20. Re:keep the kids ignorant and unable to compete by TheRaven64 · · Score: 4, Insightful

    Yup. And it's a really stupid idea giving kids lego bricks too. I mean, how often do you see a house or a bridge built out of lego? And what about meccano? I've never seen anyone make a car out of meccano! These toys have no place in education.

    --
    I am TheRaven on Soylent News
  21. Re:Sane choice by DarkOx · · Score: 3, Insightful

    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.

    I am going to disagree. There is basically no difference between C pointers and the byRef concept in all the higher level languages. It requires the same understanding, its just slightly different vocabulary and syntax.

    C method is superior because it makes it CLEAR when things are being passed by value and when they are not.

    C method is superior because it makes programmers consciously decide every time, if a reference or value should be passed. Not doing this results in code that passes massive objects by value and causes performance/resource issues, or often hard to solve bugs where values change in unexpected ways because multiple references exist and its not clear they are only references not clones.

    Not having pointer syntax is a mistake most modern languages are making IMHO.

    --
    Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
  22. Smart choice - it's accessible, and the future. by mckinnsb · · Score: 4, Insightful

    It's a great way to introduce kids to the basics of programming languages without miring them in the ( necessary as they grow more proficient ) details of memory management and computer science fundamentals such as data design and system architecture. It also falls into a very interesting class of languages - a class by its own really - which exposes kids to some of the concepts of procedural languages and some of the concepts of imperative languages.

    But more importantly, Javascript - whether or not more traditional computer scientists like I would like to accept it - is likely a gigantic component of the computing future. Its the language that runs on the most platforms, and is used for nearly everything. Right now, many of us are familiar with how Javascript handles interactivity on webpages, but did you know that Javascript is actually used to route the majority of phone calls placed through cell networks? Did you know that most SmartTV manufacturers ( GoogleTV, Samsung )are producing SDK's and API's to produce "Apps" on their televisions written 100% in javascript (instead of the "window" host object you have "volume"...etc)? Did you know that it's being used in factories ( along with python ) to control the movements of industrial robots? With the advent of server-side event-based asynchronous web programming in javascript like Node.js as well, and the beastly v8 engine being BSD licensed, its importance will only increase over time as people find more ways to embed it as the primary interface scripting layer.

    It's good thing to expose people to, for sure.

  23. Re:Since when is JavaScript an unorthodox choice? by Cogita · · Score: 3, Informative

    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.

    I agree that javascript is too often spoken poorly of as a programming language, but having the addition operator not be commutative is just twitch inducing. See the Wat video, or try
    [] + {}
    {} + []
    in you're JS console.

    --
    -- "The Price of Freedom of Speech, of Press, or of Religion is that we must put up with a good deal of rubbish."
  24. Re:My post to the original Slashdot discussion by mwvdlee · · Score: 3, Informative

    half the time you won't even get an error message when something went wrong

    FireFox, MSIE, Safari and Chrome all have a javascript console which prints plenty of error messages. F12 is your friend.

    printf-style debugging isn't all that easy either

    You can log text and data to the javascript console using console.log(); or any of the other debugging features like line-debugging.

    and of course you need to have a HTML to even start doing Javascript, which adds a another layer of complexity.

    ...and teaches you to create documents to relatively loose syntactic rules before switching to the more strict rules of JS.

    I agree that javascript isn't the nicest language out there, but it's probably the best compromise.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  25. Re:Multi threading by gewalker · · Score: 5, Insightful

    Not happening to know the term "lock convoy" does not imply that said programmer is unfamiliar with the issues. If you learned multi-threading long ago (like I did), no-one had invented the cute description, but you certainly knew how what the condition was and possible methods of mitigation. Sounds like a stupid "tech interview" type of question.

    I have programmed using threads in a number of different environments (phtreads, dce threads, and windows threads) in a number of different languages, and have taught threaded programming -- I have also threaded needles, reattached buttons, sewed, embroidered and read most of the Dragon Riders of Pern series. I am a skilled and experienced threader. I had never heard of a lock convoy until now, but have certainly dealt with this precise issue before..

    I suspect you would not have just asked this question and "stopped the interview" because I did not know this term, but I get tired of hearing statements similar to yours, and worse, I've caught myself saying similar things.

  26. Re:Since when is JavaScript an unorthodox choice? by Kagetsuki · · Score: 4, Informative

    I'm sorry, but as someone who's written way more JS than anyone should ever have to I'd like to politely ask you to shut the fuck up and stop trolling me. You could have at least brought up what points you think I'm wrong on - but I can point out solutions that were created specifically to combat each of the issues I pointed out. Hell the basic jQuery code alone deals with all of these issues AND jQuery itself was created so you could code vanilla JS without having to waste time dealing with most of them.

    Oh, and I would really recommend CoffeeScript. See how wrong you think I am after coding CoffeeScript with jQuery for a week. Don't forget to use the node.js watched compile freature - you'll get vaidation each time you save. It's fantastic.

  27. Interactive JS lessons by YoJ · · Score: 3, Interesting

    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.

  28. Re:Since when is JavaScript an unorthodox choice? by K.+S.+Kyosuke · · Score: 3, Informative

    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

    In one presentation at Google, Dan Weinreb from ITA said that unless the code delivered to be run in production in ITA doesn't pass muster for the Ops people, the Ops department will refuse to deploy it. There must be some documentation of upgrade steps, problem diagnoses procedures etc. Simply put, the programmers must write the code with some knowledge of how the Ops people are going to run it. I imagine that other companies, at least service-providing companies with internal development, have similar guidelines for developing internal code.

    --
    Ezekiel 23:20