alice-teacher Alice 2 issue: adding item to array or list takes 1 second

Vanderhyde, James vanderhyde at sxu.edu
Thu Apr 6 17:38:04 EDT 2017


Sorry, I didn’t attach the example world. Here it is.

James
—
James Vanderhyde
Assistant Professor, Computer Science
Program Director, Master of Applied Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454

On Apr 6, 2017, at 4:17 PM, Vanderhyde, James <vanderhyde at sxu.edu<mailto:vanderhyde at sxu.edu>> wrote:

My students today hit an unexpected problem working with a list. They were doing Exercise 4 in Chapter 9 of Dann, Cooper, Pausch 3rd edition (p. 281): Casting a Beach Scene. The exercise instructs the students to create an interactive animation where the user clicks on actors to add them to a list.

The problem came in when the students tested their programs. The program was written correctly, but sometimes not all the actors that were clicked got added to the list. It turned out the students were clicking too fast. I discovered that the “insert object at end of list” instruction (and the “set item i to object in array” instruction) has a 1-second duration by default. This is inconsistent with the “variable set value” instruction and “increment variable by 1” instruction, which are both 0 seconds by default.

I am attaching an Alice world that shows the problem. Clicking on the bunny adds it to a list and an array. If you look at the World properties when you play, then click rapidly on the bunny, you see the list update immediately but the array wait 1 second between updates. This is because I specified “duration = 0” in the list insert, but I left the array set item at the default duration.

Thanks for looking at this. It would be nice to have consistent behavior.

James
—
James Vanderhyde
Assistant Professor, Computer Science
Program Director, Master of Applied Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20170406/63d892fd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add to list takes 1 sec.a2w
Type: application/octet-stream
Size: 308958 bytes
Desc: add to list takes 1 sec.a2w
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20170406/63d892fd/attachment-0001.obj>


More information about the alice-teachers mailing list