How are we going to do this?

Delivery

A lecture theatre, where lectures takes place.

As with the instructional design, the main factor affecting the delivery of the module has been the class size. One of the few advantages of the traditional lecture is that one person may address many more. With a class size of five, this advantage no longer holds, and a more tutorial-based approach is possible.

The timetable provides for two hours of "lectures" a week and two hours of practicals. The two "lecture" hours have been timetabled consecutively to give a single two-hour tutorial each week. The practical has been timetabled to follow on almost immediately, and worksheets are provided for this session covering the same topics as the tutorial. The practical is supervised by a postgraduate student.

The class size also means that the conduct of the module can be fairly informal, with an element of "What do you want to do this week?". There is a vague pre-planned agenda for each tutorial session, of course, but the students are allowed (and are encouraged) to ask questions about topics they find difficult or interesting.

The tutorials are used to convey the basic ideas. For a programming module this is the usual collection of underpinning programming concepts. Some activities might include exploring loops and lists from the Python prompt, debugging classes, and more general development. The sessions also include what might be called "group programming", where the group designs a program and then tests the result. Python, with its interactive nature is, of course, ideal for teaching in this way.

At first, Python is then used, strictly procedurally, to illustrate the basic concepts. This follows a fairly customary order of roughly values, variables, loops, conditional control and functions (and modules). The Python section of the module ends with a look at objects in Python.

So the approach here could be described as "objects last". But it is not really possible to program in Python without using objects, as strings and lists both behave in very object-like ways. These examples are used to introduce the notion as an object as distinct from a primitive type.

Java takes over at this point (in terms of time this is about half way through the module). Since the students should be reasonably comfortable with Python, this is initially simply a case of rehearsing the differences in syntax, and of negotiating the difficulty of moving to a compiled language.

Once the students are comfortable with Java a few other features of Java are introduced explicitly, but the focus is more on equipping the students with the ability to use the API documentation to explore further features themselves.

The practical laboratory sessions are probably the more important part of the instruction. These give students the chance the try out the ideas and techniques that they have seen in the tutorial, hopefully putting into practice the new material. The sessions are timetabled for the afternoon immediately after the tutorial, so that the new ideas should still be fresh. Again, this timetabling flexibility is another opportunity brought about by the small class size.

The expectation at the end of the module is that the students should be reasonably fluent in both Java and Python. They should be able to develop simple Java programs that make use of a limited range of built-in Java standard library classes (for example ArrayList, Scanner), and they have also met some other issues such as static methods from Collections.

There is no prescribed text book. For the Python part of the module, the students are given a copy of "How to Think Like a Computer Scientist: Learning with Python" by Allen Downey, Jeffrey Elkner and Chris Meyers. This is a free book available from http://www.thinkpython.com/. The students are recommended to acquire a Java text; those recommended include Bruce Eckel's "Thinking in Java" and Cay Horstmann's "Big Java". It seems that they do all invest, but they choose a book to suit their style. The Python classes follow the book very roughly, for the first seven chapters or so. The Java tutorials follow, if anything, the same order as the Python text!

This is the first time that this particular module has been presented, although it did exist in a similar form at undergraduate level previously. The approach is based on the belief that Java is too complicated a language to start with and that Python provides a much more gentle introduction. In particular, students can be writing "useful" programs much sooner with Python. The constraint is that Java is required for a different second semester module.

If only one language were taught it would be possible to cover more language features. These, however, would be specific to the chosen language. The aim here is to ensure that the students have the more generic skills required to program in either Python or Java, or indeed in any other language.

Artefact

These scripts are taken from sessions discussing basic values and variables, reading from files, and the basics of objects. They illustrate how a Python tutorial would proceed.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.