comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Please Help.
Date: 1997/09/12
Date: 1997-09-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.874117393@merv> (raw)
In-Reply-To: 5vaude$q20$1@goanna.cs.rmit.edu.au


Tristan says

(by the way, please follow newsgroup conventions and keep your line lengths
under 80 characters, your message had excessively long lines, which will 
cause many people trouble reading your messages)

<<Firstly, I would say that variable length string handling is something
that all students should become accustomed to using the basic string
type which teaches t he concepts of how a string is stored in memory
and basic techniques for getting around these problems.  This is how
I was taught - it wasn't until I had been using these techniques for
1/2 a year that the concept of Unbounded_Strings was introduced to me.
>>

That's not unreasonable, but to me it misses the main objective in a
beginning class on programming which is to teach program construction
techniques, logical design techniques, and in particular abstraction.
It is NOT about teaching 101 neat gizmos that you can use in w4riting
neat programs. Indeed neat gizmos are basically a distraction to the
much harder task at hand of learning how to program.

<<I believe that this is not too "early" since it presents a cleaner way
of handling strings, but the student still has the knowledge of how to
handle normal strings.
>>

One thing to keep in mind if you are a student in a beginning course which
uses programming language X is that the details of what language X can
or cannot do are essentially completely irrelevant, and the skills you
learn which are X-language specific are the lest important skills you
will learn in the course if it is taught right.

<<Secondly, is it really necessary for the student to understand all
the inner workings of the Unbounded_String before they use it in
their code?  Surely they can safely use them and familiarise
themselves without doing any harm to the development of their
programming technique.
>>

As I mentioned in my earlier note, it is indeed valuable to show students
how they can use an abstraction without understanding the details of 
the implementation, but I find it more instructive to use for this purpose
abstractions where we *can* later look at the implementation and see how
it relates to the specification. So I would not choose unbounded strings
for this purpose, but rather bounded strings (as soon as I had introduced
generics, which I do fairly early on, since genericity is such a critical
aspect of abstraction. Or, if you did not want to introduce generics that
early, you could use Strings.Fixed as the example abstraction.

<<I found handling strings a pain at first, but quickly learnt what was
involved. But now I would rather work with Unbounded_Strings for many
applications because they provide a solution to some of the shortcomings
of String.
>>

Fine, this is perfectly reasonable, but it is about specific Ada features,
and is thus on the general scale of what one tries to teach, not particularly
important.

I cannot over-emphasize the importance of teaching early on the principles
of abstraction, separation of spec and implementation, and incremental
design. These are not easy subjects to teach (whereas teaching technical
gizmos in any language is by comparison a relatively easy task). You can
turn this around by the way, it is easy to learn technical gizmos, it is
MUCH harder to learn what abstraction is about.





  parent reply	other threads:[~1997-09-12  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-09  0:00 Please Help Ken
1997-09-09  0:00 ` Dale Stanbrough
1997-09-11  0:00   ` Robert Dewar
1997-09-12  0:00     ` Tristan Ludowyk
1997-09-12  0:00       ` Dale Stanbrough
1997-09-12  0:00         ` Stephen Leake
1997-09-13  0:00           ` Robert Dewar
1997-09-15  0:00             ` Stephen Leake
1997-09-15  0:00               ` Dale Stanbrough
1997-09-16  0:00               ` Robert Dewar
1997-09-17  0:00                 ` Stephen Leake
1997-09-18  0:00                   ` Robert Dewar
1997-09-19  0:00                     ` Stephen Leake
1997-09-19  0:00                       ` Robert S. White
1997-09-20  0:00                       ` Robert Dewar
1997-09-12  0:00       ` Robert Dewar [this message]
1997-09-13  0:00         ` Matthew Heaney
1997-09-13  0:00           ` Dale Stanbrough
1997-09-15  0:00     ` Richard A. O'Keefe
1997-09-16  0:00       ` Robert Dewar
1997-09-09  0:00 ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2001-10-25  6:55 please help Phosphorus
2001-10-25  8:22 ` Preben Randhol
2001-10-25 12:35 ` Marc A. Criley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox