It's almost over

May 27, 2005

As has become the ritual when back home, I rarely sleep (seriously) and am never actually "home." My days and nights are spent gallivanting around town with various people whom I haven't seen for the past year (or six months as it were this trip) and by the time I actually have two free minutes to sit down and write about some of the things that have happened (and that are appropriate to be discussed here) I feel incredibly overwhelmed by it all and end up writing nothing. So as not to ruin the quasi-personal nature of this site, I'll keep with tradition and again refrain from elaborating more on the hijinks of this trip.

Speaking of which, I need to get back to it — I've only a couple more days before I head off to NY.

Random plea for sympathy: I'm not sure I've ever been this sore in my life — I feel like a wrecking ball has had its way with me — multiple days of wakeboarding and wakeskating has definitely taken its toll.

The inevitable cameraphone switch

May 26, 2005

The time had finally come for me to get a new point-and-shoot camera. It had been a long while since I purchased a new camera, but if I changed digital cameras like I changed mobile phones/PDAs, I'd be broke (err, more broke) — you have to choose your vices.

As I mentioned before, I plan on getting a digital SLR as soon as I can afford it (sometime this summer) and have since decided on the Nikon D70 (and not either of the Canon models I spoke of in the previous post), but I thought I could definitely stand to get a new non-SLR digicam in the interim.

As was no doubt expected, I did a fair amount of research concerning the new camera and narrowed it down to the Canon SD400 and the Sony CyberShot DSC-T7 (you have to see this camera in person — it's incredible). The problem is, my decision to get a new point-and-click camera coincided with the release of the Sony Ericsson K750i in Europe and Asia; mine arrived from Hong Kong earlier today. This will be my only camera until I get the D70 (I'm selling my old one).

The K750i has a 2 megapixel camera with 'flash,' autofocus, and macro mode, not to mention a host of other neat camera features. Though this phone choice deviates some from my last five, which were "smartphones," it has no real imaging match in the world (outside of Korean prototypes) and I think it's going to be a lot of fun to use; the fact that I'll always have a decent camera on me is very exciting.

This is my fifth Sony Ericsson phone and while I'd like to get up a review similar to the [way-too-long] K700i review, I'm not sure I'll be able to find the time.

Silicon Valley is one big stoplight

May 18, 2005

I'm fully convinced that the powers that be in Silicon Valley have conspired to not only require a stoplight at every other street (at least), but to also prevent these stoplights from being connected to each other in any useful way.

The following rules seem to govern the stoplights in Silicon Valley:

  • If car is approaching the light and it is likely that the driver of that car can see that the light is green, immediately move to yellow and then red so as to stop the approaching car lest it get above second gear between any two lights.
  • If car is approaching the light and it is likely that the driver of that car can see that the light is red, do not move to green until the car comes to a complete stop.
  • Under no circumstances may one light work together with another, in any direction, to create what might be interpreted as a "flow" of traffic.

Headed home

May 18, 2005

I'm headed back to Florida tomorrow for a week and a half before I fly to New York for a week-long orientation with the law firm I'll be working for this summer. My plate is incredibly full back home so I'm not quite sure it will be the "vacation" I was somewhat aiming for, but then again, I've never been too good at relaxing anyway.

