New Kojo Release – Featuring Interactive Program Moulding (IPM)

I’m please to announce a new release of Kojo (Version 030512-1).

This release contains an exciting new feature that allows you to interactively manipulate your program to produce interesting output. The feature is really simple to use. Basically, you Ctrl+Click on any number in your program; that brings up a window which allows you to change the number. As you change the number, you get to see the corresponding (changing) program output.

Let’s see this in action.Here’s a slightly modified version of the Tree sample in Kojo:

def tree(distance: Double) {
  if (distance > 4) {
    val ang = 25
    val adel = 20
    setPenColor(color(distance.toInt, math.abs(255-distance*3).toInt, 125))
    left(ang + adel)


Run it to get the following figure in the Drawing Canvas

Now, Ctrl+Click the number 25 in line number 3 of the program above. That should bring up the IPM window.

Now, just move the slider around using the arrow keys or mouse clicks. For each click, you should see a different shape in the Drawing Canvas. As you play along, you’ll encounter a series of shapes that look something like this:

Starting to see how this feature works?

Here’s another program to play with:

setPenColor(Color(0, 136, 204))
repeat(43) {

And here’s some IPM output for this program:

The IPM (Interactive Program Moulding/Manipulation) feature in Kojo is inspired in part by Bret Victor’s Inventing on Principle talk. This release contains just a small beginning in the direction of IPM. Expect future releases of Kojo to build upon this in interesting ways.

Many thanks to Jerzy Redlarski for pointing me to Bret Victor’s talk in the first place, and to Björn Regnell for providing constructive feedback during the implementation of the feature.

Also included in this release is an important fix. For the past few versions of Kojo (ever since the upgrade to the Netbeans 7.1.1 Platform), using the Window -> Reset Windows menu item makes the Script Editor unusable. This release fixes that problem. So this is a recommended upgrade.

As always, the new version is available from the Kojo Download Page.


This entry was posted in News, Release. Bookmark the permalink.

3 Responses to New Kojo Release – Featuring Interactive Program Moulding (IPM)

  1. Pingback: New Kojo Release – A Minor IPM Upgrade « The Kojo Learning Environment

  2. Pingback: New Kojo Release (150512) – With performance improvements for Picture drawing « The Kojo Learning Environment

  3. Pingback: New Kojo Release (Version 250512) « The Kojo Learning Environment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s