ARTICLES

MARGINALIA

My Medicine

Hip hop is maturing as much as it can, I guess.

— Alex Cabrera, Jun 24, 2008. 2 Comments.

Here We Go Again

I’ve actually given up on version numbers for this site’s design. I think this would be 11 or something. Yes, that’s 11 redesigns in a little over a year. About 3 layouts ago, I started using names instead of version numbers. The current design is named Mrs. Wardh after the repeating background image which is a screen capture from the great Italian giallo flick, Lo Strano vizio della Signora Wardh.

A few days I got the redesign bug again. In progress:

thumbnail of redesign in progress

I need a new hobby.

— Alex Cabrera, Jun 17, 2008. Start the discussion.

Me and Joe

About a week ago I received a Facebook message from local congressional candidate Joe Garcia asking to chat “on my blog”. I’m not sure if he wanted permission to leave a comment, chat about my blog, or actually fly over to my hosting provider’s facility, stand on my shared server, and talk to me about some other issue. Either way, I was a bit intrigued and saw no reason not to talk to someone running for Congress. Here’s a copy of our Facebook exchange:

my facebook conversation with Joe Garcia

8:30 came and went and I received no call. At around 11:30pm I received a phone call from someone named Juan Carlos who identified himself as a member of the Garcia campaign. He asked if I would like to reschedule my call for the following day and then, assuring me that the campaign does not screen questions, asked what I was planning on asking Mr. Garcia. I informed him that the candidate had contacted me and was extremely vague about the purpose of the call. He seemed a bit confused, but we rescheduled for 5:00pm on Thursday, June 12th.

Just like the previous day, our scheduled time came and went with no contact from Joe Garcia or his campaign. It is now been about 120 hours since our initial call was scheduled and I have not been contacted via phone nor email by the candidate or any of his staffers.

Now, I’m not particularly pained by this. I, frankly, couldn’t care less; but I do expect that someone who is trying to amass campaign support for national public office could, at the very least, honor a commitment that he initiated. The inability to accomplish a simple phone call probably doesn’t bode well for one’s ability to tackle some of the most important issues facing our country.

Had the candidate or someone from his office called to explain why he blew off two back-to-back scheduled phone calls, I would have never mentioned the exchange publicly; but as Mr. Garica is looking to represent many readers of this blog, I feel it is in the public interest to share how he and his campaign go about honoring commitments.

I, on the other hand, have no problem honoring my side of the deal. You wanted to talk on my blog, Joe? Well, here you go.

— Alex Cabrera, Jun 16, 2008. 10 Comments.

Apple Bug: Safari, Mail, Spaces, oh my!

Warning: this post is a detailed explanation of a bug I have filed with Apple occuring when using Spaces and attempting to use the “Mail Link to This Page” shortcut in Safari. This post if filled with the kind of minutia that reminds me that not so deep down, I’m still a complete nerd. I apologize ahead of time.

There’s been a tiny bug in Leopard that’s been driving me nuts. I’m a huge fan of Spaces, especially after the changes in 10.5.3, and I’ve made heavy use of the option to have certain applications always open in a specific space. My workflow looks a little bit like this:

my spaces setup

General/Web Browsing (Space 1) is where I do most of my browsing and writing. While Safari isn’t set to always open in this space (it’s useful to have browsers open in multiple spaces), I do spend most of my browsing time in Space 1. Design & Development (Space 2) is where I do my “work”. Photoshop, TextMate, Transmit, and associated applications usually are kept here. Communications (Space 3) contains iChat, Twitterific, and my Facebook desktop application; these applications are set to always open in this space. Music (Space 4) is home to iTunes, Last.fm, and Acquisition; these applications are also always set to open here. Utilities (Space 5) is usually where I keep my Terminal windows and applications that I like to run in the background - for example, Transmission and TVShows. Finally, Mail (Space 6) is where I run Mail.app, almost full-screen, with the WideMail plugin installed. Yes, I am this anal.

