A More Perfect Religion

Monday, 19 September 2011, around noon.

Michele Bachmann receives edicts from God Himself, which many people seem to consider a selling point for her presidential bid. If she were poor, or slightly less functional, we’d all just dismiss her as an unmedicated schizophrenic and move on.

In a similar vein, thanks to the magical powers of the stock market, I am worth $20,000 more this week than I was last week, when mostly I just sat around in my underwear re-re-re-watching episodes of Battlestar Galactica. Where did that value come from? What is it a measure of? It’s a complete fiction, but somehow we all agreed that it’s a fiction I can more or less literally take to the bank.

Maybe the Cylons were right about us.

How Do You Like Them Apples?

Thursday, 15 September 2011, around eight in the evening.

I’m thrilled say that today I accepted a job at Apple. I’ll be writing software as a member of a small internal developer tools team, helping to make iPads and iPhones even more awesome. I’m just beside myself with how great I think this all is.

It’s funny how things can change. A month ago I was thinking that I’d be in San Diego for at least another six months, likely longer. I thought if I’d be leaving at all, it would only be under the condition that I was able to keep my current job and work remote. I thought maybe I’d go back to Davis and use a café as my office. I thought that sounded pretty nice.

Then I got an email from a friend I hadn’t talked to in years, someone I’d taken a software engineering class with at UC Davis. He’s been working at Apple since he graduated, and he thought I’d be great for a position they were trying to fill. Two weeks later I was up in Cupertino slogging through an interview marathon; a week after that I had a job offer.

I’m going to be in San Diego for about six more weeks. Then I’ll be in Cupertino — temporarily at least. I’ll have some time to decide where I actually want to live. Much as I don’t like the thought of a 90-mile daily commute, the idea of getting a studio in San Francisco seems pretty great right now. Apple runs wifi-equipped shuttles for people who don’t want to live in Cupertino, which means the daily two-hour drive wouldn’t be time wasted. And I’m so sick of being in Southern California that being back in a city I know, living near friends again, sounds pretty damn good.

It’s awful weird, suddenly getting the chance to do a few things I’ve always wanted to do: work at Apple, make money programming with Objective-C, and live in San Francisco. I feel like I got a golden ticket, except instead of buying a stupid candy bar, I had to spend a decade or so getting good at something. In any event, I feel extremely goddam fortunate, and I’m excited to see what comes next.

Shared Interests

Saturday, 10 September 2011, around four in the morning.

She decided she wanted to cut back on her drinking, and suddenly hanging out in bars wasn’t a shared interest. I don’t think I drink too much, but “too much” is tricky. Quoth the Poet: “You say that I drink too much, well I say that’s half true. I drink half as much as my daddy did, I drink twice as much as you.” It may or may not be significant that that song is called “Thanking Jose Quervo”.

It became clear pretty quickly that alcohol was one of the pillars of our relationship. We were doomed. She’d probably have seen it sooner if looking into the future like that was in her nature; I’d probably have seen it sooner if I’d had the self-respect to acknowledge such problems.

On the one hand, everything looks different once the dust settles, which is itself deeply troubling. We have no real choice but to get on from day to day, deciding what’s true and false when we know from experience that the things we believe now might look completely insane to us in hindsight.

On the other hand, man. It’s a bummer how things work out, sometimes.

The Onion: “Our Long National Nightmare of Peace and Prosperity Is Finally Over”

Thursday, 11 August 2011, around ten in the morning.

An oldie but a (sad, prescient) goodie:

“My fellow Americans,” Bush said, “at long last, we have reached the end of the dark period in American history that will come to be known as the Clinton Era, eight long years characterized by unprecedented economic expansion, a sharp decrease in crime, and sustained peace overseas. The time has come to put all of that behind us.”

Makes me a little nostalgic for the Bush years, when you could be angry about what the government was doing, rather than what it was refusing to do.

(Via @jkottke).

Is this REALLY the right way to embed an image in a JTree node label? REALLY???

Thursday, 28 July 2011, around five in the afternoon.

Submitted with comment:

