January 2009

Programming A to Z – Assignment #1 Coupled Couplets

The first assignment was posted here, and was to

Use a combination of the UNIX commands discussed in class (along with any other commands that you discover) to compose a text. Your “source code” for this assignment will simply consist of what you executed on the command line. Indicate what kind of source text the “program” expects, and give an example of what text it generates. Use man to discover command line options that you might not have known about (grep -i is a good one).

I decided to work off of the sonnets.txt file that Adam Parrish (the instructor) had provided as a resource – it’s just a long list of (Shakespearean?) sonnets, with the ending couplets notable indented by two spaces. I decided to extract only these couplets and then reorder the lines slighty so that the AABBCCDDetc rhyme scheme was changed to ABABCDCDetc. It wasn’t going to be a fascinating work of ‘procedural poetics,’ but it seemed like an interesting challenge that would teach me a little more about the command line.

I had to Google around a lot and looked at the man pages to figure out how to make it work – it was somewhat frustrating dealing with UNIX syntax. The code with detailed comments is here, and the code without the comments is here (if you want to run it yourself, use the latter – it wasn’t working with the comments, and I need to ask Adam about it on Tuesday).

The output of the file when sonnets.txt (above) is used as the input is here. It should accept any input file with the couplets indented by two spaces and the other lines not indented, regardless of whether or not they are true sonnets. If there are an odd number of couplets, it will ignore the last one.

(I realize that the punctuation at the end of the lines gets somewhat messed up. This is fixable – I could put commas at the end of one line and periods at the end of the next – but probably isn’t worth the effort.)

A2Z
ITP
assignments

Gmail Hack – Muting Filtered and Labeled Threads

One of the coolest things about Gmail is the ability to ‘mute’ a thread – the ‘m’ keyboard shortcut will archive a thread and prevent future replies from moving that thread back to your inbox. This is especially useful for managing high-traffic email lists for which one only needs to keep track of a subset of the posts.

Unfortunately, this feature works only for emails that are in your inbox. If you have the emails going to that list filtered to skip your inbox and go straight to a particular label (which is common practice for dealing with multiple lists), then muting doesn’t help – the emails are already skipping your inbox, and the threads will still show up as unread in that list anyway.

But there is a solution! Albeit a somewhat complicated one, so read on if you have the same problem (note part of it is Mac OS X only):

  1. First, I made a new Gmail account – the name doesn’t matter, as I was the only one who was going to use it. I changed my filter that had previously been applying the ‘ITP – student’ label and skipping the primary address’ inbox to instead forward the emails to that secondary address and skip the primary inbox.
  2. Then, in the secondary Gmail account, I set up that filter again to apply the same label (although this isn’t strictly necessary) but kept everything in the inbox. If I want to mute a conversation, I can just select it and type ‘m’ (with keyboard shortcuts on), and it won’t show up in that inbox any more, unless someone replies to me specifically. So far so good.
  3. What about sending? I want to be able to reply to the list too, and do it as I was replying before. So I went into the Accounts tab of settings of the secondary email address, and added my primary email address as the default address from which to send mail. Since this email account never receives or sends email to individuals and is not synching with my Address Book, whenever I accidentally try to send a regular email from that account the person won’t show up in the auto-complete, I’ll catch myself, and switch applications. Using a different theme for each account can also help you differentiate.
  4. But there is a problem – emails sent from that secondary account will be in that account’s sent items, and not in the sent items of my primary account. Ah, but when I sent an email to the list it was getting sent back to me anyways, so my primary account will receive that new copy of the email I sent from my secondary account (pretending to be my primary account). They should then be searchable as normal. I even tweaked the filter in my primary account to not forward emails that are both to the student list and from my primary account to the secondary account, since I already responded to the thread and don’t need to see my response again.
  5. And finally – and this is the key piece of the entire puzzle – I used Fluid to make a site specific browser application for Gmail, and I use that app to stay logged in to my secondary account. With Firefox logged in to my primary account, I can stay logged into both at all times (if you use Safari as your primary browser it might only let you be logged into one… not sure what the solution to this is). And because Fluid does not behave as a full browser, if I click a link in a list email in my List-specific app, it will open in Firefox (and thus be, forever, in my AwesomeBar history). As an added bonus, I get a little red flag in the dock saying how many list emails I have unread, and I can simply close the Fluid app and not concern myself with the list if I am too busy for the distraction. (Update: I am now using Mailplane, which makes it easy to switch between multiple Gmail accounts.)

Feel free to comment or email if you have any ideas or questions or need help setting it up!

