Dear search engines,
When I search for “<name of some ORM package> shard” I am looking for information on database partitioning. While I appreciate the extra work you’ve done to include matches on “<name of some ORM package> shared” automatically, that wasn’t really what I was looking for.
Posted May 4th, 2009 in Uncategorized | No Comments »
I work at a company of ~200 people. We have an informal email list to which nearly everyone in the company subscribes. The list carries all manner of discussion, but perhaps the most common use of it is to sell things. I tried that today, listing miscellaneous gadgets that I’d otherwise have sold on eBay. Within an hour, I had a buyer for everything on my list. That wasn’t the interesting part, though. The interesting part was that in the first five minutes I received a dozen replies from people wanting to buy one specific item: an external USB hard drive of modest capacity. Nothing else I was selling, not even an iPod at a bargain price, elicited that kind of response.
In this particular sample population, there apparently is quite a demand for external disk drives. I suppose people are increasingly aware of the importance of backups. The inclusion of easy-to-use backup software in mainstream operating systems probably is a contributing factor.
Posted March 17th, 2009 in Uncategorized | No Comments »
Version 0.9 of Assetbarista is now finished. One feature that has been in Assetbarista for a long time is the removal of a mousemove event callback from all the avatar icons in the Assetbar discussion page. The removal of a callback counts as a feature because it fixes a race condition in Assetbar’s Ajax logic. Version 0.9 still has that same functionality, but with a different implementation: instead of actually unhooking the event callback from every avatar on the page, Assetbarista now replaces Assetbar’s mousemove callback function with a new version that skips the Ajax call. This has two nice side-effects: Assetbarista’s initial scan through the discussion thread is now about 35% faster because it doesn’t have to modify event bindings any more, and the race-condition fix now applies automatically to other avatar icons elsewhere on Assetbar that happen to use the same mouseover handler function.
Posted February 16th, 2009 in Uncategorized | No Comments »
Assetbarista 0.8 is now available. My ongoing exercise in GreaseMonkey-based development has gained one new feature in this release: when you post a new comment to Assetbar, Assetbarista applies Unicode formatting fixups so that you needn’t reload the page.
To make this feature work, I put wrappers around the JavaScript callback functions that Assetbar uses to process form submissions. These wrappers open up the possibility of replacing the comment entry form’s plain text entry box with a WYSIWYG text editor in the future.
Posted December 26th, 2008 in Uncategorized | No Comments »
I’ve just finished version 0.6 of Assetbarista, my Greasemonkey script that improves the usability of the Assetbar discussion forum for the Achewood online comic.
This release contains one new feature: Assetbarista now works even when you are not logged in to Assetbar. In addition, this version does its scanning and modification of the Assetbar pages a bit faster than 0.5 did. As of version 0.6, it still takes over 2 seconds for Assetbarista to process the HTML page for the most-commented Achewood strip, there is room for more improvement in future releases.
One thing I found while working on this release is that, when scanning an HTML document for tags with a given type (e.g., table) and CSS class, it is much faster to use document.getElementsByTagName() and filter out the matches without the proper class than to iterate through the DOM oneself in search of nodes.
Posted December 6th, 2008 in Uncategorized | No Comments »
Wii Fit: Don’t forget to brush your teeth before you go to bed.
brianp: Why, thank you for the reminder, kind anthropomorphic plastic rectangle! Of all my consumer electronics, you’re the only one who cares about my dental well-being.
Wii Fit: Looks like the Basic Balance Test isn’t your forte.
brianp: Point taken; I suppose I should play your balance games some more. The ski slalom one is kind of fun.
Wii Fit: Do you find yourself tripping when you walk?
brianp: There’s no need to be a jerk about it.
Wii Fit: Create separation between your upper and lower body.
brianp: My upper and lower body are doing just fine in their current, connected arrangement, thank you very much. Barring any sort of freak industrial accident, connected they shall remain.
Wii Fit: Please step off me.
Posted November 16th, 2008 in Uncategorized | No Comments »
I normally don’t get terribly excited about political campaigns, but Barack Obama’s election victory this evening brought a smile to my face. While the President-elect faces a formidable economic challenge upon taking office, his victory seems like just cause for optimism. The young contender, campaigning on a platform of change, triumphed over the respected political veteran. The Democratic candidate won in states that had been Republican strongholds in the previous two elections. And we got to witness history in the making as America elected its first black president.