Outside of seeing all my friends (including old college buddies I'm going to visit in Gainesville), I'm most looking forward to getting out on the lake and doing some serious wakeboarding. Hopefully I'll be able to get some pics of the action and will try to get video of some flips if possible.

On writing posts

May 16, 2005

Believe it or not, I've actually been asked quite a few times how I go about writing posts and felt compelled to share the answer with the rest of the world (as I often do).

My current text editor of choice is TextWrangler, which I've written about before. As I get an idea of something I want to talk about, I open up a new document in TextWrangler and immediately save it to a folder I call "scratch," which is for these posts and whatever other mind-fleeting thing I feel the need to jot down before I forget it; I give the document the name of whatever it is I'm writing about. TextWrangler keeps all of your open documents in a "drawer" to the side of the editing window and lists them in alphabetical order by name. I currently have 23 documents open, 15 of which are future posts. I've also created a shell script that syncs my local "scratch" folder with a folder on my webserver every couple of hours so that I always have access to my posts.

There are two advantages to this setup. The first is the fact that I can see, at a glance, all the posts that I'm currently writing or plan to write. The second is that if TextWrangler crashes (it never has) or I need to reboot for some reason (and close the application), I can easily get back to where I left off; I simply open TextWrangler, highlight my entire "scratch" folder in the Finder, and drag these items over to the TextWrangler icon in the dock.

In conjuction with TextWrangler, I also use John Gruber's Markdown, a plain-text formatting syntax. Initially, it was lost on me the need to learn John's syntax given that I'd been proficient in web markup for 10 odd years and hadn't really 'thought' about it in a very long time — it had become as natural to write as English — but over time, and especially for longer, more involved posts, Markdown became indispensable and now I can't imagine writing without it. It makes 'pre-markup' plain-text much more readable. Period.

Back to studying for Patents, my last law school final of the [academic] year.

Amazon Associates Bookmarklet

May 11, 2005

I've been participating in the Amazon Associates program for some time now and decided to make my life (and maybe yours) a little easier by whipping up a bookmarklet to turn any Amazon product page into a page 'tagged' with my Associates ID. I can now use this bookmarklet to easily create Amazon links that I put on this site (or *cough* for other less noble causes that I'll let you figure out for yourself).

You can find it on the Amazon Associates Bookmarklet project page along with a more detailed explanation of what it is and how it works. Enjoy.

Revolution In The Valley

May 06, 2005

I've been sitting on this post for a while now and figured it was time to get it out there given that I don't have time to actually write anything new at the moment because of law school finals (in case there was ever any doubt, law school finals suck).

A couple of months ago I started to read Revolution in the Valley - The Insanely Great Story of How The Mac Was Made, and it's just that, insanely great. I picked it up one very exciting Friday night when a friend and I were at the local Borders "studying." I couldn't stop reading it, but I was informed that I had to part with it because the store was closing and the guy was all like, "You can't take that out of the store without paying for it." I thanked him for the heads-up and put the book down.

Between the often personal stories (as told by a lot of different members of the initial Mac team), pictures, drawings, and diagrams, the book really sucks you into the mindset and environment of those so passionate about the Mac at its inception, and oddly, makes me somewhat proud to be a small part of that today.

I was informed by Richard (who has some similar anecdotes of his own) that I could essentially read the entire book online, but I opted instead to pick it up every now and again when I was in the library at school (you know, to put some small portion of my $30,000/year tuition to good use).

If you don't get a chance to check it out in the flesh (highly recommended), you should at least read over a few of my favorite stories:

Reality Distortion Field
Bud defines Steve's unique talent
Saving Lives
Steve wants us to make the Macintosh boot faster
I'll Be Your Best Friend
Burrell Smith was creative in more than just engineering
Quick, Hide In This Closet!
Steve forbid us to work with Sony
And Then He Discovered Loops!
Bob has written many lines of code
I Invented Burrell
Burrell imitates Jef
What's A Megaflop?
We visit my alma mater to try to sell them Macs
-2000 Lines Of Code
It's hard to measure progress by lines of code
Shut Up!
The first time we demoed the Macintosh to Microsoft
Mea Culpa
Here are some of our worst mistakes

Mac OS X Tiger

April 30, 2005

Like every other second-year law student in the middle of spring finals, I spent yesterday afternoon waiting in line at the Apple store for the release of Tiger (shitty mobile pics of the line). Yes, I realize that I could have pre-ordered it and not had to wait in line, but I really enjoy that part of it (especially putting the girl I'm dating through the 'embarrassment') and didn't want to be cursing God if for whatever reason it got hung up in the mail.

I wish I could talk more about it, but like I said, finals begin in the next couple of days and I have to write less here to make it look like I'm studying (and not playing with Tiger). You know I'm going to wax ecstatic on the subject in the future, but until then, be sure to check out John Gruber's living repository of things you likely haven't heard about Tiger.

Full content RSS feed

April 30, 2005

I've finally fallen inline with a lot of my online colleagues and am now offering a full content RSS feed. If you are already subscribed, pay this announcement no mind as you've no doubt noticed the change. If you aren't subscribed, what are you waiting for?

I'm not really sure why I stuck with the excerpt-only feed for so long; I think the only thing served by such restricted content was my ego (i.e., the page hits I'd get from people clicking their aggregators to read the rest of my posts). I'm over it.

