[Edu-sig] Game of Life in Sketchup; unittesting and TDD (pedagogy)

Kirby Urner kurner at oreillyschool.com
Tue May 10 01:11:13 CEST 2011


Hey Gregor, I'm being somewhat hopelessly abstruse (obtuse?) in this
philosophy list.

You'll see your name going by, in connection with that Wittgenstein sister's
house in Vienna:

http://groups.yahoo.com/group/WittrsAMR/message/4360?var=0&l=1

BBC spent some time on it (her house) in some erudite TV such as USAers tend
to not make, only import.

Fie on those dumbed down university Youtube stations, or maybe I'm missing
the best links?

In other news, we've got Conway's Game of Life stacking up in Google
SketchUp, per this earlier thread.

http://mail.python.org/pipermail/edu-sig/2011-April/010280.html

http://www.flickr.com/photos/17157315@N00/5704569299/sizes/l/in/set-72157625646071793/

(feel free to join us on Facebook, note my invite to point to a favorite
Game of Life implementation, using Python one would expect, if you're coming
from edu-sig).

Nathan's was likely done in Ruby though, though he uses Python quite a lot.
 I'll check with him and report back.

Wait... this just in:

"""
Well that was quick!

I considered using Python, but the API didn't look mature enough, and It
turned out Ruby and Python have a lot in common.
-- 
Nathan H. Nifong
http://nathannifong.com
"""

I'm finding unittest as a centerpiece of a Python curriculum is quite an
albatross in some respects, simply because the coding assignments are still
small so the ratio of testing code to code being tested is rather too high.

That's neither an argument against test driven development (TDD), nor
against unittest in a company context, where back office workbenches enforce
company standards.

But when you're first donning the hat of "developer", you want that quick
turnaround associated with running your module top level.  A little demo at
the bottom gets the focus:

def _test( ):
   """ << demo of what this module might do for you >> """

if __name__ == "__main__":
    _test( )

is what we want to see in student projects, meaning what they release to the
world comes with a kind of built in testing that shows off native
functionality.

It's like doctest but different in that we're not showing interactions,
though we could be.

We're just giving the module a workout, making it do stupid pet tricks.
 _test contains tests like the developer used to make the code pass, keeping
some proof in the pudding.

_test( ) is what's portable, comes with the module as "batteries included".


Behind the scenes, back at Mother Ship, you have your more ambitious testing
framework.  So it's not either/or.

Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20110509/4681baac/attachment.html>


More information about the Edu-sig mailing list