Wednesday, 25 April 2012

Pycode and it's creation

Report on the development of pycode through the moodle LMS platform through University of Canterbury

http://www.canterbury.ac.nz/aqua/awards/TDG%202010%20Final%20Reports/Andy%20Cockburn.pdf

Project Report:

Learning tools for the Python programming language
Andy Cockburn, Richard Lobb, Brent Martin
Computer Science and Software Engineering

Background
In 2008 the Computer Science and Software Engineering department decided to change its first year introductory teaching language from Java to Python. Switching first year teaching language is a major undertaking as it has a major impact on the entire Computer Science curriculum (as most subsequent courses use and build on the initial language) as well as influencing all of the departments that benefit from having students that are familiar with programming concepts.
We selected the Python programming language for several reasons:
• It is widely used in industry (e.g. Google), which is important for student motivation.
• It is widely used in many academic disciplines (e.g. the biopython in bioinformatics, VPython in Physics, pyQuante in chemistry, psychoPy in psychology, etc.). Again, this is important for student motivation and potentially high value for 'customer' departments.
• It is a multiparadigm language meaning that we are free to choose how much of the language we teach (unlike Java, which requires us to teach object orientation concurrently with elementary constructs). Pedagogically, this is an extremely important asset as we can peel the learning layers as we choose rather than as dictated by the language.
• Our main teaching partners (in particular, the Engineering Faculty) were very enthusiastic about the move to Python.
We applied for, and received, a UCTL grant to assist us in making the transition to Python as effective as possible. The specific objectives were as follows: 1. to create core learning materials for the course, particularly interactive quizzes and motivating learning environments; 2. to construct a Python intelligent tutoring system.

Outcomes
We first taught Python in 2010 (C05C121-51, C05C121-52 and C05C122-52). The enrolments immediately leapt from 261 in C05C121-51-2009 to 467 in C05C121-51-2010. The increase was largely due to an increase in Engineering students, who were now encouraged by their faculty to take the course.

Developing lab and assignment materials for the course was a major undertaking. The department funded development of the core materials, but the two key extensions enabled by the grant were the development of on-line quizzes and Pycode.

Development of on-line quizzes
Practical lab work is critical when learning to program, but the time costs of setting, administering, and marking lab work has discouraged us from explicitly assessing lab work. With the grant we were able to hire a postgraduate computer science student to develop on-line and automarked quizzes within Learn. The value of these quizzes for teaching Python has been dramatically elevated through the development of Pycode (below).

Development of Pycode: Interactive and automarked quizzes, now integrated into Learn
We developed a new quiz question-type module for Moodie that allows us to embed Python coding questions into our Learn quizzes. With this new question type, called "pycode", students are asked to write a Python function that satisfies some specification; they can either type their program code directly into the answer box on the web page or test it first on a Python development system and then copy and paste their answer into the web page. When they submit their answer the new plugin module runs their program code, testing it with a set of test cases specific to the question. The student answer is marked correct only if it passes all the tests. We are incorporating pycode questions into most of the laboratory quizzes this year as they provide direct explicit testing of a student's programming skills, rather than the indirect testing available via the existing question types like multiple choice, short-answer etc.

We have also employed a student to write a set of "drill quizzes", which are collections of pycode questions in specific skill areas: strings, lists, logic and loops. Students are directed to these drill quizzes for extra practice if they struggle with the pycode questions embedded in the normal weekly lab quizzes. We hope that this will help students who are struggling but well motivated to succeed.

Developing Pycode and populating our labs with pycode quizzes was a substantial task. The heavy course demands brought about by the near doubling of enrolments increased the need (and benefits) of the lab quizzes and Pycode, but it also reduced time available for the Intelligent Tutoring objective.
We have carried out some preliminary work into parsing student's Python programs (including malformed ones) and identifying errors. We have also developed a prototype to test our approach for a small subset ofthe Python language. Developing this further to accept all of Python is a large project; we hope to continue with this in the near future as the pressure of course demands eases through the stabilisation of the Pycode resources.

No comments: