Getting to know Alice

After I wrote a review of the Scratch programing environment, one of our readers suggested that I look into the Alice programing environment. http://alice.org/ Well, I've gotten to know Alice and have found it to be quite an impressive programing environment. By the way, I'm always looking for interesting subjects to write about, so if you have suggestions, please email them to me.

Alice is a programing environment that allows students to learn Object Oriented Programing in a compelling 3-D environment. With Alice, students add objects to a 3-D world and use each object's built-in methods to create animations, interactive stories, or games. When the student is satisfied with their work, they can export it in the form of a standard web page that they can share with their friends, or instructors. Though written in, and primarily aimed at Java, most of the concepts and structures demonstrated in Alice are applicable in just about any modern language.

For this article, I'm using Alice version 2.0.7, and you can see the initial screen in Figure 1. Frankly, it looks much like any other IDE. Let's take a look at Figure 2, which is the result of loading one of the example projects. In this case, I've chosen my favorite, the Amusement Park project.

 

In the upper left panel, we have what I would call the object window. Here we see a list of all of the objects used in the project. Once a user selects an object from this list, they can see a list of methods and properties that belong to that object, in the window below, lower left. From there, a user can click on the “edit” button and edit a given method.

The star of the show, of course, is to be found in the lower center window, where we find the code window. In the main part of the code window, you see the code that comprises the current object or method. Along the bottom you see the code elements that can be used to build programs.

To create an object method, all a student has to do is select the object from the object window, then click on the create a method button for that object. From then on, the student simply drags code segments from the bottom of the screen, onto the code panel. A student can create a method parameter or variable by clicking one of the buttons on the right side of the code.

Along the bottom of the code window, we see “Do in order,” “Do together,” “If/Else,”, “Loop,” “While,” “For all in order,” “For all together,” “Wait,” “Print,” and “//.” These are the core code elements available to Alice programmers. Object methods can be brought in by simply clicking on the object in the object window and dragging the needed method into the code window.

“Do in order” is simply a means of grouping instructions that are to be executed sequentially, much like brackets or BEGIN/END groups in other languages. On the other hand, “Do together” is a means of grouping instructions that are to be executed concurrently. This is a fairly advanced feature that opens up the opportunity to explore multi-threaded programing.

The “If/Else” enables a student to create an “if” clause with an optional “else” clause. Once the student drags the “If/Else” into the code window, they will see a conditional expression container, as well as code containers corresponding to the “if,” and the “else” sides of the instruction. The student can drag whatever instructions they wish in each of the code containers. However, I did find the boolean expression creation process to be a bit cumbersome at first. Once I realized that I could drag a variable into the conditional expression container, and that Alice would then walk me through the rest, things went much more smoothly. Using the pick lists provided in the conditional container lead to strange results.

The “Loop” is pretty convenient to use. In it's default mode, the student simply specifies how many times they want the code block to execute. In advanced mode, the student can specify a full C-like construct.

The “While” is used very much like the “If/Else” is, as it should be.

The “For all in order” and “For all together” features allow a program to loop over each element in a list. The list can be created on the fly, or can be a predefined variable. Once either of these code elements are in place, a locally scoped index variable is created that contains the current item from the list.

The “Wait” element simply causes execution to pause for a given number of seconds.

One would think that the “Print” element would be fairly intuitive. However, I wasn't able to determine where the output actually went. But since Alice is primarily a 3-D programing environment, I guess printing is irrelevant.

All Alice programs are built up using these simple code elements, but the real power (and fun) comes from the methods that objects supply to the Alice environment. For example, the camera object supplies methods that move the user's point of view around within the 3-D environment.

Simply moving around in an empty environment would be pretty boring, so let's talk about some of the objects that come with Alice. Objects are loaded from the Gallery and include various types of people, buildings, animals, vehicles, land features and other props.

I think the best way to describe the possibilities is by example. See Figure 3. Here we see one of the example projects which demonstrate the Octopus and Carousel objects. These objects are fully animated, and each provide a unique set of methods. For example, the Octopus object provides a SpinAnimation method that moves the arms up and down and turns the object on it's axis.

 