Some impetus for the change has also come from the fact that I use Bloglines a lot on my mobile phone, which really exacerbates the annoyance of excerpt-only feeds: you have to click forward once to read the rest of the article and then click back twice to return to the list of feeds. While these are negligible motions on a fast connection (or within a regular browser where you'd simply open the links in background tabs), they quickly become irritating on a non-EDGE/UMTS/HSDPA/etc device. I don't want my feed to be annoying.

What About Your Google Ads?

It's true, my AdSense revenue might take a hit (I show Google ads on individual archive pages (i.e., those that are linked to in the RSS feed)), but I think that's highly unlikely given that most of the people subscribed to my feed aren't the type to click on an ad anyway. I think it's safe to say that the only people who click on the ads are those coming from web searches, who won't be affected at all by the change.

I've moved to Flickr

April 25, 2005

I've finally begun the transition to Flickr. Though I've had a free account for quite a while, I've been hesitant to move to a Pro account; something I've written about before. What pushed me over the edge was the free Pro account (for a year) I received from Richard (old Pro users were given some invites; a side effect of the Yahoo! acquisition).

As I mention here, I plan to use Flickr as my primary photo-storage medium (and my home machines as backup).

I've already moved all of my "public" pictures to Flickr (i.e., the picture sets that used to be on my photos page) and have described/titled/tagged all of them where applicable (see the sets on Flickr). The Flick Export Plugin for iPhoto is brilliant and was absolutely essential in moving these sets over.

I think I'm going to hold off for a while on putting all of my other pictures on Flickr. As it currently stands, there doesn't seem to be a way to create "private" sets. All of my pictures are organized by event and/or month and I'd like to create sets that follow this convention but are only accessible to me.

If you create a set of "private" pictures (i.e., NO public pictures), the set will not be seen at all by the public. This, however, does not solve the case when picture sets that I upload and want to keep private contain pictures that are in public sets (for instance, the Personal Favorites set) — privacy settings are based on the picture, not the set, so if a picture spans multiple sets, the last privacy setting for that picture will be applied to every occurence of it (regardless of set), which will obviously make some of those sets that I wish to remain private, public. Yes, the pictures that I want to remain private, will stay private, but the set itself will be publicly viewable (and will cloud the "public" sets I want people to see).

WordPress find and replace

April 22, 2005

As much as I like WordPress, I'm still a little miffed from time to time by its shortcomings. Of all the things it should have, it's missing a simple find/replace function. I'm not sure any excuse the WP team could come up with would make sense to me — this is not a "feature," but rather a necessary tool.

As is the case with most things in life, there is a workaround (that requires very little SQL knowledge). To find/replace something in WP, all you really need is the following query:

update wp_posts set post_content = REPLACE(post_content, "X", "Y");

Where wp_posts is the name of the table that holds your WP posts (wp_posts is the default), X is what you want to replace, and Y is what you want to replace X with. You can obviously run this query directly or through phpMyAdmin if you have it setup (just click the SQL tab once you're inside your database). Simple, right? Right, which is why I can't figure out the reason it's been left out of WP.

Future Plugin

I was a little suprised to come up empty when looking for a find/replace plugin (surely everyone needs/wants this?). I think I'll probably write a plugin for this in the next couple of months if no one else does.

UPDATE: I've been told that there is a plugin to do this: Search and Replace. I might still write my own plugin that supports regex pattern-matching.

Help a brother out

April 21, 2005

A couple of days ago I added a "contribute" button to my project pages. I'm posting about it here to prod those who already use my code into contributing something to my "I'm a poor law student" fund. I was encouraged to add such an option after receiving several requests to use some of my code in a commercial setting. Depending on how lucrative (or not) this turns out to be, I might be compelled to put the button on all of the individual archive pages as well, you know, for those random surfers bent on giving away money.  :)


I thought I'd elaborate a bit on the method I used to display the "contribute" button only on the project pages. For other "special" pages (i.e., yearly, monthly, and individual archives), I just run simple PHP "if" statements that use WordPress functions to check for the type of page we're dealing with. Obviously though, my project pages exist completely outside of WP (i.e., I don't use the WP "pages" feature and there's no built-in function to discern a "project" page from any other page).

Because all of my project pages are located off of the "projects" directory in the URI, I use a simple regular expression to check for this in an "if" statement.

if (preg_match("/projects/i",$_SERVER['REQUEST_URI'])) {
    // Word found in URI
else {
    // Word not found in URI

There's nothing more to it. If you are looking to do something similar, be sure that this check runs after all other checks (to the extent possible) if the word/phrase you're looking for occurs somewhere in the title of your posts (assuming of course, that you use post titles in your archive scheme).

Use Gmail as a spam filter (three ways)

April 18, 2005

UPDATE: I've just been made aware that someone else posted a similar, though more detailed, description of the first method I talk about below.

This is something I meant to write about months ago, but just never got around to it. I don't think the idea is new (perhaps it was when I thought to write this), but that shouldn't deter me from sharing it with everyone.

I guess the title begs the question, "Why would I want to use Gmail to filter my spam?" Well, if you're currently relying only on client-side filtering, the question is answered. If however, you have both a client and server-side solution, the answer isn't so clear; perhaps you aren't satisfied with the server-side filter or you just want to try something new.

Notwithstanding your current setup (and requirements), Gmail does a decent job of siphoning out the good e-mails from the bad, and while it's certainly far from perfect, I'm sure that over time, partly because it can set filter rules based on the aggregate "report spam" actions of its users, it will become an excellent filter. I've come up with three different ways for you to take advantage of Gmail's spam-filtering capabilities, all of which allow you to keep your current e-mail address.

Method One

You can only use this method if you have the ability to set server-side e-mail filter rules. It's based on the fact that Gmail adds some extra information to the header of the e-mail before forwarding it along. There are a number of things you can predicate your rule upon and I'll place a few of them at the end of this section. The method is outlined below.

  1. Forward the e-mail from your current account to Gmail.
  2. Forward your Gmail e-mail back to your current account.
  3. Gmail will filter your e-mail before forwarding it along.
  4. Setup a server-side filter rule to check for the existence of certain data in the header (see below) and forward it to Gmail if the header lacks this data; let it pass through to the inbox of your current account if it contains this data.

Like I said above, there are quite a few things that you can check for in the header and use as the basis of your forwarding rule. Three of the most obvious are:

  • X-Forwarded-For:
  • X-Gmail-Received: some-random-number
  • Delivered-To:

Method Two

This method is best for those that can't edit server-side filters, but can create multiple mail accounts. The method is outlined below.

  1. Create a new mail account (the username doesn't matter; no one will see it).
  2. Forward the e-mail from your current account to Gmail.
  3. Forward your Gmail e-mail to the account you just created.
  4. Gmail will filter your e-mail before forwarding it along.
  5. Use your new mail account (you'll obviously want to set the "reply-to" and "from" fields to your current address and not the one you just created).

Method Three

This is the simplest method and the one you should use if you can't setup server-side rules or create extra e-mail addresses. The first thing you'll need to do is setup your current account to forward to Gmail. The next and final step is to setup your local mail client to access Gmail through POP.

Archiving and Privacy

All of the methods shown above (forwarding and POP) allow you to keep your Gmail messages in your inbox, archive them (i.e., keep a backup of your local mail), or trash them. All e-mail in the trash "folder" will be automatically deleted after 30 days. Keep in mind though that just because you delete a message doesn't mean that it's entirely gone. From Gmail's Privacy Policy:

Because we keep back-up copies of data for the purposes of recovery from errors or system failure, residual copies of email may remain on our systems for some time, even after you have deleted messages from your mailbox or after the termination of your account.

They'll never learn

April 12, 2005

And she wrote, "sigh... its hard to compete with all your gadgets!   :)"

I swear I warn them before I get involved.   :P

Sin City is phenomenal

April 11, 2005

I hardly ever write about movies here, but I had to make an exception for Sin City. Stop your download and actually pay for this one — it's absolutely incredible. I'm not sure I've ever seen such wonderful cinematography. I'll be the first to admit that I'm no Frank Miller fanboy, hell, I've never even seen/read any of his work (which is probably why my fascination with the film is so pronounced — I have no book-to-movie qualms), but this thing knocked me on my ass.

I guarantee that you will walk out of the theater going, "What the fuck was that?" It's almost like they turned a comic book into one of those flip-book things to create the motion. The genius use of color, the CG, the lighting, the camera angles... brilliant.

Wikipedia + RSS

April 08, 2005

Is there a particular reason why Wikipedia doesn't have a syndication feed for newly added articles? Technically, this would be a trivial addition and so I'm not quite sure why it isn't offered. I'm an information whore and would love to be notified when new things are added to the wiki. If anyone knows of something that scrapes Wikipedia or of an official feed that I'm not yet privy to, pray tell.

Now if you'll excuse me, I must get back to deciding whether I'm going to buy a PSP law school.

UPDATE: 10 minutes after writing this I actually found exactly what I was looking for; there is a "new pages" page with RSS/Atom feeds.

Related entries

April 04, 2005

About a week ago I started running the Related Entries plugin here. If you aren't directed to this site either through a news aggregator or a search engine, there's a good chance that you haven't seen this plugin in action because I only have it running on individual archive pages. To get a feel for what it does, take a look at my initial post about the Smart Archives plugin. Notice the "possibly related" section in the menu. I chose this particular post because it's a somewhat apropos example given its topic and it does well to highlight the accuracy of the plugin. The accuracy though isn't always as good as it could be; there are a lot of posts where it just chokes and either returns nothing or posts that are totally unrelated. Time permitting, I'm going to dissect the source at some point and see if I can game it (i.e., modify the way that it "scores" posts for relevance) to give more deference to the content of the post; as it stands now, I think it looks only at the title of the posts if you supply no keywords. In the context of this plugin, keywords are user-defined, one word descriptions that help the plugin to return more meaningful results, but for obvious reasons, namely time, there's no way in hell I'm going to add keywords to all of my entries (or even just to those whose titles don't accurately reflect their content).

I installed this plugin with some trepidation, fearing that the server hit would be too expensive, but surprisingly, it's pretty negligible (granted, we aren't talking about searching through that many posts; I'm not sure how well it scales up).

Be Careful Where You Call It

As usual, before I take something "live" on this website I test it pretty heavily. While putting this plugin through the motions I came across some rather odd behavior which took me a few minutes to nail down. To sum it up, the function call to this plugin must be placed after the infamous WP loop, else you'll get the dreaded "no related posts."

I initially called the function after the "individual archive" section of the menu, which runs through "the loop," so there were no problems there. After playing around with it some, I decided that the results should be displayed before the "individual archive" section. This meant that the function would be called before any iteration of "the loop" (because of the way my markup is structured, the menu is built before the rest of the page; if that were not the case, then there would be no problem because the "content" section of these archive pages goes through "the loop"). To avoid having to change the structure of my markup, I decided to simply throw in a "dummy" loop before I called the plugin.

Most likely to succeed

March 29, 2005

Earlier today a good friend of mine sent me a couple of pictures that had me laughing 'till I cried. I'm assuming these were taken when I was in 8th grade (1993), which would put me at ~13. I think the first picture shows me about as "dressed up" (come on, there's some semblance of a collar there) as I got in those days (it was required for the shot, much to my opposition). I'm apparently still rocking the "skater cut" at this point, though it looks like I'm in serious need of getting the sides shaved (see second pic for a better example).

As a side note, the other most-likely-to-succeed person in the first picture is a good friend of mine and we actually lived together for some time during undergrad. The best(?) part is that both of us are still in school.  :)

Justin - middle school - most likely to succeed Justin - middle school - eating

That's me on the far left.

Nice[r] titles

March 28, 2005

As a lot of you have noticed, I started using Nice Titles throughout this site a couple of weeks ago (so that those who hover above my linked-list posts will immediately see what I have to say about them, if anything). A few people have asked how I got mine to look the way that they do (i.e., the URI is not shown and the width of the background picture is a bit more predictable). If you prefer the way that mine look, feel free to use my hacked nicetitle.js file as you wish.