Serverless automatic assessment of Javascript exercises

3 downloads 13333 Views 452KB Size Report
Dept. of Computer Science and Engineering ... rarely in the core of programming courses. However ... online3. 1http://code.google.com/apis/ajax/playground/.
Serverless Automatic Assessment of JavaScript Exercises Ville Karavirta

Petri Ihantola

Dept. of Computer Science and Engineering Aalto University, Finland

Dept. of Computer Science and Engineering Aalto University, Finland

[email protected]

[email protected]

ABSTRACT Because of the web, JavaScript (JS) is one of the most popular programming languages today. Tools like GMail or Facebook are built heavily on JS. Despite the importance, JS is rarely in the core of programming courses. However, it still has a role in many courses [1, 2, 3]. In this paper, we introduce an open source tool to create small, automatically assessed JavaScript programming exercises (see Figure 1). Automatic assessment is based on unit tests, JSLint and various software metrics. Embedding an exercise into an existing web page only requires inserting the following or a similar HTML block: // initial code for students
exerciseOptions = { ’jslint’: true, ’tests’: [’sub_sum_qunit.html’], ’commonspath’: ’../javascript/’};

Figure 1: Screenshot of an example exercise.

Categories and Subject Descriptors K.3.2 [Computer and Information Science Education]: Computer Science Education

In addition, teacher needs to provide unit tests for each new exercise. The fact that the assessment happens inside the student’s own browser is the novelty of our work. Installation and sandboxing of a server are not required. This makes it easy to add exercises into any web page. The downside is that exercises are for self study purposes since grades submitted from a browser could be tampered with. Google Code Playground1 and W3Schools interactive demonstrations2 are similar to our system. However, these do not provide automatic assessment and are hard to integrate into other websites. Sources of the tool and a set of exercises are available online3 . 1

http://code.google.com/apis/ajax/playground/ http://www.w3schools.com/JS/ 3 http://github.com/vkaravir/jsassess-demo 2

Copyright is held by the author/owner(s). ITiCSE’10, June 26–30, 2010, Bilkent, Ankara, Turkey. ACM 978-1-60558-820-9/10/06.

303

General Terms Human Factors

Keywords Programming exercises, automatic assessment, JavaScript

1.

REFERENCES

[1] Q. H. Mahmoud, W. Dobosiewicz, and D. Swayne. Redesigning introductory computer programming with html, javascript, and java. In Proceedings of the 35th SIGCSE technical symposium on Computer science education, pages 120–124. ACM, 2004. [2] X. Wang. A practical way to teach web programming in computer science. Journal of Computing Sciences in Colleges, 22(1):211–220, 2006. [3] P. Wu. Teaching basic game programming using javascript. J. Comput. Small Coll., 24(4):211–220, 2009.