Spring Flowers
Springtime is marked by the blossoming of many kinds of flowers in my yard. Above, some small blue forget-me-nots. I can’t take credit for planting any of these flowers – that belongs to my mom and grandparents – but I appreciate their colorful presence.
Posted on Monday, May 6th, 2013.
Binghamton Bridge Run
(I was waving to the camera, not flapping my wings like a bird. Photo by mom.)
I ran the Binghamton Bridge Run half marathon this Sunday. Here are the official results: I ran a 1:38:47, and nailed my target average pace of 7:30/mile. My time was about a minute slower than last year’s result (I notice a number of acquaintances’ times were as well), but I ran a much better race this year. I started off relatively relaxed (my early miles were around 7:40 or 7:45) and just gradually increased my pace, staying on the offensive throughout the entire race. It felt very good to remain in an attitude of control the whole way, never lapsing into the psychological state of “just hanging on” – a real risk during the lonelier back half of a long race, in my experience. I hope to carry this confidence into next month’s notoriously hilly Vestal XX.
Posted on Monday, May 6th, 2013.
Running Calendar Update
Instead of running the Uphill Mile race in Ithaca this weekend, I plan to watch the Binghamton Circuit Race and get a couple long runs in in preparation for the Binghamton Bridge Run half marathon next weekend.
Posted on Friday, April 26th, 2013.
One Down
As planned, I ran the Forks XV this past Sunday. It was the 40th running of the race but my first time running it. Here are the official results. I did the 15k in 1:08:30, at an average pace of 7:21 per mile.
Next up is the Remington Murder Mile in Ithaca on April 28. I’ve also added the Oneonta Tuff eNuff Challenge 5k obstacle course to my summer calendar.
Posted on Tuesday, March 26th, 2013.
Fabric Marker Face
As long-time followers may know, now and then I draw on my old MacBook with markers. Here’s a recent portrait, drawn finger paint style with a fabric marker. The fabric marker ink behaves curiously on this smooth surface – amenable to smudging or scraping erasure, depending whether it’s wet or dry. The mix of textured shading and inky black blots makes this one of my favorite looks in recent memory.
Posted on Friday, March 22nd, 2013.
Eclipse Online recipe
I made a Calibre recipe for Eclipse Online, a free short fiction magazine edited by Jonathan Strahan and hosted by Night Shade Books.
Like Strange Horizons, Eclipse Online is published only as a web site. This recipe assembles an ebook from recent posts and stories. Get more details and the script itself at Github.
Update: Sadly, only a month or so after I discovered Eclipse Online and wrote this recipe, the magazine was closed and will no longer be published.
Posted on Friday, March 22nd, 2013.
2012-2013 Portfolio
Posted on Tuesday, March 19th, 2013.
Calibre ebook cover art in Slideshow screen savers
The Mac OS X 10.8.3 update is out. Among the various minor fixes is this item:
Allows the Slideshow screen saver to display photos located in a subfolder
This restores the slideshow behavior from previous versions of Mac OS X; until now, it was inexplicably absent from Mountain Lion (10.8). Missing support for nested folders made it inconvenient to use photo collections organized in folders as the basis for screen savers.
Calibre organizes your ebook files, including cover images, in subfolders of a main library folder. So, now you can select your Calibre library folder as the source for a slideshow screen saver. (If you don’t know where your library folder is, you can re-open the Calibre Welcome Wizard to check the location, as pictured at left above.) The screen saver appears to ignore files that aren’t images, so the result is a slideshow of cover art from your ebook library. This works out nicely if, like me, your ebook library contains many magazine issues with great cover art.
Posted on Friday, March 15th, 2013.
Backups
It’s widely recommended to make regular backups of your files, but until recently that’s been advice I’ve neglected. Now, though, I do have a regular system in place. Here’s the setup:
My Mac mini has a 500 GB internal drive. It is connected to an external 2 TB drive with two partitions. One partition is an exact bootable backup of the internal drive, updated each night with SuperDuper. The remainder of the external drive is allotted to Time Machine, which allows recovery of previous versions of individual files. These measures only guard against drive failure (inevitable) and user error (likely). A more robust backup strategy would include off-site copies of these volumes, to guard against local meteorite strikes or other such mishaps. Toward that end, I do store many current projects on Dropbox, and most of my programming-related projects are mirrored on Github as well.
Once set up, this scheme is easy to maintain because Dropbox, SuperDuper, and Time Machine all perform their jobs automatically. I acknowledge that the local backups would not be quite so easily automated (and therefore reliable) if my computer was a laptop, in which case I’d still have to remember to plug in the drive on a regular basis.
I share this not to imply that you should use the exact same backup system, but simply to encourage you to consider whether you have any digital files that may be worth the investment of a little verifiable protection.
Posted on Friday, March 8th, 2013.
An arcencode example
Arcencode is my Tcl implementation of the compression algorithm used by both MapQuest and the Google Maps API to encode a list of coordinates as a printable string. It can be used, for example, to obtain a relatively compact representation of a route that can be passed as a single parameter value to a web map.
Here is a GPX file exported from a map created with MapMyRun. It contains a track representing a route through a nearby park, pictured above. The track consists of 790 points, listed here in plain text form. If the contents of that plain text coordinate list are assigned to a variable named coordinates
, the encoded form can be obtained with:
set encoded [arcencode $coordinates]
With line breaks added, the contents of encoded
are:
q}g`GrlfnMPDND\DJ?L?T?P?N?N?N?P?VAPANANAPANAPANATGNELGXENANANCNANA^BNDPDNBNDNDND NDPDNDNBNDNDPDNDNDNDVHNFPFNFNFNFPFNFNFNFPFNFNFNFPFNDNFNFPFNFNFNFVFNBPBNBNBNBVFND PDNDPDNFPDNDPDNDPDNDPDNDPDNDPDNFPDNDPDNFPFNDPFNFPFNDPFNFPFNDZLHFJDNFPHNFNHPFNH\F LAJ?V?F?PFNFNDNFNHZNLHNHLHLHLHNJLHLHT?N?PAN?PAPAVDPFNDNDPDNFNDPDNDNFPDNDPDNFNDPD ND\JLDNBNDLDNDNBTFNDLBLDVDN@PBN@PBN@PBNBP@XHNHLFNHNFNFLHNFNFPVBNPVJFHHRLHFPANCPC PAPAR?L@R@P@P?N@P@P@P@P@VFLDLFRHNFNFPFNFNFNFNFNFNFTLHFLPLNJLRTJHPJJDPBTAJCPGPGNE PGNGPGNGNEPGNGPGNEPGNGNGPGNEPGZIJAJAVJLDLDRAPENCPCNCPENCPCNEPCXGNCLCNCNCPDPHTTJJ HLHJLNJLLLRLLBPFRNJLJJJLJLTHL@T@L?N@THLHLHLHNLNJLLLJNJ\LL@N@N@L?N@ZALENCLCNENCRI NGNELGZKNGNGNGNGNGNGNENGNGNGNGNGNGNGTUFQHOHOFQN[HOFMPYHKHINQJKLLHRHPHPHRJPHPHRHP J^BPDRDPDVJVHNHPPNNJLHLHLJRFPFNDNDPFNDNDPFXHLFLDLDRFNFNDNDRBNBN@RENCPEPCNEXCH@P@ VJJHHHFBEWCSEUGSIUO[KOIMIMUWKMMKMMKMMMMKKMMMMMSMOGMIOIOGOIYQMIMIMGMIKIUMMKOIOKMI OIOKMIOIOKOISKOEMGOEUCOCQAOAQCQAYCMAMCSEOEOEQCOEWCM@WBMBOBODOBUJMFMHMHMLOJMLWPMF MFMFWFMBOBODYBO@O?O@O@O@SCOAOCQEOEQEQEOGQEOGWGMAU?M@O@QDODQBWFQBOBO@QBOBOBQBOBSB O@QB[DOBOBODOBOBOBOBUDQDOBOBQDOBOBW?KEQGMGQ@QBQFOD_@NODOFODOFOFODOFODOFODOFOFODO FODYJK@Q?SGKCOMKKQQKMKOKMOKUMOGOGOGOGOGOGOGQGOGWKIEOGWEQ?OAQAOAQ?OAQAOAQ?W?SGIIK GKOKQMOOMMISCUHGFQGOGOIOGOIOGOIQIOGUGQAOCQAOCQAOCQAOC[GOEOEQEOCOEOEOEOEOEOESEOGQ EOEQGOEQEOEQGUGOEQGOEOEOEQGOEU?Q?O@Q?O@O@YIOIMKMIOIMIOIMIMKQGQGOGOGOGYEM?M?Q@[GM GOGMGMGMGUIMGOGWMKEMCQIQEOGOGQEOGOGOGQE[KQEOEOEQEOEOEQEOEOEQEOEOEQEOEOEQEOGOEQEO EWEOCQCOEOCOC_@KOGOGOGOEOGOGQGOGOGOGOGOGOGOEOGOGOGOGOGOGOGWGOEQEOEQEOEQEOEQEOEQE OEQEOEQEOE[AK@M@Q@Q@OBQ@QFOFOFWBO@Q@O@Q@O@Q@Q@U?O?Q?Q?O?Q?Q?O?]CKEMCME
Succinct, considering it encodes detailed geometry. A coordinate list of 790 corresponding points can be recovered from this block of text with the complementary arcdecode
procedure:
set decoded [arcdecode $encoded]
The decoded
coordinate list can be examined here.
An important proviso: this encoding scheme is lossy. Specifically, coordinate values are rounded to five decimal places. Compare the input coordinates to the decoded output for an example. Any precision can optionally be specified, but greater precision compromises the amount of compression. (Note that the Google Maps API is only compatible with five-digit precision).
How does this algorithm work? Google offers a technical step-by-step explanation. Essentially, compression is achieved by storing only the difference between each coordinate value and the previous value in the sequence; this requires fewer digits than storing each value in full, especially since precision is limited to a fixed number of digits. The values are packed into a printable Base64 representation in a way that eliminates the need for delimiters between coordinate values: values are bit-shifted left before output, and the ones place is used to mark whether the subsequent character represents a new coordinate or a continuation of the same value.
I updated my WheresThatSat site to use JavaScript and (on the Twitter bot side) Ruby implementations of this algorithm. It’s an appropriate application – previously, satellite ground tracks were encoded as a repetitive sequence of separate point parameters. In addition to yielding somewhat shorter URLs, this compression method ensures the correct point sequence is preserved even if the URL parameters are re-ordered.
Posted on Sunday, March 3rd, 2013.