On Sat, 18 Aug 2001, Derek Peschel wrote:
  Sad but occasionally true.  I met a student in an
intro CS course who
 obviously didn't understand the idea of imperative programming (what happens
 to variables as the program progresses, the fact _that_ the program
 progresses, what WHILE loops do, etc.). 
THAT is why beginners should start off with a "trivial" language and
"trivial" assignments before they get into the real body of programming.
BASIC is excellent for getting those beginning concepts.  Then, as soon as
those concepts are down, they should switch to a "real" language :-)
   I once hired
one of their graduates.  I fired him a few weeks later.  He
 was unable to write a trivial program to print 3-up mailing labels from a
 name/address data file, because he couldn't figure out any way to do 3-up
 labels without knowing how to make the printer return to the top of the
 page! 
 I'm sure I could solve the problem pretty quickly.  On the other hand, I
 would put that task (or ones like it, but more elaborate) into the class
 of "algorithms that look easy, but require more analysis and more weird
 special cases than you would think at first".   
 
It was VERY simple and VERY "real world":  "Here's a file of some names
and addresses, here's some stuffed envelopes, here's some stamps, here's
some sheets of 3-up labels, the post office is 3 blocks east.  Try to get
them out before lunch, and don't wast supplies, they're expensive."
  More elaborate tasks might
 include:
        - Make the names run alphabetically down the first column
          of a page, then down the second, then down the third,
          then continue with the next page. 
      "WITHOUT manipulating the
printer feed!"
          - Make the names run alphabetically down the
first columns
          of all pages, then the second, then the third.
        - (I did this recently in AWK) Change a file of the form
                jmp a1
                call a2
                jmp a2
                call a3
          into one of the form
                a1      jmp
                a2      call, jmp
                a3      call
        - If you really generalize things you get report generators
          or page-layout programs.  I suspect those require a lot of
          care to get right.
 Maybe I'm the only one with this view.  Maybe I've gotten lazy after
 graduating.  Maybe the current programming languages make this sort of thing
 harder than it ought to be.  But maybe not. :) 
Thank you.  Those would do nicely as quick assignments in my Data
Structures and algorithms course, or near the end of my C class.  I
already have them do some simple stuff like convert "Firstname Middle
Lastname" into "Lastname comma First", and then make them try to expand
their programs to deal with exceptions, such as "Martin Van Buren"
--
Grumpy Ol' Fred        cisin(a)xenosoft.com