Results: finished teaching one Dylan course 
Author Message
 Results: finished teaching one Dylan course

"A New Approach to Object Oriented Programming" course finished May 10,
2000 at the Northern {*filter*}ia Community College, U.S.A. with excellent
reviews from the students.

The students (with the exception of a senior citizen auditing the
course) were professional programmers (mostly C/C++ programmers, but
one Smalltalk one).  Their primary goals were 1) to learn more about
object oriented programming in general, 2) to learn about the
functional programming style, and 3) to learn about multimethods.

Over 5 sessions of 4 hours each, the students learned: the basics of
Dylan syntax; using, then creating, objects; creating generic functions
and multimethods; and the basics of macros (functional, statement, and
defining).  In the final session, each student presented a final
project.  They were: a symbolic equation manipulator, Karel++
(the "smart" robot), an expert system that determined/inferred {*filter*}
type based on parent or child types, and the card game "War".  I was
particularly pleased at how quickly the students grasped the
fundamentals of the language, as demonstrated by the advanced coding
techniques used to complete their projects.

I will teach this course again July 20, 2000 under the
title:  "Practical Object Oriented Programming".  See
http://www.*-*-*.com/
courses I offer.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 10 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course

Quote:

>"A New Approach to Object Oriented Programming" course finished May 10,
>2000 at the Northern {*filter*}ia Community College, U.S.A. with excellent
>reviews from the students.

>The students (with the exception of a senior citizen auditing the
>course) were professional programmers (mostly C/C++ programmers, but
>one Smalltalk one).  Their primary goals were 1) to learn more about
>object oriented programming in general, 2) to learn about the
>functional programming style, and 3) to learn about multimethods.

So what was their reaction to Dylan?  Presumably these were
people motivated to try something new and different?  Is there
anything you learned that might persuade less motivated people
to rethink their ideas about O-O programming?


Sun, 10 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course

Quote:


> >"A New Approach to Object Oriented Programming" course finished May 10,
> >2000 at the Northern {*filter*}ia Community College, U.S.A. with excellent
> >reviews from the students.
> >...

> So what was their reaction to Dylan?  Presumably these were
> people motivated to try something new and different?  Is there
> anything you learned that might persuade less motivated people
> to rethink their ideas about O-O programming?

And while we're asking questions, is there any possibility of seeing the
results of their final projects?  I'd be interested to see what good and
bad bits of Dylan design and style they came up with (bearing in mind the
goals of your course, e.g., functional programming), what they found easy
and hard to understand, any language gotchas they hit etc.  I realise you
and/or they might want to keep these copyright or whatever but I thought I
might as well ask :-)

Hugh



Sun, 10 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course
Quote:
And dauclair writes:

 -
 - I was particularly pleased at how quickly the students grasped the
 - fundamentals of the language, as demonstrated by the advanced coding
 - techniques used to complete their projects.

What were the major stumbling blocks, or minor if there weren't any
major ones?  What techniques proved the most popular / accessible?
Where there any missing you hoped to see?

Does anyone have experience with less experienced programmers?  C++
hackers already know how to battle with a complex language...

Jason



Sun, 10 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course


Quote:
> So what was their reaction to Dylan?

Actually, more positive than I had hoped.  The syntax was familiar to
the Algol types, and the Smalltalk guy was at first puzzled then
pleased about covariance (he didn't like how classes were structured to
make
all members "public", as it were, but then saw the point when we got to
multimethods)

Quote:
> Presumably these were
> people motivated to try something new and different?

Yes.

Quote:
> Is there
> anything you learned that might persuade less motivated people
> to rethink their ideas about O-O programming?

Yes.  Amazing results.  Talk doesn't seem to do anything in my case.
However, when I develop and deliver a system in two weeks (that, by
their
estimate, would have required two months) using a dynamic language,
they stop, look, listen and want to learn more, instead of pontificate
the same old dogma.

It's a risk you must face if you want to change things or if you want
people to listen to you.  I risked my job, because the PM said:  "Java
for the GUI, C++ for everything else, no exceptions."  I chose to
ignore that order because I knew, as you do, that there's a better way
to build rapidly evolving systems.  I was vindicated (the PM told me to
continue development my way and plunked down $2500 for the IDE and add-
ons.  Results, like money, talk), but I could have just as easily been
fired.

When people (managers, bosses, coworkers) notice you're six-times more
productive than the average software engineer, month in and month out,
a few things will happen: 1) you'll be assigned more work and tougher
(impossible for others) jobs, 2) you'll become the subject matter
expert/task lead/responsible authority on vital parts of your company's
system, 3) people will want you to solve their code/design problems and
to teach them these "new" techniques.

And so you get to become a Dynamic/Functional/Dylan Evangelist at 3).

Sincerely,
Douglas M. Auclair

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 20 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course
In article <Pine.GSO.3.96.1000524152611.22645D-


Quote:
> And while we're asking questions, is there any possibility of seeing
the
> results of their final projects?

