[Edu-sig] More re Imagery

kirby urner kirby.urner at gmail.com
Sat Jun 16 22:46:29 CEST 2007


I liked how Jerritt Collord (collord.net) started our Adventures in
Open Source course for out three teen guinea pigs.  This was
a pilot staged in West Precinct, Hillsboro Police Department,
Saturday Academy providing the instructors (that'd be Jerritt
and myself). Summer of 2004.

He started with tcp/ip right off the bat.  Kind of the polices' worst
nightmare, in a way, to have someone who knows about packet
sniffing showing wannabe hackers how to sniff packets, how to
dissect these little capsules with payloads, looking for pathologies.

But that was the whole point: we're showing you the ropes, as
future pioneers, developers, and maintainers of the Internet, not
as future criminals.  You'll need the same skills.  You'll need to
build up your internal model of how it all works, making it rich
in detail, a readily extensible model should your job require
going even deeper into the internals of ethernet frames or
whatever. http://en.wikipedia.org/wiki/Ethernet

So like of course (!) you need to understand about tcp/ip, just
as police do (Heuston, exFBI and our liason in HPD, helped
run a computer forensics lab plus ran that speakers' program,
CRIME, at the Oregon Zoo).

This is where 'Warriors of the Net' comes in, a great little cartoon
modeling tcp/ip as an accessible visualization involving little trucks
in tubes.  This visualization likewise connects to container shipping
for more adult content, per one of those high quality analyst talks
@ OSCON (Nick Gall's): http://blogs.zdnet.com/BTL/?p=1675

So here's a logical flow I could see using in a standard public
school curriculum:

Begin:

Google Earth or similar service
-> lots of geography talk about lat/long, time zones etc.
-> lots of infrastructure talk including about container shipping
-> about the Internet (cartoons)
-> about tcp/ip (more cartoons)
-> moving to CP4E languages (e.g. Python) and xml-rpc i.e.
let's now interact with some web services (hands on, not just
talk)

Exhibit 1: A Perl version, for passing an address on the command line:

#!/usr/bin/perl

use XMLRPC::Lite;
use Data::Dumper;
use strict;
use warnings;

my $where = shift @ARGV
    or die "Usage: $0 \"111 Main St, Anytown, KS\"\n";

my $result = XMLRPC::Lite
  -> proxy( 'http://rpc.geocoder.us/service/xmlrpc' )
  -> geocode( $where )
  -> result;

print Dumper $result;

Exhibit 2:  And now in Python, just lazily interactively in IDLE for starters:

>>> from xmlrpclib import Server
>>> server = Server('http://rpc.geocoder.us/service/xmlrpc')
>>> result = server.geocode("1600 Pennsylvania Avenue, Washington, DC")
>>> result
[{'city': 'Washington', 'prefix': '', 'suffix': 'NW', 'zip': 20502,
'number': 1600, 'long': -77.037683999999999, 'state': 'DC', 'street':
'Pennsylvania', 'lat': 38.898747999999998, 'type': 'Ave'}]

or we might look at the actual XML that goes to the server:

>>> print xmlrpclib.dumps(("1600 Pennsylvania Avenue, Washington, DC",
), 'server.geocode')
<?xml version='1.0'?>
<methodCall>
<methodName>server.geocode</methodName>
<params>
<param>
<value><string>1600 Pennsylvania Avenue, Washington, DC</string></value>
</param>
</params>
</methodCall>

Kirby


More information about the Edu-sig mailing list