Tuesday, September 29, 2009

More Gardening

HPIM0672

The philosophical underpinnings of the garden remain important. Better the seeds be harvested directly from the local scene than obtained through the cash economy.

The game is to develop using biological methods having root access in ways money does not, unless converted from bracelets back to cows (a few bulls) per the Critical Path codec.

The dirt pile was developed with assistance from a borrowed pickup truck. Various flavors of compost will be mixed for raised beds. This is a process any family with a lawn might engage in, if seeking urban edibles. Which reminds me, we met at Back Space again. I got it all working on the Starling, with Mark giving me some invaluable pointers on how to operate it more successfully. He's a pretty brilliant guy I think. And yes, there's a plan to go with GeoDjango. I'm recruiting talent from PSU and such places.

We elected not to view Constant Gardener at the Boltons' last night, though I am eager to learn of Maureen's adventures in Kenya. I'd seen the movie, even read the book, had all this pending business to attend to, including around Quarterly Meeting.

Speaking of which, Glenn and I just met Lisa at the corner of 37th at Bagdad to discuss options. She was on a bicycle, whereas my party was walking Weird Sarah to Laurelhurst Park (a designated off-leash area in the neighborhood).

The Private Party at Duke's Landing was recorded live (about 3.5 hours) and sliced up into 109 separately entitled tracks for archiving and blogging. At least half of them are dialog. Some of the song takes are headed straight to the Myspace site whereas some of the more private stuff will go exclusively to event participants, at least at first (the most recent plan, as of this writing).

We're happy to have a mobile sound studio solution so that rough cut recordings get some air time. I'd like to add video at some point and find some R-rated TV slot on community access, or just burn straight to DVD. The various video products will then draw from this raw footage. Coffee Shops Network is already a client.

Lindsey is not playing covers so there are no issues around who controls the music at this point. Most cities have a Wild West of this kind, frequented by talent scouts, intrepid tourists. I've not spent much time in Nashville, yet imagine something similar. Savannah must not be that different either, given Lindsey's duck to water transition to the PDX music scene.

Glenn suggested I nudge Trevor to get Lindsey a slot at the upcoming Esozone conference. That's smart thinking, whether it happens or not.

Sunday, September 27, 2009

Architects of Control (movie review)

This comes from the equivalent of the horror shelf at the Laughing Horse co-op. Michael Tsarion does a stream of consciousness rant, eloquent yet annoyed at peoples' evident gullibility.

He pushes the conspiracy theorist envelope by bringing in a lot of interesting history and fringe characters, providing a kind of 101 introduction to Esozone type threads, ala Da Vinci Code and like that.

One gets the impression the mind controllers hold all the high cards ("resistance is futile..."), plus the production values are good, so this becomes one more mesmerizing piece of media in the hard to find category. The irony in controlling (checking the power of) other mind controllers is not lost on this audience. Spin doctors R us eh?

The scene where Clark Kent and Superman get into a knock down drag out fight in a junk yard... where was that from again? What are these movies we keep excerpting? I admit to being out of the loop on a lot of pop culture. "What's the difference between sorcery and magic?" is one of the questions, fair warning to the science-minded that we're talking to your irrational side in this film -- but about building up your rational powers as a counter, heightening your skepticism quotient. That's a positive community service in my book, so I'm hardly panning this film.

Michael reminds me of our own Alex Ansary, a kind of on-steroids version given all the help he's been getting from props and production. I recommend this film if only for the archival footage and the obscure historical allusions. This was only Program One in the series, after which I fell back into a passive state, the effect of the trigger words having worn off already.

