Tuesday, July 18, 2017

Rocky Horror Picture Show (movie review)


I've seen very little mention of the geodesic dome, featured as a part of the spooky castle above.  Much could be made of this link to another counter-cultural icon, from a domain of sexual mores breaking out of their bounding box, thanks to ETs.

The point was to visit Clinton Street Theater where teens, mas o meno, have been doing the audience participatory version of this cult film for some twenty odd years, starting midnight on Saturdays.  The torch gets passed, one generation to the next.

Getting picked as a cast member means knowing the right people, in addition to exhibiting some talent to entertain. Participating in a RHPS is something of a rite of passage.

I went with a professor of gender studies and international development who'd never seen the film, turned off by the word "horror", a genre she doesn't enjoy.  The raucousness of the audience overwhelmed the soundtrack and she came away with a garbled version of the plot, but that's easily rectifiable with later study.

I like pointing out that Tim Curry has a later role in the movie Kinsey, where I plays an ironically prudish professor. One of the best ways to study a culture is by delving in to its sex ed, but then don't make the mistake of thinking education == academia.  All media have an educational role.

My first induction into this cult came way back in my Princeton years, in the late 1970s, much closer to the time when this film, originally a stage play in England, where that castle is, first came out.

Audience Participation

Tuesday, July 04, 2017

Coursera Homework


The on-line course I'm taking asked us to build a circuit of two push button switches, both of which need to be pressed for the LED to come on. The Arduino motherboard is used only to power the breadboard, very not fancy.

Note that a yellow LED on the motherboard itself, distinct from the always-on power light (green), is flashing intermittently. This would have to do with some earlier-loaded blinking light program, unrelated to the current project. The Arduino does retain the last loaded program, even when powered down.

Saturday, July 01, 2017

Retro Coding

:: talks about CGI in the client / server context ::

Retro Coding is where one deliberately dials back to an earlier point in time and uses tools at that time considered cutting edge, but since abandoned.

A case in point:  "Common Gateway Interface" or "CGI" programming. "Computer-generated Imagery" is the more common decoding; a name collision (just get clear on the namespace, for less cognitive dissonance).

In Python, we import the cgi module primarily for access to FieldStorage, an object that plays the role of sys.argv in some ways, the latter being a list object intermediary between "__main__" (the running namespace) and the shell command used to start a script.

For example: 

$ ./get_chem.py Au 

passes Au as a string string element to the running get_chem.py, which finds it in sys.argv[1].  'get_chem.py' itself, the name of the running script, is what's in sys.argv[0].
 
Here's an example lookup operating, running the above lookup about gold ("Au"):

Server and Client 

That's Python's standard library CGI server in the background, plain vanilla.  The going rate is not included. This pared down database lists he abbreviation and longer name, number of protons, and atomic mass.  The long integer and KTU track when a user last touched the record, me in this case.

>>> num
1493462392
>>> datetime.datetime.fromtimestamp(num)
datetime.datetime(2017, 4, 29, 3, 39, 52)


The invocation in the foreground triggers a little script to send an HTTP request to said server, with a chemical element symbol (e.g. Au for Gold), which, if all goes well, returns a JSON string which the little script converts, to a list. Print to console. We're done:

looking up an element through localhost

Taking a look at that script, we see the Python DBI in action. That could have been Oracle we were talking to, like in the good old days (mythological allusion).

Serving Data

I've changed the shebang line to /usr/bin/env python, which is fine if you're running Python3 or greater, and shared the two scripts via Github, for educational use.  Thanks to WorkingIt!

The database table, periodic_table.db, is likewise available.  I'm continuing to evolve this little project, adding AJAX to the mix.

Friday, June 30, 2017

On the Banks of the Tigris (movie review)


The Portland Blues Festival kicked off today and our Hawthorne bus 14 moved slowly across the bridge, stuck in traffic.

