JavaScript used to teach computing
Written by Ian Elliot   
Monday, 11 July 2011

Stanford University has adopted JavaScript to teach its Introduction to Computing Principles course. How does this impact what is taught and how?

If further proof were needed that JavaScript shall indeed inherit the earth we have the news that Stanford has adopted JavaScript to teach CS101 - Introduction to Computing Principles.

"the essential ideas of computing via little phrases of Javascript code."

The advantages of using JavaScript are many. In particular it allows the course to be web-based. Programming demonstrations, tasks and assignments can be performed using live code in a web page.  The syllabus is what you would expect from an introduction to computational thinking but it seems to succeed in motivating the students by using more realistic examples. For example Lecture Two dives into working with images. This allows loops and conditional to be introduced without having to invent silly tasks. It also provides examples of data structures, storage mapping functions and other ideas which are so often overlooked in an introductory course but are central to algorithmic thinking.

 

cs101javascript

 

If you visit the course website you can try the course out by reading your way though the lectures and try out the code by clicking the Run button. There is a demo and discussion.

As an introduction to very basic computing it seems to work really well - even if the instructors seem to have some reservations about the JavaScript syntax:

"The Javascript language and syntax here is less than ideal and I do not love it. However, in practice syntax was not a barrier for these projects where the code snippets are so small."

Personally I think the JavaScript syntax is no worse than any other - it's like C/Java/C++/C# etc. and its approach to many things is sufficiently fresh to make it an ideal teaching language. After all it has enough features to do objects without getting bogged down in classes and functions as first class object means you can do functional programming as well. And, perhaps a first for computer science, the language is actually in use and very important.

So why not teach an entire CS course using nothing but JavaScript?


More Information

CS101

Demo and discussion

 

Related articles:

JavaScript inherits the earth

 

If you would like to be informed about new articles on I Programmer you can either follow us on Twitter or Facebook or you can subscribe to our weekly newsletter.

 

Banner


OpenJDK Project Leyden Now Available
22/07/2024

Project Leyden, an OpenJDK project, is now available in an early access release. Leyden aims to improve the startup time, lower the warmup time, and reduce the footprint of Java programs. It aims to d [ ... ]



Developers Wary Of The AI Tools They Use
24/07/2024

Over three quarters of developers use or plan to use AI tools, perceiving the main benefit as increasing productivity, but at the same time fewer than half trust the accuracy of AI tools and almost ha [ ... ]


More News

Last Updated ( Monday, 11 July 2011 )