Followup: when Maureen showed up next day, I offered to screen this to her United Methodists, maybe answer questions. But then it's not mine to show in public, could get in trouble with ASCAP or one of those. Also: the excerpts from other movies are clearly labeled i.e. I don't want to leave the misapprehension this isn't a scholarly work with the equivalent of video footnotes. Plenty of thinking went in to this rendition. I haven't seen Program Two yet (it's a four DVD set right?). Laughing Horse only has Program One.

Saturday, September 19, 2009

Equinox Retreat


:: fall equinox 2009 ::

Shomar is here, a favorite Wanderer. Dr. Nick is sauntering through. Dr. Tag is at the beach maybe?

I attended a neighborhood meeting of the Palestinian rights group recently, focused on Palestine's right to exist. There's an initiative at local schools to have students notice whenever Palestine is bleeped over as a "forbidden state" (one of a long list of banned and/or esoteric institutions).

We also discussed the two and no state solutions, the former being a neoliberal preference, the latter having to do with demoting nations more generally, treating them as tourist attractions ala EPCOT i.e. less as a part of Tomorrowland (the Spaceship Earth projection cite BuckyBall).

Linus Pauling House is nearby, so some of this thinking spills over (97214 is close knit).

The PSF has the following Diversity Statement, still in beta, thanks to a bunch of alpha geeks hacking:
The Python community is a global community. The Python Software Foundation and the broader community of which it is a part welcome and encourage participation by all. Our community is based on mutual respect, tolerance and encouragement, and we strive to help each other live up to these ideals. We would like our community to be more diverse, so we extend an especially warm welcome to everyone who will broaden it.
I was out until 3 AM last night with the Lindsey Walker Show, enjoying the scene at Local Lounge on MLK. We used the company car. I'm still a little retarded regarding set up and tear down, especially w/r to the Bose Tower. Her skills surpass mine w/r to SQL probably, too, though with the Django product Urban Edibles, we're one step removed from raw SQL, thanks to the data model. If she comes by the Pauling House, I'll steer her towards Steve's eggplant dish, pretty tasty.

Saturday, September 12, 2009

Beautiful Pizza

:: art by J. Shea ::

I went by Fine Grind today to show Joe the pictures I'd snapped of his artworks at Lizard Lounge. Tag and I checked it out a few days ago. This is mostly a retail outlet for clothing and accessories, but offers coffee and a couple workstations. Blending in some art gallery motifs works well in this ambiance.

My other work at FG was to set up a developer's workbench vis-a-vis VPython and document some of the steps on edu-sig. Those of you following my curriculum writing know that I put a lot of stress on the VPython add-on, which bridges Python to OpenGL in a manner friendly to ordinary mortals who just want a simple API for real time spatial renditions.

Over on Synergeo, I've been consolidating some of the gains we've made around the T, E and K modules and their respective rhombic triacontahedra of volumes 5, 5+ and 7.5 respectively. Of course these values are in tetravolumes, a feature of this Portland ethnomathematics I share through Coffee Shops Network, Esozone, Saturday Academy and other places. We're training a next generation of advertiser... designer.

The title of this post refers to the venue from which I'm posting. After a long day in service of my country, it's great to get some R&R listening to a favorite vocalist and friend who also happens to be a talented rock star. Life is good sometimes. The set is over now. Lindsey is having some well deserved beer and pizza with the newest fans -- all guys here tonight, with a mix of passers by checking us out through the window. She's talking solidarity with the soldiers, other policies (yes, I'm eavesdropping).

I've been working on this Starling / System76 since 8 PM, still have up to an hour of battery life. I'm so far pleased with this netbook, although it doesn't let me get away with being as ham handed as I'm used to.

Thursday, September 10, 2009

DjangoCon (Day 3)

Our keynote speaker this morning is Ted Leung from Sun Microsystems. He's giving us the 10,000 foot view wherein DjangoLand is but one domain among many, albeit a robust one (he likes our Pony, currently at the front of the room, enwrapped by you know who).

We're looking at some of the Erlang competitors, though not in much detail, such as Nitrogen and Webmachine. Then of course there's Lift, written in Scala, a JVM language, with brilliant support for Comet. Not everyone is using Python for everything, so true. Some are using Jython.

Kirby's aside: So WTF is Comet? Checking... OK, basically AJAX on steroids, doesn't stand for anything, means the server might be aggressive about updating its clients, doesn't lazily wait for http requests. More of a udp datagrams model. Think of a multi-user game environment (business lingo: multi-user collaboration tool) wherein every player needs frequent updates, even if only passively. Think of Twisted, already a basis for such global game playing.

