[plt-scheme] cutting and pasting snips

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Oct 18 08:41:26 EDT 2006

On Oct 18, 2006, at 7:07 AM, Prabhakar Ragde wrote:

> My first assignment also uses images (and Kathi's fabric  
> teachpack). But it's still not necessary to cut them out of the  
> Interactions window and paste them into Definitions, and in any  
> case I am not talking about images. I am talking about numerical  
> results. I ask them to do something like compute taxes in a multi- 
> bracket system, and they create their examples and tests by running  
> their code, getting numbers in Definitions, cutting them out, and  
> pasting them into an example-comment or a Boolean test expression.  
> Except taxes have decimal places, typically, and what they paste is  
> not a piece of simple text, but a snip. What is the utility of  
> permitting a student to cut a snip representing a rational, as  
> opposed to a textual representation of a number, out of the  
> Interactions window?


Many teachers have asked for this functionality, specifically, the  
functionality of rational fractions displayed in the conventional  
manner. If you stop to think about it, this is even useful to  
professional programmers that work in fields using this notation.  
(The US stock market switched a few years back, but surprisingly you  
still find rational fractions here and there.)

They come as snips and copying them copies snips right now. I can  
see, however, that one would want to convert such snips to suitable  
text representations when they are pasted, and that would solve half  
your problem. Of course, it is the half that you don't care about. I  
bet you know that they can do this already with a right-click on the  
mouse. They are just too lazy.

Which brings me to my last bullet on this topic: there is NO  
mechanical tool that will enforce what you want. Lazy students will  
always be tempted to use the output as the expected result and voilà,  
get perfect tests. What to do: present them with problems, time and  
again, that demand examples first to get it right. Introduce a  
grading policy that says if a function definition is "obviously"  
wrong but the tests pass, they get 0 credit. And scale up big, fast.  
I am having them implement a "war of the worlds" program after six  
weeks. They program to a GUI api (world.ss) and if they don't test,  
they suffer. (I also make fun of them in class for suffering.  
"Naturally, you can ignore all of our advice. We know that if you do,  
you will suffer. But we enjoy it very much if you do suffer. The  
more, the merrier." They get so scared ... "-)

-- Matthias





Posted on the users mailing list.