Jul 182011
JavaScript’s rise to prominence continues as it becomes the new introductory language for Computer Science at Stanford.
The content of the course will be CC-licensed soon, but for now can be seen at the course’s site. Lectures include:
- Syllabus
- Code Introduction lecture-1 materials getting started with print etc.
- Homework 1 (opens in new window)
- Homework logistics
- Digital images lecture-2 introducing images and image reading code
- For Loop 1d lecture-3 introducing 1d for loop, iterating over images
- For Loop 2d Every Pixel lecture-4 more serious image changing code
- Homework 2 (opens in new window)
- If Statement Images Bluescreen lecture-5 adding if-statements to images, enabling neat effects such as bluescreen
- How Computers Work – Hardware lecture-6 computer hardware and vocabulary
- How Computers Work – Software lecture-7 how computer programs run, and how they are built
- Pre Midterm1
- Midterm1
- How The Internet Works lecture-9-10 Ethernet Packets TCP/IP and Routing
- Midterm1 Solution
- How The Web Works lecture-11 HTML HTTP etc.
- Table Data lecture-12 Structured table data .. baby names!
- Homework3 simple table data (new window)
- Table Data 2 lecture-13 more complex queries, bring in the survey data
- Homework4 more complex table queries (new window)
- Table Data 3 lecture-14 nesting of loops, survey count break down, multi-year baby names
- Digital Media lecture-15 JPEG, audio, video
- Pre Midterm2
- Analog and Digital lecture-17 Sound, signals, analog handling, digitization, samples, CD audio
- Homework5 short, last homework (new window)
- Midterm 2 solution
- Computer Security lecture-18 Computer Security — phishing, passwords, vulnerabilities, malware, zombies, botnets
- Computer Economics lecture-19 Computer Economics — competition, network effects, lock-in, standards, open source software

Woot, err, I mean document.write(‘Woot!’), err., I mean, var woot=’Woot!’;document.write(woot); I passed Homework 1: Problem 1 with:
var x = ‘Easy does it.’;
var spacer = ‘ ‘;
var br = ‘<br />’;
document.write(x+br);
document.write(x+spacer+x+br);
document.write(x+spacer+x+spacer+x+br);
I'd love to get the Stanford faculty's reasoning behind this choice. A careful look at the syllabus reveals that at it's root the course is really not much different than any other basic programming course, albeit a bit skewed toward client-server-like web development. So why Javascript? My guess is that they said, "since it really doesn't matter what decent language we choose, why not pick one with a little glitz and glamour."
Aha! In Hacker News: "This course is not the first CS course that most Stanford students (who take a CS course) take– that's CS106A, which is based on Java. This CS101 class is a small, recent addition aimed at people in non-technical majors. I believe there's only one class of ~30 people, taught by Nick Parlante."
It sounds like Stanford's rationale for considering JavaScript for an introductory programming course is similar to the U-Me New Media Department's baseline language proposal. I think the difference is that UMaine's JavaScript initiative aims to go beyond simply introducing programming to "non-technical" majors. Instead the goal is leverage JavaScript's ubiquity–the fact that you can use it in platforms as diverse as the Web, arduino, and Photoshop–to integrate programming into creative fields in which it is currently underused.
I buy that… the interesting thing about A language is not only it's programming constructs that facilitate basic procedural problem solving, but also it's contribution to helping learn about issues such as GUI development, architectural concerns, databases, networks, etc. I've always thought VB was useful in that it gave students a relatively painless introduction to event driven applications and GUIs. Javascript is useful in that same way, more so when combined with it's companion tools. Combined with the other Ajax toolset and you have a framework for looking at many of the critical issues mentioned above.