Cloud Computing

Cloud Computing simulates an environment where a student can write code subject to certain requirements.  In this example, the language is javascript, and the requirements are:

  • A For Statement containing a Variable Declaration.  For example, for (i=0; i<4; i++) { var x = 10 * i; doSomething(x) }
  • An If Statement.  For example, if (color === 'orange') {shout()}
  • A While Statement.  For example, while (y>0) {y--}

Not for Internet Explorer.

The idea is that a teacher could assign a programming challenge to a student, and the student could get immediate validation as to whether or not they satisfy the requirements.  The requirements are fully customizable from the back-end.  The code editor will output compiling errors to the student also, which is useful for debugging.  The student need not set up a javascript environment themselves, and all students can work in the same environment.

This project uses plain HTML5 with heavy CSS (SASS) for visual effects.  The syntax highlighting for the “day” theme is my own, while the syntax highlighting for the “evening” and “night” themes is the popular Solarized theme.  The code editor comes from CodeMirror.  The Esprima Parser is used to parse the javascript properly, and my own functions validate the student’s code.  I’m trying out a new javascript type checker called check-types that I like so far.  RequireJS bundles all the javascript together and optimizes it for the web.  I used the Python Tornado Web Server to host it on a FreeBSD virtual operating system.

Thanks for taking a look at Cloud Computing!

You can also view the code repository here.

Leave a Reply