Footnotes and Textpander

August 28, 2005

I've contemplated using footnotes here for years and have fleshed out all kinds of variations, but I always seem to abandon them rather quickly, opting instead to use long parentheticals because implementing footnotes in HTML is a bit of chore.

Technically, it's pretty mindless. All you're really doing is using anchors to specify a spot (i.e., the footnote) to move to within the HTML document — HTML 101. The thing is, to make everything look nice and function well, a bit more effort is required, and this effort, over time, can become quite burdensome.

That's where Textpander (now called TextExpander) swoops in to save the day. "Textpander listens to what you type and inserts predefined text snippets on the fly whenever you enter their corresponding abbreviations." While there have been other programs that do this very thing, I've yet to find one that does it as well as Textpander; it's fun to use and lends itself well to all kinds of applications, including hypertext footnotes, which I describe below.

I've 'mapped' both the footnote reference and the footnote itself. Whenever I type "rf" (in any application) the following automagically appears:

<sup id="r1-%m%d%y"><a href="#f1-%m%d%y">1</a></sup>

And when when I type "fn," out pops:

<div class="footnotes">
<hr />
<li id="f1-%m%d%y">
<p>FOOTNOTE TEXT<a href="#r1-%m%d%y">&uarr;</a></p>

As you can see, these little snippets of text are nothing more than footnote 'templates' that I created and all I'm required to do after they've been 'called' and inserted is add the footnote text; I went ahead and 'mapped' the 2nd and 3rd footnotes as well so that I don't have to manually change the number at the beginning of the anchors that corresponds to the current footnote (see above examples).

Unique anchors

Obviously when you're using anchors you need them to be unique, else, when visitors are on a large archive page (such as that for 2004), a footnote reference might bring them to a footnote meant for a post other than the one they're currently reading. See the "%m%d%y" text in the examples above? I use these to produce the date in the form of "082905" (for August 29, 2005), which, as it turns out, are perfectly suited to uniquely identify a particular point in the text.1

You'll also notice a little arrow at the end of each footnote. The links used for these arrows need to be unique as well because they bring the reader back to the footnote reference that brought them down to the footnote in the first place (hat tip Gruber).

Too serious?

I realize that some of you might think that by using footnotes I'm taking myself (and this site) a bit too seriously, and you might be right, but if at the end of the day the footnotes make the posts easier to read, then I don't really care.

  1. Assuming of course that you don't have more than one entry per day that uses footnotes. I can't see this being an issue for me.   

booq Vyper PowerBook sleeve

August 28, 2005

I've been slacking lately with "reviews" here and so I figured it was high time I talked about something that I've been using for a few months now, the booq Vyper PowerBook sleeve. From the website:

Simply put, Vyper has to be the coolest laptop sleeve. We sandwiched durable, semi-rigid high density foam between a layer of 1682D cross-weave ballistic nylon on the exterior and a super non-scratch lining on the interior - an effective blend. Virtually molded around your 15-inch laptop, Vyper M is the most compact sleeve for your 15-inch PowerBook.

That pretty much sums it up and I can't say that I disagree with any of the claims. Find me a better sleeve and I'll buy it. I've never been a big fan of sleeves because they always seemed to miss the point. Almost by definition a sleeve is handleless and doesn't really allow the user much flexibility. But the Vyper changes all of that because it's rugged (and thin) enough to be put into a regular bookbag, as if it were just another book, which is exactly how I use it (and why I purchased it in the first place1). I'm incredibly careful with my "toys" (it's kind of absurd actually) and so for me to be able to treat my favorite toy this way and not think twice about it is really saying a lot.

This is the paragraph where I'm supposed to complain about something, but I can't come up with anything — it's a great product.

  1. I was headed back to Florida and needed to bring a suit in a bag separate from my regular suitcase. I also needed to bring my bookbag and so I was going to have more than three pieces of luggage and I could only check one of them (I didn't want to check my computer, bookbag, or suit). So, I needed the sleeve to kind of merge the computer with the bookbag (and yes, I realize that there are other products that do this very thing; in fact, I owned a Brenthaven Pro back in the Titanium PowerBook days).  

Largest mailbox size?

August 27, 2005

I mentioned a couple of months ago that my "personal" inbox had crossed the 20,000 e-mail mark; I've now just passed 22,000.1 I'm fairly certain that the app itself doesn't have an upper limit, and so I'm curious to know, what's the largest usable mailbox out there (and by "usable" I mean a mailbox that's being hammered on a daily basis)?

I'll keep updating this post with the largest number I receive.

Currently, the largest number is 283,686 (I required screenshot proof of this one).

  1. I've had a lot of people e-mail me about the fact that my e-mail doesn't seem to be sorted in any particular order, but is instead all lumped into one big folder (or two, sent/received). This actually isn't the case — I use Mail Act-On (something I'm sure to write about in the future) in conjunction with a fairly elaborate system of smart mailboxes (scroll down a bit after the jump), which leave the mail in its original folder, but replicate it across the "smart" mailbox.   

