Category Archives: Uncategorized

2011 in review

The WordPress.com stats helper monkeys (and their fabulous keepers — trust me, I know them, they’re amazing) prepared a 2011 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 1,600 times in 2011. If it were a cable car, it would take about 27 trips to carry that many people.

Click here to see the complete report.


Automatically sending changed files from BBEdit over SCP

If you use BBEdit on a local copy of code that you want to send to a remote server upon saving, here’s one way to do that:

  1. Create a file bbedit_docsave.scpt somewhere with the following contents:
    on documentDidSave(doc)
    set p to file of doc
    do shell script  "/Users/you/bin/copy2remote.sh '" & p & "'"
    end documentDidSave
    

    and compile it with this command:

    osacompile -o Document.documentDidSave.scpt bbedit_docsave.scpt

  2. Create the directory ~/Library/Application Support/BBEdit/Attachment Scripts if it doesn’t exist.
  3. Move the compiled file Document.documentDidSave.scpt to the Attachment Scripts directory you just created (or that already existed).
  4. In /Users/you/bin (or somewhere else, but remember to adjust the path in the .scpt file above), create (and chmod 755) a file called copy2remote.sh with the following contents. Note the check for */projectname/* in the path. This is important, because BBEdit will trigger the script for all files you’ll ever edit, and you don’t want to copy all files to your remote server. Pick any marker in the file’s path that indicates it’s part of a project that you want to send to your remote server:
    # Change colons to slashes in path:
    p=`echo $1 | tr ":" "/"`
    # Check whether this is a file you want to copy
    if [[ $p == */projectname/* ]]; then
         # tweak this to match your path and server
         cmd=`echo "$p" | sed 's;^.*/projectname/\(.*\)$;scp /Users/you/devhome/projectname/\1 you@server\:~/you/projectname/\1;'`
         $cmd
    fi
    

That’s it.  This will require tweaking to match your situation.  Works in BBEdit 10.x, I haven’t tested with others version.


Why I love Softpro Books in Denver

I want to give a copy of Revolution in the Valley as a gift to a bright young programmer and Apple fan that I meet with a couple of times a month.  I love reading stories about the chaotic founding days of world-changing companies or products, and I think he would too.  But it turns out the book is out of print.  Softpro Books to the rescue:

Found a copy at O’Reilly’s offices in Sebastopol. I should have it in a few days for you.

Wow.  You just don’t get that kind of service anywhere but a local retailer.  Softpro is one of the last remaining retail computer bookstores in the country, and it’s a gem.


Seamus Heaney, “Digging”

Every spring when I turn on the sprinkler system and begin another season of mowing the lawn every week and pretending that one day I’m going to do something about the garden, I think of this sonorous number by the great Irish poet Seamus Heaney:


My favorite 2.6% of the day

My new favorite run takes me through 4.5 miles of the open space near my house, has about 700 feet of ascents according to my trusty Garmin Forerunner, and takes me about 38 minutes on a good day.  There’s nothing like running under a Colorado sky on a sunny December day.  Those 38 minutes are my favorite 2.6% of the whole day.

This slideshow requires JavaScript.


Carrying the Fire

This summer, I picked up a copy of Mike Collins’s memoir Carrying the Fire at the Barnes & Noble in Melbourne, which is on Florida’s “Space Coast”. I’m a sucker for books about local happenings, even more so when there’s an adventure or geeky angle (or both, as with this book).

I just finished the book and recommend it highly to anyone interested in flying or America’s space program or Apollo in particular. Collins tells the story of America’s ambitious race to the moon from a personal perspective, and there’s lots of test pilot talk throughout the book.


Book Usage

I collect books. Once I bought the entire stock of the university library’s annual used book sale, which took two trips with a pickup truck to haul away to our house. OK, that wasn’t smart because we still had three or four moves ahead of us before we settled into our present house.

Now I mostly buy books from Softpro, a real, physical, local, independent computer bookstore. I still buy far too many of them, and keep having to give some away, and add new bookshelves to accommodate them all.

Here are two real problems with having so many books:

Problem One – There are some real gems that I never see, they’re lost among the thousands of books on my shelves. I need a way to remind me to consider the gems every once in a while.

Problem Two – Some books you just don’t need. Stuff like “Implementing SOA with J2EE”. Much better to use that space for an Erlang book or “Gödel, Escher, Bach”.

Both of these problems could be solved with some kind of coating on the books that registered touch and, after six, twelve or eighteen months of a book not being touched again, there would appear a bright yellow, orange or red dot on the spine. The dot would be a reminder to look at the book and either recycle itdonate it to the library, or rediscover it as a gem.

Of course, on a Kindle sorted by “most recent” you get the same effect, but come on, it’s just not the same as standing in front of a real live bookshelf.


Metamorphoses Play at LHS

Saw a brilliant performance of the play Metamorphoses by Mary Zimmerman at Littleton High School last night.

The performance by the super talented cast was very artful, funny and touching.  Great set, too.


Education Snapshot … Overheard

My daughter today (high schooler, Colorado):

“In Science we’re doing exactly what we did in middle school, but at a more basic level”

My niece (middle school, California) is having a furlough day today (meaning, school is closed because teachers are on one of their scheduled unpaid leave days).  Also, her school gets brand new textbooks every year, whether they’re needed or not, because it’s in the budget — and furlough days?


Siri iPhone App – First Look

Siri is a new iPhone app that takes spoken input like “coffee places near here” and shows you a list of coffee places near your location with distance, directions, etc.  You can also enter a query by tapping on a type of location you’re looking for, but that’s boring.  I haven’t tried some of the more ambitious queries from the company’s demo video, stuff like “get me a table for two at a romantic restaurant near work at 7pm next Thursday”.  For the simple queries I’ve tried, it works well and is surprisingly fast, considering it has to recognize speech (done by uploading the recorded text to a server) before it can process the query.  The technology is interesting, using context awareness and service delegation.  See Siri’s About Technology page for more info.

For the “coffee places near here” example, I have only a small criticism: Culligan Water is not a coffee place, and my favorite, the Tattered Cover bookstore’s cafe, which is about a mile away, isn’t on the list.  Not a big deal, I’m sure it’ll improve by improving query formulation to map “coffee places” to additional terms, or delegating to services with better data.

siri_screenshot


Follow

Get every new post delivered to your Inbox.

Join 244 other followers