(Note that I tried another solution first – using Gmail’s stars to mark the student list threads as muted, and then trying to match those stars in the incoming filter. So new emails going to that starred thread would theoretically not be re-labeled with the student list label once they were starred and archived once. This doesn’t work, however, because the “is:starred” filter does not ever match incoming messages.)

ITP
lifehacks

4-in-4 Day 4 Project 4: Social Network Organization

My final 4-in-4 project was originally going to be “Plan Trip to SXSW” – including buying plane tickets and book a hotel – but not quite enough people seemed like they were ready to commit yet (props to Liesje for being decisive).

It was during this realization that I went to post my finished blog entry for the M[]leskines, and noticed that DreamHost was down. I spent a while trying to diagnose the problem (before they finally posted a proper status update) and researching other web hosts.

Somewhat simultaneously I received another flurry of random Twitter followers, and, since I hadn’t looked at my feed in days, decided that organizing them was more urgent, and made that my project. There’s a blog post that will come soon about some UI design thoughts that were crystalized by this project, but I don’t have time to finish it now.

I went through the 107 people I was following on Twitter, and copied their user names and real names (if specified) into one of five txt files based on my relation to them (click for full size) –

Those groups are Friends, ITP, Networking, Unknown, and Bots. I then used those lists to create groups using the functionality in TweetDeck, and now my Tweets are sorted (see rotated image below, or click for a horizontal version). This should make it easier to keep up with the groups which are most important and look through the less important feeds when I have time. I’ll keep both sets of lists up to date as I follow more people. It was a small project, and not as creative as I would have liked, but it needed to happen anyway and my day didn’t quite go as expected.

4-in-4
ITP
events
lifehacks
projects

DreamHost Downtime

If you tried to visit my site in the next few hours, it probably wasn’t loading. DreamHost, the company doing my web hosting, had a problem at one of their data centers. You can see the block below when it was down (where I’m getting no visitors), from Google Analytics

On the day after I got two or three times as many site views as I had on any previous day, this is pretty inconvenient, and I’m probably going to switch hosts. Al3x recommended Gandi, and I’ll look more into it in the next couple of days.

(I really wish Google or Amazon offered the sort of hosting service I needed.. those are the only companies I would really trust.)

I apologize to everyone for the inconvenience. Hopefully it doesn’t happen again.

ITP
admin

4-in-4 Day 3 Project 3: M[]leskine

I was in NYC for a couple of weeks during the summer of 2006 after I finished the Career Discovery Program in architecture at Harvard’s Graduate School of Design, and I went to see the exhibit of the work of architect Zaha Hadid at the Guggenheim. I enjoyed exploring the variety of her built and unbuilt design work, but it was her sketchbooks that made the most lasting impression (image by Ivar Hagendoorn, same books different exhibit) –

If you look carefully, you’ll notice that a rectangular piece has been cut out of each page so that a pen can be stored inside when the book is closed. I had started to use a Moleskine notebook during the program at Harvard, and when I finished my first one I cut my second one like Zaha’s using a ruler and an X-Acto knife. That particular brand of notebooks is relatively popular and often recognized, but I think the reputation is deserved, as they are quite durable. I carry them everywhere, and with some black electric tape on the binding they will last more than six months.

I was shopping for architecture supplies at Accent Arts in Palo Alto, and noticed a short black lead-holder style pencil that looked like it would fit horizontally across the top of a notebook rather than vertically next to the spine. I compared it to one they had in stock, and it fit perfectly. My notebooks since then have all had a whole cut out at the top, and I’m currently on my eighth.

In addition to the pencil, Gabriela gave me a fountain pen that fits nicely, and I’ve been using Pilot G2 Mini’s more recently for their simplicity and reliability.

It takes an hour or two to cut each notebook, and I decided to try getting them laser cut. I took one to Canal Plastics, and talked to Raymond, with whom I had worked to get pieces of acrylic laser cut for architecture models at Kevin Kennon Architect. Both covers of the notebooks bend back, allowing for a cut straight through all of the pages, and he agreed to give it a try.

The experiment was a success, so I ordered ten more moleskines from Amazon. I had planned my third 4-in-4 project to be to set up a store on Etsy on which I could sell the lasercut Moleskines.

He agreed to cut those too, but had some trouble with burning on one of them, and didn’t want to cut any more. I cleaned off the ash –


- and will probably give a few to the friends that have requested them (Dan, Kabir, Jorge, Cassidy) and save the rest for later. It’s a somewhat scaled back third project, but my second one was pretty ambitious, so I’m satisfied.

4-in-4
ITP
events
lifehacks
projects