private String stringValueWithIcon(String stringValue, File iconFile) {
    if (iconFile == null)
        return stringValue;

    // I am going to hell for this
    return "<html><table cellpadding=\"0\"><tr><td><img src=\"file://" +
           iconFile.getAbsolutePath() +
           "\" /></td><td width=\"3\"></td><td valign=\"center\">" +
           stringValue +
           "</td></tr></html>";
}

Engma-nigmatic

Friday, 10 June 2011, around noon.

Outside of California, what happens when “walking” becomes “walkin’”? This is a serious question. I want to know.

In my California English, it seems all vowels before /ŋ/ must be tense (Wikipedia agrees). So I can have [king], but never [kɪng]. This morning, I was thinking about that in relation to the phonological process that “walking” undergoes when it is spoken as the more informal “walkin’”. For me, it’s the difference between [walkiŋ] and [walkɪn]. That is, even though the orthographic representation suggests that only the consonant is changing, for me the vowel changes as well.

Now, given the above-mentioned prohibition of lax vowels before [ŋ], it seems reasonable to assume that it is solely the fronting of the consonant at the end of “walking” that makes the word sound informal, and the vowel is just reverting to it’s underlying phonemic value. In other words, what I’ve always thought of as the /-iŋ/ suffix is actually the /-ɪŋ/ suffix.

This upsets me. You think you know a morpheme, and then it goes and pulls this kind of shit. Do other English speakers say [walkɪŋ], and I’ve just never noticed? Or am I wrong? That’s usually the best explanation for this kind of thing.

Moar Pretty Visualizations

Friday, 20 May 2011, around six in the evening.

If you need to find huge sets of data to work with, you could do worse than the Stack Exchange data dumps. Stack Exchange is a network of question/answer sites that nerds of all stripes can use to get their questions answered. All of the content on the network is user-generated, and it is all licensed under a very permissive Creative Commons license. Every couple of months, the Stack Exchange guys dump their entire database onto the net for anyone who wants to use it. Gigabytes and gigabytes (compressed!) of interconnected, structured data.

Nerdgasm.

Anyway, I though I’d ingest some of that data and see what it looked like. I picked a small site, because the popular sites on the network (such as Stack Overflow) generate way too much data to deal with quickly. Their Apple site is pretty small, but with over five and a half thousand users, that’s still a bit much for super-casual data mining. Fortunately, each site has a companion meta-site, where people can ask and answer questions about the site itself (in other words, if you have questions about your Mac, ask them at the Apple site; if you have questions about the Apple site itself, ask them at the meta-Apple site). Far fewer use these meta sites than use their non-meta counterparts, and the meta-Apple site only has about eight hundred users — a much more manageable dataset.

Anyway, long story short, I asked a few of questions. For one thing, how many questions and answers have been asked to date? Four hundred and forty four. And there are only about seven hundred users who have interacted with the site in any meaningful way. So, a bit under two users per post. Not too bad, I guess. But I assumed that there were some users who are really active on the site, moderators of a sort. Probably these users generate a lot of content, while other users basically created their accounts to ask some specific question, and, having gotten their answer (or not), never came back. Mapping users to the posts and comments they’ve generated yielded a pretty good visual sense of this. And, incidentally, it’s kind of a pretty picture — really, the only reason I wanted to write this whole thing was to post it:

Content owners
Figure 1 | Content Ownership on http://meta.apple.stackexchange.com/

At the center of each circle is a user, and all the blue lines point to questions, answers or comments that user has generated. It becomes pretty clear that on a site with eight hundred users, about a half-dozen of them account for a disproportionately large chunk of the generated content.

Which isn’t surprising, and probably isn’t even that interesting, and I’m sorry you read this far just to learn that.

Euclid’s Elements: A Visualization of Book I

Thursday, 28 April 2011, around six in the evening.

The Johnnies in the audience might remember an assignment from early in the first semester of Freshman Geometry: visualize the dependencies within the propositions of Book I of Euclid’s Elements of Geometry. The 48 theorems and constructions that make up the first book’s propositions are related through a complex set of citations and references: while some stand on their own (such as Proposition 1: To construct an equilateral triangle on a given finite straight line), others use earlier propositions as the premise for their solutions. Visualizing these dependencies can be useful in understanding the structure of the work and the thematic threads that hold each volume of the treatise together.

