logo       

Re: VERY URGENT, CUT AND FINDALL/3: msg#01603

Subject: Re: VERY URGENT, CUT AND FINDALL/3
Anthony Borla wrote about the "using finall/3 to compute
symmetric set difference" thread:

        Perhaps because his instructor asked him to use it ?
        
I was too polite to suggest that, but yes, it is a possible
answer.

An instructor who would tell someone at this level to do that
should be fired.

>From a cannon.

        As you've quite clearly and comprehensively pointed out, the use
        of findall/3 is a most inefficient means of finding the
        "symmetric difference of two sets".

Exactly.  Yet GETTING PEOPLE TO DO THINGS THIS WAY AMOUNTS TO TEACHING
THEM THAT THIS IS THE WAY TO DO IT!

When I was working on my Masters, one of my fellow students (and I don't
suppose you're reading this, Laurence Chiu, but if you are, Merry
Christmas, long time no see, and where are you these days?) commented to
me that he was having a hard time learning statistics.  It turned out that
the heart of his difficulty was this:

    A textbook writer wants to explain technique T.
    S/he describes a problem P,
    and shows how technique T can be applied to P.

That is, the teacher is addressing the question "given that I know about
technique T, what is a simple problem I can illustrate it on?"

BUT THE STUDENT HAS A DIFFERENT QUESTION.

Laurence would look at the example in the textbook and say

    I understood how to work technique T.
    What I DON'T understand is WHEN to use technique T.
    This example shows me an appropriate use of technique T.
    Therefore there should be something about problem P
    that makes technique T the right technique to use.
    But I can't figure that out.

When I looked in detail (as part of my PhD work; this part never actually
got written up), the reason that my friend could not figure out from the
examples why technique T was the right thing to use on problem P was
that IT USUALLY WASN'T.

That is, problem P in the textbook was almost always *better* solved by
some other technique T'.

Now Laurence is a pretty bright guy.  He got a job before I did; he sold
a useful program before I did; he understood a lot of decision theory that
I still haven't got my head around.  It wasn't any lack of ability to
understand statistical concepts that held him back.  It was the fact that
he mistakenly believed the textbook writers were trying to show him ***GOOD***
examples of using techniques, instead of the **OVERSIMPLIFIED** examples
they were actually giving him.

This example of using findall/3 to compute symmetric differences looks
like just such a case of a teacher hacking up a problem P to demonstrate
technique T on despite the fact that NO SANE PROGRAMMER WOULD EVER USE
TECHNIQUE T TO SOLVE PROBLEM P.

        However, the posing of this problem does provide a simple
        introduction to the use of findall/3.

>From the teacher's perspective, maybe.
Laurence is a living warning that what the *STUDENT* sees is
"here is how to compute symmetric difference".

The interesting thing here is that computing symmetric difference
using findall/3 is, for me at least, significantly HARDER than doing
it without.  The lesson that a bright student will learn is that
findall/3 just makes things harder.  This does not contribute to
a deeper understanding.

        Having successfully solved such a problem the way is then paved
        for more complex applications, as well as a deeper
        understanding, of findall/3 [and its brethren].

Ahem.  Aren't we forgetting that at least one student *didn't*
successfully solve the problem?

For the sake of argument, let us accept that the way *is* "paved"
(rather than, as I believe, barricaded) "for more complex applications,
as well as a deeper understanding".  The tragedy is that you could
get all of that with *better* examples where using findall/3 actually
makes SENSE.

The basic job of findall/3 is to convert a "temporal" collection (a
set that you obtain by backtracking) into a "spatial" collection (a
list that you have all at the same time); it is particularly valuable
for letting you combine information from different paths through the
search space.

This example DOES NOT SHOW THAT ASPECT AT ALL.  How does that help
someone get a deeper understanding?  Or any understanding at all?

        To my mind this is another example of 'bad code' having its uses
        [at least in a teaching context].
        
Based on what this kind of "teaching" did to my friend Laurence,
it is to my mind another example of the kind of teaching best dealt
with by the public hangman (or if you are in Utah, a firing squad).

OK, OK, I'm actually a consistently pro-life person.  I don't *really*
advocate the death penalty for bad teaching.  (I would rightly be the
first to suffer the consequences!)  But that kind of thing genuinely
does make me very angry.

So sorry, this is just another "teaching bad code is bad teaching" case.




<Prev in Thread] Current Thread [Next in Thread>