[plt-scheme] cutting out of Interactions window

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Wed Oct 26 11:20:30 EDT 2005

Matthias Felleisen wrote:

>> There is a textual representation of the number right there in the
>>  Interactions window. I can see why images become snips, but not
>> why this has to happen for numbers. Is there a purpose to a number
>> snip cut out of the Interactions window? What would one do with it
>> that would work, unlike pasting it into the Definitions window?
>> --PR
> Fractions. They are snips. -- Matthias

Yes, and you can tell, as with images, because they don't look like
normal text in the Interactions window. (Though I don't see the harm in
cutting a fraction and having it pasted as 5/6 instead of 5 atop 6 with
a horizontal bar beneath.) You can't tell that a computed number is a
snip, except by the colour, which is pretty subtle.

> I strongly recommend adding problems on homeworks and tests where the
> students construct examples/tests _only_.

We ran into an interesting problem in designing the midterm (which is to 
be given Monday, so I can't talk about specifics); the idea that your 
tests must exercise all paths through the code has to be spelled out 
more clearly in the case of short-cutting special forms like "and" and 
"or" (that is, tests should exercise all early exits), and it's not 
clear what to do with "not smooth" functions like "max". Ideally data 
analysis identifies situations which need to be tested, but HtDP really 
talks about one-dimensional cases (they're not good enough with 
inequalities to ask for more than that). We asked for middle-of-3 on an 
assignment, expecting them to use nested conds, and one student 
submitted (- (+ x y z) (min x y z) (max x y z)). (Yes, this is a bad 
idea with inexact numbers, but it is clever.) I know that trying all six 
total orders is a good test suite, but can I expect the students to 
figure that out? --PR

Posted on the users mailing list.