Chris McAvoy, on cold meds, is talking about Django on Jython. Most attenders have flooded the "scaling your django applications" in the room next door, now that the ballroom has divided in half (I say ballroom somewhat sloppily, as there's no ball in here, let alone a hexapent version).

He's suggesting JRuby and JPython define an Enterprise-y web framework that's more agile than the usual Oracle, "portal", Websphere kind of stuff. "We're all ops people now" in the sense that writing the app is now the easy part. It's the Apache / mod_wsgi crap that's killing us. So how is Django on Jython an answer?

Pip django-jython to build WAR files, get the zxJDBC package for chatting with Postgres, SQLlite (MySQL still in the works -- ironic given Sun's position here). Sequence: use virtualenv, install pip, pip install Django 1.1, install patch django-jython. http://bit.ly/django-jython-fix for Django 1.1, delete settings$py.class if you're using 1.0 for some silly reason. Forget about models.ImageField -- you won't have PIL. If PIL moves to ctypes... doj.backends.zxjdbc.postgresql will be your database_engine in settings.py (for example). jython manage.py war is going to roll up your stuff for throwing over the wall to admins (for deployment).

Andy McKay is giving a fascinating talk about his trip to Kenya in support of health care workers, originally using Rapidsms, similar to Twitter on cell phones. Kenya has great cell phone coverage. He's learned a lot about malnourishment. "Robbed of vital nutrients as children they grow up stunted and sickly, weaklings in a land that still runs on manual labor." (NYT).

Andy helped wire Django in as the switchboard for sms messages in the field, forwarding to the clinic. An Eee PC running Ubuntu is the server. One of the bugs was in spomskyd, a Ruby daemon. pygsm has since replaced spomskyd ("Ruby rubbish").

Malaria was added to malnutrition, as another set of sms messages. He also branched out to Malawi. from rapidsms.message import Message gives you the sms messages. urls.py makes routing sms commands easy -- so what these aren't urls. A non-standard use case, woo hoo. Class based views to the rescue when Malawi wanted a different command set -- just subclass. Here's some code.

Erich Ocean: HTML5 is a technical spec, but culturally its more a Flash killer. The beefy JavaScript engines are making a big difference. Dynamic languages win again (sorry Java). SproutCore is the HTML5 application framework adopted by and now developed at Apple. It's open source, like WebKit and LLVM. Erich thinks WebKit is the future for the browser, thinks Django is well positioned on the server side. Webkit will run on Windows. HTML5 is moving faster than many think. You'll be able to sneak WebKit in the back door into IE6 even. This talk relates to the anticipated future of low latency push apps that keep updating the browser without waiting for client-side requests i.e. like Comet (see above). HTML5 web sockets...

Dr. Russell Keith-Magee: No! Bad Pony! A "pony" is shorthand for "desirable feature" in some ways. "Daddy, I want a pony" might be a typical developer's feature request to the Django core developers. The core developers, being protective of the project's aesthetics, as well as being busy, often have to say "No!"

Lightning talks: lots of good stuff, James K. Tauber made use of Steve Holden's input to welcome us to the wider Python community, giving some sense of what Python Software Foundation is doing in the world. He gave a second lightning talk about how to pronounce "Django" -- very technical, plus 30 seconds over, meaning the Pony was thrown (raised an exception).

Wednesday, September 09, 2009

GeoDjango

This talk helps me integrate many themes from these blogs. Our speaker, Adam Fast, is from Lawrence, Kansas, the Django HQS.

He's showing some really cool geodjango apps that he's worked on, including one with all the bird strike data coming from the nation's airports.

He uses PostGIS with Postgres. MySQL is really quite deficient in this area. django.contrib.gis and a custom test runner are needed. Set some POSTGIS stuff in settings.py. You'll have these different field types in models. You need objects = models.GeoManager(). You can start getting points on maps right in the custom Admin.

GeoPy is a great dependency for talking to the different map service back ends, e.g. Google's and Yahoo's. It's really easy to do polygon stuff, like with zip codes. His example uses 97214. Distance lookups are also easy.

So shouldn't Urban Edibles be a GeoDjango application? Maybe it is at this point. I've been out of that loop.

This is the kind of free stuff we need in Portland Public Schools. Yes, we'll need lots of scaffolding to get set up. A lot of that is already available in the form of tutorial code on the web. These geographic coordinate systems aren't going away and the resources are plentiful.

Advice re some of the gotchas: geometries are big, maybe use .defer(). You don't want huge data sets going over the wire with every page request. Xapian and SOLR might help with search down the road but for now searching isn't as straightfoward as it might be.

This stuff is really cool. Is anyone at PSU a GeoDjango expert? I went up after the talk to ask some questions about ramping up from inside IDLE at first, then moving to a dev server for maps 'n stuff. Adam thought that'd be highly doable. PyGeo by itself, without Django at all, would be a good place to start, for like the stuff we were doing at Winterhaven in 2006.

Clever tweet: jtauber RT @dartdog: it is about to be 09-09-09-09 must be a continuation of @jtauber 's plot at #Djangocon ....

Tuesday, September 08, 2009

More from DjangoCon

I joined Lincoln Loop guys for lunch. This is a well known Django shop based in Colorado, although the developers are spread out, including this one guy from Portugal (we discussed Portland's planned aspect, strong zoning, with a tightly focused CBD).

Every subculture has its "buzz word city" which I work to tune in (anthropologist hat). Here it's Fabric and Pinax, also pip and virtualEnv (both Ian Bicking projects) -- gotta know about 'em. Also Satchmo and Lightning Fast Shop.

These latter two on-line shopping frameworks are the kinds of free tools Stu Quimby was experimenting with, when coding Design Science Toys to do more business over the web.

My side of the conversation drifted into medical uses of SQL and ~SQL (not-SQL). I reiterated my view that legal medical records (LMRs) would go document-oriented non-SQL, because you want to stay schemeless in such an amorphous environment.

No one wants a table structure expected to handle every medical eventuality and/or course of treatment.

However, for outcomes research purposes, when comparing apples with apples, oranges with oranges, you'll want to harvest clinical research records (CRRs) from raw data, scrub it clean by masking true identities, to build these valuable clinical datasets of a more traditional schema-based nature, suitable for sharing among doctors and statisticians. Heads nodded around the table.

James Tauber's talk on Pinax replays the "gateway drug" meme. He's also a math geek I see (@jtauber).

Pinax core-dev how: there's a task tracker, wiki, pastebin, 'new' vs. 'accepted' workflow, 'fix needs review' tag, 'resolved' vs. closed' status. This infrastructure dovetails with discussions on Diversity@python.org re the Postgres core-dev process, versus Python's (Selena contributing).

github
is the repository for Pinax. #pinax-dev the IRC channel, #pinax the Twitter channel.

Andy McKay (@clearwind) is next up. "What the heck went wrong?" is his topic. Andy has been a strong player in the Plone community over the years, good seeing him again (we talked later in the lobby, mostly about conference organization issues). He's talking about debugging Django apps (how to).

First: use the dev server, set DEBUG = True. Use assert False and print statements as primitive debugging stubs. Remember to print the type as everything prints as a string. mod_wsgi will halt if you print. Fix: WSGIRestrictStdout Off.

Next level: logging. The logging module in the Standard Library is notoriously complex, e.g. (log.debug("blah blah")). Then comes pdb (import pdb; pdb.set_trace()). pdb is essential. The werkzeug debugger is also really cool.

Next: unit tests and Django debug toolbar. Continuous integration products are good for keeping costs down: TeamCity, Tinderbox...

Arecibo is a good example of a live error monitoring service.

RESTful Ponies by Mike Malone (@mjmalone), currently with Six Apart: Roy T. Fielding came up with REST in 1999, per his doctoral dissertation. It's an architecture, like Bauhaus, Baroque, or Functionalist. WWW, based on HTTP, conforms to REST. Representational State Transfer is also like a programming paradigm, like OO. RESTocity: uniform interface, statelessness.

A resource is something that can be named, like an object in Python. On the web, these are typically URIs. Terminology: a representation is a sequence of bytes on the wire, describing a resource. Hypermedia contain hyperlinks. Application state affects how a request is processed. This isn't the same as resource state.

RESTful web services should use HTTP 1.1 as defined in RFC 2616. This is your API. Give resources URIs. GET, POST, PUT and DELETE are your four essential methods. PATCH is in the wings (has momentum, not here yet). He's using curl for demos. Status codes define how to handle requests and responses.

Media types are part of the content-type in HTTP. Examples: JSON, RDF: FOAF; XML (e.g. Atom) etc.

You also need to specify cacheability using the Cache-Control HTTP header. Django has conditional GET middleware, but you still need to manage Etags and Last-Modified yourself (e.g. use Python hashlib, md5). These same techniques are used to establish preconditions. Statelessness means don't use sessions or cookies. All state information the server might need goes via the hypermedia. django-piston by Jesper Noeher is worth studying for RESTful Django.

Simon Willison: Renting old castles and forts is a fun way to host a sprint. WildLifeNearYou.com was co-developed over 10 days using "cowboy development" techniques. Consensus processes are important. Pair programming helps a new team achieve common coding standards. Shared blogs, Twitter-like programs also help coordinate projects. The fort team hacked Bugle, had no Internet connection, just an intranet.

Simon, who works for The Guardian is giving us his British-style spin on that topic (rapid application development). The scandal around MP expenses provided raw material. The result: a Django application for investigating these revelations. The plan was to break scanned A4 pages into individual images using convert and send them to a MySQL database. In the end, other tools were required given the non-standard nature of the PDF materials.

This process was educational but also proved "cowboy development" has some real downsides. The better way: use pair programming, unit tests, mocks, Team City, deployment scripts. He's mentioning redis (link below), with its atomic data structures.

Our day is concluding with the technical panel. I need to bus home to grab the PSF snake and head down to the Portland Python User Group meeting. @psf_snake has tweeted invites to the conferees, with a link to the Meetup site.

Django Conference (Day 1)

I'm in the great hall, registered with T-shirt. @psf_snake is still in her FedEx container, to join us later. At least she's able to tweet. They've done a good job providing power strips here. So many hotels aren't set up for one laptop per adult (OLPA).

Speaking of which, I'd hoped to be lugging my new 2.6 lbs Ubuntu Starling, a replacement for the Dell that died, but after first picking mode of delivery (paid extra for 3-day), I then got notification it takes up to seven business days to run orders through manufacturing (nothing "just in time"). So I don't have the sexiest of accessories. At least I've got my high heels (and Olympus Stylus). Need coffee...

This is a friendly mostly-guy world. I was offered a free pastry, met Travis in line for coffee. He's fresh from Kansas, the Django capital. The Django pony is here, more like a unicorn, all pink and adorable. Are our totems both shes then? More gender studies ahead. Most of us are from out of town, camped out here at DoubleTree. I introduce myself as the local guy, say "Welcome to Portland" quite a bit.

Fake JKM (a quick keynote): James Konrad Tauber (JKT) is "impersonating" JKM (Jacob Kaplan-Moss). Russell Keith-Magee... RKM JKM JKT... it's The DaJango Code, flash to book cover (JK... MT... so many riddles). MT = Malcom Tredinnick (Cornwall, UK). Simon Wilison is allegedly the original inspiration for JKR's Harry Potter, the K taken to comply with the code. TMR is Tom M. Riddle (Voldemort). Obviously a conspiracy and yeah that KKK down the middle is disturbing, probably just means "Kansas on steroids" (note to diversity@python.org: maybe check poet Gene Fowler's "e pronoun"? -- I'm having trouble googling anything on it (math-teach is down again)).

Avi (@avibryant) is now taking the podium.

Avi is from Smalltalk (.st) and Dabble DB worlds. Seaside web framework? Never heard of it. Trendly: another product he's plugging. The theme here is obsolete systems, a theme for me too (I was poking fun at MUMPS while in line with Travis (he'd never heard of it)).

Primo Levi story: we didn't need the onions anymore (as a metrological tool for testing varnish, a kind of thermometer). Lots of "onions" left over from CGI days.

Yes, we're aware of ~SQL e.g. Cassandra (Facebook), these key:value and map:reduce machines. Yes, web frameworks "of the future" will back end into these too. This jibes with my idea of the legal medical record as more like a Facebook scroll, medical instruments leaving signed results, applications harvesting what they know to look for.

If your entire dataset fits into 600 Meg, just put it in RAM (duh). Affordable RAM changes the dynamics. It's the "database wars" (finding the right tool for any given job). Persistence doesn't have to mean SQL, we've all learned that by now.

Concurrency is the other thing to keep thinking about (yay, dimming the lights, about time). The GIL is not a big deal. He's going with what I call the "snakes on a plane" model, i.e. many separate Pythons doing their thing, ala the plain vanilla buzzbot design (thinking of Patrick's architecture).

