Tuesday, January 09, 2007

Grey Legoo

Legos don't need humans to reproduce anymore - check out this automated Lego car factory. Of course, this Lego duck assembly line still has a long way to go before it catches up with the old-fashioned duck factory. [via Laurence and zefrank]

Sunday, October 01, 2006

Gmail search bookmarks

I've found a few Gmail searches to be very valuble in my email management. The main search I use is [(label:inbox label:unread) OR label:star] - that is, unread items from my inbox plus all my starred items. This search turns gmail's read/archive pattern on its head - once I've read a message, it disappears from view unless I take explicit action to save it (i.e. star it). This works well for my mail, since I receive a lot of mail that doesn't need any response.


Of course, [(label:inbox label:unread) OR label:star], or even its shortened form [(l:^i l:^u)|l:^t] is too much to type all the time. Mihai has a greasemonkey script that can add links for your favorite searches below the labels box, but it slows things down (or at least it used to), and it's a two-step process to perform your saved search when you're not already in gmail.


I've written a simple tool to generate bookmarks that will perform gmail searches. These bookmarks will work even if you're not currently in gmail, but if you're already in gmail it will use your current session instead of reloading everything. I've been using these bookmarks for a while now and I'm happy with them, so I figured it's time to share them with the world.

Sunday, September 03, 2006

Daily WTF for other industries?

The Daily WTF is a showcase for shockingly bad code and computer systems, all claimed to be found "in the wild". It's a fun read if you have both the right sense of humor and the appropriate background to understand what's going on. I wonder if there are similar websites out there for other industries. It's kind of scary to think that there might be, for example, doctors so bad that other doctors have websites devoted to mocking their work.

Maybe the reason is in the low barrier to entry to so much computer work. It's easy to transition from amateur to "professional" with minimal training. Maybe the equivalent to the Daily WTF is the story that a couple of mechanics are probably telling about me right now (or, as they probably call me, "that kid who broke something changing a flat tire and had to get his car towed in").

Monday, June 19, 2006

Useful obscure firefox extension (Mac)

In Firefox on the Mac, whenever you press Cmd-N to open a new window, it tries to place the new window slightly below the current window (so you can see both titlebars), even if that puts the bottom of the new window off-screen (bug 218214). It only seems to happen with Firefox, and only on the Mac version. This is especially annoying since Apple's fondness for widescreen displays makes vertical space even more precious. It turns out there's a workaround: this extension (direct link to onscreen-0.1.xpi) will move all new windows as necessary to fit on the screen.

Tuesday, April 18, 2006

Linkblog and new feeds

I've set up a linkblog using Google Reader's sharing feature. It's actually been visible on http://eclectic-mayhem.com for a few weeks now, but those of you who read this blog in a feed reader wouldn't have noticed. For those of you who are unfamiliar with linkblogs, it's a lightweight way (one click) for me to publish things I find interesting without writing up a full blog post.

Using the links in the "Feeds" section of the right-hand column, you can subscribe to this blog, the linkblog, or a combination of the two using Google Reader or another feed reader. If you subscribe to the combined feed, you'll also automatically get any other feeds I may create in the future (like photo feeds, etc). Note that I've moved the linkblog feed (the old address ends with "/starred", the new one ends with "/linkblog") - if you've already subscribed to it under the old location, you should update your links. The new arrangement allows me some more flexibility for possible future changes.

