Scenarios

There are two main areas of teaching we believe the turtle can support (which largely apply to existing 2D turtles too). The first is teaching the ideas and concepts behind procedural programming, where using a turtle graphics system allows the programmer to see, rather than imagine, what the program is doing, e.g. by seeing loop constructs as the turtle repeatedly moving in a similar fashion. The other area of teaching is in geometry, which a Second Life–based system can make more challenging and stimulating by extending it to 3D shapes.

A second way of dividing usage scenarios is in terms of how different users of the system interact with each other: are they located physically near each other or working remotely (but with their Second Life avatars in the same virtual space), and also whether they are using the system simultaneously or at different times. The scenario below relates to interaction between students using the system at the same time and in the same physical location (a practical/lab session for a course).

The target audience's age range is also quite wide: Logo and turtle graphics are used for students from primary school through to degree-level. We are focusing on the use at university because it makes it more feasible for us to evaluate the design/implementation by having appropriate users test it.

People

Bob and Fred: students on a first-year Computer Science course called Introduction to Programming. Bob has learnt some BASIC in the past, and needs rehabilitating. Fred has no programming experience. Theodore: the bored PhD student who's been coerced into running the lab sessions.

Student taking a copy of the turtle
Student taking a copy of the turtle

Scenario

Note: the pictures used below are a combination of screenshots from the prototype we implemented, and mockups created within Second Life.

Setting: they are in the first lab session for the course, have already logged on etc, created/been given Second Life accounts, and been given the assignment work sheet.

Theo uses the existing Second Life mechanisms to invite all the students to teleport their avatars to his virtual location (part of a private island owned by the university where the students will be carrying out the exercises).

Student placed turtle in the environment
Student placed turtle in the environment

Bob and Fred each see a pop-up message in the top corner of their Second Life client informing them of the invitation, and each clicks the “Agree” button. After a delay, their avatars arrive in the new virtual location, and a turtle system is clearly visible nearby. Theo instructs each of them to right-click on the turtle and use the “Take a Copy” command, which will add it to their inventories.

Each student then moves to any empty area of the land, drags the "Turtle System" entry from their inventory to the empty space, and starts working on the exercises using their new instance of the copied turtle.

The half-complete square and commanding the turtle via the chat interface
The chat interface

Fred starts the exercises by using Second Life's chat system to issue commands to his turtle (the other turtles in range ignore his commands, since they're not owned by him). First “fullreset”, which the worksheet says will clear any state and randomise the colour used so it can be distinguished from the other turtles nearby. First “forward 10”, then “right 90”, then “forward 10”, and is rewarded by seeing his turtle draw half of a square, in a very-visible but rather ugly shade of pink.

The next exercise it to use loops to draw a square using less code. Fred drags an example script from the object's library, and opens the script editor to modify it to draw a square rather than a triangle.

The code editing window
The code editing window

While the code there is initially a little confusing, the comments point out the part he needs to change. He then exits edit mode, and clicks on the turtle to have it run the script, and it draws a square.

Meanwhile, Bob is having difficulty – he's deleted the sample code for drawing a triangle, because he thinks he knows what he's supposed to be doing, and is trying to write a loop using a GOTO command. He asks Theo what the syntax for the command is, but Theo doesn't understand his question and tells him to just follow the sample provided. Bob isn't happy with this, but when he sees Fred has it working, he decides to accept it. The “fullreset” command won't bring back the original script though, so instead he deletes his existing turtle from the environment, and creates a new instance of it from the version in his inventory.

Bob progresses through the rest of the 2D exercises without much difficulty, and onto the 3D exercises, the first of which is drawing a square-based pyramid. Since he can't immediately see how to do it, he starts playing around with direct commands via the chat system. The worksheet suggests. “up 60” followed by “forward 20”. At first he can't quite see what effect the “up” command has had, so he looks for information about how to change the view. A reference sheet accompanying the worksheet explains that holding down “ctrl” and “alt” and dragging with the mouse pointer in the Second Life window will move and rotate the view, and after a bit of experimentation he manages to adjust it to his satisfaction. He then proceeds with drawing the pyramid, issuing the commands “left 90” and “forward 20”, expecting that that should produce one of the other sides of the pyramid, but it does not give the desired result (because the rotation is about the turtle's own z-axis, not the global z-axis for which a 90 degree turn would be correct). Being a self-reliant sort of chap, and having noticed other students aren't finding talking to Theo very helpful, he tries playing around with different variations of the turn command to see what it does. It gets a little difficult to remember the different results though, and to compare them, so he decides to create duplicate turtles for the experimentation – which he does just by moving his avatar away from the original one, and dragging another copy of the turtle system from his inventory. After looking at three variations side by side (and moving his avatar and the view around to see what's different), he realises the turn left is relative to the plane the turtle is facing in, not relative to the flat surface it started on, and continues with the exercise without too much trouble.

In This Section