After seeing the nation so polarized since 2004, it is refreshing to see the the Democratic ticket’s electoral victories spread across the country.
My parents, lifelong Republicans, were among the Floridians who voted for Obama. Mom and Dad put an “Obama/Biden ‘08″ sign in their front yard a few weeks ago. Every night before bed, they brought the sign inside because pro-Democrat signs tended to get stolen or vandalized in their right-leaning county. In the corner of the country where I live, the left-leaning Pacific Northwest, newspapers reported on the woes of McCain/Palin supporters whose yard signs were stolen or vandalized. Amid such pettiness, with people at both ends of the political spectrum seeking to just silence their opponents rather than engaging in any kind of dialogue, I was pleasantly surprised to see the winning candidate earn the popular and electoral vote in so many parts of the country: not just the West Coast and Northeast where his party was strong in recent years.
The euphoria of Obama’s victory will soon fade away into the harsh realities of economic turmoil, of course. But the election results suggest that he has succeeded in finding common ground among a lot of people with diverse backgrounds and concerns, and that’s a very promising first step.
Posted November 5th, 2008 in Uncategorized | No Comments »
Bad: I lost my work-supplied Blackberry a few days ago.
Good: I alerted the IS/IT folks, and they were able to remotely disable and reset it.
Unseemly: This remote reset, I learned today, didn’t clear emails or calendar entries already on the device.
Good: A good samaritan found the Blackberry and attempted to track down its owner.
Good (from an information security perspective): There was insufficient information on in the device to identify me or the company.
Bad (from an odds-I’d-ever-get-reunited-with-the-Blackberry perspective): There was insufficient information on the device to identify me or the company.
Good: The aforementioned good samaritan called the phone’s own number, in hopes that its voice mail greeting might identify an owner.
Bad: I’d never used that device as a phone. (I already had a personal cellphone that I liked, so I continued using it for voice after getting the Blackberry. The Blackberry served only as an email client.) I’d never set up a voice mail greeting.
Good: The phone number of the Blackberry was previously that of my former boss. The voice mail greeting for the phone number was still the one he’d created a couple of years prior, directing callers to his personal cellphone number. (He, too, liked to use a personal phone for voice and a company-supplied phone for work email.)
Bad: The aforementioned former boss had long since moved to the other side of the country to work at another company.
Good: Despite moving across the country, he’d kept the original phone number for his personal cellphone.
The net result of these many arbitrary decisions was that the person who found the Blackberry was able to track me down and return it.
Posted October 15th, 2008 in Uncategorized | No Comments »
Recently, needing a break from spreadsheets at work, I did some performance testing of lighttpd. Using an HTTP load generator client without keep-alive connections, I soon ran out of ephemeral port numbers on the Mac that ran the client. Once the connections in TIME_WAIT cleared up, I could resume load testing for a very short while.
OS X 10.5 has a reasonably large default range for ephemeral port numbers:
net.inet.ip.portrange.hifirst: 49152
net.inet.ip.portrange.hilast: 65535
Other than widening the range, the usual way to support more short-lived connections is to reduce the amount of time that closed connections can spend in TIME_WAIT state. On Linux, for example, this can be done as:
echo timeout_in_seconds > /proc/sys/net/ipv4/tcp_fin_timeout
It took me a while to find the equivalent setting for OS X, although I did find a few discussion forums where people had asked how to change the TIME_WAIT interval to less than 2MSL and been told it couldn’t be done.
What ended up working for me was to change net.inet.tcp.msl:
$ sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
$ sudo sysctl -w net.inet.tcp.msl=1000
net.inet.tcp.msl: 15000 -> 1000
1000ms is too small a value for an Internet-facing system (the default 15 second interval is arguably aggressive enough already), but when testing over a local network it enabled me to do webserver testing at the rate of several thousand new connections per second from one client host.
Posted October 3rd, 2008 in Uncategorized | No Comments »
The Web Riddle Two, a web-based puzzle exercise being released episodically, is shaping up to be a fun mental challenge. It is thematically similar to other online puzzles like P4X; the object is to find clues in and around a webpage to determine the next webpage in the puzzle. Having just finished the first set of puzzles in The Web Riddle Two, though, I’m impressed by the fresh set of puzzle techniques. Challenges in this genre seem to overuse a handful of basic tricks, such as clues hidden in images and solutions hidden in HTML comments, but this one uses some out-of-the-box ideas. I dare not go into detail, lest I spoil the fun for others, but tracking down solutions to puzzles 1-4 led to some rewarding “aha!” moments when the pieces clicked into place.
Posted September 28th, 2008 in Uncategorized | No Comments »