In case you're curious about how exactly to do this, here's what I did. First, I made my starred items in Google Reader: Under the "Share" tab, check the "Shared" box next to "My starred items". There are a couple of links in the "Tell your friends" section. Copy the orange one (looks like http://www.google.com/reader/ public/atom/ user/[20-digit-number]/ state/com.google/starred)
and paste it into the search box at the top of the page. Now you can subscribe to your starred items and apply another label to it (for example, you might label your starred items "linkblog" or "me"). You can subscribe to your own blog and give it the same label to create a spliced feed containing both your blog and your starred items (this is my "me" label). You can then make that label public and put links to it on your blog (or the clip you see on the sidebar of this page).

Saturday, February 25, 2006

Pin-pen merger

Brain processing of speech sounds is different in some southern English speakers.

So this is why no one in California understands me when I say my name. See also this Wikipedia article. Via amitp.

Tuesday, December 27, 2005

The Internet in a nutshell, part 2

Wookieepedia: a wiki site set up by Star Wars fans "when wikipedia users began to complain of the overabundance of minutiae related to Star Wars" on Wikipedia. (via Ned Batchelder)

My original Internet in a nutshell comment predates this blog, so I'll repeat it here: An image from Bert Is Evil, a site self-conciously created to qualify for Internet Underground's "Weird Wide Web" column is included in a pro-bin-Laden poster because the image ranked highly in a Google Images search for [bin laden].

Tuesday, December 06, 2005

Filling code in Emacs

My friend Ryan has writen a neat addition for Emacs: fillcode-mode lets you word-wrap code just like M-q already does for text. It knows how to indent parenthesized expressions, break lines at commas, etc. It's not perfect, but it gets the common cases right and sure beats fixing up the indentation by hand when you change a function signature.

Sunday, December 04, 2005

Fighting with Civilization IV's copy protection

(Note: if you're looking for information about how to get an illegal copy of Civilization 4, you won't find it here)

After downloading the Civilization 4 demo, I went out and purchased the game. Once I got it installed, I found that I immediately got a blue screen of death whenever I tried to start the game. The windows crash reporter was no help this time, but since the demo worked fine I suspected some sort of attempted copy protection. As it turns out I had an old version of the Safedisc copy protection software on my system (c:\windows\system32\drivers\secdrv.sys, dated 2002), that I think may have been broken by Windows XP SP2. Civ4 apparently won't install its version of Safedisc when it sees another version already installed. Macrovision publishes an update to Safedisc, although it's not easy to find on their site. Unfortunately, attempting to install the update directly triggers another BSOD in the old version. The procedure for upgrading looks something like this:
  1. Go to Device Manager and turn on "Show Hidden Devices".
  2. Under "Non-Plug and Play Drivers", find "Secdrv" and double-click it.
  3. On the "Driver" tab, change "Startup Type" to "Disabled".
  4. Reboot.
  5. Run the Safedisc update installer. You'll get an "error 101" because the driver is disabled, but the installation still works as far as I can tell.
  6. Go back to Device Manager, change "Startup Type" back to "Automatic" and reboot.
Now I try the game again. The CD spins up and I see the splash screen this time, which says "Loading" even though it really means "Please wait while we waste your time and verify that you still have this otherwise-unneded CD". A dialog pops up and says "Please insert the correct CD and try again", with a link to the official support website. The website says the CDs are mislabelled - the CDs say "Disc 1/Install" and "Disc 2/Play", but you're actually supposed to use Disc 1 to play. Oops.

I swap discs and try again. Same message. Some searching reveals that Safedisc tries to detect CD emulators like Daemon Tools and Alcohol 120% and refuse to start if it sees them (of course, now that it's caught a pirate red-handed, it doesn't want to give you any hints about how to evade the protection, so it just says "please insert the correct cd"). I've never used either of those programs, and I'm pretty sure I don't have anything like them installed (If I did, I'd probably be using it, since I can see plenty of non-piratical uses for such a piece of software). The solution is a little program called sd4hide, which temporarily removes a few registry keys that Safedisc looks for. The registry keys it removes in my case are entries in the SCSI section of the registry, entries for my hard drive and DVD drive. I have no idea what they're doing there (both drives are IDE) or why SCSI would be taken as evidence of piracy (does no one use SCSI drives anymore?), but it did the trick, and now I'm able to play the game.

It's things like this that make me about ready to give up on PC gaming. The consoles may be closed systems with their own copy-protection schemes, but at least I know that up front, and the games still work.

Saturday, September 17, 2005

Project timelines

Don Knuth has a different perspective from virtually everyone else in computer science:
"I don't want to delay The Art of Computer Programming by an unnecessary week; I've been working on it for 43 years and I have 20 more years of work to do"
(via Dare Obasanjo)