Home > From The Labs > Channeling Douglas Adams

Channeling Douglas Adams

December 9th, 2011 Leave a comment Go to comments

In Last Chance To See Douglas Adams talks about writing a program that is very sexy and has pull down menus and everything, and it’s entire purpose is to figure out the volume of the nests made by a certain kind of bird. In an article called “Frank The Vandal” he writes about a desire to be able to take just the parts of programs you want and paste them into a workflow so that you can do whatever it is you want to do without using six different programs. This is a mindset that resonates with me. If I can spend a few happy minutes1 writing pointless software to solve a problem now instead of seconds taking care of it manually once a week I will definitely go for the pointless software. It was in this vein that I tackled the following

Extremely Small Problem:

I do a lot of what Natalie Goldberg calls “practice writing”. which is where you just block out some time and keep writing for that entire time. This writing can be directed, or not, but the goal is to keep moving forward, to keep putting words on the page, or, in my case, into the text document. This isn’t “real” writing that you plan to put in front of other people some day, this is just exercise, to keep those writing muscles in shape.

When you exercise your muscles, you aren’t left with an artifact of your exercise. But when you do writing exercise, you have this document that you created, and have to do something with it. It’s possible that some part of it might be worth something to you in some context, so it seems wasteful to just delete it. Once again referring to Natalie Goldberg, these are like compost; they’re not really valuable by themselves, but if you keep piling them up there’s a chance that someday something good will grow out of them. Being the nerd that I am, I decided that I would keep all these useless little documents, and I would keep them all in one folder, so they would stay out the way.

So, on my home Mac I set up Hazel to just take those documents, rename them to today’s date (which gives me a good record of which days I did my writing practice and which days I didn’t) and shove them in a folder. All of this happens without me thinking about it, because Hazel is awesome. So, here comes the extremely small problem:

Sometimes I do my writing practice on my laptop, which is a PC.

Because I’m insane and picky and whatnot I use FocusWriter on the PC2 and FocusWriter, by default, produces Rich Text files (rtf files). BUT I have WriteRoom set to produce plain text files (txt files). It’s possible that I could just set FocusWriter to save things as txt files by default, but that’s crazy talk. Simple solutions need not apply, thank you very much. And I still have the problem of getting my little documents3 from my PC to my mac, and in the right folder.

Now, I grant you, I could move these files myself, but part of being who I am is having a rock-solid conviction that I shouldn’t be thinking about things if I can make a computer think about them for me. My ultimate goal is to be able to write something mindlessly and forget about it, secure in the knowledge that when I look for it4 it’ll be where I expect it to be.

After a little bit of thinking and a little more tinkering, I came up with the following

Gloriously Baroque Solution:

The moving parts involved here are (in order):

  1. Dropbox
  2. Hazel
  3. Automator
  4. Word 2011 for Mac
  5. Hazel again

Here’s how it goes:

I write my useless document, and save it to a particular folder in my Dropbox. It’s instantly beamed to all the other computers that are connected to my Dropbox account.Otto: the Automator icon

On my mac, Hazel is monitoring that folder, and sees a new rtf file show up. It starts a rule5 that renames the file and moves it into my “compost” folder. But the file is still an rtf instead of a txt file! Not to worry, this is where it calls Automator.

I’ve created an Automator workflow that takes the file, loads it into Word, converts it into a txt file and saves it.6  It then hands control back to Hazel. The Hazel rule completes, and colors the label of the original rtf file gray. This triggers a second Hazel rule that is watching the compost folder. This rule does one thing: if it finds an rtf file with a gray label it puts it in the trash. Since these files are only turned gray after the txt version is created I’m no longer worried about keeping the rtf file around.

This all works perfectly, much to my surprise, and (even more surprisingly) usually takes less than five seconds to run, even with all the Word opening and closing stuff. And since it’s happening while I’m not at my mac it’s effectively happening instantly.

Conclusion

Well, there isn’t one, really. All in all this took me about 20 minutes to set up, and will save me a few seconds of work a few times a week. But it’s work that I’m unlikely to do by myself, which would compromise the integrity of my compost folder. So, here’s to creative solutions to minuscule problems!

Note: This article was cross-posted here and at Coals[2]Newcastle.
  1. or hours []
  2. it most closely matches the functionality of WriteRoom, which is what I use on my mac []
  3. which, you’ll remember, are pretty much worthless []
  4. which may nor may not ever happen, but that’s beside the point []
  5. Hazel’s name for a set of actions that happen when a certain condition is met []
  6. and then closes Word. I don’t know why this is a separate step, but it is. []
  1. Sue
    December 9th, 2011 at 10:27 | #1

    I opt for the manual once a week. But I do like Dropbox.

  2. Ace Deuce
    December 10th, 2011 at 13:52 | #2

    Thanks, Nate. I forgot about Hazel. And your opening remarks reminded me about OpenDoc, doomed by the machinations of Microsoft.

  3. Ace Deuce
    December 10th, 2011 at 13:58 | #3

    And will you be posting more after this? I don’t do twitter, or tweet. I’ve been hoping it is just a fad that will go away any day now.

  4. Jon
    December 14th, 2011 at 20:16 | #4

    I’m with you, Ace; I don’t do Facebook or Twitter or LinkedIn any of the other social media fads.

    Give me Slashdot and CANS and I’m good.

  5. Jon
    December 14th, 2011 at 20:16 | #5

    I’m with you, Ace; I don’t do Facebook or Twitter or LinkedIn or any of the other social media fads.

    Give me Slashdot and CANS and I’m good.

  6. Jon
    December 14th, 2011 at 20:17 | #6

    Sorry for the double post.

  7. Sue
    December 24th, 2011 at 19:43 | #7

    Merry Christmas to all and to all a good night! See you all next year.

  8. Ace Deuce
    January 1st, 2012 at 01:41 | #8

    Happy New Year, Sue! And Nate, I guess. If he ever comes here any more. Sniff!

  9. January 1st, 2012 at 23:51 | #9

    Nice work Nate. I have been working on a similar system in which my fridge recognizes that I have leftover turkey, taps into my bread box to check what state my current bread is in and starts my breadmakeer depending on the shade of blue/green mold on the bread. It then runs an analasys of current condiments and determines the best possible sandwich scenario. I then have it relay a message to my wifes cell so she can come make me said sandwich. So far it keeps stalling out on the “wife makes sandwich” part, but I have faith I will get all the bugs worked out eventualy!

  1. No trackbacks yet.