alice-teacher A couple of work arounds for Alice

Robert Durtschi robert.durtschi at gcsu.edu
Fri May 4 13:11:15 EDT 2012


I am using the 03/11/2012 version of Alice. I recall that the school (GCSU) has the August version loaded on the lab computers.  The problem exhibits in both versions and involves being unable to drag an integer function on top of a non-integer expression. We are using "An Introduction to Programming Using Alice 2.2, 2nd Edition" by Charles W. Herbert, as our textbook for the class.


In the Penguin Splash tutorial, chapter 10, the students are instructed to drag "penguin.distance to" on top of the "if True".  It does Not work.  Very frustrating to the students.



The workaround is to

  1.  introduce a new integer variable I've chosen to call FUBAR ("Fouled Up Beyond All Recognition": An ancient (in terms of computer years) and venerable name)
  2.  drag it in place of the "true" (which works just fine for variables)
  3.  choose <= 1
  4.  drag "penguin.distance to" on the top of FUBAR (no problem dragging a function on top of an integer)

At this point you should be able to eliminate FUBAR since it is no longer needed, but I have had at least one student say that his program didn't work when he did so; which is, perhaps, another "feature" of the current release.



It's one of those subtle errors introduced by Alice trying to shield students from making errors by not allowing a numeric function to replace a logical value.

Work around for exercise 6.2

The Teacher solution file uses the following:
[X]

The challenge was that none of us (including the teacher) could figure out how to get the (age*365) to go directly into the "what as a string" function when we dragged the function into the "sheriff say" line. The solution was to introduce another Numeric Variable, days, and do the math in a separate line:

[X]

Then you can drag days into the "sheriff say" expression.  As it turns out you can also drag the math "(age * 365)" into the expression, thus creating a duplicate of the solution.

Which brings up another surprising "feature".  Rather than copying the expression "(age * 365) the drag operation "steals" the expression from days leaving it with "days set value to age".  Seems like a definite violation of the "Principle of Least Surprise".

Hope this helps any of you that are using the same textbook and/or have run into a similar problem.

Bob Durtschi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20120504/b295ac6e/attachment.html 


More information about the alice-teachers mailing list