Sorry, Hugh, I received the source code from the students over my
promise of not sharing it with others (Anti-GNU license?).  I can
understand their wish:  besides Go, I find code to be one of the most
revealing sources of one's personal style.

Quote:
> I'd be interested to see what good and
> bad bits of Dylan design and style they came up with (bearing in mind
the
> goals of your course, e.g., functional programming), [snip] but I
thought I
> might as well ask :-)

No harm in asking (-;

Stroustrup stated it well when he said:  learning a language's syntax
takes 6 days, beginning to learn its style takes 6 months.  So, the C
programmer who wrote 500-line procedures with 5-deep nested if-blocks
(no exaggeration) wrote Dylan code with big functions and nested if
blocks.  The C++ programmer who designed flat class hierarchies and
used attributes to describe types (the abstract base class usually had
boolean attributes which each derived class switched on) designed Dylan
classes the same way.  The programmer who built procedures for their
side effects only (returning a boolean success result)  (... you know
what I mean:  add(a,b,c) would return #t and modifies the variable c in
place to be a + b (notice the lack of a helpful keyword)), did the same
non-functional programming style in Dylan.

What pleased me very much was how naturally these self-same students
picked up and used multimethods.  And, even though their styles did not
become picture-perfect functional, they completed their final projects
... tasks that, I believe, they couldn't do using their familiar Algol-
family language (not, of course, because it's impossible to do in those
languages, but Dylan makes some "hard" things easier, and allows one to
think through a problem differently (especially since FD comes with the
interactor so one may test as one builds)).  What an amazing confidence-
builder:  making something work in Dylan that you know you couldn't do
in (e.g.) C++!

What also pleased me is their positive response to Dylan
(evangelization through education mission advanced), and that, now that
they've been exposed to functional programming, they have that glimmer
that tells them when their well-practiced procedural methodology makes-
things-hard/lets-them-down, that functional stuff that was weird was
terse and worked.  Seed planted.  Maybe, just maybe, they'll try the
functional programming methodology.  Certainly, they'll be more
receptive to the functional option as managers of software projects.

Sincerely,
Douglas M. Auclair

P.S.  Am I an optimist?  Nah, I'm an EXUBERANT optimist!

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 20 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course


Quote:
> What were the major stumbling blocks, or minor if there weren't any
> major ones?

Theory.  I think the students had difficulty grasping the
concepts/utility of covariance ("freeing the functions", "exposing" the
attributes, "subtyping" verses "subclassing", "specialization" verse
"substitution") at the theoretical level.  When we got to exercises,
however, they picked up multimethods quite naturally.

Quote:
> What techniques proved the most popular / accessible?

Since everyone knew OOP to some degree, multimethods drew the most
interest.  I think the first-order functions (e.g. r/curry, map, etc)
blew most of them out of the water.

Quote:
> Where there any missing you hoped to see?

Personally, I wish we had more time to go over macros.  I covered them
in the last class as the students were finishing up their final
projects.

Quote:

> Does anyone have experience with less experienced programmers?  C++
> hackers already know how to battle with a complex language...

In most my classes that I teach, I often get a student who is very much
less experienced than the rest.  My special joy, and theirs, is, if
they hang on and work at it, they become proficient, sometimes more
proficient than other students.  It's tougher to teach a class with an
obviously overwhelmed student, but the rewards of their persistence
make teaching worthwhile.

In this Dylan class, I had a senior citizen who was in that situation.
He even offered (off-line) to drop the course, but I encouraged him to
continue, and we both were happier for it.  He learned some OOP, and I
got e{*filter*}d about being 70 years old and learning a crazy, new thing
because it's there and because I like to learn and because I still can
be a contributing, productive member of society and because even though
I'm physically old doesn't mean a thing about my attitude and outlook.

Another example:  in a course I'm currently teaching, Web Programming
with Perl,  I've a student who, in the first session, didn't even know
how to open the MS-DOS prompt (much less write a script), but now is
writing her own Perl scripts, understanding the concepts I'm teaching,
and correcting some of her scripting mistakes.

Yes, teaching the "less experienced" is hard, but can you fix a value
on the result?  I, happily, cannot.

Sincerely,
Douglas M. Auclair

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 20 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course
 -
 - > Does anyone have experience with less experienced programmers?  C++
 - > hackers already know how to battle with a complex language...
 -
 - In most my classes that I teach, I often get a student who is very much
 - less experienced than the rest.  

I agree completely.  My point was more towards the differences between
learning Dylan as an additional language v. learning it as a first (or
early) language.  I've found people have much different issues depending
on what baggage they already have.  For someone else's cute example, see
the wonderful Perl-for-COBOLers story under www.perl.com...

The baggage loads I'd expect from semi-seasoned C++ programmers ares 1)
don't trust the compiler, and 2) objects are packages of stuff (contain
methods, too).  I'm fishing for examples that the Dylan / CLOS-style
object systems are still accessible to those people.  I'm also fishing
for any actual evidence that they're more accessible to beginners.

Jason



Fri, 22 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course

Quote:

>  -
>  - > Does anyone have experience with less experienced programmers?  C++
>  - > hackers already know how to battle with a complex language...
>  - ...
> ...
> The baggage loads I'd expect from semi-seasoned C++ programmers ares 1)
> don't trust the compiler, and 2) objects are packages of stuff (contain
> methods, too).  I'm fishing for examples that the Dylan / CLOS-style
> object systems are still accessible to those people.  ...

While brushing up my C++ recently, I realised that C++ actually does have
"generic functions" in one particular limited case: overloaded global
operator methods, like operator+.  In fact, you can even reproduce Dylan's
"ambiguous method" problem by

  - defining a class C and subclass S
  - writing operator+ methods for (C, S) and (S, C)
  - calling operator+ on instances (sOne, sTwo) of S

MS VC++ catches this error at compile time, as you might expect from C++.

Now, given that C++ has unary, binary and ternary (?:) operators, it's
maybe not such a big step to "n-ary".  The tricky bit would be explaining
to them what "next-method()" does in this context (and why they'd want it
in general, I suppose!)

Quote:
> I'm also fishing for any actual evidence that they're more accessible to
> beginners.

That I'm not sure of.

Hugh



Sat, 23 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course

Quote:

>While brushing up my C++ recently, I realised that C++ actually does have
>"generic functions" in one particular limited case: overloaded global
>operator methods, like operator+.  In fact, you can even reproduce Dylan's
>"ambiguous method" problem by

Overloading in C++ works not only with (a hand-picked subset of) built-in
operators, but also with user-defined functions in general.
But this kind of overloading lacks the full power of generic functions,
because method selection is done at compile time, based on the static
(-ally inferrable) type of the arguments, not by the dynamic type of the
objects. Virtual methods allow dynamic dispatch on the single and arbitrary
receiver object.

The only area where C++ really shines are templates, since the template
selection rules contain type based lookup and incorporate a prolog-like
sublanguage that can be used for metaprogramming.

        Gabor



Sat, 23 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course

 GG> Overloading in C++ works not only with (a hand-picked subset of) built-in
 GG> operators, but also with user-defined functions in general.
 GG> But this kind of overloading lacks the full power of generic functions,
 GG> because method selection is done at compile time, based on the static
 GG> (-ally inferrable) type of the arguments, not by the dynamic type of the
 GG> objects. Virtual methods allow dynamic dispatch on the single and arbitrary
 GG> receiver object.

This is also the big problem with overloading in Java.  Overloading
gives the "feel" of dispatch by argument type, but it is misleading at
best.

As an example, consider the following example in Java:

   // file A.java:
   class A extends Object {
   }
   // file B.java:
   class B extends A {
   }
   // file Problem1.java:
   class Problem1 extends Object {
       // A is a subclass of Object,
       // B is a subclass of A.
       public static String foo(A x) {
           return bar(x);
       }
       public static String bar(A anA) {
           return "bar on A";
       }
       public static String bar(B aB) {
           return "bar on B";
       }
       public static void main (String[] args) {
           B aB = new B();
           String s = foo(aB);
           System.out.println(s);
       }
   }

What should "javac *.java ; java Problem1" print?
It prints "bar on A", even though bar is called with a B object.

A "real" multimethod dispatch system would invoke the bar method on
B.
--

Sullivan  http://www.ai.mit.edu/~gregs/



Sat, 23 Nov 2002 03:00:00 GMT  
 Results: finished teaching one Dylan course
Quote:
And Gabor Greif writes:

 -
 - The only area where C++ really shines are templates, since the template
 - selection rules contain type based lookup and incorporate a prolog-like
 - sublanguage that can be used for metaprogramming.

A month or so of debugging code that uses these techniques will
cure you of any admiration.  They are evil.

This use of C++ templates is just another pseudo-macro system,
although it is wrapped in fair syntactic sugar for its intended
use.  I admit that resolving based of known, compile-time types
is interesting, but I prefer that to be hidden in a compiler for
a dynamically typed language...

I know more of Scheme macros than of Dylan macros, so this may
be trivial:  Can the Dylan macro system access any type
information?  In other words, can a macro expand different ways
depending on how much type information is known during compilation?

Jason



Mon, 25 Nov 2002 03:00:00 GMT  
 
 [ 33 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. Dylan course taught April at NVCC

2. Dylan course taught Spring 2000 at NVCC

3. See one, do one, teach one...

4. One proc does not wait until one another finished

5. Only print report after first one finished

6. Using Smalltalk to teach intro cs courses

7. Course taught from OOCS

8. Visual Basic course taught over the Internet

9. Teaching an Object-Oriented Programming Course - Need Your Help

10. ***Verilog,VHDL and Synthesis courses taught by author of Verilog book*******

11. ***Verilog,VHDL and Synthesis courses taught by author of Verilog book*******

12. Who teaches ADA courses?

 

 
Powered by phpBB® Forum Software