Henry's Journal

Monday | Tuesday | Wednesday | Thursday | Friday

May 12, 2008

While Alice was installing, I read the paper titled "Alice: A 3D Tool For Introductory Programming Concepts." Here is a brief summary:

The paper argues that one of the greatest difficulties for novice programmers is learning "put the pieces together," or figuring out how to coordinate programming elements to create a functional program, and proposes visualization with Alice as a way to develop this coordination. The paper goes on to summarize the programming language constructs of alice, as well as some of the built-in functions. It notes that Alice simplifies the process of Animation; objects know what it means to "Turn Left." The paper emphasizes the animation gives very useful, visual, and immediate feedback. Finally, the paper concludes by discussing four categories of pedagogical issues: Graphics, state, programming concerns, and event-driven programming.

Learning notes: I need to be careful with Python conditionals and Alice constructs. You cannot put Python statements inside a DoInOrder().

Some questions that came up as I was reading the paper:

"Alice is built on top of the programming language Python and uses many of Python's features"

"Functions in Alice are supported through the underlying Python language."

I thought Alice was built on Java and the source code is all in Java.

Next, I read through Chapter 1 and went through the Appendix A and Appendex B tutorials. I then completed all the exercises in Chapter 1. I am currently attempting to get the Random number thing working, although I ran into some difficulty trying to increment a local variable. Apparently you have to temporarily create an instance variable, drag it in, tell it to increment, and then replace it with the local variable. I have created a test for the random number generator, but it does not seem to be failing. I will try a few more things to see if I can elicit any odd behavior, and then continue with the tutorials. I finished Chapter 1, and went through all the exercises. I think I have a reasonably good command of object manipulation and camera control now.


May 13, 2008

I started today by reading a paper titled "Tools for Teaching Introductory Programming." Here is a brief summmary:

This paper is a recording of comments about various introductory programming learning tools. Steve Cooper emphasized that Alice's greatest pedagogical feature was the use of narrative, because it attracted a wide variety of students in addition to introducing "storyboarding as a design technique." Ken Goldman emphasized that the drag-and-drop interface of visual programming tools effectively prevented syntax errors and allowed the direct manipulation of programming concepts in graphical form. Among the rest of the speakers, it seemed that visualization and immediate feedback was greatly emphasized as a powerful tool for teaching computer science at the introductory level.

Next, I read and went through some of the exercises in chapter 2, over the course of which I encountered a couple of errors, which I have documented. I then skimmed chapter 3 VERY quickly, and moved on to read Chapter 4. I moved quickly through most of the programming concepts, since they were already familiar. I learned how to import sounds and textures, and apply texture maps. (Note: Only WAV and MP3 are supported for sounds, and bmp, gif, jpg, +tif for images) Further, when sounds or images are imported into Objects, they go with the class when it is exported as a user-created .a2c file. Then, I read the all of Chapter 5 and did the fun Zeus-Lighting exercise in addition to the fireTruck exercise. It was interesting to visually observe all the sporadic bugs that come as a result of clicking the wrong method, but painful to replace the methods and re-click on all the correct arguments.

Note to self: isShowing property vs Opacity property should be used consistently.); (isShowing is very useful for making objects go around in circles (circle an invisible object).

Some questions

In Alice, the only class parameter type is Object, as seen on Page 87. In the text, we see that we can call methods on this parameter, such as "move." I'm assuming that this means the "move" method is a valid command for all objects. However, how does one call type-specific methods such as user-created methods, without a way to cast the Object parameter to something more specific?


May 14, 2008

I started by reading the paper titled "Developing Algorithmic Thinking with Alice." Here is a brief summary:

This paper begins with a brief discussion of the Fluency with Information Technology goal of the National Research Council's Comittee on Information Technology Literacy, and cites its definition of algorithmic thinking. It then cites previous work on the use of animation, and specifically proposes Alice as following the tradition of Karel, the Robot. Next, we get a description of the Alice Programming environment, with some screenshots. Apparently one can dynamically add and destroy objects in an Alice scene. I will probably explore this further, since it seems to be a useful thing to have. Then we look at an illustration of using Alice in the classroom, with the example of the snowman and the stool that it must get to. Multiple solution approaches of various students are discussed. The final section of the paper summarizes the advantageous features of Alice.

For the next couple of hours I worked through the examples in chapter 6, trying them out in Alice. I ran into a save bug and another error that came when I displayed in Java view, but did not come up when I showed the code in Alice format. At approximately 2:20, a fire alarm went off and most of LSRC people came out. Apparently it was a real fire, and there were four fire trucks and five police cars. After standing around until 3:00 with the rest of the people, I decided that we weren't going to be able to go back in there anytime soon, so I called it a day, since my laptop and Alice book were still in the office.


May 15, 2008

Since I had finished reading Chapter 6 yesterday, I went through and did some tests on the random numbers in Java. I got Alice to run and print multiple random numbers between a fixed max and min, integer and non-integer. I also tested negative-to-positive ranges. Then, I wrote a short java program to count the number of each type for integer tests, and the amount above half and below half for the non-integer tests. I did not notice anything unusual, although Alice does tend to generate random numbers very slowly. I think the bug might be one of those things that comes up arbitrarily, so I will have to keep a look out for it as I continue to work with Alice. Here is a link to some of those results. The prints from Alice fill the files, and the counts are at the bottom.

I read up through chapter 8 and through half of chapter 9 in the book, following and running the examples in Alice. I found Towers of Hanoi to be a great example of the convenience of Alice's 3D environment. Something amusing I noticed today with the error submission system: If you get an error and click "Submit Bug," it will give you a new error, namely "Error posting stacktrace to bug database." However, this new error also has a "Submit Bug" button, which you can click again to generate the same error twice over. So it's sort of like a recursive bug.

I finally read a paper titled "Teaching Objects-first In Introductory Computer Science." Here is a brief summary:

This paper begins by acknowledging the difficulties of using an objects-first approach, primarily resulting from the complexity of classes and objects, encapsulation, and methods, in addition to types, variables, and syntax. The challenge is in mastering both states and functions simultaneously. It follows with discussion of how most of the tools designed to assist in objects-first programming are visual or graphical to some extent. The remainder of the paper discusses Alice as a useful tool for reducing the level of details and providing a meaningful way of visualizing objects. This includes a laundry list of observations about Alice's advantages for teaching object-oriented programming. At the very end of this laundry list, they mention that Alice's weakness is that it does not give students direct exposure to syntax errors. The last part of the paper provides some statistics and a comparison with the other tools mentioned in the introduction.


May 16, 2008

I started by going through the second half of chapter 9. Sometimes we learn something that, after learning it, feels like it should have been intuitively obvious. For example, variable assignments - Alice does not allow you to assign local variables to an expression at initialization, but you are able to do it in the body of the method.

I may have found your random bug, in the Whack-a-Mole example. However, I found that at least this one was not a problem with random.

I updated my website structure, so that each week is linked from a main page, which also has descriptions of bugs in Alice. Also, there are now links to each day at the top of the weekly journal. It turns out that the Wack-A-Mole was a separate bug, but now I've also found the Random number generator bug, and posted on my main website.

Next, I finished reading the last chapters of the Alice book, which discussed how Alice implements arrays and variables. As I finished it, I thought of an easy workaround to the random number problem, and I tried it. Apparently you just have to subtract the number and see if it equals zero. I thought of this because I remembered reading somewhere that we compare doubles in Java in a similar fashion. Here is the working workaround.

Then, I read a paper titled "Objects: Visualization of Behavior and State." Here is a brief summary:

This paper, as with previous papers on this topic, begins by pointing out the difficulty of the concept of objects with behavior and state. It then lists out the key concepts in the design of Alice, such as making state and changes of state as visible as possible, and not allowing syntax errors at any time. It then proceeded to discuss two programming exercises involving a class level method (making the skater spin) and a world-level method (animating a dance routine). The argument from these examples is centered around how these sorts of examples allow the instructor to motivate a discussion with students of the concept of methods. The paper proceeds to discuss how Alice's ability to export objects as new classes provides a context for understanding inheritance and the necessary use of parameters for the resuse of objects in new worlds. Then there is a brief note about the purity of functions - they do NOT change state. Finally, the paper goes into the introduction and use of state variables for student's learning, a discussion that is centered around using variables to store state, which is used in other methods. The example given was steering a car. The paper concludes with a brief discussion of other tools, and reiterates the belief that the visualization is what makes Alice successful in teaching fundamentals of object-oriented programming.

I concluded my day by briefly going through the Fall 2007 CompSci 4 website. I think I will opt to develop new materials for CS4, at least at this time, due to familiarity with content. Also, I think that is might be more effective to develop modules when more people are here, since those should require a broader range of subject knowledge and ideas.


My Alice Home Page

Professor Rodger's Home Page

My Home Page