As it turns out, visualizing these relationships is not completely straightforward. At least, not if you want the result to be at all useful. There are a lot of dependencies.

I don’t remember what my solution looked like, but I don’t think it was very good. Some of my friends’ efforts were better; and some people on campus got exceptionally creative with the assignment. One woman, whom I don’t remember at all, made a sculpture! It consisted of 48 wooden blocks with the proposition numbers burned into their faces. Each block was connected to its dependents via a series of wires, and the most frequently-cited propositions were lowest in the sculpture, forming the base on top of which everything else balanced. It was extremely cool, but still pretty visually noisy, and not very useful as a learning aid (in my opinion, which I shared at the time and was accused of being jealous of the creativity the student had displayed, which I was, but that was beside the point).

In a couple of weeks I’m going to go to work full-time for a semantics research company. Their flagship product is a software tool that helps analysts and researchers gather, organize and visualize complex sets of structured data. Some people use the software to track terrorists. Others use it to monitor money laundering schemes. In an effort to better learn to use the software, I thought I’d see what it could do with Euclid.

The first step was to get the data. I relied on an online version of The Elements to get a list of the dependencies within Book I, since my copy of the book is in a box somewhere and I couldn’t be arsed to get up and look for it. Once I had the data (which I actually gathered for the first five books, since it was all there), I needed to format it in a way that would be easy to import into the visualization tool. CSV files work really well for this, so I made two: one that lists what propositions belong to what book, and one that lists what propositions depend on one another. For the sake of completeness, you can find the scripts I used to generate the files here, though I assure you it’s really quite boring.

The second step was to actually import the data into the visualization tool. This was the interesting part for me, since the whole point for me was to get practice with the tool. But, you don’t have the tool, and can’t afford it anyway (neither can I), so we’ll just skip this part and move onto the pretty images.

The visualization tool has a few different organizational presets, and as I have been playing around with different data sets, I’ve been able to see how the different presents lend themselves well to different kinds of data. The first preset I tried is the hierarchical view, which most closely resembles the visualization-as-sculpture I mentioned above (you can click on all these images to get the full-sized versions).

Hierarchical
Figure 1 | Hierarchical View

Neato. The propositions with the most direct and indirect dependents are at the bottom (I.1 and I.4 being notable among these); I.48, on the other hand, is way up at the top.

The visualization tool can produce other, somewhat more compact visualizations. This is the star view:

Star
Figure 2 | Star View

Here, the propositions with the most dependents are at the center of the map, while those with the most dependencies are on the outer edge.

Yet another view configures the data in a big circle. I recall that several students at St. John’s took this approach, though without the touch of putting the most depended-upon propositions in the center.

Circle
Figure 3 | Circle View

Finally, for the sake of completeness, here’s an orthogonal version of the star view. I don’t like it as much as the others, but it might be a little easier to trace the lines of dependency in this configuration, as they’re all horizontal and vertical.

Book I: Orthogonal View
Figure 4 | Orthogonal View

And there you have it. Once I had the data in place, I was able to do all of this with the push of a button. The moral of the story? I like my job!

Spain

Monday, 18 April 2011, around one in the afternoon.

Things I thought about this morning: three places and a person, in Spain.

In the summer of 2007, my cousin Travis was living in Spain. I went to visit him, partially, and partially I went just to wander around for a month with a backpack and much too little money. I landed in Madrid, and while Travis was off west in Extremadura teaching English to kids at a summer camp, I met his then-girlfriend-now-wife Stine, a Dane studying in Madrid. Travis and Stine met under circumstances from which I could only conclude that my cousin was in fact a James-Bond-esque character living a bracing life of international intrigue.

Stine met me at the Plaza Dos de Mayo, which she said was one of Travis’ favorite spots. She didn’t seem to know why he was so partial to it, but it struck me immediately as one of those places you just want to be. I didn’t know it at the time, but that plaza is actually the centerpiece of the Malasaña neighborhood, a creative and countercultural hub in Madrid, something like New York City’s East Village. I liked it, and I tended to go out of my way to have lunch or beer (always a caña, because I didn’t know how to order a full glass of beer) or coffee there whenever I was in Madrid and didn’t have anything else to do (which was often).

