1. 8
  1.  

  2. 4

    Interesting choice, I was also thinking of teaching JavaScript over Python to a friend who has had absolutely zero programming knowledge (and very little computer knowledge in general).

    I went with Python in the end (via Codecademy), and I’m not sure if this was the right choice. The spacing aspect proved slightly cumbersome to get used to, as using a keyboard was not a super natural way of input and they typed very slowly (not handicapped–just not a frequent user of computers; their smart phone is their primary computational device). They hated typing spaces (code they wrote would look like foo=str(a+b-d/b)+"bar"), and doubly so for the stringent spacing requirement in Python.

    Prototyping and experimentation is very cumbersome as installing and using the command line was not something my friend was used to at all (vs. just right click -> open inspector for JS, all in the same program that they use for FB and everything else).

    I think the most important aspect of zero-knowledge programming introduction should be on ease of access and fast iteration, and JavaScript absolutely destroys all competition on both fronts. And it’s not like JavaScript in 2017 is a toy language anymore, so I applaud Stanford for experimenting with teaching it in their intro class.

    Unrelated to my own comment, but a comment left by Leland on the blog mentions:

    I think the headline is a bit misleading. Java is not gone from Stanford’s huge intro course CS106A and C and C++ are not gone from CS106B or CS 107. Looks like they are experimenting with a pilot version CS106J that uses Javascript.

    1. 6

      also thinking of teaching JavaScript over Python

      I’ve agonised over this choice a little myself.

      On the one hand, JavaScript is ubiquitous, it’s easy to make motivating examples like GreaseMonkey scripts, it’s really easy to share the things you’ve made with people, you can’t even buy a computer which doesn’t come with a decent JavaScript interpreter preinstalled. If you use some of the ES Harmony and ES2015 features (and just ignore old-browser compat instead of getting mired in compiler stacks, at least at first) then it’s actually, well, a lot more pleasant than it used to be.

      On the other hand, everything-is-asynchronous is a terrible thing to stump a first-time programmer with. :(

      1. 2

        you can’t even buy a computer which doesn’t come with a decent JavaScript interpreter preinstalled.

        Really? None of my last four computers came with an operating system, let alone a web browser preinstalled.

        1. 3

          Okay, you got me. Pedant! :)

          Maybe I should go bribe someone at American Megatrends Inc to ship some functionality implemented in Node in future versions of their BIOSes, just so I can contradict you at some point ~20 years in the future. ;)

          1. 1

            Crowd fund? Although I shouldn’t joke, there is probably a crowd fund for rewriting BIOSes in rust.

      2. 5

        And it’s not like JavaScript in 2017 is a toy language anymore, so I applaud Stanford for experimenting with teaching it in their intro class.

        A first language has to do much more for students than not being a toy. Unless you want to spend a second semester teaching more programming languages, it has to be good for the kinds of things that they will have to learn after their first semester, like:

        • Data structures and algorithms
        • Modular programming
        • Databases, compilers, network programming, etc.
        1. 1

          A first language has to do much more for students than not being a toy.

          Yes, like I mentioned:

          I think the most important aspect of zero-knowledge programming introduction should be on ease of access and fast iteration

          it has to be good for the kinds of things that they will have to learn after their first semester, like…

          I would in fact rather classes taught using the right tool for the right job. For an introduction, the ability to iterate quickly and try out many different programming constructs to introspect their result trumps other technical considerations. The key focus here is to allow them to build a mental model of how computers interpret their textual inputs and the general flow of a “program”.

          For the record, my introductory CS class used Python (this was in 2007), and second year classes used C/Java (depending on what was being taught).

          Just because a first year introductory classes taught one thing doesn’t mean the rest of the institution is now stuck using that same language.