a glob of nerdishness

December 21, 2007

I quit.

written by natevw @ 11:11 am

Yesterday was my last day at my old job. It’s a decision I had been considering for a while now, and one that’s been settled in my head since the end of August. I still wonder, though, how I’ll remember this week looking back.

Over the past year, I came to realise that writing in-house software, regardless of the problem domain, was never going to stimulate my AD/HD-addled brain in a wholly satisfying way. That wasn’t reason enough to quit, though. I had a great boss, comfortable enough pay, camaraderie with some interesting co-workers, and the work still offered good challenges often enough to make it worth doing. Not all was rosy (my job description was in transition from “independent contractor working from home” to “employee commuting to an office building almost an hour away”) but life was good.

In short, the job had its upsides and downsides, like most of life. I didn’t really quit my job because the downsides outweighed the upsides, though there were plenty of days when that’s how I felt. I quit my job because of its opportunity cost. I’ve been wanting to start my own company ever since I was a twelve-year-old, craving augmented buying power but thwarted by those feckless child labor laws. I think my motivations have matured a little, but the dream never died.

As my interests changed — from computers, to music, to photography, to fleeing the torment they call “higher education”, back to computers — I collected a lot of neat software ideas. But ideas are like opinions: valuable, just not in a way that puts food on the table. (Unless you’re a patent troll…I digress.) Out of all my ideas, only a handful seemed to have much feasibility or market potential, and out of those, only one has consistently held my interest.

Since I first latched onto it in the Fall of 2004, I’ve watched the idea slowly move towards mainstream while I tried to do schoolwork and while I drove to my quasi-cubicle. I tried to fit it in as a hobby, but never got the momentum to bite off any sizeable side-project in my “spare time”. Trying to pursue two nearly-overlapping software lives was distractingly complicated. Now my mission is simple: Create the best software for organising photos geographically. Ever.

December 3, 2007

Hacking Stacks: A Failed Attempt

written by natevw @ 10:18 am

I’m pretty much enamored with optica-optima’s DRAWERS icons for Stacks. The concept, the icons, even the disk image they come in. Imagine my horror when my first subsequent download plopped itself right on top of my wonderful new “drawer”, once again shattering the illusion that I could like Stacks. “Date Added” is not a ‘touchable’ file property — the Dock somehow keeps track of this itself. Googling revealed a folder action based fix, but I wanted something that could be done automatically for all Stacks present and future. Poking and prodding revealed that I could sqlite3 ~/Library/Preferences/com.apple.dock.db and look at the fairly simple database the Dock uses for Stacks.

There’s a “directories” and a “files” table. The directories table has one row per stack, and just one main “path” column (it also has an sqlite3-implicit ROWID used as the directory_id elsewhere. The rest of each stack’s info is in the Dock’s plist). The files table had what I was looking for: an “ordering” column. So I added a drawers table, and inserted rows for each beautiful icon:

CREATE TABLE IF NOT EXISTS drawers (directory_id INTEGER, filesystemid INTEGER);

INSERT INTO drawers (directory_id, filesystemid) SELECT directory_id, filesystemid FROM files WHERE name LIKE ' %'; -- this should be a trigger for future additions, but see results....

Then I added a trigger so that whenever a new file is added to a stack with a drawer icon, the drawer’s icon would still have the highest “ordering” value:

CREATE TRIGGER drawer_defender AFTER INSERT ON files
 UPDATE files SET ordering=NEW.ordering+1 WHERE directory_id = NEW.directory_id AND filesystemid IN (SELECT filesystemid FROM drawers WHERE directory_id  = NEW.directory_id);
-- if BEFORE INSERT, the new row doesn't show up at all for some reason

CREATE TRIGGER drawer_cleanup ON files AFTER DELETE ON files
 DELETE FROM drawers WHERE drawers.filesystemid = OLD.filesystemid AND drawers.directory_id = OLD.directory_id;

The bad news is that while this works as far as the database is concerned, the Dock seems to keep track of the ordering itself until you “killall Dock”, which puts us right back in folder action territory with an even uglier transition. So unless somebody finds a way to get the Dock to read in the database without getting killed first, or Apple’s usability team regains a say in what prominent features get shipped, it looks looks like the sleight-of-hand folder action is still the best bet for helping Stacks out. That method has the added advantage of not requiring users to tinker with private Dock internals as well, which is probably a good thing.