Right off the Plaza was a club Travis took me to one night. The first few times he said the name, I thought he said “La Vida Láctica”, which I translated as “The Lactose Life”. Didn’t seem like a very good name. Actually, the place is called La Via Láctea (The Milky Way), and is a veteran of the hedonistic movida scene that grew up in Malasaña in the decade following the death of General Franco (my fascination with whom being well known to my unfortunate friends and family).

I did not, at the time, feel at home in a club like that. I still don’t.

One painful memory from that night: going up to the bar to order dos chupitos — two shots, of Jack probably, or something equally terrible. I wanted to leave a tip, which was already an uncomfortable proposition because to this day I don’t understand the etiquette of tipping in foreign countries, and since I was feeling self-conscious I fumbled and accidentally flung the coins onto the bar and watched in horror as the very small amount of money (by American tipping standards) bounced off of the lady serving drinks and landed at her feet. She picked up the money and wordlessly gave it back to me. Trying to recover, I wanted to say “no, sorry, I just meant to leave a tip”, but since my bad Spanish was hampered by awkward fright and self-consciousness, I instead said simply “it’s yours” — or probably just “it’s you”, because, again, bad Spanish.

I fled, back to Travis and a few posh London women we were hanging out with for some reason, all of whom were way too cool for me.

Another night, on that same trip, Travis took me to this bar called Begin the Beguine. It was an entirely un-advertised hole in the wall somewhere in the labyrinth of streets between Calle de las Huertas and Calle de Moratín, run by a guy named Tony who remembered my cousin immediately, even though it had been a while since Travis had last visted. Tony’s caipirinhas are the drink of choice there — sugary lemon cocktails served in huge square glasses — and the house tapa is cherries on ice. Tony himself was wearing a tight black-and-white striped shirt like some kind of French caricature, and he only smoked these long, skinny cigarettes that I’d never heard of before.

The doors opened late and closed early, and if you didn’t arrive during that brief window, you were out of luck. For those who did manage to make it in, once the doors closed there was a general feeling of “what happens in Beguine stays in Beguine”. Being a total dork and utterly uncomfortable with myself, I only saw the prevalent substance abuse from a cautious distance. About 5:30 AM, Tony came around and served scrambled eggs to all the patrons who had stuck it out that long; at 6 AM, he politely told us all to get the fuck out, because the trains were running again and we no longer had any excuse for being there. I gathered that such is the usual routine in Madrid clubs, perhaps excepting the free breakfast.

Maybe a week later, Travis and I were hitchhiking westward from Málaga along the southern coast, trying to get to Cádiz. Somewhere just outside of Estepona, we managed to catch a ride with a crazy lady named Ruth, who had two dogs and an old van that had the weirdest transmission system I have ever seen. I let Travis do all the talking, because my Spanish is bad, and because I’d only ever really used it to write essays in school, and writing essays is very different from explaining to crazy ladies named Ruth who we were and where we were going and what we were all about. So, I had lots of time to sit and watch her work the van’s transmission, which was controlled via a row of old-style radio buttons on the dashboard. Ruth apparently made most of her money during the Spain’s festival season, traveling around selling drugs and clothing to hippies. That served her well enough that she could just do whatever during the fall and winter months, which we were heading into.

Ruth and her two dogs dropped us off in Tarifa, where we ate a bunch of fried things for lunch and reflected on the fact that we could see the mountains of Morocco on the horizon. It was one of the more surreal moments of my life, eating lunch with my cousin from East Texas and stopping occasionally to point and say: dude, that’s Africa.

Kind of a Typical Dream for Me

Thursday, 24 February 2011, around one in the afternoon.

In which my mom and sister sat there visibly, painfully bored, while I discussed Orwell’s take on US and German involvement in the Spanish Civil War, and why the loyalist Republicans ultimately lost to General Franco’s Nationalists. There were considerable historical inaccuracies, as well as a kitten.

I need to get out more.