On the other hand, the PinkBallerina object provides methods that allow her to be moved within the environment and to “say” messages to the user.

The 3-D environment presented by Alice is compelling, and frankly, a lot of fun. Where else can you have a Japanese Samurai, an Electric Bass, Lunar Lander and a Cowboy in the same place? While I'm not a fan of strict object oriented programming, I do understand the benefits of object oriented programing and Alice is a very good introduction for a fairly advanced class of students.

That said, I did find Alice to be a bit unstable, and at times, a bit counterintuitive. Some of the objects supported some methods that didn't seem to make sense in context, and lacked others that seemed appropriate. But sometimes that is the nature of programing, something most programmers have learned to live with. It's strict object oriented nature and compelling 3-D presentation make Alice a very good introduction to modern programing technique, but it may only be appropriate for fairly advanced, or mature students. As my sons are a bit too young to be able to work with the Alice environment effectively, I would certainly recommend anyone instructing older students, say high school, to consider using Alice as a teaching tool for intermediate to advanced programing.

______________________

Mike Diehl is a freelance Computer Nerd specializing in Linux administration, programing, and VoIP. Mike lives in Albuquerque, NM. with his wife and 3 sons. He can be reached at mdiehl@diehlnet.com

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

great project, greater potential

Saurabh Suman's picture

I just hope 10 years down the line this project should not be eaten by big companies I see much wider purpose of this project in future like for business process etc and beleive me not body even in BPM area are anywhere close to this in graphical representation. This is the future I see that this project can be base of many work flow engine, BPM process etc. Or can even give tough compition to company like sumtotals.

A little buggy but what fun - watch out Disney!

madtom1999's picture

Couldn't get 2.0 it to run using sun java on my 32 bit machines but works with open-jdk and not at all on 64 bit stuff - haven't tried later versions but whatever happened to Javas write once run anywhere?

Having said that I've had immense fun making little 'cartoons' with this thing - its not (just) an educational tool - its the next generation of Animation software. Possibly the last - you don't need anything else!
I give it a year before you're not allowed to run this in case you take a penny or two away from those that wish to control your media.

Poor Choice Of LIcence

Lawrence D’Oliveiro's picture

Shame their licence includes the obnoxious advertising clause.

Alice for Linux

Don Davis 's picture

Alice 2.0 is a great intro for students. That have been said - Redhat recently helped out Carnegie Mellon with a computer lab. Alice 3.0 is completely Linux friendly. (The author didn't mention which OS he had run Alice on; I had real difficulty running Alice 2.0 on Linux). The newer Alice has more aesthetically appealing methods e.g. Sims characters doing push ups; however, the interface doesn't seem as straight forward and it seems to be resource hungry.

Alice 3.0

Mike Diehl.'s picture

I looked at Alice 3.0 when researching the article. While I liked the improved methods and characters, I felt that 2.0 was more approachable. 2.0 is hungry and can be unstable; 3.0 I felt, was even more so. That said, I did find 2.0 to be stable enough to work with comfortably.

My main purpose in writing this article, as well as the one on Scratch, is to get people interested in these types of projects. Especially since my own boys are getting old enough to benefit from them.

Will be cool to learn a

predictive dialers's picture

Will be cool to learn a software that easy ^^ but it isn't , is a lot of hard work and even if you learn a software you will never know all his things.

agree

Anonymous's picture

You are right. His things is always the hardest part of learning any new computer language.

alice for comp sci classes

linuxgeek96's picture

Alice is a great IDE, however, it is one of the most unstable and buggy programs I have ever had the misfortune to work with. If the developers focussed on stabilizing the current features rather than adding new ones, it would be waaaay improved.

Well I guess that gives kids

Anonymous's picture

Well I guess that gives kids experience in the sort of frustration they are likely to face in real-world programming (especially if they use M$ products \ ) ;-)

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix