[Edu-sig] Design patterns

Kirby Urner urnerk at qwest.net
Mon Aug 22 19:08:42 CEST 2005


 
> I guess.
> 
> Though I can't say I find there to be much consensus out there about what
> language features truly make for robust software development from group or
> community efforts.  

There's a long history of coders seeking consensus, but not arriving at any
set in stone answers (no carved tablets at the Smithsonian), in part because
the backdrop is always shifting, in terms of languages and technologies.  

The design patterns movement is the latest chapter in the series, drawing
inspiration from that 'pattern language' book beloved by the architects, and
followed by a big splash by the Gang of Four (an allusion to recent Chinese
political history).  O'Reilly's 'Head First Design Patterns' is one of the
most pedagogically sophisticated in this tradition to date (I'm still
somewhat awed by it, though I've heard others express a wish for still
greater content density):  http://www.oreilly.com/catalog/hfdesignpat/ 

We had the structured programming revolution, which tossed out the GOTOs,
and the object oriented revolution.  Under the hood, we've been moving to
virtual machine platforms with their own byte code languages.  This paradigm
has taken over at Microsoft and places (i.e. .NET).  Python is one of these
VM languages, as are Java and C# (the latter being system languages, less
agile, yet very necessary, as implementation languages for Python itself
among other things).

> Python itself can be thought of as a robust community
> effort - in C, which itself probably pre-dates/ignores much of the lessons
> of what is necessary for such effort. Java seems obsessed with these kinds
> of concerns - which is why I do in fact find coding in it as a solo as a
> kind of foolishness.

And now we have IronPython in C#.

C is like clay -- it can be anything you want it to be if you're good at it,
which Guido and friends are (I'm not -- I enter the picture as an xBase
coder, working up the dBase II, III, IV, FoxPro fish ladder (we've always
had an interactive 'dot prompt,' which is why Python's >>> seems so natural
to us (there're other FoxPro geeks out there, bending a Python framework
into a familiar shape (named Dabo), as I learned at Pycon in DC last March
[1]))).  

The object orientation was always there in Python, but user-defined classes
were originally 2nd class citizens.  Getting them to be top level, unifying
types and classes, has been a long haul saga within the Python community.
I'm still a bit hazy myself on how to subclass some of the primitive types.
Where do you store the value?  I appreciated getting a history lesson on
Python's origins and early evolution from Guido himself in Sweden, where he
talked to a packed upper floor room full of mostly newbies (EuroPython had a
friendly newbie track).

> OTOH, I find code readability absolutely satisfying, even without an
> expectation that anyone else will in fact be reading it.
> 
> Whatever.
> 
> Art

I'm glad to hear it, as I do expect PyGeo code will be eyeballed by many
more newbies as time goes on, ready to get their feet wet as strangers in a
strange land.  Your coding style will be an early influence on these little
penguins.

One of the challenges I had @ OSCON was how to talk about Elastic Interval
Geometry (EIG) as inspired by Kenneth Snelson and others, without being off
topic.  Because the best open source EIG apps are written in Java (Springie
and Fluidiom), and the best closed source offering (Alan's SpringDance) is
in Delphi.  My solution:  write the presentation manager itself in Python,
such that at any given moment, even if the slides were showing Java
creations, the screen itself would be Python + Pygame driven (I also went
out over the Internet to demo the Java applets live, but only for a few
minutes).

This strategy worked well IMO (plus I got positive feedback from people in
the audience who came up to me during the rest of the conference).  My code,
though somewhat quirky (look at the weird way I pass parameters -- inside a
parameters object), isn't especially crash prone, does what it's supposed to
do.[2]  I too am an influence, and fortunately just one of many (my stuff
should be part of a balanced diet).

Kirby

[1] http://mybizmo.blogspot.com/2005/03/pycon-2005.html

[2] http://www.4dsolutions.net/ocn/oscon2005.html





More information about the Edu-sig mailing list