Gmail is prototypical of tomorrows applications in providing all the HTML and Javascript up front, then just sending JSON snippets back and forth. This isn't about being swoopy (glitzy) so much as making the browser the puppet theater, pulling strings with jQuery etc. The JavaScript VMs have gotten so much better, e.g. V8 in Chrome.

Incremental updates means more behind-the-scenes gnarly URLs, a kind of lower level conversation between a client back door and the server. Django URL routing might become less pretty? Google's GWT is probably the only framework taking this challenge head-on. However Avi sees going to smelly Java (from JavaScript) as something of a step backward, even if strategically justifiable.

I recall Alan Kay's being excited about JavaScript at our London summit, thinking it has a bright future (he'd done a turtle graphics demo to amuse himself while recovering from a back injury). His prognostications have borne out. Portland's Admirers of JavaScript would appreciate this talk. Avi has developed a Smalltalk development environment internal to the browser that translates to JavaScript under the hood. Could Python do something similar?

Ur Doin It Wrong by James Bennett: RTFM. "Help! I don't know Python" is the other big problem. How do I do X in Django is often really a Python question. Do the tutorial, get a couple books, read Python module of the week. You need to know about PYTHONPATH, super(), closures, decorators... know how to read error messages. Read bit.ly/reusable-django-apps/.