Now let’s say I’m browsing in Space 1 and come across an article I’d like to share with a friend. There’s a few ways the interaction model could work:

  • Ideal (Automatic-Space-switching setting disabled)
    1. While using Safari in Space 1, I click on File ⇒ Mail Link to This Page
    2. A new Mail.app composition window opens in Space 1, I fill out the info, click send. The window disappears.
  • Good (Automatic-Space-switching setting enabled)
    1. While using Safari in Space 1, I click on File ⇒ Mail Link to This Page
    2. The OS moves me over to Space 6, my dedicated Mail space, where a new composition window is waiting for me.
    3. I fill out the info, hit send, and the OS takes me back to what I was doing on Space 1
  • WTF? (current implementation)
    1. While using Safari in Space 1, I click on File ⇒ Mail Link to This Page
    2. The OS moves me over to Space 6, my dedicated Mail space, and all I see is the Mail’s inbox.
    3. I quietly mouth the word “motherfucker”, and start wondering what the hell happened to my composition window
    4. I remember that this happens every fucking time I use “Mail Link to This Page” in Safari and Cmd+` my way to the composition window which has inexplicably been opened behind the main Mail window
    5. Preform a Control+→ to get back to what I was doing in Space 1.

In a perfect world, Safari would offer better integration with Address Book and I would simply be able to send a link without ever having to touch Mail as seen in my brilliant mockup:

safari-address book-mail integration

I’ve included this screencast if you’re interested watching the bug in action.

Note: I’ve unchecked the Spaces preference that automatically switches focus to the space an application is located when you Cmd+Tab to an application. Unchecking this setting allows you to spawn new windows of an application in your current space.

I’ve filed the bug with Apple. You can track it’s progress by searching for Bug ID# 6001337.

— Alex Cabrera, Jun 11, 2008. Start the discussion.

Newsracker

For most of my career in technology, I’ve worked primarily with front-end technologies - HTML/CSS. I consider it much more of a designer role, only I do my work with markup instead of Photoshop. I won’t go as far to say that I skip the Photoshop phase altogether, but I do try to break out of it as soon as possible and get to tangible code.

I’ve also worked a little bit with the tools that “programmers” use. PHP, *nix system adminsitration, blah blah blah. For the most part it’s boring. PHP is a pain in the ass to use, and I haven’t been able to wrap my head around the automagical frameworks like Ruby on Rails or Django. I don’t know either Ruby or Python particularly well, and these frameworks abstract so much that I don’t ever feel particularly comfortable using them to learn either language.

These days, however, HTML/CSS isn’t enough. You need to be well versed in Javascript, something I’ve been able to avoid for a while, and at least know a server-side technology well enough to build prototypes. I could do this in PHP, but even the thought of working with PHP is enough to make me want to repeatedly bash my dick with a hammer.

I’ve been messing around with Python for a while and ran through a couple of tutorials, but I needed a project of my own to really learn how to use it. I found a lightweight web framework called Web.py that makes me code all the important parts by hand without having to worry about the really low-level stuff like getting the page to actually display in a browser.

While browsing around about a week ago, I came across this page on Newseum’s website that collects the front pages of newspapers from around the world.

newseum's daily covers

It seemed like a gold mine of untapped data. Surely there would be some benefit from being able to analyze what’s on the front pages of newspapers around the world. Newseum provides all sorts of data long with the image: the name of the publication, city, state, and country of publishing, and the date of the newspaper. If I could somehow glean the context of each over, which stories were given prominence, and what words are being used I would be able to visualize what issues are being covered and how they are being reported.

Now that I had my project, I needed to figure out what I wanted to do with it. Initially, I was planning on downloading the full-size JPG, finding some sort of OCR library, indexing the words, and drawing conclusions based on the gleaned data. This plan ran into a few problems:

  1. I knew next to nothing about Python.
  2. Even if I was comfortable with Python, it wouldn’t matter because I’m a horrible programmer.
  3. There aren’t a lot of OCR options for Python. Google open-sourced Tesseract which is based off work done at HP during the mid-90s, but it’s a bit of a pain in the ass anyways.
  4. Any output I could get out of Tesseract would be useless, because the JPGs weren’t of sufficient quality to perform OCR.

I solved the last problem to a certain extent by using the PDF files Newseum provides for each of the newspapers, but I still couldn’t, and I’m sure it’s entirely my fault, get any output from Tesseract. Instead of continuing to bang my head against the wall, I decided to just change the short-term goal of the project and get something running as soon as possible.

After massaging the data into SQLite and grabbing longitude and latitude coordinates for the publishing location of each newspaper (US only for now), I decided I would plot each cover onto a blank canvas based on it’s latitude/longitude. The end result would be a daily, dynamically generated graphic representing the most important daily issues throughout the country based on local media attention.

I was able to cobble together some python code to access my SQLite database, fetch both the JPGs and PDFs (I still want to analyze the content at some point), and resize them for plotting purposes. I tried getting away with only downloading the PDF and converting that, but PIL kept choking.

screen capture of python script running

Sadly, Python either lacks good visualization libraries or I couldn’t figure out how to use the ones that exist. After some searching, I came across NodeBox, a Python-based visualization tool. I was able to load up my database, access the newly downloaded images, and create a composite map using the latitude/longitude coordinates. The end result looks a little something like this (click for full size version):

newsracker map for June 9th, 2008

I’m pretty happy with the results, but there’s still a lot more work to do. I’d like to be able to size the newspapers by relative circulation numbers so that more popular papers become more prominent. I also haven’t been able to figure out how to get the NodeBox library running on my web server, so any web app I would currently be able to build would involve far too many manual steps to keep updated. I’m toying with doing the visualization on the client side using jQuery, but I really would like to generate it on the server using Python.

Nerdy, I know.

— Alex Cabrera, Jun 10, 2008. Start the discussion.

Jim Webb is effing militant!

jim web black power fist

Assalam alaikum.

via Sullivan

— Alex Cabrera, Jun 06, 2008. 3 Comments.

Lost

— Alex Cabrera, Jun 04, 2008. Start the discussion.

But if a thing test me, run for me gun

Stewart Rhodes in the June issue of S.W.A.T via Attackerman:

I was hoping to break it to you gently, but now that the Bush Administration has so blatantly stabbed gun owners in the back, it is time to rip the mask the rest of the way off the fake conservatives who have conserved nothing, and show you the full extent of the damage that has been done to our Republic in the last seven years. It’s not going to be pretty, but it has to be done.

As I will further show in coming columns, the infrastructure of our Constitutional Republic is being torn down and replaced with something else — and that something is fundamentally unsuited to a free people and incompatible with liberty. We are seeing a constitutional republic in its final death throes, being killed by a thousand treacherous cuts, with the final slashes being inflicted by cold reptilian lawyers who fancy themselves “conservatives.”

Gun owners turning on the Republican Party. About time.

— Alex Cabrera, Jun 03, 2008. Start the discussion.

OMGROFL

I. HEART. THE. INTERNET.

— Alex Cabrera, Jun 01, 2008. Start the discussion.

NOW READING

Month Year
Jun 2008

MONTHLY CATALOG