Code Animation Platform


STEM Education focuses on building the skills to solve real-life problems using a mixture of technology, science and logic, and the best way to teach how to integrate technology and logic is to teach to Code.

Diogene-CT is a code visualization environment developed by Svelto!, thanks to a long experience with innovative methods for teaching programming conducted at introductory programming courses at the University level, that stands a new paradigm called ACME (“Code Animation by Evolved Metaphors”). ACME is a consistent visual metaphors for both procedural and object-oriented programming to teach computer programming in secondary schools and university first-year courses.


The innovative approach of Diogene-CT can be summarized in the following points:

  • it develops a set of consistent metaphors to introduce the concepts of programming. By adopting the metaphors, it is possible work with students in order to ease their approach to coding, reduce their cognitive load and the black box effect associated with source code;
  • the methodology is based on two different but interrelated metaphors. The first and basic one is centered around the main constructs of procedural programming; the second and more advanced one is constructed around the principles of object-oriented programming;
  • it has a set of executable tools: the basic building blocks for our toolset are represented by animation actions and animation programs. The metaphors are translated into a library of animation actions over an animation scene: in this way, each execution of a target program becomes an animation program on the scene;
  • it allows to seamlessly deep dive from one metaphor into the other. This richness of the method allows students to gain a better understanding of the actual operational aspects of programming, by reducing at the same time their cognitive overload;
  • the animator tool may be run both in offline and online mode. In offline mode the teacher typically develops some code, then picks up a usage scenario for it and uses the Diogene-CT animator to give life to the execution of that particular usage scenario. Much more challenging is the online mode, in which the Diogene-CT animator is provided with a piece of source code written in Java and allows the student to run the code and interact with it while animating all events triggered by the code.

Specifically, Diogene-CT has three different tools that makes the difference: the Mechanical Arm Metaphor for Procedural Programming, The Robot-Community Metaphor for Object-Oriented Programming and the gamification.

The Mechanical Arm Metaphor for Procedural Programming

The aim is to teach the basic concepts of any programming language, like variables, assignments, control structures and so on. More specifically, we develop a metaphor for the execution of code instructions based on the use of mechanical arms.

The main elements of the metaphor are as follows:

  • the RAM is exemplified as a large spreadsheet of cells that can be named and can store values (to represent variables);
  • the ALU is depicted as a calculator capable of performing the typical computations required in numerical and Boolean algebra;
  • the standard input and standard output are represented by pipes connected to the keyboard and console screen, respectively. Animations show streams of characters flowing through these pipes when they are activated;
  • the mechanical arm represents an execution context, typically a function, and is responsible for animating operations carried out by the processor or virtual machine, like: (a) changing the contents of the memory spreadsheet; (b) operating the calculator to perform computations; (c) activating the pipes to the console or from the keyboard.
  • finally, to clarify the importance of the control flow and the role of control structures, a lollipop sign indicates at any moment of the animation the number of the next instruction that the mechanical arm is supposed to execute.

Each instruction causes a set of actions by the mechanical arm on the scenes, guided by the lollipop. Students can see all of the intermediate states of the program animation, and this removes the "black box" effect associated with the traditional execution of code by the machine, and makes it more transparent to students.

The Robot-Community Metaphor for Object-Oriented Programming

Diogene-CT designs a metaphor of object-oriented applications as communities of cooperating robot, each robot being a component (class of objects); the typical concepts of object-oriented programming (reference, message, method, package, binding etc.) will be explained in terms of this metaphor (e.g.: a reference to an object is a remote control for the object; a message between objects is a message exchanged between robots etc.).

The Robot-Community Metaphor is strictly tied to the object-oriented computer programming concepts. It uses similar real-world elements to easily explain the typical concepts of object-oriented programming. It also benefits from the mechanical arm metaphor interaction so that the learner can automatically zoom-in procedural programming details and zoom-out to the highest object-oriented interaction level.


The last important feature of our metaphor-based approach is that it naturally lends itself to gamification. Gamification is the technique of teaching problem-solving using games, and is already proven to be effective in computer programming. In the Diogene-CT approach, the goal of a game is to write a computer program that solves a problem, e.g., a math problem or a simple simulation of a scientific phenomenon. The game consists of designing the target state of the scene, i.e., the one in which all results have been computed, and asking students to physically enact the actual animation -- either procedural or object-oriented. Students can work in group. Each of them is responsible of performing the actions of an element of the scene -- say, the mechanical arm or the lollipop, or the calculator, or to conduct the actions of a component robot.