Archives for : karel

Adding events

A big part of JAKE (Java Karel with Events) is that it adds an understandable event model to the Karel mini-paradigm. We know that there are problems with Java’s event model [1], and that’s part of what JAKE is meant to address. The idea is that the programmer, once they’ve set up their world, creates event buttons, methods of the control panel.

Adding an event is done with the “Add…” button. This adds a new button to the control panel.

When the programmer clicks on their new event button, a pop-up menu opens, giving them the option to write the method that goes with this button.

This opens the code editor (work on which is still in progress).

Now, when the programmer compiles their work, JAKE copies this method into the program, creates an appropriate JButton, and writes a Listener to connect the JButton to the control panel method. The student programmer doesn’t actually see any of the event listeners, and doesn’t have to worry about them yet. It’s not an ideal solution to have to hide away parts of the program, but hey, it is “broken”


[1] Milner, W. W. A broken metaphor in Java. ACM SIGCSE Bulletin, 41, 4 ( 2010), 76-77.

Setting up "situations"

Karel programs are built on “situations”. Similarly, Greenfoot programs use pre-built scenarios. So JAKE programs, also, use Pattis’s situation model.

Up until now, it’s been possible to add robots, beepers and walls by clicking on the buttons down the side of the world editor. These objects were stationary and appeared, by default, in the centre of the World. As of this week’s latest version, the objects can be moved; this lets us set up complex scenarios, like the one below.

World objects can be moved around using a tool window that appears only when one is selected.

These screenshots are from the JAKE IDE. When the JAKE program is run (from the toolbar or with F5), the program represented in the world editor is transcribed into Java and compiled. The resulting program, running in Java, looks like this:

Thus, we can now create situations in JAKE, and see them running in Java.

New robot graphics

Up until now Jake’s had to make do with a clipart-based outfit. His new ensemble has now arrived, and it comes in several stylish colours…

The new drawings are courtesy of Miriam Lowrie.

It’s alive!

The robot has a name: Jake. Jake stands for “Java Karel with Events”. Jake is based on Karel the robot, with an objects-first approach and some new button-based event interfaces.

Today the first prototype is complete: Jake can move, turn and bump into walls. He’s programmable in Java using the “jaketherobot” package. There are world, robot, beeper and wall classes.
So far Jake only exists as a collection of classes. The JAKE IDE is planned for development within the next couple of months.


Since I’m starting this blog at the same time as working on my honours research, I thought I’d post a little summary. Right now I’m working on objects-first programming education, particularly with Karel the Robot and other virtual worlds. Objects-first programming is all about teaching object-oriented programming from the start, rather than the “traditional” model of introducing objects on top of procedural programming.

Over the next few months, I’ll be developing a prototype tool for teaching programming with virtual robots, hopefully bridging the gap between “pure” robot worlds and standard applications programming.