Django really is just Python, not some language on top of Python. Main beef: Django does not make you use the default components. Learn how to swap in the components you need. It's just Python. Wanna point Django at Twisted ala LeafyChat? Go for it.

If you're distributing Django applications, follow packaging guidelines. Advice: steer clear of setuptools for now, stick with distutils (need a README, /docs, license.txt etc.). Use Sphinx for docs.

James likes MIT, BSD licenses over GPL, which "might as well be proprietary" the way he looks at it. Have unit tests. Use django-lint, pep8.py and pylint. pypants is a fun implementation of some of this.

We have a Perl guy now, Frank Wiles. This is a good complement to our Smalltalker keynote -- proves the Python community is not just a buncha KKK-style language bigots.

Frank is addicted to Django and not ashamed to admit it. Django is his "gateway drug" (this is a pep talk). Frank is from Revsys, part of the Kansas-based Django cartel, has been with the project almost since its inception.

The difference between good code and bad is "WTFs per minute" upon code review. zc.buildout, django-admin.py -- nothing as clean and nice in Perl world. Testing setup much easier -- saves so much time, nicer hangover, the high is better... (check out the slides). "My hands don't hurt anymore..." (less shift key, than in Perl). You've gotta love your tools, is the basic message.

Monday, September 07, 2009

Up (movie review)

Up at 5:15
Up is about the puer-senex combo, to use Jungian parlance. The pair embarks on a classic quest, in a spirit of adventure shared by an off camera mother figure.

The villain is just trying to prove his authenticity (at the expense of harming an endangered species -- so unacceptable) and has surrounded himself with talking dogs in that effort (it's a cartoon, and Disney knows how to animate dogs).

I saw this as a double feature with Groundhog Day (later, back at my place) so that may color my thinking (deja vu is a theme).

The "little mail man" (pun) looks like Humpty Dumpty and brightens the picture right from the start, turning a potentially bitter old man story into an heroic epic instead. Uplifting.

Friday, September 04, 2009

Poster Art

:: poster art by claire ::

:: lw @ duke's ::

:: private party byob ::

:: public event @ Angelo's ::


Good Bye Party
:: click thru to photostream ::

:: on upright piano ::