Thursday, October 29, 2009

A Short Talk

On the Logic of Object Oriented thinking. Click slides for enlargements, or captions for the Flickr-saved originals.

:: slide 0 ::

Object oriented languages
distinguish between a blueprint, which defines the generic aspects of a whole class of objects, such as houses or fish, and the special case instances of that blueprint, the specific houses or fish, each occupying its own time and place, taking up room in memory.

:: slide 1 ::

Above is some code for a generic Animal.

The blueprint defines only two behaviors, one for giving birth to an instance of itself (__init__), and another for representing itself to the public (__repr__).

There's an attribute called species which will get assigned a random value, choosing from the list [ 'Dog', 'Monkey', 'Philosopher', 'Bird' ] as the four possibilities.

For now, the species is unspecified.

Because the philosopher Descartes famously said cogito ergo sum (I think therefore I am), the logician writing this code chose the name cogito within the birth method, and me within the representation method (because they're roughly synonymous).

Those of you who already know Python will agree this is somewhat pathological, but does serve to illustrate the positional nature of this handle to the specific instance, more traditionally and consistently called self across all methods.

:: slide 2 ::

What you see above is not another blueprint, but a function. In this particular brand of logic, the level of indentation is significant. The function begins with the orange signifier def, and ends with the return statement.

The many function "eats" two arguments (the parentheses are like a mouth turned sideways -- think of emoticons). It expects to know howmany, and what species.

These two parameters are like guards at the castle gates, or like butlers at the door, waiting for a hand-off, for incoming values, which they'll circulate internally to said function.

In the code below, this function many is invoked three times, each time to fill a zoo_cage with additional animals. The extend and append methods, both used in this code, are built in to each list instance, thanks to the blueprint for the list type.

"Dot notation" of the form "noun.verb(arguments)" and "noun.adjective" is what we use to interact with our blueprints and instances.

The equal sign ("=") is an assignment operator in this Logic and is used to bind names to objects in memory. Other symbols are used to compare values for equality ("==") or to test whether two names actually specify the same object ("is").

:: slide 3 ::

Secondary characteristics of color and sex get added after the zoo_cage is already full with our full complement of instances. They're set for each animal individually, irrespective of the fact that neither quality was mentioned at the blueprint level. Not every brand of object oriented logic has such a liberal (forgiving) grammar.

Note that if you trigger the representation method (__repr__) before color and sex attributes have been assigned some values, you will get an error message, as the returned self description is counting on having that information available, even if the sex is "unknown".

The choice function, imported from the random module, is not obligated to choose uniquely, only randomly. In other words, after some runs of this program, we might have only Monkeys, even all white ones, whereas other times we might have a mix of Birds and Philosophers.

:: slide 4 ::

What you see in the square brackets, denoting a list, is our zoo_cage of animals. Because of how the representation method was written, one sees the color and species, with the sex in parentheses.

Run this over and over to get a different mix of animals. Notice the shuffle function in Slide 3, also imported from random, keeps the animals in a jumble, instead of a sequence of Dogs, then Monkeys or whatever.

Comment out this line (with a #) and run the script again, to see what difference shuffle makes. You might see where we'd use it to shuffle a deck of cards, with both Deck and Card more blueprints for specific instances.

For further reading:
Trends in Early Mathematics Learning: Looking Beyond Y2K
More curriculum writing featuring Python

Wednesday, October 28, 2009

Open Source Dot Gov

In the course of discussing Python vs. PHP last night at Wanderers, someone brought up the fact that the White House has switched to Drupal, a PHP application.

Likewise the DoD has been touting open source as more of an answer to its prayers. "Just because a proprietary solution is way more expensive, doesn't mean it's that much better, or even could be worse" is a message to military intelligence personnel. Many in the commercial sector have already learned this lesson.

You might think that all this talk of automating medical records and/or outcomes research might yield some new open source assets, even outside the Forge dot mil domain. If there's tax money involved, then shouldn't the code be of, by and for the people? GOSCON is a traditional forum for such rhetoric, lots of Portland people already on board with that.

Speaking of Portland, OSCON is coming back here again next year, after bouncing down to San Jose in 2009.

Slate has been making fun of the WH decision to go with Drupal. I'm not sure the CIA's use of Plone ever got such attention. NSA put out it's own SELinux distro a long time ago, is still putting out new releases, like in March of last year.

Then of course we should remember DARPA's role in helping Guido get IDLE off the ground, a big step in making Computer Programming for Everybody (CP4E) seem a little bit more real.

Sunday, October 25, 2009

From Fred Meyer

I'm in the downstairs dining area sitting with Leslie H. who is busy grading papers for the health studies class she's teaching. We're catching up a little.

Last night I joined a large group of well wishers at Mississippi Pizza to say bon voyage to Nirel, about to launch on one of the big adventures of her life, which she's planning to blog about. She'd shaved her head in preparation, called it a "mohawk".

There I met a science teacher from the new high school in Hillsboro, which has a state of the art facility for home economics. I shared my concept of producing cooking shows ala Julia Child, multi-ethnic, imparting a mix of culinary and TV-making skills. You could even see it as chemistry.

I then headed home for my Ubuntu laptop, the Starling-1, so I could maybe get some work done from Muddy Waters, while Lindsey brute forced through her set, despite a rather nasty cold. Greg and I got to talking about geometry, paper folding, pin ball machines and computer programming among other things, also Kodak's reputation for being rather slow to adapt. Future shock is sometimes shocking, even for futurists. Get ready for a next generation of "3D" movies (director Cameron of Titanic, Aliens 2 fame has one in the wings; science fiction).

Speaking of futurists, Dr. Bolton (emeritus) filled me in on some of the latest thoughts in The Futurist over Thai food the other day. We'd missed the surprise party in their honor, mom just back from lobbying Congress in Washington DC. Chuck and Mary are old family friends, were aware of my dad at the University of Chicago before I was born there. The Boltons used to own that rustic getaway home overlooking Hood River from the Washington side of Columbia Gorge, where Dawn and I went on our brief honeymoon in September of 1993.

I posted one of my "once again, from the top" kinds of posts to edu-sig, explaining what I think I'm up to regarding education reform. You'd think The Futurist would have explained the concentric hierarchy of polyhedra by now. I recall Applewhite writing an article in that mag many moons ago, pre Chemical Intelligencer. Next time I'm in a well endowed library, I should try digging that up.

I've been digging out my basement, having gutted the garage, coming across some old papers, including the rejection letter from the Guggenheim Foundation (Ed had encouraged me to apply). I'm reminded of an episode of Family Guy when I see that (fifth paragraph from the end). I may be smart, but I also sometimes come off as kinda kooky, or quirky as Ed put it. Or just call me a freak of nature, helping to keep Portland weird.

I'll end with a quote from Wittgenstein (many thanks to Sean, for digging these up):

From Culture and Value, 1931:
“The solution of philosophical problems can be compared with a gift in a fairy tale: in the magic castle it appears enchanted and if you look at it outside in the daylight it is nothing but an ordinary bit of iron (or something of the sort).” CV 1931, 11.
... and with this Youtube about a new extreme sport (with thanks to Dave Koski).

Thursday, October 22, 2009

Hubbert's Peak: The End of Oil (movie review)

You might have trouble finding this one. Thanks to Laughing Horse Books for stocking it. The Illahee Lecture Series is locally produced, similar to the ISEPP lecture series in that way. Kenneth Deffeyes is speaking in the First Congregational Church, as Jared Diamond did, and in some ways about the same topic: why civilizations fail (or not, as the case may be).

Yes, this is the "peak oil" guy, an engaging and avuncular teacher who asserts we hit peak production around December 2005. He sketches some of the alternative sources of energy humans have developed, as well as ways to stretch what we have (remember to turn out those lights, a 100 watt bulb is like Lance Armstrong riding a bicycle, in terms of power requirements -- per an apparatus at Princeton he remembers).

Especially interesting to me was his mention of Richard Smalley, who had recently died of lukemia at the time of this talk (Kenneth was visibly saddened). Smalley was one of the Nobel Prize recipients for the discovery of buckyballs, and had been working on buckytubes in connection with high efficiency electrical current transmission.

This project was close to the heart of Bucky himself, who spent a lot of time/energy focusing on the global grid, work carried on by GENI, at least in terms of PR. Would that the popular media pay more attention to these memes, not just back office engineering firms.

This mention of buckyballs prompted me to dig out my Pergamon Press satchel from the first international conference on buckminsterfullerene in Santa Barbara in 1993, where I had the privilege of meeting both Richard Smalley and Harold Kroto. I found a fun stash of documents therein and am uploading some of them to my "chronofile" (Flickr Photostream).

Speaking of Bucky, I enjoyed chatting with D.W. Jacobs at some length by cell yesterday. He was driving along Hwy 101 from the Bay Area to LA. His play opens next June in Washington, DC.

Saturday, October 17, 2009

Equipment Drop

I'm doing an equipment drop at Circadia, patching in to the wifi for a few. Tomorrow is Burn Out, a festival relating to Burning Man. Lots of weird buses in the parking lot, a stage crammed with instruments. Lindsey is volunteering with setup, as well as taking part in the show tomorrow.

Lindsey pulled off a superb performance this evening, shades of Over the Hedge (we met the president of the homeowner's association). Another upright piano conquered in any case.

Speaking of suburbanite neo-liberals, some of these diversity groups turn out to be little more than the middle class brats seeking to extend both their comfort zone and entitlements.

Python's is different I'm hoping. As I posted earlier, to the diversity list:
The first guideline for diversity trainers might be something like: you have no human right to not be offended, as life is offensive and (here's the kicker) there's no one to blame. It's like when Lord Buddha first left the palace compound, where he'd been spoiled rotten: "who are all these sick and dying around here, is this some inferior species?" From there to enlightenment was a long and strange journey.

My talk in Vilnius (Jacob was there) featured snake defecation (snake poop), a way I teach about queues and FIFO in early Pythonic math classes, using eat() and poop() methods.

I preface this by saying kids love Grossology (some do) and have these books of Madlibs (fill in the blank stories) that are gross by design. You can code that way too. Some find this offensive, yet also find they learn Python a lot faster. No one walked out of my talk, as my slides and presentation were both tasteful, as was my three hour workshop in Chicago which mentioned Hitler's holocaust and included a scantily clad Britney Spears on one slide (first 57 minutes are on Blip TV).

All that being said, intelligent managers do tend to provide ways for humans to sort themselves, exercising their own freedoms of choice, into niches where they'll be happy and productive, with co-workers they're OK teaming with. Or call them schools (as in schools of fish, schools of thought).

I'd be pleased if Pycons were models of well attended, well managed events, and from what I've seen so far, I have no reason to expect disappointment. These are stellar and talented geeks, with every potential to accelerate into multiple Pycons happening with quite high frequency around the world. But the faster you grow, the more tourists you'll get checking you out and muddying the waters, hence my plans for more exclusive venues, where BOFs are more likely to find one another.
BOF stands for Birds of a Feather.

Speaking of Python, Scott David-Daniels was at the venue this evening. He struck up a conversation with Lindsey about arms profiteering and how to escape its grip. They found some points to agree on, given a shared background in IT.

Scott has some papers he's working on, one about a new data structure (currently undergoing testing), and maybe another about his super fast search algorithm.

Good Bye Party played the opening gig, will be here tomorrow as well.

Tuesday, October 13, 2009

To Wanderers...

[replying to internal message traffic on wwwanderers at Yahoo]

Yes, pessimism requires scientific justification these days as cognoscenti needn't be knee-jerk Malthusians to gain entre to the best parties. Of course if you're not knee-jerk... Malthus was a pretty cool guy right?

Regarding power generation, there're also those slow turning high torque thingys buried under rivers i.e. you have no unsightly or obstructive dams to contend with. The spin is slow enough to not kill the fish.

http://www.washingtonpost.com/wp-dyn/content/article/2008/09/19/AR2008091903729.html

Keep in mind that some of the best most fuel efficient cars, e.g. a 65 mpg diesel Mini Cooper, are simply unavailable in the USA because the so-called "capitalists" in this country are for the most part wimps who can't stomach real competition and puppet Congress to protect them from those with an unfair advantage, such as better engineers.

Sunday, October 11, 2009

Subgenius Devival

Subgenius Devival 2009
:: subgenius devival, pdx 2009 ::

Our company forked into parallel tracks last night, though in retrospect I wish I'd been positioned to welcome another subgenius into the fold, as this was quite a good show. Reverend Stang was in good form, as were these others from the inner circle.

I was checking out this Ash Street Saloon as a possible venue for the Lindsey Walker Show and it met my criteria: room for dancing, a distinguishable stage area (preferably raised), and no problems with the neighborhood i.e. compliant with local zoning ordinances. This place definitely qualifies, as do Red Cap, Angelo's and Ladd's Inn. That's not to say she won't book elsewhere, just this is the groove or "ground state" as it were, to get more quantum mechanical about it.

The Subgenius Church imitates televangelical fire and brimestoney speech, encourages ranting. The clientèle tend to range to the geeky side, to the point of embracing weird as a badge of honor, like Portland does, or Austin. Bob Dobbs is the titular deity with uber-femme Connie a manifestation of his luckiness (more than smarts). Bob is modeled on the pipe-smoking 1950s salesman figure well-known to Americana lovers. You'll find him everywhere in the glossy commercial literature of that era.

This morning I was more on the serious side, with other earnest Friends engaged in an overhaul of Faith and Practice, the privilege of any generation worth its salt (we're even somewhat inter-generational, though tend to be aging boomer-seniors for the most part -- "geezers" as Jane calls us). That was at Bridge City (hi Larry). Then it was back in the maxi taxi to blog and munch on some factory bread products. Now it's on to Multnomah Meeting wearing my Oversight hat (metaphorical -- the real deal is around the house someplace), going on foot, testing my iPod.

The reason my iPod needs testing is I went into the red for a Toblerone, to celebrate this first Portland Devival in like a decade. I consumed a lot of it, but stuffed the balance in my Python fleece pocket when boarding the 14 bus, not bothering to wrap it in plastic or foil. This proved to have consequences: melted chocolate all over, meaning I spent much of the service licking my iPod, trying to cleanse it of the brown stuff. This was an appropriately kinky and bizarre activity to be engaged in, given the venue. I was also drinking Jack Daniels, grateful for a little R&R in a war crazy world.

Tuesday, October 06, 2009

Triangulating

I was just posting over on Synergeo how I'm looking at a conceptual triangle as governing my projects: Wittgenstein, Synergetics, Python. Yes, esoteric (Esozone conference coming right up, but nothing scheduled yet on my end).

Wittgenstein was a contemporary of Hitler's, an Austrian, who ended up in a POW camp in WWI, where he started hammering together a world famous philosophy that made him the darling of Cambridge. After publishing his magnum opus, he hung up his academic regalia and took off into the wilds again, only to return with a slap of the forehead, realizing he'd made some mistakes, or at least now he had a better way of saying what he'd been trying to say. I did my Princeton thesis on his so-called second philosophy (Philosophical Investigations, On Certainty, Remarks on the Foundations of Mathematics, Philosophical Grammar etc.).

Synergetics is a philosophical language invented by the famous American born inventor R. Buckminster Fuller, one of the first jet setters and one of the most intrepid, never traveling as a tourist. He used this invented language as a way to anchor all kinds of incoming communications from all over the globe. He was friends with Marshall McLuhan and the two of them formed the nucleus of a subversive network which also included "Sonny", my mentor E.J. Applewhite. The magnum opus is on the web and, like Wittgenstein's stuff, is very much a topic in these blogs.

Python is a computer programming language. The first language I really respected a lot was APL by Kenneth Iversion, first encountered at Princeton. Then I followed the xBase trajectory for many years, starting with Ashton-Tate's dBase II and ending with Microsoft Visual Foxpro (VFP9). Whereas xBase was retrofitted to become object oriented, I think successfully (it's a better language than VB), Python was object oriented from the ground up and is even more intelligently designed. It reminds me of APL in some ways, although these two are not in the same language family.

How I relate these three vertices of my triangle is as follows: the later Wittgenstein introduces the notion of "language games" which relates easily to the computer science concept of "namespaces", which Python well implements. The idea of namespaces helps thinkers make room in their thinking for remote vocabularies, alien shop talks, extraordinary grammars (philosophies), such as Bucky Fuller's Synergetics. Given the latter has a lot of geometric content for its core logic, implementing Python modules to express this geometry has been yet another edge on this triangle.

The mutually reinforcing nature of this design helps guide my curriculum writing, which includes journaling in my blogs.

:: google today ::

Monday, October 05, 2009

Eyes Wide Shut (movie review)

I've long been curious about this movie, given I'm a Stanley Kubrick fan. This was my first time seeing it, and I wasn't sure what to expect. I was pleasantly surprised, as I'd been bracing for some kind of horror movie, not upper crust New York, more like Woody Allen world, lots of doormen and taxi cabs, around people who have everything and then some.

Tom and Nicole (the celeb stars in their characters) manage to get into a fight over the price of holy matrimony. It seems to work for the daddy-I-want-a-pony minded, and indeed daddy is used to spending money, but it's rough on the couple. Daddy is off at work, looking at naked women all day (he's a doctor) while mommy is highly appreciated by members of the opposite sex (as well as her own) yet does all that semi-boring staying home stuff (nice pad!), while wondering what her husband is really up to out there. Little does she know.

As a result of the fight, Tom at least gets that he's taking too much for granted. He's now haunted by the Bridges of Madison County story, with someone besides him as Clint Eastwood. That's disturbing of his equilibrium and he goes off the deep end into film noir country, in this case a kinky patriarchy full of voyeurs, ala Elizabethan Era Globe Theater (the origins of stagecraft in English, inheriting from Greeks via Romans). As private cave DVD watchers, we join the rest of the masked (and Tom) for some brief peep show. No, we don't have limos either, aren't that politically powerful, but at least we have VCRs.

What's amusing about this film is that Tom & Nicole ride so high in their social network that the "dark underworld" of pulp fiction seems just as out of reach in the sense of economically advantaged. The two temptress roommates are pretty much like my girlfriends at Princeton, well off enough to afford a slumdog apartment in The Village (we weren't actually that well off by a long shot, lived in Jersey City until finding that place in the Big Apple (where my girlfriends moved, me staying behind to teach in a Catholic girls' school, but I digress)).

Tom Cruise, being in over his head, out of his element, is what adds levity to this interesting film. He keeps flashing that doctor badge like it's supposed to justify his playing private detective or undercover cop, like "hello, I'm Kojak, just let me wake you up in the middle of the night so I can dress up and go to a kinky party in the steens" (or wherever that was).

Obviously I'm coming from some kind of economic jealousy angle, which I think the film consciously encourages. We have a hard time feeling sorry for these well off people and their exciting lives, identify more with the working class who keep getting to take Tom's coat. I'm coming from being the limo chauffeur probably, stuck outside with the taxi driver, not even blindfolded because I can't play some fool musical instrument, plus I suck at sleazy dancing like that guy at the party was doing, sucking up to Nicole (whom I'd gladly suck up to if I could figure an angle, but then glitzy LA aka Hollywood is hardly my stomping grounds; I'm a fish out of water in that neighborhood (that's more Governator turf)).

Speaking of Hollywood, earlier last night I saw Whoopi Goldberg apparently liking Google Android on the LCD flats (at Claudia's sports bar on SE 30th & Hawthorne). We also saw boomers in a Windows 7 commercial; I advised Annis to try extending the life of the old Toshiba to take advantage of Xmas discounts on new laptops with that Microsoft OS, more suitable for "normal people" than GNU/Linux maybe (a geek favorite), and less Cadillacy than MacOSX.

Open source (e.g. Python) runs on all of the above so I'm not required to be dogmatically against all proprietary layers above and below my level (talking "chip-to-cloud stack"), even though copylefting more assets remains a worthy undertaking and goal. I'd like freedom to gain and/or hold on to some stack pieces at all levels, making purists happy while continuing to leverage economies of scale. To this end, I encourage free products to advertise, given boosting sale price has never been the only motivation for flaunting what you've got. There's also simply recruiting a user base (cite the Java campaign, or the PR for ostensibly not-for-profit religious brands, Quakers included).

Friday, October 02, 2009

High School Geometry

Synergetics
:: math cast by 4D Studios ::

 My proposal to teach a non-Euclidean geometry as a part of the 4D spun DM track (digital math track) is met with ridicule in some circles, as isn't the priority to gain some grounding in Euclid first, before delving into college level topics?

These ridiculers may not appreciate the meaning of dialog and/or dialectic that much, not having studied philosophy maybe. The Platonists, taking a page from the Sophists, continued the tradition of recording conversations, debates. One needed interlocutors, like what we see on listservs today.

In other words, to really "get Euclid" you'll need to contrast his metaphysics with some other's, say that of Democritus (our "patron saint of discrete math" -- as in: "it gets down to atoms" (quanta) vs. continua).

The pragmatists don't so lazily resort to ridicule in the opening frames, but do worry we're muddying the waters. These might be neo-liberals or neo-cons, secretly and somewhat desperately hard at work to shore up some central authority (an imagined monarchy). The idea of young children questioning the existence of "infinite planes" and/or "perfect solids" just sounds like chaos to them. What will they doubt next? The existence of "real numbers"?

One solution in this case is fairly easy to implement: keep these worry wart types teaching along the creaky old analog math track (aka the status quo in 2009), a sequence of connected curriculum segments already well memorialized in any number of textbooks, some better than others (Dolciani gets some respect, also Saxon, whereas some brands of corporate pabulum cut way too many corners, leaving many in the Lower48 with mush for brains, "pseudo-educated" as Dom Rosa would say).

In other words, don't let them muddy these waters they're so worried about muddying -- leave this non-Euclidean stuff to the certified gnu math teachers, properly trained to not botch it. They have a computer at their elbow (know two or more coding languages), have enough linear algebra to teach the neo-Euclideans' XYZ orthodoxies, even as they express skepticism in the face of its more dogmatic apologists (you'll find these zealots in all walks of life).

Just zooming back from an ancient greek geometer, sketching a proof in the sand with a stick, showing it's on a beach, on a ball (ala Google Earth), not something infinitely flat, would be too subversive for some teachers to handle. The space program sort of went over their heads maybe.

But in a school truly committed to diversity (do they have a statement?), students will have some leverage, as will the parents. If you don't have a spanking new DM track, hotly relevant with lots of bright screens, maybe contact your state and/or local representatives. Ask about the new standards, the new K-12 pipeline.

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

Equinox 2009
:: 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

J. Shea
:: 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 ::