28.03.2014 Views

isbn9789526046266

isbn9789526046266

isbn9789526046266

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Elizabeth: And. . . So the function is called again. I suppose that means that it sorta. . . I<br />

wonder if I can create, here, still another. . . (Clicks the heap to bring up the “new frame”<br />

option but does not click it.) frame, I guess I can? Or is it so that the same [frame] can. . . In<br />

the same, like, umm. . . If the [sub]program has been called (Circles the mouse cursor around<br />

the code of the function.) is it so that I can put it there again in the same [frame]? So that<br />

instead I give this “n” a value within the same [frame] thingy that I’ve been working with<br />

(Motions with the mouse from the parameter value 4 in the current top frame towards the<br />

variable n in the same frame, which contains 5.) or do I have to create a new frame? (Clicks<br />

the context menu to produce a new frame. No error: this is the correct step.)<br />

Interviewer 1 : Feel free to try.<br />

Elizabeth: Laughs. Well, apparently I can [create a new frame]. Proceeds to create another<br />

variable n in the new top frame and brings the value 4 there.<br />

In this quote, Elizabeth considers two ways of dealing with the recursive program: the correct solution<br />

that uses multiple frames and an alternative solution that relies on a single frame and is not viable here.<br />

She decides to go along with her first hunch of creating another frame and finds out that it works. (The<br />

alternative ‘looping model of recursion’ is reported in the literature as a common way of misunderstanding<br />

recursion; see Appendix A.)<br />

Our observations are intriguing in that they concretely show that it is possible to learn to understand<br />

recursive programs by applying one’s understanding of a notional machine. In UUhistle’s notional machine,<br />

there is nothing special about recursive function calls compared to other nested calls. Elizabeth and Sue<br />

learned to deal with self-calling functions quite naturally and painlessly, building on their existing knowledge<br />

of function calls.<br />

The above quote from Elizabeth also illustrates how the VPS system can serve as a platform for the<br />

interactive exploration of ideas, supported by automatic feedback: had Elizabeth chosen instead to try<br />

out the ‘looping model’, she would have received an error message and would then presumably have tried<br />

the correct alternative.<br />

We are not in a position to generalize these findings to any other students or to claim that VPS or<br />

UUhistle makes learning to understand recursive programs easy. Further study is needed to establish the<br />

extent to which these interviews are representative of CS1 students in general.<br />

18.2.3 We saw a few pedagogically interesting patterns of student behavior<br />

A few patterns of student behavior during VPS work stood out as potentially significant from a learning<br />

point of view. We comment on these below.<br />

Revisiting one’s goals. . . or failing to<br />

One theme that emerged from the analysis was the way some students succeeded in overcoming problems<br />

by returning to reflect on what they were trying to accomplish through the GUI. Other students failed to<br />

revisit their goals and struggled enormously.<br />

Analytically, we may separate what the VPS user does as they choose what to do into two parts:<br />

deciding what one wishes to happen next, and choosing a GUI operation that (one hopes) achieves this<br />

intended goal. Students do not necessarily draw this distinction, however. Even if they do, they may fail<br />

to consider that the root cause of any mistake they make can lie within either part. Let us contrast two<br />

examples.<br />

Pair 40 initially make the wrong assumption about what a line of code does, thinking it modifies<br />

an existing list. This gives them a headache, which is resolved as soon as they consider an alternative<br />

meaning for the code (it creates a new list) and find a GUI operation to match the new interpretation.<br />

Pair 40 are discussing the line list = [3, list[0]].<br />

John 40 : Right, so it kinda shifts the list one step forward and adds the number three in front,<br />

doesn’t it?<br />

Kate 40 : Mmm. . . let’s try.<br />

310

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!