I was on my way to Rogue Hall to meet up with Dr. Tagrid Khuri of Portland State University.  Our plan: to see this award winning movie at the Clinton Street Theater (Tag was expecting outdoor live Arabic music, and I wasn't sure what to expect, but never mind).

The film is a work in ethnography, more specifically ethnomusicology. A lot of the folk music of Iraq traces to Iraqi Arab Jews, who knew?  They fled Iraq en masse, after some two thousand years by the Tigris, starting in the early 1950s, some looking for a new life in the newly established state of Israel.

The Ba'athists seemed keen on erasing cultural memory, but music and memes are more powerful than mere politics.  Enforced ignorance doesn't last.

The film is the result of a collaboration between a Muslim Iraqi refugee, Majid Shokor, living in Australia, a veteran of the Iran-Iraq war, and an Ashkenazi Jewish woman, Marsha Emerman, with experience making documentary films.

The project took about ten years to complete.  This was not a first screening by any means, but was a strategic one, with Emerman joining by Skype from Victoria, British Columbia, fielding questions.

The film succeeds in conveying the respect musicians have for their music, in ways that transcend ethnicity.

The opportunity to share memories, life stories, in a relatively safe environment, comforted by familiar tunes, brings out the best in people.  The film is uplifting, as well as informative.

Saturday, June 24, 2017

Smith Rock

One of the great joys in getting married is the merging of families that occurs.  In Dawn's case, I lucked out big time, with her brother Sam and partner Judy, musically minded creators of a new scene in Sisters, Camp Sherman more specifically, in the Metolius watershed.  I also met Elise and then Les, that wonderful family. 

Dawn's extended family went to Indiana, Pennsylvania (a town).  We spread her ashes there in 2009, following a Chicago Pycon.  Tara and Alexia were with me then too.

Compared to our city rat lifestyle, as non-profit hub managers (CUE and so on), Sam & Judy were the rustic true pioneers, living off the grid as year round caretakers of the lovely Dahl Ranch, in a time when the surrounding forest was lush.  They hewed their own firewood, kept the swimming pool operational.

Later, Sam, a skilled indoor finish carpenter, built a house for the two of them.  Judy's mother joined them later.  She died in the same Partners in Care facility Sam did, same room.  That was on Gold Coach road, in a gorgeous patch of country.

Just an hour ago I headed over to Smith Rock for some memories.  The two sisters (Tara and Alexia) are exploring somewhere in the area.

Radio is important here, and music.  I'm listening to Psychedelic Protest on KPOV FM, a show sometimes hosted by the Smith's friend Steven.  Mad Dog is hosting today.

Saturday, June 17, 2017

Decorating a Circle

When I teach about Python decorators, I often use the extended metaphor of "being abducted by a UFO".

In science fiction, the abductee is subtly or not so subtly transformed by the abduction experience. What's important is they come back as still themselves, which parallels decorated callables retaining their original names.

In the video below I'm using the @property decorator to show how a Circle type might update its inter-related attributes through setter method calls behind the scenes.


Monday, June 12, 2017

Wonder Woman (movie review)

A Visitor

I wasn't planning on seeing this today. I'd RSVPed on the Flying Circus meetup downtown. Then came a knock at the door and there was Lindsey Walker, whom I'd not seen since last year.

We had tea on Division at our usual spot where she showed me pictures of her new place, austere and functional, in Kathmandu. Turned out she was curious about Wonder Woman also.

Probably the Bible families won't be too bent out of shape as the somewhat Bollywood style Greek mythology reiterates the Paradise Lost theme of Lucifer, jealous of God's love for his homely creature, Man.

Aries (lets call him Mars) is a died-in-the-wool misanthropist, and what is War (a favorite form of theater) if not misanthropic?

Wonder Woman is on the side of good as we slide back in time to the World War One era.

Mars is having a field day and the job of these Amazon women is to defend humans, innately good, from his manipulating.  Or so the children are told.

As Wonder Woman grows wiser she realizes Mars is a pretty good prosecuting attorney and humans somewhat deserve the fate they choose for themselves, and indeed they're somewhat loathsome.

Lindsey and I agreed it was all on the corny side, but then we're talking about a comic book after all.  Serious-minded theologians are not a primary audience.

We're more into learning about puberty and putting our childhood toy stories to bed.

Thursday, June 08, 2017

From Forum 206

I haven't posted much about factoring quadratics, but would for one take a group theory approach if following the forking-off Lambda Calc track after Algebra, more vocational than Delta Calc (Calculus), in the sense of straight-to-job, minus college, for more trainees.

You've got the JS + HTML + CSS, what more could you need? Of course plenty, and many will head back to college or code school or whatever, but the meaning of "vocational" still pertains. You get some paid work as a front and back end developer, applying your high school degree, and afford college later, where you go into Physics, say.

Where I'd go with quadratics is full bore into History as I think it's a travesty how we try to tease apart maths from any cultural context. Enough with the "universal language" already, if that means Greek metaphysics about infinite planes "existing". That's philosophy, so any PhD will be able to defend these theses of plane geometry (Euclidean), but lets not pretend that they're not cultural, and that mathematics is not as multi-cultural as Manhattan.

The fierce "game show" competitions on the Italian peninsula, to factor polynomials in contest, complete with pro wrestler style champions and death bed secrets (algorithms) is all too much to pass up. Then we roll forward to Galois, who scribbles some final words on Galois Theory before defending his honor in some dark ages duel to the death. Bleep over all that? Not unless you're into "history avoidance" which math geeks are often guilty of, but not in my course, no way.

I like showing a Polynomial class in Python, complete with some Newton's Method type convergence algorithm for finding roots even when factoring is nigh impossible. I've got this in my archive somewhere. [0]

At least lets tell them about the limits to factoring. And don't wait until some bitter end to share the quadratic equation, making it some punch line after slogging through months of seeking roots by other means.

I'm into spending a lot more time with primes versus composites, Euclid's Method, because I'm heading to RSA (public key crypto), like they do in Mathematics for the Digital Age (Bob and I both like it, although I do class-oriented coding much earlier in the deck, see my Fraction [1]). RSA is a capstone "thing to get" in the aforementioned text, used at Phillips / Andover. I teach crypto too, had for years before I saw that book. [2]

Why Euclid's Method to get the GCD over factoring into primes? Because factoring fizzles long before EM. Then there's the extended version (EEM). Check Knuth. These are the algorithms they're gonna need. As a mammal to other mammals: don't let them write that off as "just computer science" in their snobby mathy way.

Kirby

[0] http://4dsolutions.net/ocn/python/

[1] https://repl.it/H7VF/12

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

Sunday, June 04, 2017

Radar Blips

In case you're a long time reader of this blog, or a relative newcomer with a Sherlock Holmes bent, wanting to piece it all together like a Russian novel of interweaving scenarios, let me look at some loose ends.

The pristine wood hull motor boat that featured often in blog posts and pictures, especially in warmer weather, is still with us, but under repair.  A boat seeing as much use as that one, way above average, incurs wear and tear. The only real question is whether anyone around is skilled enough and has the time. Don and Barry have been on it.

Also speaking of Barry, his big project to keep himself in shape and amused was to convert a legacy motorcycle, a big one, into something two-wheeled yet enclosed.  The prototype has been test driven, however the loose end is I've not been present to photo-document anything.  It's front-heavy on steering and a next iteration is planned.

Former housemates have been meeting among themselves, crossing paths at different times. Jen has moved to California with Yarrow, growing up.  Melody drove down there and visited.  Maybe Lindsey got there later?  I'm not in her loop.

Speaking of Lindsey, a looped through her music on Facebook again, spiraling through some of her showtime posters.  She was a keyboardist / singer with a big love for her drum machine.  With me as chauffeur, she could pull off real gigs.  Archive.org has her at the Egyptian Room in Portland (long gone).

My two daughters are both working hard in their respective roles.  We've been sharing developments on email with Carol (mom) and my sister Julie.

Today we had some tense times downtown thanks to various rallies and counter-rallies.  We seem to be forgetting the past and dooming ourselves to its repetition but then history doesn't repeat, not really.  OK somewhat it does.

Patrick bounced down there on foot, busing back.  We're both yammering about Python this week, in a code school setting.  I'm studying his textbook, to which I contributed, plus we both learned from Steve Holden, author of an earlier curriculum we both used, when mentoring for O'Reilly School (since closed).

Speaking of Steve Holden, you'll find where he bounced out to the West Coast for meetups and business, but he's a citizen of the UK and has lived there for some time.  We see each other on Facebook and like that.

Wednesday, May 31, 2017

Dress Rehearsal

Relax into Knowing

Speaking of a dropping Portland IQ, lets focus on mine.

What does it say that I was fully cognizant up to some point, that I would not be needed in Lake Oswego today (because the course ended last week) but that I nevertheless dutifully drove to Laurelhurst, as if today were tomorrow.

I got all dressed up, in my collar shirt, smarty pants, and badge.  Fought traffic (was traffic). Finally figured it out.  The booby prize goes to me.

Hey, we all make mistakes.  Today was the day.  Actually it's already tomorrow.