The PowerBook Prank

August 25, 2005

The PowerBook Prank is a very entertaining account of one man's attempt to scam the scammer. This is something that would normally get relegated to the bits (you can actually find it there as well), but I wanted to put it here too so that no one missed it.

Apple wallpaper

August 22, 2005

This picture is of the Apple store in San Francisco (the side facing Stockton street). As soon as I took this shot, I had a feeling I was going to be happy with it. It came out perfectly symmetrical (I didn't crop it at all) and I thought the colors were awesome. In post-processing I bumped up the saturation a bit to bring out the gradient and wiped out a few artifacts that surfaced due to dust on the lens.

Remember that clicking the photo will take you to its Flickr page where you can download the full image (3504x2336) and comment if you'd like.

Apple wallpaper

Fried okra in Silicon Valley?

August 21, 2005

Where can a brother get some fried okra in Silicon Valley? I think I've asked this question of just about every person I know in California and have come up completely empty. It's kind of funny the responses I get out here on the left coast; they range from "What the fuck is okra?" to "What the fuck is okra?" Having exhausted the people I know, I figured I'd ask here and see what trickled in.

100,000 words

August 18, 2005

I just received an e-mail alerting me to the fact that my weblog entries now contain more than 100,000 words (you can see the exact number at the top of the archives page). Wow. Of course I now want 1,000,000.  :)

When can I get off this damn thing?

August 16, 2005

While I was technically really happy with this picture, the "bored" look on the girl's face took some of the wind out of my sails. Either way, I love the colors, which I brought out a bit in the post-processing stage.

When can I get off this damn thing?

Related Entries apostrophe error

August 14, 2005

As many of you have noticed and routinely bring to my attention, the Related Entries WordPress plugin (you can see it in use on the sidebar when looking at an individual archive) breaks any time the title of the post for which related entries are being sought, contains an apostrophe. I e-mailed the author a few months ago, but he couldn't nail down the problem.

I came up with a pretty elaborate solution that I've been using for the past week or so, but have since abandoned. Basically, I split the title of the post, delimited by spaces, into its constituent words. I then cycled through the array of words and used preg_replace() to remove any apostrophes and letters that followed them. Finally, I cycled through the now-modified array of words and concatenated them with each other to form the title sans apostrophes.

After slapping myself for wasting so much time I came to my senses and remembered the addslashes() function; a single call to this function fixes the problem. Feel free to grab my hacked version of the plugin and do with it what you will. Be aware that my code has the find_keywords() function removed (I don't use it and I doubt many of you do either).

You don't need to worry about the possible double escaping of anything because the term being escaped (i.e., the title) is never inserted back into the database. It might also be prudent of me to mention that addslashes() is not needed if your web server's PHP installation has magic_quotes_runtime enabled, but of course if that is the case you probably aren't seeing the apostrophe error in the first place.


August 12, 2005

I took this shot last weekend while up in San Francisco. I didn't like the colors too much and so I played around a lot with different black and white setups before deciding on what you see.


Justin, circa 2005

August 07, 2005

I figured I might as well go ahead and bring this whole pictures-of-Justin thing full circle by putting up a picture from earlier this year (see 1993, 1997, and 2003). While usually pretty reluctant to post pictures of myself, I seem to have gone a bit mad the last few days and said to hell with it; I assure you though, this will be the last photo of me for a while.

Justin, circa 2005

Justin, circa 1997

August 07, 2005

As promised, here's another scanned picture of myself from back in the day. That's myself and Bonnie, a good friend in high school and the girl I was dating when this picture was taken.

Justin, circa 1997

Justin, circa 1993

August 05, 2005

While back home for my friend's wedding, I scanned a couple of photos of myself from a few years ago; you can find the first of these below. That's Wendy (a good friend of mine since 4th grade) and I getting ready to head into the 8th grade dance in 1993. I'll put up another in a few days.

Justin, circa 1993

SBC Park is beautiful

August 02, 2005

Yesterday I went to my first San Francisco Giants game with a few friends. Though I'd been asked to make my way up to SBC Park a couple of times before, it just never worked itself out. Notwithstanding the fact that the Giants lost (as did the Oakland A's when I visited the McAfee Coliseum for the first time last week; truth be told, I couldn't care less about the outcome of either game), we had a good time and I managed to take a few pictures, some of which I've put up on Flickr.

SBC Park

Sony PSP

August 02, 2005

I finally caved and bought a Sony PSP a few days ago. I'm sure no one is surprised that I picked up one of these (have you seen it?!?), but I'm sure some (including me) are surprised that I held out so long.

Within minutes I had it booted up, connected to my wireless LAN, and downloading a firmware update. Shortly after installing the v1.52 firmware I remembered reading that the Japanese v2.0 firmware was floating around and that this version included a web browser (not the Wipeout Pure hack) and worked fine on "English" machines. Not wanting to buy yet another cable (you can't move files from your computer to the PSP over Wi-Fi, though after the v2.0 update I'm assuming that you can probably download files through the browser), I couldn't come up with a reason why the USB cable that came with my Canon 20D wouldn't do the trick, so I tried it out and it worked flawlessly. After transferring the update to the PSP over USB and then rebooting, I was quickly browsing my site on the device. Unfortunately, v2.0 has not been "cracked" yet and so any emulators or other things I want to run will have to wait, but I'm sure it won't be too long before the deed is done.

Playing games and hacking away at this thing will be the death of me. It's not without reason that I've denied myself a gaming system for the past few years (save the Gameboy Advance SP).

It's official

July 30, 2005

Yesterday morning Kenyon & Kenyon officially offered me an associate position upon graduation from law school. I think it goes without saying that I'm ecstatic right now, but I'll go ahead and say it anyway: I'm ecstatic!

I'm doubtful that I could have had a better summer at any other firm in the country. It was a wonderful experience and I feel very fortunate to have found what seems to be a great fit for me.

I've also been asked to work part-time during my last year of law school. While this will certainly be difficult given all of the things I'm already involved with outside of school, the opportunity was obviously something I couldn't pass up and I look forward to working with everyone again as soon as possible.

San Jose Grand Prix

July 29, 2005

Earlier today the firm gave us some tickets for the San Jose Grand Prix, which, by the way, has turned San Jose completely upside down — the track is nearly two miles of streets in the heart of downtown and so getting anywhere in the city is a nightmare. We got to take a tour of the pit and had great seats right above it.

I didn't bring my camera to work because I didn't think I was going to the races, but one of the partners actually has a 20D and offered to let me use it. I'll put some of those pictures up as soon as I get them from him.

Without question, the coolest thing I saw at the track on Friday was the drifting exhibition. I've watched a lot of drifting videos on the net the past couple of years and just read a great article in the latest edition of Esquire about it (subscription required), but had never actually seen it done (on a track!) in person. All the superstars of the sport were there and they put on quite a show. It was fun to watch everyone's reaction to all of the near-crashes and donuts. I absolutely could not wipe the grin off my face each time they slid through my turn.

Got root?

July 29, 2005

I think it's a safe bet that I'm the only summer associate at a large IP law firm that wears a "Got root?" shirt around his apartment. Old habits die hard.  :)

And so it continued

July 25, 2005

It's well known among my friends that I'm pretty much the unluckiest person on the planet when it comes to most everything except women. However, that one exception keeps a lot of my friends from being sympathetic to my plight, yet I will always insist that, on balance, I'm generally worse off than all of them. Not wanting to deviate much from my destiny and NorthWest apparently looking to further cement themselves at the bottom of my list of ways to travel (somewhere between running and riding a camel), my bad luck with this wedding trip continued. My flight out of Orlando was delayed a full two hours, which, I was told, was likely going to cause me to miss my connection to San Jose in Minneapolis. Fortunately, I made it to Minneapolis on time, but only to be delayed yet again, this time for slightly more than two hours, with most of that time spent on the tarmac. If anyone is keeping score, we have one missed flight due to a mobile phone bug (which cost me $500 on top of my round-trip ticket), a delayed flight, a cancelled flight, another delayed flight, and finally, one more delayed flight. Oh, and two, nearly 24-hour days spent flying, driving, and complaining.

To add insult to injury I left my PowerBook power supply in Florida and so I had to ration my computer time carefully throughout the day. As usual though, when I did manage to brave the malfunctioning heating pad that is a PowerBook on your lap, someone sitting next to me struck up a conversation about Apple and I, of course, being the pundit that I am, did my thing. Not too long after we started warming up to each other she started to complain about NorthWest (her flight to Seattle was already an hour late), and so we began to trade war stories. Next, I did what any self-respecting computer dork would do; I used my mobile phone to connect to the net over Bluetooth and had her read my previous post. She said, "You win."

As if there was ever any doubt, her story only reinforced my disdain for the airline and we both vowed to never fly them again.

That, however, was not the biggest lesson learned on this trip. No, the biggest lesson learned was that ignorance truly is bliss. This lesson came from the old, bat-shit crazy (think Tom Cruise) lady sitting behind me in the terminal who was convinced that she had done her part to save humanity because she had given $25,000 to a destitute "mystic" who is single-handedly keeping California "afloat" using a series of "atomic bubbles" placed strategically throughout the state. She swore to the poor guy who got caught up in her pipe dreams that all of the "news people" knew about it but didn't want the public to know, because, well, they would obviously try to "pop the bubbles" and sink the state. What? Yah.

When I'm old I'm going to make up the craziest, weirdest shit ever, just to see what lengths people will go to humor me.