Recently in geek Category

Preserving digital files

| | Comments (0)

During the cleanup project I mentioned in my last blog post, I learned a few things about preserving old personal (not business) digital files.

First, what to save. The short answer: everything and then some.

Why everything? Because it's cheaper than picking and choosing. My entire collection of Apple ][ disks, converted to 143KB disk images and compressed, came to 1.7MB. Even at the time I archived those in the mid-1990s, that would have fit on two floppy disks for a total cost of less than $10.00. Today the economics are a little different, but still, a one-terabyte external hard drive costs $90.

What does "and then some" mean? It means don't just save the TurboTax file; also save a PDF of it. Think about why you might want to look at a 2010 tax return in 2025. Is it because you have a computer with TurboTax 2010 installed and were feeling like editing your old tax return for old times' sake? No, it's because you're running for Congress and have decided to publish your old returns during your campaign. You're much likelier to need to read an old document than to edit it. Save a format that makes it easy to read.

"And then some" also means converting certain physically represented information to digital. Example: take a picture of the CD-ROM case with the serial number, and put the JPEG in the same directory as your files. The picture's usually enough to prove ownership of software, and if you ever have to reinstall TurboTax 2002 to get the IRS off your back, it'll be nice to know what to do when the license-key installer dialog pops up.

Next, which archival format? I like containers rather than individual files. On Windows, that's .zip. On Linux, it's .tar. On a modern Mac, .dmg. These containers are designed to survive transmission over networks, to move easily from an obsolete medium to a modern one, and to preserve metadata. I've witnessed the grief of helping a friend recover an old Mac file, only to find that the resource fork was gone. I've personally needed to know the last-modified date of an old file because that date was more significant than the file itself, and discovered to my horror that the date was today. Stick your old files in the proper container and take reasonably good care of the container, and you'll get them back out again exactly the way they were put in.

Which file format? For files that already exist, don't change them. But going forward, pick formats that are (a) open or ubiquitous, (b) understood by non-DRM applications. Examples:

  • Plain old text files. As is customary, Apple will someday invent another new character for line endings, but otherwise text files are universal.
  • High-resolution, lossless TIFF for scans of old photos. High-quality JPEG is probably OK for photo scans, too, depending on how important they are.
  • PNG for static graphics. The only example I can think of is Eagle PCB files.
  • WAV for important audio like the cassette tape of your dad interviewing his mom when she was 90 years old. But also make an MP3 so you can easily email the interview to your kids.
  • PDF for final versions of electronic documents (see above), and EPS for vector graphics. Both these are proprietary, but enough open-source viewers exist that they're unlikely to be unreadable in the future.

Obviously, it's only an educated guess which file formats will be readable decades from now. But ASCII, PNG, TIFF, JPEG, WAV, MP3, and PDF/EPS are good bets for today's documents.

So we have our entire life's Word documents rendered to PDF and stored in a zipfile. Which medium should we use? Two answers, depending on size.

For small file collections (10GB or less) I'd love to recommend CD-R or DVD-R if my personal experience with their longevity weren't so poor. I'd estimate 50% failure rate for well-stored CD-Rs over 10 years old. Moreover, computers with no moving parts are becoming common; in ten years, perhaps a CD-ROM reader will be as rare as a floppy drive is today. (Update: some have pointed out that the demise of any computer medium won't happen suddenly, and that there will be time to migrate data stored on old media, which is why the CD-ROM obsolescence argument is weak. I agree in principle. In reality, stuff gets put on shelves and discovered years later. Moreover, we're talking about personal files, where the hassle of tracking down a friend with an obsolete reader might be a high enough barrier to recovery.)

That leaves USB drives and SD cards, and I'll pick SD cards, even though they're a little more expensive. Two reasons. First is reliability. I've found SD cards to be more reliable than USB drives, which makes sense because SD cards usually store the only copy of pictures taken on digital cameras, meaning failure is potentially devastating, and USB drive files need to last only long enough for a sneakernet file transfer, meaning failure isn't a big deal. The second reason is form factor. SD cards are uniform and stackable. (Update: there are questions about flash memory longevity. The point is that if the medium is rewritable, then for archival purposes it has failure built into the design. Might make more sense to make multiple DVD-R copies and store them in different places.)

For big file collections, I'd buy an external 1TB hard drive, fill it up, and put it away. I know that hard drives have lots of moving parts, but they're well-sealed inside their cases, and I've personally had great success getting data off hard drives last used nearly 20 years ago.

What about online storage? Nope. I haven't yet found a consumer storage service that has a WORM (write-once, read many) philosophy about storage; it's too easy for me or a mischievous web weenie to issue a command that erases either my files or my entire account. And any software-as-a-service relationship (including any DRM purchase) is effectively a lopsided, eternal contract with a company. They can change the terms of that contract any time, and if the company goes away, it's likely your files will, too. I love Gmail for the service they provide, but I don't expect them to be my email archiving solution.

Should you encrypt your local backups? Several reasons why I say no. First is that I don't want it; if I die, I do want my wife and kids to be able to intelligently dispose of this stuff. Second, I don't need it; nobody cares about my personal data except me. Third, I can't follow through: either I'll forget the passphrase (or forget to divulge it on my deathbed), or else I'll keep it written down next to the SD cards, in which case it's no more effective than physical security of the SD cards. Your opinions may differ on this one, but let me ask: if your files are so important and secret, how come you don't back up or encrypt the files on your computer today?

And finally, in spite of all this carefully reasoned advice, consider throwing it away instead of saving it. If you don't, your future heirs will have to when you're gone. I admit that it's cool to know that I could call up my high school freshman year book reports on a moment's notice, but I doubt I ever actually will. I don't want to be featured on the digital version of Hoarders in 40 years, after all.

Time out of mind

| | Comments (1)

While throwing out old storage boxes this weekend, I discovered my old Power Macintosh 6100, packed up in 1997. To use eBay terminology, it was in vintage condition. It had the mouse, keyboard, VGA monitor adapter, power cord, and a few floppy disks. There was no excuse not to plug it in and see what happened.

So that's what I did. The chimes played and the smiling Mac appeared on the screen. The clock battery had died, but otherwise it was working like the day I'd last shut it off. My work was all there in Nisus Writer and ClarisWorks formats, patiently waiting 13 years for me to resume. On one of the unlabeled 3.5-inch floppy disks was a series of .DSK files. Those files were images of 5.25-inch Apple ][ diskettes. I downloaded an Apple ][ emulator and was soon running the Applesoft BASIC and 6502 assembly programs I'd written when I got my first computer at age 10.

I have a recurring dream where I'm in a house where I lived long ago. It's just as if it had remained abandoned since the day I left; it's dark and filled with cobwebs, but otherwise the furniture is still there. These dreams always have the effect of compressing time. I remember old situations so vividly and freshly that my mind thinks hardly any time has passed. Exploring this old Macintosh and Apple ][ was the same experience, but without the cobwebs, because digital files don't age. My programs from decades ago ran just as well as they did back then.

The time-compression effect was as strong as the files were perfect. It transported me to the room where my family kept the Apple. I felt the pattern of the carpet and the texture of the walls. I smelled the slightly musty air. I felt the resistance of the door and the momentary change in air pressure as I opened it. I was ten years old again. Woz hadn't yet crashed his plane, Steve Jobs hadn't yet met John Sculley, and Microsoft wasn't yet the enemy because they didn't sell operating systems.

It's tempting to dive deeper. There are "Classic" Mac websites. Apple ][ fan clubs are still going strong. eBay stands ready to help me complete my retro hardware collection. But I wouldn't really be reliving old memories; I'd be replacing them with new ones. Today, if I close my eyes and think hard, I can still evoke the sensation of pure wonder I felt when, as a child, I first ran Bob Bishop's magical "APPLE VISION" program. But I'm sure I could replace that memory with a jaded "my, how far we've come" chuckle if I loaded up the dancing man in the TV set today.

I chose to keep my memories, not make new ones. I copied my old personal files to a fileserver, then wiped the Macintosh's hard drive and packaged it up to sell on eBay. The hardware is gone, and only the software remains.

I'd like to spend some time learning to create sprite artwork, and I have a suspicion that my left-brain mind will have a better chance making 3D models and then rendering them as flat 32x32 PNGs.

I happen to have some incredible Cinema 4D models supplied to me by a talented artist, which I could use as a starting point. So I'm tempted to buy it and start there. But I've also admired POV-Ray's galleries for years, and I'm sure it could also do what I want.

Should go the commercial, proprietary Cinema 4D route, or open-source POV-Ray, or something else entirely? I'm sure there are a thousand right answers to that question, so I'll try asking differently. Given that I have an attention span of maybe a weekend and virtually no 3D modeling experience, which toolset is most likely to give good short-term results?

Loyal Readers,

I wrote a 99-cent casual iPhone game called Teragati, and last night it was approved for sale in the App Store! Please head on over there and buy it now. It's just 99 cents, it takes a few moments to learn, and typical games last only about a minute. It's a perfect way to spend time waiting in an ATM line.

If you like the game, please rate it in the App Store (5 stars, please!) and write a brief review. If you don't have an iPhone, please tell someone who does.

http://bit.ly/a2b6Qo

Thanks!

Logo or CAPTCHA?

| | Comments (0)

logo or CAPTCHA

Homemade Pizza

| | Comments (2)

I've been experimenting with pizza from scratch for about a year. I have not yet achieved the perfect homemade plain cheese pizza (my sauce is all wrong), but I have finally gotten the crust right. I let the dough ball sit out for a couple hours to rise, then I stretch it out into a round shape. I don't use a rolling pin or press it, because that squishes the bubbles from the yeast that make the crust light and airy. Then I slide it onto a sheet of parchment paper (that's the key to my method) and cook it on the lowest rack in the oven at 400 degrees for about 11 minutes. This cooks the dough all the way through and nicely browns the bottom of the crust.

Other experiments I've tried along the way:

  • A preheated iron pan that you then stick in the oven. This did cook the dough, but the crust had no crispiness.
  • Quickly browning the round in a pan, then sliding it right onto the rack in the oven. This might have worked, but I was never able to transfer it without ruining it.
  • Cooking the crust almost all the way through in a pan, then putting on the toppings and broiling briefly in the oven. This was pretty good, but it was a lot of work (stretching the dough, then stopping to cook, then returning to ingredients, then cooking again), and it was very hard to get it consistently crispy; I often burned the bottom of the crust.
  • A pizza screen. This was close, but the screen seemed to deflect or absorb too much heat, and I could never get the crispiness I wanted. Cleaning the screen was a nightmare.
  • A cookie sheet. Easy but awful crust.

I never tried a pizza stone. From product reviews on Amazon, they never seemed to last more than a couple dozen uses, and they're expensive to buy and to ship. Also, success with a pizza stone seems to be entirely dependent on how close you can get your oven to 1000 degrees, and my 1950s electric oven is nowhere near competent for that task.

Next mission: a good, easy-to-make sauce. I'm currently using plain old spaghetti sauce, which costs less than store-bought pizza sauce and tastes just as good, but it doesn't have the bright taste of tomato and basil that I love on a good pizza.

Style nits

| | Comments (0)

Here's the latest batch of style errors that I've made all my life.

She was here, however, he was there.

This is a run-on sentence. The comma before "however" should be a semicolon. It would also be OK to have "however" start a new, second sentence. I'm pretty sure that "however" is an adverb in this sentence, but I've been using it as some sort of magic conjunction that has special punctuation rules.

She believes he is there. Which is true.

I've always thought the second sentence was a sentence fragment, and if I were editing someone else's text, I'd dutifully change the first sentence's period to a comma and combine the two. I think I thought this because I looked at "which" as a conjunction. But "which" is a perfectly good pronoun, and it can be a perfectly good subject of a sentence.

The powers that be have informed me that the home-office thing wasn't working out, so on Monday I started visiting various spots within mid-Peninsula commuting distance. Here's my report so far:

  • Hacker Dojo: Mountain View, just a couple exits south of Google. Pros: it's built specifically for people like me. It's inexpensive ($100/month) when compared to a real office rental. Quiet. Good internet. Lots of parking. Python/Django questions can be answered immediately by simply speaking them loudly enough for people around me to hear. Good community. Reportedly kid-friendly if I want to stop by on the weekends and happen to have the kids in the car. Cons: because it's on the opposite side of Google from my home, morning traffic is horrendous. Currently opens at 10am, which is late for me. The history of the building (former stained-glass factory) causes me to expect the bong to be passed around to me any minute now. Very cold in the morning.
  • TechShop: Menlo Park. Pros: Feels like I'm 40 minutes into a Star Trek TNG episode (sample dialogue from neighboring workbench: "Dude, I totally ordered a sensor bearing, but when it went into its return arc...."). Good commute. Endless take-a-penny-leave-a-penny parts bins so I can finally empty my home closets of junk from projects past. Various pint-sized robots around me provide inspiration for video-game themes. Same price as HD ($100/month) if I pay a year in advance. Cons: As a software guy who neither builds animatronic handbags nor wishes to add jet propulsion to his commute car, I feel out of place here. Earplugs generally required to get any work done. Like HD, chilly in the morning. Free popcorn is not seasoned. Kids below age 12 are absolutely prohibited for insurance reasons. Constant risk of suffering injury from neighboring projects.
  • Local public library. Pros: Free (pro because it costs me nothing). Reasonably functional internet. Cons: Free (con because money no longer has filtering effect). Doesn't open until 11am, so I've never actually been there. If I visit the bathroom, my computer will be either stolen or used to view porn. Borrowed books must be returned in two weeks.
  • Local coffee shop. Pros: Lets me pretend I'm 22 years old again. Cons: No free internet. Unless I'm drinking 16 ounces of coffee every 20 minutes, I'm not truly welcome there. Too many overheard conversations that make me want to get up as a self-appointed Angel of Darwin and strangle the participants.
  • Google parking lot. Pros: Free internet. Chance of being invited to free lunch. Cons: Risk of heat exhaustion if I don't roll down the windows.
  • Real rented office. Pros: It's my place. Cons: Expenses likely to outweigh revenue. Overkill for one person.

Have I missed any other candidates?

In Defense of Modern Legos

| | Comments (0)

(Yes, I call them "Legos," not Lego-brand blocks. Get over it.)

Like many of my generation, I've complained bitterly about how modern Lego sets are full of special-purpose blocks that can be assembled exactly one way, versus the old sets that were just a bunch of red, blue, yellow, and green rectangles that forced you to use your imagination to make anything. I figured it was a ploy to sell more distinct sets to a single kid, rather than just hoping the kid would want to grow his or her collection of abstract blocks. I think this is true, but recently when a catalog arrived in the mail for my son, I realized another reason why Lego had to go this way.

The Spongebob Lego contest sought Lego creations that looked like Spongebob characters. And wow, the winners were frickin' HUGE. It's a simple question of resolution. When you have a "pixel" that's at least a half-inch across, any expressive artwork is going to end up a couple feet across, not to mention unwieldy and expensive.

So when the Lego guys wanted to get into branded stuff, they probably tried building a Darth Vader out of regular blocks that was only a few inches tall, and it ended up looking like crap that even George Lucas would have rejected. They really had no alternative but to cheat by manufacturing a few special-purpose blocks to build a model that was both small and instantly recognizable. Scale that across a complete set and you end up with what we have today.

My objection stands: it sucks that my kids want more and more Legos rather than thinking of new ways to assemble the sets they have. But I am no longer sure that the Lego guys intentionally betrayed their original mission to sell sets of building blocks. Instead, I think it was fallout from a different decision (to get into branding) that happened to align perfectly with their goals of selling more stuff.

Hey, Google! (And other providers of web services.)

Some of you have scaled back your twentysomething, 100-hour/week engineering lifestyles and started families. If so, have you noticed how nice it'd be to be able to share email addresses with your spouse and maybe your kids? Or create a task list that's a joint to-do list for the household? Or log into your own email account and approve new senders for your kids' email accounts? Or have a single email address that's the "household" email address, but doesn't require everyone to log into that account and share a password?

The marketing department calls these "enterprise features." But you know what? A family is an enterprise, too! Not in the SLA or guaranteed-support senses, but definitely in the we-have-complicated-relationships-among-ourselves sense. No, we don't want to set up a domain, or change our email addresses, or designate Dad as the administrator with access to the family's control panel. (Google Apps would be perfect if we did.) We just want those enterprise features!

The consumer/enterprise distinction is frustrating because (a) each side in fact needs the other side's features, and (b) the distinction really doesn't make sense when either version is free anyway. Please break down that feature wall. Help me share my contact list with my wife!

We recently replaced our home cordless phone with the Siemens Gigaset S675IP, which is a cordless phone/answering machine combo that has a key new feature: it will act as an ATA for up to six SIP accounts. In plain English, this means we can easily make phone calls over the internet using free providers like Gizmo and sipgate. (In our case, the motivation for getting a VOIP-capable device wasn't so much free calls as the ability to easily add extra phone lines for our business and the kids.) I'm hoping the Siemens folks read blogs, because here are some feature requests:

  • I'd like the handset to have a unique ring per SIP account. This way we can tell whether the call is coming in on my work line, our home line, the kids' line, etc. My suspicion is that the DECT standard doesn't allow this, because it seems like an obvious and useful feature that wouldn't have been overlooked.
  • Either let me add new ringtones or include some standard, ordinary ringtones. All the ones included on the S67H handset are either musical sequences or incredibly shrill alert-type sounds. How about just a conventional ringing-bell sound?
  • Please fix the screensaver-eating-the-first-keystroke bug that Michael Graves described in his remarkably comprehensive A580 review.
  • Please let me specify whether the address book displays Last, First or First, Last.

Capsule review: the phone system is very good. It does everything it promises. Audio quality is great, range is excellent, SIP account setup is reasonably easy, and battery life appears to be a non-issue. I wish the handset UI were faster -- it suffers from too-long pauses after keystrokes, like so many portable electronics these days -- but other than that, I'm satisfied with the purchase.

This might be a contemporary urban legend, but the rumor is that Google Android and Palm WebOS don't use multitouch in their UIs because of Apple's Patent #7,479,949. But how can this be if Keanu Reeves invented multitouch back in 1995? Check it out here:

At 1:21, he stretches a small planet on the screen using both hands.

At 2:02, he stretches a rectangle.

Heck, at 0:35 he even says iPhone! (probably "eye phones.")

This is a patent issue, so nothing about it is simple. But it seems like it's an old, non-novel idea to use two appendages on a touch screen to change zoom level on an object in the UI.

AVG decided to shoot themselves in the foot and run a near-daily popup ad campaign on their Anti-Virus Free Edition users' machines. Here's a response to user complaints written by one of their volunteer forum moderators:

Don't forget that you are privileged to be using an available Free AV product so you can expect AVG Technologies to be trying to encourage you to use their Pro (paid for) version. In the end of the day it's not really a lot to put up with....

Any response to this attitude is tilting at windmills, but I can't resist pointing out the irony that AVG uses the very same tactics (annoying popup ads) that their product is supposed to eliminate (malware can be responsible for annoying popup ads, among many other things).

Any recommendations for free antivirus software that has a better attitude toward their customers?

I'm doing my first AdWords ads for iLetDown, so I've written a few ads like this:

Relax and Pump Quickly
Trigger your letdown reflex!
Buy iLetDown for iPhone.
www.attachmentcomputing.com

These were working fine until yesterday, when I tried to edit them slightly, and all my ads were halted because... Apple has asked Google to prohibit the trademarked "iPhone" term from being used in AdWords ads.

Huh? So the maker of this phone that's being promoted as a platform is preventing developers from advertising the fact that they've created products for that platform?

I stayed away from Apple for a long, long time, so maybe I'm just being naive about how this part of the world works. Does Apple always crap on its community like this?

Reproducible

| | Comments (1)

Every once in a while I'll forget that I did something, and I'll do it again, or I'll at least start doing it before I remember that I already did it. When this happens, I sometimes surprise myself by re-doing it exactly the same way I did before.

Example: I wanted to open a savings account for my one-month-old daughter, who got her Social Security number a few days ago. So today I do the following:

  1. Open Notepad (actually Notepad2, which is a great Notepad replacement).
  2. Type her name: first name, middle initial, last name.
  3. New line.
  4. Type her SSN.
  5. Print.
  6. Get the paper from the printer, get in the car, etc.

When I got to step 4, however, I asked myself "Wait, didn't I already print this out two days ago?" So I walk to the printer and sure enough, find a sheet of paper with first name, middle initial, last name, new line, SSN. And I remember that I was about to go get the sheet of paper two days ago when the phone rang and I got distracted.

On one hand, of course, I worry that this forgetfulness is the beginning of early-onset dementia. But on the other hand, as a software engineer I take delight in the reproducibility of my own behavior. It's very geekily comforting to know that if I'm placed in the same situation twice, I'll probably behave the same way twice, right down to the middle initial.

I have two Linux machines and a gigantic file on one that I want on the other. The two machines are connected by Ethernet. scp is incredibly slow, about 1.6MB/second. I don't feel like setting up samba or nfs on either. I don't care about security, authenticity, or integrity; I can md5sum if necessary, and both machines are isolated from the Internet.

I assumed the scp slowness was a CPU thing with ssh encryption, but someone on the web said the problem was in fact at a lower level (64K buffer sizes in ssh). The best solution I came up with was python -c "import SimpleHTTPServer;SimpleHTTPServer.test()" on the source machine and then wget source:8000 myfile on the other machine. That got me about 8MB/sec, which was barely fast enough to get the job done, so I stopped investigating.

But for next time, there must be a clever command-line solution that a Linux guru can recommend. Maybe piping through nc?

Picasa no worky

| | Comments (0)

I've used Picasa for a couple years now, and I still don't get it. Here's my workflow:

1. Take pictures with camera.
2. Stick SD card from camera into computer.
3. Import pictures from SD card to home fileserver.
4. Browse, edit, remove red-eye, torture relatives with more pictures of kids, etc.

But here's where it breaks down. At step 3, Picasa asks me where I want to save the pictures. I must type a directory name; it won't store them in the root of the directory specified in Picasa preferences. So in effect, I must supply metadata to describe my new pictures, and I always end up typing "pictures I took in the last few days" or more likely "asdfasdsdfs."

Can you imagine how successful Gmail would have been if it popped up a dialog forcing you to type a label name each time a new email came in? Or even worse, a single mandatory label to cover all email that had arrived in the last 24 hours?

Picasa, it's your job to organize my pictures for me. Don't make me do it for you!

This wouldn't be such a problem if I could type the nonsense directory name, do the import, and then immediately see what I imported. But no, Picasa doesn't know about pictures it's imported until it re-scans watched directories. This means it can be minutes after the import before I actually get to see my pictures. By then I've usually switched to another task (like writing a griping blog post about my photo-management software) and I forget to return to it.

It's possible I've totally missed the Zen of Picasa. Perhaps because it came from Google I expect it to act like other Google products: it should be a giant funnel for unorganized data, and it should magically present that data in a sensible fashion. Instead, Picasa refuses to accept unorganized data, and it briefly (but at a critical time) loses all knowledge of the newest data I've entrusted to it. I don't get it.

BSG Finale

| | Comments (1)

Mary and I watched the series finale of Battlestar Galactica this weekend, and I feel like I've run a marathon. At least, I do as much as anyone who watches The Sci Fi Channel will ever know what running a marathon feels like.

The most interesting thing I got out of the final show was that God must exist in the BSG universe. There was always a lot of religion in the show, of course, but religion exists independently of God's existence. In her final scene, Kara was either an angel or a very fast sprinter. I'll accept either possibility as sufficient proof of divine intervention. If angels exist, then God exists. I now need to rethink the words and actions of Head Six and Head Baltar, because they were probably real, rather than hallucinations.

Drop iPhone to fix it

| | Comments (0)

My mom had an iPhone. One day the speaker went mute. Apple Store people show her a pink strip in the earphone jack, which apparently voids the warranty because the strip is a water detector. Unknown how this happened, but she's a grandmother with a 2-year old living in her home, and there is at least one toilet in the house.

Anyway, I borrowed the phone because the display still worked, and I was thinking of writing an application for it. The other day I dropped the phone onto a rug from about waist height, and what do you know: the sound works again.

For you pink-jackers out there: give it a try. What do you have to lose?

One of my all-time favorite electronics purchases is my Infrant ReadyNAS. It's a file server that's barely bigger than the four SATA drives it contains. We keep all 100+ GB of our family photos on it. (With periodic offsite backups, of course.)

The other day I walked into my home office and smelled burning electronics. I wish I could say this were a rare occurrence in the Tsao household, but that's the price a tinkerer pays to lead an adventurous life. Fortunately, this time it wasn't my fault: the ReadyNAS was dead, almost certainly because of a popped capacitor. After a few online searches I determined that mine was likely within a range of recalled units that had a flaky power supply.

So on a grim Saturday night I called an 800 number. I promptly got an answer. I explained my problem exactly once; I gave my name and shipping address exactly once; I provided a credit card number exactly once as security to allow cross-shipping of the good and defective parts. No apologies for hold times, no transferring to supervisors, no hassle. A few days later I received a box with a new power supply in it and a prepaid shipping label for the return. My file server was back in business!

I admit that I was worried when Netgear purchased Infrant a couple years ago, but if it means it's cost-effective for them to hire competent, courteous phone people even on a weekend night, I'll accept it.

Watchmen

| | Comments (0)

Over the past few nights I read Watchmen. This was my first time reading it; in fact, until the movie hype began, I hadn't even heard of the book. (Yes, I understand that my geek credentials will be revoked because of these admissions.)

Not only was this my first read, but it was also my first graphic novel, except maybe for those Chick booklets that warped my mind when I was a kid. I found the storyline incredibly evocative because of the format. I didn't need to spend a lot of mental energy trying to remember which character was which, because their faces were right there in front of me. I wouldn't say it was any faster to read than pure text, because I spent quite a bit of time poring over the pictures even after I'd sopped up all the dialog. I like the compromise between the precision of prose and the convenience of film; like prose, it pushes you in the direction the writers want you to go, and like film, it leaves enough to your interpretation that your experience might be quite different from someone else's, but not so much so that you leave the theater/book saying "huh?," as so often can happen with artsy films.

I appreciate The Incredibles even more now; I can see that it also started with the idea of the everyday lives of superheroes and took it in a totally different direction.

But after watching a trailer of the movie and recognizing nearly every scene from the book, I have to wonder: why make a Watchmen movie at all? Won't it just be a tweened version of the book? I'm sure I'll still see it even if it is. Unfortunately, it's rated R, so that won't happen any time soon unless I can find a sitter for the kids.

Android on Netbook, Part 2

| | Comments (1)

My prediction about availability of Android on a netbook by the end of 2008 didn't quite come true, but it was not too far off.

Next challenge: who will port Android to the Alpha 400?

December 15, 2008: I wrote this post back in August but never got around to editing it. The server has been running perfectly since then.

The MSI Wind PC is a barebones Atom-based PC. The case is small but not tiny. With shipping and sales tax from NewEgg, the cost was $165.34.

The goal is to make this box into a simple but capable home Linux server. I already have an Infrant ReadyNAS, which is a fantastic file server, but just too slow to serve any other function such as a Squeezecenter server. I figure the two machines together will handle most of my home hacking needs, and most of the day they'll together consume less than 50 watts.

Step one: install required hardware. I plugged in a 512MB SO-DIMM from an old laptop, and then a 2GB CompactFlash card for the OS. I had to take apart the entire thing to get the CF card plugged in, because the socket ridiculously abuts the case wall. Otherwise, no problem.

Step two: install OS. The RTL8111C network adapter wasn't incorporated into the Linux kernel until 2.6.26 or so, which meant this would be challenging. I got a CentOS 5.2 DVD and put the RealTek driver source on a USB drive. The CF card's slow write speeds meant the installation was slow (45 minutes). After reboot, I copied the driver source to /root, then built and installed it. On reboot, sure enough, I had a working eth0. By the way, during the installation my Kill-A-Watt showed the box at a fairly constant 20W.

Step three: tuning. Added a few quick ramdisks to take care of most unnecessary CF writes in /etc/fstab:

tmpfs /tmp tmpfs defaults,mode=1777 0 0
tmpfs /var/cache tmpfs defaults,mode=1777 0 0
tmpfs /var/log tmpfs defaults,mode=1777 0 0
tmpfs /var/run tmpfs defaults,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,mode=1777 0 0
tmpfs /var/lib/squeezecenter/cache tmpfs defaults,mode=1777 0 0

(It seems like there must be a better way to do this, but I didn't want to muck with too much on the system that yum would then unravel.)

In order to get the system to boot after this, I had to switch SELinux to permissive; otherwise, it seems like all the startup scripts that wanted to write to the tmpfs filesystems during boot failed because the filesystems were read-only. And thus I blow right through another New Year's resolution to learn SELinux instead of being lazy.

Then yum -y update, and once again rebuilt the RealTek driver for the updated kernel.

Over the next couple days I'd occasionally do a query like this to see whether anything was being unexpectedly written to flash:

find /etc /var /tmp -type f -and -mmin -45

Based on these results, I configured ntpd to write its drift file to /var/tmp/ntp_drift. Otherwise, everything looked about right.

You might notice that I configured Squeezecenter to store its "cache" data -- which includes the MySQL database where it stores music metadata -- in ramdisk. Yes, this means that it does a full-library rescan on every reboot. I'll see whether this works in practice, but I expect this server to reboot very rarely. I had a home server a few years ago whose uptime was close to a year, so it seems realistic.

Good music for home movies?

| | Comments (0)

Lazyweb, I call upon your collective experience and wisdom. This weekend I edited family vacation video into a real movie. The hardest part by far was picking the background music. The test I used was simple.

If a mom is shown a picture of her children while listening to the song, will she burst into tears of happiness in less than ten seconds?

I found one candidate: You're My Best Friend by Queen. This got Mary going in about four seconds.

Another contender: Cast Your Fate To The Wind, Vince Guaraldi Trio. Evocative of childhood Charlie Brown TV specials because it's the only non-Charlie Brown hit song from the band that did all the Charlie Brown music. This one set the stage for Mary's breakdown but didn't actually cause it.

But after that, I was left with filler. I went with The Brazilianaire by Cujo, and then Follow Your Bliss by the B-52s.

Now, to be honest, I have other criteria that make the selection harder.

  • No Celine Dion or anything in a collection including a Celine Dion album. (Yes, this means if there's a Celine Dion album in your music collection, you and your entire family are disqualified from expressing an opinion. I'm sorry about this. Trust me, it's for the good of the country.)
  • No songs by any band having an American city or state as a name (Boston, Chicago, Kansas, etc.).
  • Remember, these are family movies. Thus, no love songs that include a description of what's going to happen when the singer finally gets some private time with the subject of the song.

Not every song needs to be a trigger, of course. But I'd like to have more than one in my arsenal. Suggestions?

Site launched

| | Comments (2)

FSX is now kaChing. Yay!

Instant messages are meant to be instant. That's the whole point. Please don't start instant message conversations with "throat-clearing" phrases. Just say what you were going to say! Specifically:

  • Hello or Hi: Wastes time forcing the recipient to write "Hello" back. Ensures that an IM exchange always takes at least a minute.
  • Hey Mike: See above. Even worse because the recipient has to either personalize the response ("Hi Joe") or else appear rude by simply saying "Hi."
  • You there? or You busy?: My status message has already answered these questions.
  • Got a minute?: Irrelevant. Typical instant message exchanges should take much less than a minute.

For the geek crowd: think UDP. Send a message; maybe it'll reach the recipient, maybe it won't. Maybe you'll get a response, maybe you won't. If you're OK with this, use UDP. Same goes with IM. If you're OK with a connectionless protocol, use it. If not, consider using the telephone or email instead. But just as you wouldn't try to implement TCP over UDP, you shouldn't use telephone protocols over IM.

Android on a Netbook

| | Comments (2)

Before the end of the year, it'll be possible to download an Android LiveCD ISO for commodity PCs. Soon after that, all netbook vendors will abandon their custom Linux distributions and begin shipping Android instead.

Android is the Linux desktop that the Linux community has been waiting for. It's the chrome around the kernel that makes Linux usable by everyone's kids and everyone's parents. But unlike Apple's OS X (which is also chrome around an open-source kernel), Android will be open source.

Long: cloud computing, Intel, Amazon, Google, and small app development shops.

Neutral: Apple, Adobe, Yahoo.

Short: Microsoft, Symantec, Intuit, Computer Associates. Probably Garmin.

I own only one of the current generation of Atom-based notebook computers, so this isn't the voice of experience speaking, but my decision was the product of a fair amount of online research. I am very happy with my Acer Aspire One. I got the 1GB/120GB/XP Home/blue model.

Pros:

- I can do Java development in Eclipse on it. I prefer using a full-sized workstation, but I am genuinely productive on it.

- It doesn't have the half-sized misplaced right shift key that I never learned to use reliably on my Eee PC from last year.

- The 120GB hard drive is pretty much infinitely large for my cloud-friendly lifestyle (especially now that Dropbox is out).

- The 1GB of DRAM is perfectly fine.

- It feels solid!

Cons:

- Oh dear, the shiny surface collects fingerprints more than any surface I can think of.

- The fan's a little too loud. In a meeting where people are listening intently to a speaker, it's just on the border of being annoying.

- I wish it had Bluetooth so I could easily sync pictures from my phone.

- The buttons on the side of the trackpad make single-hand cursor control difficult. I've gotten better at tapping, but for some operations it's not good enough.

Sad. I've been waiting for it for years, and had it on preorder since June. But back it goes, unopened.

Poor Man's Photo Geotagging

| | Comments (0)

Picasaweb's new face recognition feature got me thinking: if every public sign in the world included a QR code with lat/long info embedded in it, then photo sites could scan for them in pictures and automatically insert geotags into the EXIF data. If geek Good Samaritans carried around combination GPS/label makers, they could obsessively deposit such codes as they walked around -- a sort of beneficial graffiti.

Update: I think this could easily work. I encoded a message in QR code, printed it out, and stuck it on a wall in the house. Then I took this picture of it:

qr-full.jpg

Then because of size limitations on the online QR code recognition site I tried, I cropped the image:

qr-crop.jpg

Finally, submit to Google's ZXing site, and it worked.

Looks like some other people have come up with similar ideas (dencity is one). But this approach is a little different: rather than requiring users to run specific software on a cameraphone or otherwise actively try to parse the codes, this software could run automatically on Picasaweb and insert appropriate tags if it encountered QR codes following some sort of compact microformat.

Update 2009-12-07: Getting closer. Not exactly what I had in mind, but a step in the right direction.

The big FLAC project

| | Comments (0)

I made a mistake a few years ago. I've since learned that I can hear better than I thought. Thus begins the once-and-for-all CD archiving project. All my physical CDs will be see the light of a laser one last time, and then be put away forever, replaced by album-image FLACs with embedded cuesheets. These archive FLACs will then serve as source files for other audio formats (MP3 high quality, MP3 small size, audio CD ISOs, and so on).

Step one: following Alex Wetmore's lead, find a bulk CD ripper cheap on eBay.

Step two: Get Alex's stuff working. (Yes, it really does work.) What I learned during this step: (1) turn off the Removable Storage service in XP, (2) don't try updating any software from Alex's zip archive; just treat it as a turnkey system; (3) turn off the Windows Update service unless you want to lose 10 hours to an automatic update restart; (4) set your computer's power settings to always-on; and (5) understand that to kick off the whole process, you need to first mount the Slot 0 disc, then launch REACT, then press alt-F5 to start the ripping.

Step three: wait a long time. Excluding the Windows Update incident, I'm seeing about 12 minutes per disc, start to finish. Thus about two ideal days for a 200-CD batch.

Future post-processing steps include adding album art, MusicBrainz tags, replay gain info, and embedded CUE and Vorbis data. I'll update this entry as I get there.

Halt on all errors

| | Comments (0)

Why do BIOS default configurations specify that the boot process should die if a keyboard isn't attached? Right now, as you read this, I bet there are at least three people driving down the highway expecting to ssh into their new headless servers when they reach their destination. This is how it happens:

1. Spend N hours getting the server just right.
2. Reboot a few times to make sure it works.
3. Unhook the monitor and keyboard.
4. Shut down. Unplug.
5. Put server in its permanent spot. Plug back in.
6. Press power. See blinking light.
7. Leave.
8. #)(#$%*#@!@(!@!!!!!
9. Drive back.
10. Go back to step 1 for a slightly smaller value of N.

nfs vs. smb

| | Comments (0)

350MB file on an Infrant ReadyNAS, copied to a generic Linux box. Same directory, same file, only difference is mounting over NFS vs. mounting over Samba:

$ time cp /mnt/nfs/file.bin .
real 0m2.662s
user 0m0.084s
sys 0m2.504s

$ time cp /mnt/smb/file.bin .
real 0m57.294s
user 0m0.008s
sys 0m0.452s

Update a few hours later: I think caching fooled me. A new test for a different file that is 321MB shows NFS at 10.9 seconds versus SMB's 49.6 seconds. Still an extreme difference, but no longer uncomfortably close (over 130MB/sec) to the theoretical maximum speed of a typical SATA hard drive.

If you have a lot of CDs and have set up a good home system to listen to them online (i.e., on a hard drive rather than having to pop each physical CD into the player to listen to it), I'd appreciate some advice. If your goal were to put the physical CDs in the attic forever, no matter what fancy encoding technology appeared in the future, which format would you choose? Would single-file-per-album FLAC plus embedded cuesheets be sufficient? Or is there reason to drop to an even lower level, such as ISO or BIN?

I don't care about file size; if it takes 747MB per CD, so be it. I do care about the archive format being usable; hence the attraction of FLAC, which my Squeezebox can play, versus ISO/BIN, which are cumbersome as an audio source. I don't care about hybrid data/audio CDs. I definitely do care about gapless playback.

I made a mistake back in 2005 and ripped my collection to a lossy format. My penance is re-ripping the whole batch. Please help me do it right this time.

  • Early July: One of our new employees agrees to a start date of August 11.
  • July 21: I order a Dell PC and a 24-inch monitor for this new employee.
  • July 25: I get an email from Dell saying the purchase has shipped.
  • July 31: The package arrives.
  • August 11: First day for our new employee. Unpack the box, discover the monitor's broken. It flickers, and when it's not flickering, twisting lines of blue and green pixels shimmer on the display. We swap cables, computers, identical models of monitors, etc. We upgrade drivers. We reset the monitor to factory settings.
  • August 11: Navigate through Dell's website and submit exchange request.
  • August 12: Nothing happens. Once again, navigate through Dell's website and submit another exchange request.
  • August 12: "Sorry, your 21-day exchange period has expired." My response: no, it hasn't.
  • August 12: "Hi, sorry you can't figure out how to hook up your monitor. Have you tried our technical support department?" My response: look, it's really broken.
  • August 13: "Sorry, your 21-day exchange period has expired." My response: no, it hasn't.
  • August 13: "Hi, sorry you can't figure out how to hook up your monitor. Have you tried our technical support department?" My response: hey, we've gone through all the troubleshooting steps. Just give me the RMA.
  • August 14: "Oh gosh, we're sorry about all this. We'll be happy to replace the monitor. One question though, was the box damaged when it arrived?" My response: you already asked me that when I filled out the original web form. To repeat myself: no, the box was OK. Their response: "Hi, sorry you can't figure out how to hook up your monitor. Have you tried our technical support department?" My response: RMA, please. Don't make me dispute the credit card charge.
  • August 15 (this morning): "Sorry, your 21-day exchange period has expired."

(By the way, yes, I have called their tech support department. Early morning I haven't been able to stay on hold longer than a few minutes, and in the evening they say to call back the next day.)

Dell hardware is fine. But Dell the company sucks.

Update 10:09am Friday: On the phone now for 39 minutes. Spoke to Mark Garcia, an unknown other person, Misha 143497, Virginia 869237, and now on hold for the last 12 minutes being transferred again to a "technical support specialist." Each time except for Virginia I explained most of the story all over again. Verified name 4 times. Verified mailing address twice.

Dell, if you're listening, my incident number is 617570338.

10:14 "Please wait."

10:15 Hey, what a great idea: liveblogging my defective Dell monitor return experience.

10:16 The "Please wait" every 30 seconds for the last approximately 20 minutes has just changed into music, as well as an occasional recording urging me to hang up and figure out the problem myself on the support website.

10:21 Sigh, looks like the switch to music wasn't a sign of imminent human contact. But on the bright side, I now know that Dell's set up a "community" site where people can help each other diagnose their problems with Dell machines.

10:22 "Many times a simple restart will resolve issues. Try restarting and see whether the problem persists!"

10:24: Don't like being on hold? Buy "Dell On-Call Support"! What a great value!

10:25: The Dell community message. Also ensure your virus definitions are up to date. I've heard that one at least three times now. Ooh, but I missed that visiting the site can give you access to free virus software. Wow!

10:26: Now they're telling me HOW to turn off my computer to restart and "see if the problem persists." Buy Dell On-Call Support. "Do you think spyware is an issue?"

10:32 The music stopped for about a minute. Was hopeful this meant I would get someone to answer. Nope, just got reminded about spyware again, then more music.

10:34 I just realized it's been forever since I heard someone say "forward-slash" when reading a URL. But I've heard it probably 60 times in the last 40 minutes. "Visit dell dot com forward slash support blah blah blah blah blah...."

10:38 Searching my Gmail for from:US_CAG_Customer_Care@dell.com returns 25 distinct emails. That means I've gone through 12 and a half email round trips with Dell.

10:39 Ooh, the music stopped again!

10:40 Nooooooooooooooo! "Many times a simple restart will resolve..............."

10:41 On the phone now for at least 1 hour, 11 minutes.

10:42 "forward slash security tips"

10:43 I wonder how many of their users type a space between "security" and "tips" when typing in that URL. Why couldn't they have picked a single word like "security" or "tips"?

10:44 I love how they say "issues" instead of "problems." I know everyone does that in the tech industry, but it's amusing to analyze how thoroughly they've cleansed the language of these recorded messages.

10:47 It looks like the music stops about every seven minutes. It must be a loop. So unfortunately there's no meaning in the fact that it stops.

10:50 Here's a screenshot of the email:

dell_mails.jpg

10:51 "Scan for viruses for free!" More music.

10:52 Here's my attempt to transcribe the music into text: doo dee.... doo doo doodly-doo, bwap bwap bwap bwap (repeat verse), boop boop twang

10:54 will have been on for 90 minutes soon.

10:55 "then restart to see if the problem persists." Technically it should be "whether," not "if." Otherwise you're literally saying that you should restart your computer ONLY IF the problem persists. But how would you know, unless you restarted your computer to find out?

10:57 bathroom break. Hope I don't drop the call.

11:01 Hi, this is Mike. I'm totally not brainwashed or anything. I just wanted to ask my loyal readers a simple question. Did you know Dell is here for you 24/7, all year long? doo dee.... doo doo doodly-doo......

11:04 Oh, this was weird. This time the music stopped for 9 seconds. Historically it takes from 5.5 to 7 seconds before the tape loops.

11:05 Thinking of hanging up and redialing.

11:06 I'm also thinking of designing a T-shirt people that people could wear to show their support for my cause during this phone call. I've been happy with cafepress in the past -- any better suggestions?

11:09 So here's the thing about hanging up. Remember that quote from Boiler Room? "there is no such thing as a no-sale call. A sale is made on every call you make. Either you sell the client some stock or he sells you a reason he can't." Does this count as a "call"? Then if I hang up, what have I bought? I mean, besides a broken monitor?

11:12 Oh, wow, must be a slow news day. I'm on CNN! Read the article here: http://www.cnn.com/2008/TECH/08/15/mike.vs.dell/index.html

11:14 Ha ha, made you click.

11:15 Coming up on TWO HOURS ON THIS DELL PHONE CALL. Hanging up now.

11:15 Redialing 800-624-9896.................

11:16 "Welcome to Dell...."

11:24 got someone

11:26 I think he's in the States. Score!

11:27 It's actually possible that he is genuinely shocked that I was on the phone for two hours.

11:28 "You're in the wrong queue" OH GOD NO

11:28 "But since you were on hold so long I can make an exception and process this matter for you..." Do miracles happen?

11:30 Describing the problem, won't fall into previous traps.....

11:31 As I'm fumbling to describe the snake-like flickering pixels, he suggests "like an ink spill"? My goodness gracious, a man who speaks my language!

11:32 "Yeah, that's bad." (His words.)

11:33 I'm "verifying" my shipping address. He wouldn't ask that unless something were being shipped there, right?

11:35 aw, crap, he's doing it to me. I'm going to have to call someone else.

Was it something I said? I thought we had a really good relationship.

11:39 We're still talking. Maybe we can save this thing.

11:40 "I'm picking the part for you now." I am not sure what that means, but it's better than "Sorry, you're 19 days into your 21-day exchange period, which means your exchange period has elapsed."

11:44 Off the phone. "Scott" says they're going to send someone out to replace the monitor. No need to call anyone. He says I should call up "Dell Customer Care" and explain what happened and "I'm sure they'll do something for you."

11:46 I got a confirmation email from him proving the last conversation really happened.

11:48 end of liveblog, for now. Back to work. I have vastly improved my state of mind, now elevated to "F*** you Dell, you f***ing shameful excuse of a customer service organization." Let's see what happens next.

Update 8/22/2008: Happily resolved.

Blocking an IP address

| | Comments (0)

For example, if a script kiddie is trying to ssh from address w.x.y.z as adam, betty, charlie, dan, ed, etc.:

iptables -I INPUT -s w.x.y.z -j DROP

The login attempts are generally harmless (unless they succeed, of course), but they can be distracting if you're debugging something related to processes (e.g., atop or ps).

Declutter user manuals

| | Comments (0)

Lately, when my family buys anything with a user manual, part of my unboxing ritual involves going to the manufacturer's website, downloading the user manual as a PDF, and putting it somewhere safe. Then I throw away (er, I mean, recycle) the paper version. Less physical clutter, and searchable product documentation -- no matter how the manufacturer reorganizes its website in the coming years.

CentOS 5.2 under Xen

| | Comments (0)

If the following are true:

  • You have a working Xen Dom0 instance
  • You have downloaded the CentOS 5.2 image from jailtime.org
  • You can't get the image to boot up as a DomU instance because of missing directories such as /dev and /proc

Then you might be interested in knowing that the jailtime images expect certain Xen modules to be preloaded in the ramdisk. So run something like this on your Dom0:

mkinitrd -v -f --with=ext3 --preload=xenblk --with=xennet /boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img 2.6.18-92.1.6.el5xen

Note that I added "-xenblk" to the ramdisk filename to distinguish it from the standard Dom0 file that came with my distro.

Then put the resulting .img in your ramdisk= field in your Xen config file, and believe it or not, it will work. Here's my complete .cfg:

kernel = "/boot/vmlinuz-2.6.18-92.1.6.el5xen"
ramdisk = "/boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img"
memory = 256
name = "myxen"
vif = [ 'bridge=xenbr0' ]
disk = ['file:/home/xen/myxen/centos.5-2.img,sda1,w',
'file:/home/xen/myxen/swap.img,sda2,w']
dhcp='dhcp'
root = "/dev/sda1 ro"
extra = '4'

.proto free at last!

| | Comments (0)

Google has open-sourced one of my mostest favoritest areas of the codebase: protocol buffers!

I can feel the commentary appearing in Atom feeds already: why another serialization format? Especially one that is clearly dwarfed by XML/JSON/bencoding/Hibernate/my company's dual-licensed ORM framework/my thesis? (Yes, I know protobuffers aren't an ORM framework, but ORM frameworks do of course provide object-mapping functionality.)

My answer is that the protocol buffer implementation just works really, really well. It excels at handling version mismatches, it's tremendously efficient in terms of stream size (except for negative floats, if memory serves) and execution speed, and it has all the debugging features you could possibly want from a small library. By the way, the debugging features are for your application code; you might say it's already pretty well-tested.

Protocol buffers aren't for every application. You'll still send JSON to your JavaScript, and to my knowledge it hasn't been optimized for code size. If there's any chance at all a human will ever want to read or edit the stream (for example, in the case of a preferences file), forget about it. But if you have two servers sharing information over the wire -- particularly two servers written in different languages -- and you are dreading writing another custom object mapper, protocol buffers might be just the ticket.

My team is moving to new offices in Redwood City, and we've resolved to lay out our workspace in an XP-friendly bullpen style that favors pair programming and impromptu meetings.

While visualizing our new digs, I had an idea. What if, instead of making it easy to gather around a single computer, the computer itself were mobile? Laptops aren't the answer; I can't write code of any depth without an ergonomic keyboard and a mouse, and I am addicted to giant LCDs. So I'm looking for a tiny rolling workstation stand with a VESA monitor arm, an adjustable keyboard/mouse tray, and a UPS so I can move around without shutting down the PC. A quick search on the web produced many contenders that I had to rule out for various reasons: too ugly (wood laminate), too fragile-looking, keyboard tray not sufficiently adjustable to the 26-inch height I prefer, not really compatible with a VESA mount, or priced for verticals rather than the consumer market.

This is the closest to what I have in mind.

Rolling PC Workstation

But I wanted more of a flexible monitor arm so that we could easily move the monitor around according to whoever's coding at the moment, and I'd imagined the keyboard tray jutting forward a little more, both to counterbalance the monitor arm (visually if not physically) and to enable me to stretch my legs out a bit underneath without straddling the PC. And if I ditch the included tray and monitor mount and replace them with my own, then I'm paying $250 for a rolling pole, which doesn't feel like such a great deal.

Any ideas? By the way, I decided to disable blog comments after a barrage of unsuccessful spam attacks, so if you have an idea, post it somewhere on the web, and my Google Web Alerts will eventually pick it up.

I'm doing something pretty goofy today: I'm leaving Google. My tattered old employee badge goes back to HR during my exit interview at 4:00 this afternoon. After that I'll be an ex-Googler.

Working at Google was as amazing as everyone says it is. Sure, the perks were nice. I'll miss the delicious meals, the ski trips, the commuter shuttle, and TGIF. But any company could provide such benefits, given enough free cash flow. What makes Google unique is its culture of respect. The tough interview process means that engineers are treated with respect from their first day. In such a supportive environment, even the most timid person works with self-confidence, which is marvelous to witness. This element of the company's culture was the biggest difference between Google and every other place I've worked in the past. I hope to take it with me throughout the rest of my career.

Which brings me to the future. What's next? I'd originally intended to take a year off and bang on a few software ideas that have been rattling around my head. I'd then pick the most promising one, find some friends, and start up a new venture. As it turned out, things went faster than I expected, and not exactly in the order I'd expected, but the result was the same.

My new venture is a software startup called FSX. I think of the company as a mashup of eBay, Charles Schwab, and American Idol. FSX will use a highly accurate, simulated brokerage to identify skilled stock portfolio managers. For the majority of participants, the fun of FSX's community and fantasy stock exchange will be its own reward. But there will be a tiny number of managers who we find can consistently outperform the field. For those newly discovered stars, we'll provide a market of investors willing to entrust real investment funds to their management.

The business idea is risky, no doubt. The Random Walk Down Wall Street crowd has seen all this before. But the premise that stock-picking is a legitimate, repeatable skill also forms the foundation of the hedge fund and mutual fund industries. If you (or your pension plan) have any of your money in a managed mutual fund or hedge fund, then you believe the premise, too.

The technical challenges are less risky, but to me they're even more fascinating. The uptime and integrity demands are arguably higher than those of a real brokerage. A slow trade in a real brokerage might cost one customer a certain amount of money. In fact, depending on how the ticker goes, the mistake might even earn the customer more money. But every complaint about FSX's performance damages its status as a faithful brokerage simulation, and that in turn damages the value of its entire community. Building a top-tier brokerage website would be hard enough. Our goals are much higher than that.

eBay built a global marketplace out of Pez dispensers and Elmo dolls. They made it possible for you to find that one guy out there who wants to buy your dusty old deluxe chartreuse dinglehopper. He completes his dinglehopper collection, you get some cash and some extra space on your shelf, and the world's a better place. FSX will do the same thing for investments and investment managers. If you think you have management talent, we'll prove it for you. If you want hedge fund-level talent cheaper than the cheapest mutual fund, we'll find it for you.

If you'd like to see a preview, add the Fantasy Stock Exchange application to your Facebook account. If you're a smart software engineer in Silicon Valley and want to join something big while it's still small, .

If life were Hollywood, I'd be typecast as The Guy Who Understands AMT As It Applies To Your Company's Stock Options. I get asked certain questions often enough that it's time to write up my answers. But remember, I'm not a tax lawyer or accountant; I just play one in movies. So get real tax advice from a professional.

Two questions are popular. First: "I just joined a company and got some stock options. There's something in the agreement about early-exercising. I understand how options work, but I don't understand why anyone would exercise early. What's the deal?" Second: "Oh boy, we're going public in six months, and the lockup expires 6 months after that! Should I exercise my options now to get the long-term capital gain rate on my zillions in profits?"

There are two considerations when you exercise ISOs (Incentive Stock Options): capital gains, and alternative minimum tax.

If you sell an asset more than a year after you acquired it, you're federally taxed on the profit at 15%. Less than that and it's the same as your ordinary income tax rate, which is probably 28%. So if you exercise your options, that means you buy the underlying stock, and that starts the cap gains period running, and you might cut your federal tax on the profits in half. Note that there are some funny rules for ISOs that effectively change this period for early-exercised stock to two years; either way, it's beneficial from the cap gains perspective to exercise as early as possible.

However, AMT can really screw you over. AMT is like an alternate universe that's even weirder than the normally taxed universe. You're potentially taxed on imaginary income, for example. In our case, the imaginary income is the difference between so-called fair market value of your stock on the day you exercise, and if that amount is large, you have to pay AMT on it, even if your stock ends up worthless by the time you're actually able to sell it.

Here's an example.

  • On 1 Jan 2008 Joe gets 10,000 options of ABC Corp. at strike price of 5 cents.
  • On 1 Jan 2010, ABC files for IPO for the coming month of June. The Board of Directors determines FMV of ABC is $75/share.
  • On 2 Jan 2010, Joe is very excited about the upcoming IPO, so he exercises his options, writing a check for $500 (10,000 x 5 cents).
  • On 1 Jun 2010, ABC goes public at $100. After an accounting scandal, the stock tanks. Joe ends up selling his shares for $1 each, or $10,000 total, the day the employee lockup expires. Joe's bummed out because he was briefly a millionaire, but still happy because he made a profit of $9,500.
  • On 1 Apr 2011, Joe's accountant determines that Joe owes AMT. Joe "earned" imaginary income of $749,500 on 2 Jan 2010. The accountant asks Joe to write a check to the IRS for approximately $250,000.00 to pay his 2010 taxes. Joe says "wait a minute, why am I paying taxes of $250,000 on a profit of $9,500??" His accountant says "Because you suck."

Joe should have either exercised on 1/1/2008, or never early-exercised at all. Early exercise avoids AMT and starts the cap gains holding period. Never early-exercising means you pay higher taxes on the gains, but you avoid AMT (and, of course, you don't put any money at risk by exercising).

Obviously, things change if you assume the share price will go down. But you wouldn't be working at that company if you believed that.

Final disclaimer: all of this is probably wrong or at least out of date. For example, I heard from a friend that for 2007 you're allowed to recover quite a bit more than usual of AMT paid in prior years, so the situation is possibly not as awful as it has been in the past. Again, hire a professional.

Nokia A/V cable pinouts

| | Comments (0)

The Nokia CA-75U's pinouts are identical to the Creative Zen Vision A/V cable's pinouts.

The documentation showing how to upload mail to your Premiere (not Standard!) Google Apps account is good, but there are a few practical matters either implied or missing from it. Here's how to post an email from your Linux command line.

First, let's assume you have a user test@example.com with a password 1234567890. Get your auth token as follows:

$ echo -n "Email=test@example.com&Passwd=1234567890&accountType=HOSTED&service=apps" \
| POST https://www.google.com/accounts/ClientLogin


This will either ask you for a CAPTCHA (resolve as described here and then repeat), or tell you the credentials:

SID=a-long-string-of-characters
LSID=another-long-string-of-characters
Auth=yet-another-long-string-of-characters


Now you should put a test RFC 822 message into a file called test_letter:

From someone@somewhere.com  Sat Jul 15 19:00:40 2006
Return-Path: 
Received: from somewhere.com (localhost.localdomain [127.0.0.1])
        by somewhere.com (8.13.4/8.13.4) with ESMTP id k6G20eq4024585
        for ; Sat, 15 Jul 2006 19:00:40 -0700
Received: (from someone@localhost)
        by somewhere.com (8.13.4/8.13.4/Submit) id k6G20eBj024584
        for someone; Sat, 15 Jul 2006 19:00:40 -0700
Date: Sat, 15 Jul 2006 19:00:40 -0700
From: Someone 
Message-Id: <200607160200.k6G20eBj024584@somewhere.com>
To: someone@somewhere.com
Subject: hi

hello


Then you need to XML-escape it. I used this sed script, called escape-xml.sed:

s/\&/\&amp;/g
s/</\&lt;/g
s/>/\&gt;/g


... and I performed the escaping with this command line:

sed -f escape-xml.sed test_letter > escaped_test_letter


Now wrap the whole thing in a full Atom request:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005">
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'>
  <atom:category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/apps/2006#mailItem'/>
  <apps:rfc822Msg xmlns:apps='http://schemas.google.com/apps/2006'>
From someone@somewhere.com  Sat Jul 15 19:00:40 2006
Return-Path: &lt;someone@somewhere.com&gt;
Received: from somewhere.com (localhost.localdomain [127.0.0.1])
        by somewhere.com (8.13.4/8.13.4) with ESMTP id k6G20eq4024585
        for &lt;someone@somewhere.com&gt;; Sat, 15 Jul 2006 19:00:40 -0700
Received: (from someone@localhost)
        by somewhere.com (8.13.4/8.13.4/Submit) id k6G20eBj024584
        for someone; Sat, 15 Jul 2006 19:00:40 -0700
Date: Sat, 15 Jul 2006 19:00:40 -0700
From: Someone &lt;someone@somewhere.com&gt;
Message-Id: &lt;200607160200.k6G20eBj024584@somewhere.com&gt;
To: someone@somewhere.com
Subject: hi

hello

</apps:rfc822Msg>
<apps:mailItemProperty xmlns:apps='http://schemas.google.com/apps/2006'
value='IS_STARRED'/>
<apps:mailItemProperty xmlns:apps='http://schemas.google.com/apps/2006' value='IS_UNREAD'/>
<apps:label xmlns:apps='http://schemas.google.com/apps/2006' labelName='Event Invitations'/>
<apps:label xmlns:apps='http://schemas.google.com/apps/2006' labelName='Friends'/>
</atom:entry>
</feed>


and put it in a file called xml_test_letter. At this point you have your credentials, and a file that constitutes the body of a valid Atom request to insert the mail into the account associated with the credentials. The problem I ran into here is that the POST tool won't let you use a Content-Type header of the form foo/bar+baz, but the Google API appears to accept only the type application/atom+xml. I found the POST tool on my local system (it's just a Perl script) and fixed it:

        die "$progname: Illegal Content-type format\n"
            unless $options{'c'} =~ m,^[\w\-]+/[\w+\-]+(?:\s*;.*)?$,


(note the new plus sign added into the regex). Now you're ready to do the request:

$ cat xml_test_letter | \
POST -H 'Authorization: GoogleLogin auth=yet-another-long-string-of-characters' \
-c 'application/atom+xml' \
https://apps-apis.google.com/a/feeds/migration/2.0/example.com/test/mail/batch


This should return a result indicating that the new mail is in test@example.com's account. Unfortunately, in my case it told me that because I have a standard account, I can't bulk-upload mail. But I'm confident that if I had the right kind of account, then this process would have worked.

Getting close

| | Comments (0)
$ crontab -l
0 0 15 11 * chmod -R 555 /music/holiday
0 0 1 1 * chmod -R 0 /music/holiday

If you've found your way here because of NaNoWriMo, then you're probably wondering why my Firefox extension started on November 2 rather than November 1. I reprint here my response in the Mozilla discussion:

Hey everyone, I'm the author of this extension. As pointed out in the discussion, the start date for 2007 was incorrect. It was miscalculated to be November 1, 2007 *as of the current time*, and because that was always not-later-than now on November 1, the extension thought that NaNoWriMo hadn't started yet. On November 2 and beyond, it works correctly. I realized this just as NaNoWriMo was starting and quickly submitted 0.4, which fixes the problem. However, the Mozilla extension reviewers appear to be far behind on their extension-reviewing queue, so they haven't approved 0.4 yet, and that's why it doesn't appear on the site. Meanwhile, I have put 0.4 on my personal website at (link). Note that you should generally not install random extensions you find out on the web; if you're uncomfortable doing this, just wait until the Mozilla folks approve 0.4, and you'll get prompted for an update. Sorry for the distraction. Get back to your novel!

Updated 11/9/2007: The official Mozilla site now has 0.4.

How does the Moon work?

| | Comments (6)

The other day I realized that I couldn't explain why the Moon has phases (full moon, half moon, etc.). I looked it up on Wikipedia and thought I'd figured it out: the Sun always (except for eclipses) lights up half the Moon, and we see that half from different angles. For example, if we see a full moon, that means that the Sun is behind us (us = viewer and the Moon), and if we see a new moon, that means the Sun is behind the Moon. I also found a cool Flash animation that helps visualize the process.

In an attempt to apply my newfound knowledge, I concluded that the angle of the shadow on the Moon's surface must indicate where the Sun is, like this:

moon_theory.jpeg

That's an exaggerated drawing of a "gibbous" moon. In simple terms, you're looking at a ball that's illuminated by a light, so if you recognize the boundary between the lit and unlit sides of the ball, you can tell where the light must be.

This sounds great in theory. But tonight just after sunset I saw this in the sky:

moon_reality.jpeg

If my theory were correct, then this observation would be impossible. Either the Sun must be above and to the right of the Moon to explain the shadow boundary (which it plainly isn't, because I just saw the Sun set below the horizon), or the shadow boundary should obscure the upper-left region of the Moon (which it plainly doesn't). I know what I saw, so my theory must be wrong.

This is probably going to be one of those problems I figure out the moment I press the Publish button on this entry. Otherwise, I'd appreciate an explanation about exactly how I'm confusing myself.

Update, 10:30 a.m. 10/23/2007: After some discussion with smart people involving whiteboards, flashlights, and borrowed computer-mouse trackballs, I have learned nothing new and realized nothing new. My basic premise is correct that the shadow on the Moon indicates where the Sun must be in the sky, or at least that a given shadow precludes certain Sun positions. Moreover, my observation was indeed that the Sun was in one of the precluded positions based on where I judged the shadow to be. So the most likely explanation at this point is that my observation was wrong.

One point that one person didn't get was that my second diagram above really represents what I saw -- that the Sun's setting point on the horizon was only about 10-20 degrees to the right of where I saw the Moon. The picture does not condense two different parts of the sky into a single view.

I can has Zune?

| | Comments (0)

A bullet point from the Engadget article caught my eye: "Additional native video codecs for h.264 and MPEG-4." Oh, really? If this is true, and you can drag, drop, and view MPEG-4/DivX videos, then the Zune suddenly got interesting. Only mildly interesting, mind you, but still interesting.

I'm still smarting from my purchase of a Toshiba Gigabeat S, which misleadingly implied in its advertising that it supported MPEG-4 video. The truth was that it played Windows Media Format videos that had been transcoded from other sources, including MPEG-4. By this reasoning, paper-pad cartoon flip books support Blu-Ray.

Zulu

| | Comments (2)

Wow, I'm a dork. For the next few weeks, at least, I'll be wearing a wristwatch. Not only that, but it is set to Universal Coordinated Time (UTC). More details to come (the title of this post is a hint).

Grammar gripes, volume 27

| | Comments (2)

Today's theme: verbs that have become nouns for no good reason, threatening to replace perfectly serviceable preexisting synonyms.

Invite (pronounced as the made-up word that it is: 'in-vite): "Dude, my invite arrived yesterday and I'm, like, so psyched." Perhaps the speaker meant "invitation."
Reveal: "Dude, she was totally, like, 'wow' after the reveal." I know that "revelation" sounds too important for these situations; "unveiling" fits nicely, and has the nice extra feature of actually being an English word.
Ask: "Dude, like, what exactly is your ask?" In the words of another true believer, this is a terrible, terrible grammar plague that has infected the corporate world. Although there is a noun form (the "ask," which is short for "asking price" in securities trading), it's a term of art that is understood to be shorthand.

Standard disclaimer: yes, I'm sure you can find a dictionary that defends the other position. Yes, I still understand what these speakers were trying to say. Yes, I'm tremendously judgmental and my complaining about these linguistic nits is no doubt symptomatic of various deeper problems with my personality.

Friendly tip to web developers

| | Comments (0)

If you resize my browser, I close your window. Do you hear me? Zero-percent conversions! Negative ROI!

Burning Man 2007

| | Comments (1)

Quick rundown of thoughts/observations/babblings:

  • We never saw any of the friends we planned to see unless it was by accident, or for specific appointments. Not especially surprising in a city of 47,000.
  • Only in Black Rock City: you're awakened to the sound of an enormous explosion and hundreds of people screaming, and your first thought is "oh, cool, they blew up the oil rig."
  • I'm still not convinced the monkey installation was anything more than a mass hoax. I went out there three times and it never did anything but gather dust.
  • LED technology has really become dirt-cheap and common in the five years since I attended Burning Man. At night, it was weird to see a person not wearing at least three blinking lights.
  • I estimate the number of kids at Burning Man to have increased about 90% since 2002. Of course, my awareness of kids has also increased about 90% since having two of my own.
  • Didn't miss TV or computers. Did miss the internet as a news/research tool (queries would have been [burning man arson] [ultralight trike] [burning man suicide] [crude awakening] [adds] [canopy shade]).
  • The movie theater project worked out great. We had about a dozen kids visiting each night, with deep expressions of gratitude from about a dozen sets of parents the next morning.
  • I blew up my charge controller when I first hooked up the whole circuit. On the inverter the terminals had come loose and shorted. The charge controller bore the brunt of the amperage and died a few seconds later. It still charged the batteries but couldn't regulate the output load at 12 volts anymore. So I had to charge one battery during the day and then run the inverter directly off the other battery at night. No big deal, especially since my maximum power consumption turned out to be little more than 60 watts, meaning I pretty much could have run the whole project all week from a single battery charge and skipped the solar part entirely.
  • Emily and Thomas each learned how to ride a tricycle. Thomas also proved adept at skateboarding!
  • Yes, the weather sucked, just as everyone said it would. It was humid most of the week and we had three dust storms. Two were routine but one was severe, turning the sky dark orange for about 10 minutes. The playa surface fragmented very easily, so that it was like walking on the beach after a few days. It's hard to bike through those kinds of conditions.
  • I was a UNICOM operator for two days at the spaceport. That was a lot of fun, and I met many cool folks. For various reasons the work meant I woke up before dawn every morning, and it was very nice to get such an early start on the day.
  • My shade structure was adequate for adults but no good for the kids. They didn't look at it as part of our home (it had no walls and just camouflage netting for a ceiling) so they didn't see the point of spending time there. If I could do that over I'd have just bought one of those structures that they advertise as portable garages for cars.
  • Real-world food didn't taste as good as I'd expected upon our return to civilization. Nor did showering feel as good. This is undoubtedly because we were able to shower in our RV, and because Mary made all sorts of good food when we were on the Playa.
  • My favorite art car was gigantic and made out of a segmented bus. Great music.
  • I was neutral about the early burn. Though I was sure that the guy who did it was an ass, I was also sure that I'd basically agree with his reasons (which I more or less correctly speculated were that the event had lost its spontaneity). That said, there are other less illegal ways to express yourself (but probably none as effective).
  • I never saw a single one of the 1,000 donated community bikes. I did hear they were being stolen (to the extent it's possible to steal anything in BRC without leaving).
  • Coffee quality varied wildly day by day.
  • I saw nothing that shocked me.
  • Emily was scared by a group of people who had painted themselves entirely red. But if seeing Mickey Mouse in person was a 10 on the kid fright scale, this was only about a 6.
  • I'm undecided about the RV. Great to have the storage space, but I think the rest of it (shower, refrigerator, stove, comfy bed, maybe even air conditioning) could be reproduced in an appropriate temporary living structure. True, you probably don't want to spend the time and effort to do so, but depending on your attitude about what "radical self-reliance" means, you might consider it a worthy and interesting challenge.
  • Likewise, undecided about camping in Kidsville. It felt like a monoculture (bad) with a marginally safer environment for kids (good). I don't consider BRC to be an unsafe environment for kids to begin with, so I'm not convinced it was a fair trade.
  • I heard lots and lots of good music, and I recognized almost none of it. The closest was remixes of songs I knew. I wish I had some way to get everyone's playlists.

Geek Toolbox

| | Comments (0)

I've been meaning to start a list of stuff that any self-respecting geek will have in his or her toolbox when out exploring in the world. These criteria are intentionally broad, and I don't want to limit the list by any specific constraint, such as weight, mass, or purpose.

  • A wristwatch. Although many devices these days think they know what time it is, it's good to have a low-tech device that you can trust.
  • An alarm clock. Most cell phones have a built-in software alarm clock, but they do you no good on a three-day camping trip after their batteries run out.
  • A multimeter. Nothing too fancy; just enough to test voltage, continuity, and maybe resistance, any of which might restore your sanity in a flash when you can't tell which of several parts of a contraption is broken.
  • Zip-ties. Get some big ones and a lot of small ones.
  • A sledgehammer. I'm very happy with this one. Much better for ad-hoc pounding or smashing than a piece of wood or a soon-to-be-never-the-same-again book.
  • A few dozen feet of rope as well as knowledge how to tie at least one good knot. For most purposes, this is just as good as tie-down straps or aircraft wire. A couple carabiners are nice, too, but not essential.
  • A cigarette lighter. Or strike-anywhere matches, your preference.
  • A pair of multi-purpose shears.
  • Several different sizes of bungee cords.
  • Sunscreen.
  • A towel.
  • A compass, or at least some very basic knowledge about which way is North.
  • A power inverter. As long as you have a car nearby, you'll also have AC power. Just be careful about wattage, or else you'll soon have neither.
  • Duct tape.
  • An LED headlamp. This one is my all-time favorite because it has night-vision red, reasonably bright white, and a third Krypton mode if you need extremely bright or more natural wavelength light.
  • A high-intensity utility light. I wouldn't bother with rechargeable models; if you don't have AC power, either wait until daytime or use a headlamp.
  • An adjustable wrench. You'll curse yourself for not bringing a full socket set, but it's better than nothing.
  • Work gloves. You can do anything once without gloves, but once might not be enough.
  • Earplugs. Preferably a bunch of individually wrapped pairs, so you don't have to reuse an old pair with unknown history.
  • Safety goggles.

I have purposely excluded various useful electronic devices (cell phone, laptop, GPS, scanner radio, portable printer) because they tend to be unavailable at any distance from civilization. They tend to need a battery recharge just when you need them most, as well.

Did I miss anything?

Every so often when I'm rearranging electronics at home and feeling overly fastidious, I run through a brief thought experiment about how to move something to another outlet without turning it off. The basic idea is something like this:

1. Start with a device plugged into a power strip.
2. Create an unholy power cable with male prongs on both ends.
3. Plug a UPS into the power strip using the unholy cable.
4. Now the device is running off both house current and the UPS!
5. Unplug the power strip from the wall, then move the device.

I've never had the guts to actually try this, and I think I've figured out why it will lead to misery, or at least unexpected behavior. The power from the grid is a sine wave, and DC devices depend on the oscillation to convert the AC to DC. If you introduce another power source into the mix, the waves won't be synchronized, and the device won't be able to convert sufficient power to keep going.

I'm sure there are other problems that will lead to worse consequences, no doubt involving the fire department. But this seems to be at least one independently sufficient reason why Radio Shack doesn't sell male-to-male power cables. (I'd be happy to hear the whole story from an electrical engineer; please comment.)

Updated 11/06/2007: Someone figured it out!

My solar agenda, revealed

| | Comments (0)

Last week I wrote about getting my feet wet with a PV solar energy project. Here are more details.

The camping trip is Burning Man. The purpose of generating all this power is a magnificent 200 square-foot shade structure with mood lighting, music, and a drive-in (OK, walk-in) movie theater in the evening. We'll be camping in Kidsville so we expect to get a fair number of toddlers in the audience, and video content will be chosen accordingly.

The mood lighting is strings of icicle LED Christmas lights that together will consume about 25 watts. The music is a desktop PC speaker system with subwoofer (50 watts peak). The projector is a Mitsubishi PK-20 pocket projector (50 watts peak), which is LED-based and isn't too bright, but will work fine at dusk.

I have two 108-Ah 12-volt batteries that I hope will get topped off to capacity each day by the 120-watt solar panel. Doubling my estimates to be conservative, and adding some extra wattage for miscellaneous usage like laptops and AA battery recharging, we should easily get five hours of power each night with everything cranked up to the maximum.

If we choose to ignore the environmental impact of manufacturing the gadgetry and driving it 1,000 miles round-trip in a gas-guzzling RV, then it'll be the greenest movie theater ever!

I have purchased the solar panel and charge controller, and will do a test charge over a few days this week. Then this weekend I will put up the shade structure in my yard, hook up the theater, and confirm power consumption with my Kill-A-Watt. That leaves one full week before we leave for the Playa, which is probably a record in terms of advance Burning Man project completion.

Two problems:

1. The CSS just ain't right, as far as I can tell. Go to Design -> Templates -> base_styles.css. Find the p element and copy it into its own separate block. Change padding to 0px 0px 20px 0px and rebuild.

2. Thanks to Joe Siegler on the Movable Type forums for this: change convert_breaks="0" to convert_breaks="1" in the three places it appears in the RSS/Atom feed templates.

If you've bought a car in the last decade, you might have a remote control on your keychain that locks and unlocks the doors. This is convenient -- so convenient that the experience of locking the car is no longer memorable, and I often find myself wandering away from my car and then worrying that I forgot to lock it.

Here's my invention, which I hereby dedicate to the public domain, that helps solve this problem. For 15 minutes after you press the lock button, a tiny green light on the remote control blinks every 5 seconds. Or maybe a little LCD says "Lock OK." Whatever the implementation, when you realize that you don't specifically remember pressing the lock button, you can find out by looking at the indicator. It doesn't guarantee that the car is actually locked, of course; it just confirms that you pressed the button recently, and that's generally good enough for worrywarts like me to relax.

I'll be going camping soon in a sunny place, and was thinking of using this trip as an excuse to start on a long-term project of building my own grid-tie PV (photovoltaic) solar system at home. I'm asking you, person who probably arrived here via a search engine, whether this is a workable idea.

Allow me to play the part of Basil Exposition for a moment: "As you may know, gentle reader, grid-tie systems are connected to the electricity grid, which generally means that they supplement a home's electricity, rather than being the sole source of it. A typical system consists of some PV panels that convert solar energy to DC electricity, an inverter that both converts the solar DC power to AC and connects the system to the power grid, and optionally a charge controller that delivers power to deep-cycle batteries, which store excess power for use at night time."

For the camping trip, the basic strategy is to buy one of each part of the system that can be bought piecemeal, and then buy inexpensive, relatively throwaway versions of parts that are expensive in a full-blown system. I'd buy one 120-watt panel (about $600) and a cheap charge controller (about $50). I'd then use a couple deep-cycle batteries and a little inverter that I already own. On the trip I'd use this power to charge various battery-powered devices, such as a laptop computer. (We'll ignore the annoyance that I feel knowing that 12-volt DC gets converted to 120-volt AC and then back down again to around 12 volts to charge batteries, no doubt losing at least 40% power in the process.)

On my return, I'd put the panel on the roof of my house and try connecting my desktop computer to it (via a UPS so I get a warning if power's low). I use that computer for perhaps a few hours a day so it should work.

Eventually, after research, and hopefully your feedback, I'd shell out money for a real grid-tie inverter (at least a couple thousand dollars) and charge controller (also thousands of dollars), and then add a few more panels and batteries. If the efficiency worked out, then I'd scale up the system -- having already bought inverter and charge controller capacity to handle the extra power.

The alternative is just coughing up $40,000 and having someone come in and install a complete system this weekend on my roof.

Advantages of the roll-your-own approach? It's an interesting hobby project; it commits less capital up front. To the extent that PV panels come down in price as technological advances occur, I get the benefit of lower prices in the future.

Disadvantages? It might fail because I don't know what I'm doing; I get the worst possible return on the large components until I fully utilize their capacity.

What do you think? Silly idea?

Rechargeable USB devices

| | Comments (0)

Some time in the past year or so, all my family's geegaws and gadgets suddenly became mini-USB powered. Instead of my Nokia phone using one kind of wall wart, and my Sandisk MP3 player using another kind, our Motorola phones and my iRiver MP3 player are all recharged by the same kind of cable.

This is convenient because I got rid of all the proprietary power adapters, and it's now possible to carry a $2 USB-to-mini-USB cable with me and plug into just about any computer in existence for a quick device recharge.

But the downside is that computers have now become the most expensive power adapters on Earth. In the past, I've left my computer on overnight solely to charge my phone -- and as a bonus once I forgot to re-enable the hibernation feature when I was done, so I actually left it on for a couple days after that. Assuming the computer consumed 100 watts for three days, that was 7.2 kilowatt-hours at around 35 cents each, or $2.52 to charge my cell phone. Granted, that's not a fair calculation given the extra couple days of accidental on-time, but I'm sure it's quite common these days to leave a computer on overnight to charge a device, so that's at least 42 cents spent versus the few cents of power actually consumed for charging purposes.

My solution? I'm going to try something like this: yet another geegaw that will probably consume less than 5 watts, assuming 30% efficiency (still 3.6 Kwh/month or $1/month), if I leave it plugged in all the time.

Two steps forward, one step backward.

Update: It turns out those Motorola bastards use a special cable for charging their devices. I could easily make a cable with the required 165K resistor, but this defeats the purpose of having a single power source and plug for all my devices. Meh.

Second update: It pains me to admit this, but at least other devices are compatible with the screwy Motorola power adapter. So I can use that for charging all my devices.

iRiver Clix2

| | Comments (0)

The iRiver Clix2, a.k.a. Clix second generation, is a 4GB MP3 player that also plays MPEG-4 movies. The screen is a 320x240 OLED display, and the moment I saw the hardware supported 30 fps, I wanted it. I picked one up a few weeks ago, and so far I'm very happy with it.

As I've written before, my previous MP3 player was a Sandisk Sansa e260. The Sansa wins on form factor (it's smaller), but the Clix wins on features and implementation. The UI is so responsive it makes my Series 1 TiVo look like a turtle. The typefaces look nice, the colors are vivid but not distracting, and the animations are subtle and helpful. The Sansa's typefaces, by contrast, look blocky and primitive, and its animations are slow enough that they hurt the experience.

Others have claimed that the sound on the Clix is noticeably better than that of other devices. I haven't done an A/B comparison, but my MP3s do sound brighter.

The best feature by far is the video. Yes, it really does play 30 frames per second, and yes, it's possible for various encoding utilities on the market to produce compatible video (compared to the Motion-JPEG format on the Sansa, which is wasteful in size and not supported by any third-party converters I know of). The open-source iRiverter is an excellent program; it handles batch videos nicely and always produces compatible video. Fast-forward and reverse work just as well as your run-of-the-mill DVD player, and the OLED display is easy on the eyes; I've watched one-hour TV episodes on it without fatigue.

My complaints are few. Obviously, I want 1TB of storage on the device rather than 4GB, but meanwhile 8 or 16GB would be nice (an 8GB version has been announced). As far as I can tell, the hardware is incapable of line-level outputs, so there will never be a cradle or dock worth buying -- though this also means that iRiver had no incentive to create yet another annoying proprietary connector, so I can use any of the dozens of mini-USB cables I have around the house for charging or loading the device. And finally, it's overpriced by about $50. The 4GB Meizu M6 is only around $100, and the 4GB iPod Nano is less than $150, but the Clix is $190. I'm sure the OLED adds a bit to the price, but the fact is that the top-selling device in the category costs less than the Clix, and as long as the iPod remains dominant, competitors will have to beat it both on features and on price.

Robotron: 2084

| | Comments (1)

One more item ticked off on personal Things To Do Before I Die list: "Score one million or more on Robotron: 2084 set on difficulty 10."

GPS devices are dumb

| | Comments (1)

Today's GPS devices remind me of CD-ROM encyclopedias.

If you were living on the cutting edge of technology in the early 1990s, you remember the excitement of being able to look up anything on your computer and, after a short delay and maybe swapping a disc or two, seeing a few paragraphs about it.

Then along came the web in the mid-1990s, and suddenly CD-ROMs looked like dinosaurs nearing extinction. Not only didn't you have to pay $99.99 for a static copy of one company's encyclopedia, but the web version was actually better. You got a dozen different viewpoints on the topic. The information was fresh. If you didn't like how someone had organized a web page, that's OK; search engines would help you find specifically what you wanted.

Today, of course, we have Wikipedia and search engines with contextual ads, all of which nicely align business interests with data freshness. If you're looking for something on the web, many forces come together to make sure you find it.

But GPS devices act like CD-ROM encyclopedias from 1992. Buy a Garmin GPS and you get a static copy of maps from many months ago. Unless you pay for map updates, your GPS device will never know about the new overpass constructed along your daily commute. Some trim lines of the Toyota Prius include a GPS, along with the privilege of getting to pay $200 for each map update.

"Point of Interest," or POI data, make this problem even more frustrating. It's possible to ask a GPS device to tell you where the nearest Peet's Coffee is. And it will tell you where the nearest Peet's Coffee was, as of September 2006. Unless you pay for map updates (around $100 from Garmin), your GPS will never tell you about the closer one that opened in May 2007.

Don't you think Peet's Coffee would be willing to pay a few cents to get your map data updated to tell you about its newest stores? Don't you think Starbucks and Peet's and Coffee Bean would be willing to compete for placement on my GPS device when I pressed the "coffee" icon on the screen? In other words, shouldn't the people being mapped get to be in charge of making sure the maps are accurate? If there's an error in a map, who's more likely to fix it: the store that's invisible because of the error, or the would-be customer who never knew the store existed?

No doubt, existing technology explains why the wrong people (users) instead of the right people (advertisers) are being asked to pay to keep the advertising medium up to date. GPS devices generally don't have any sort of networking capability. So they physically can't update themselves.

So build a WiFi chip into each GPS. Let it associate with your home network to trickle map updates each night while the car's parked in the driveway. In communities with public WiFi, let it connect. And let it connect promiscuously to any open WiFi network while you're parked elsewhere. (Security issues? That's exactly what SSL is for. In fact, with appropriate security in place, GPSes can connect by P2P to share authentic map updates.)

At this point GPSes are capable of updating their map data daily, and I'd be happy to trust my GPS manufacturer to be sensible about updating the data frequently with hotlinks between every retail chain in the country that's interested in letting drivers know that they just opened a new store down the road.

But why stop there? Now that my GPS is on the web, can't it subscribe to RSS feeds listing local weather and traffic? How about weekend sales at Fry's Electronics and my neighborhood grocery store? Or how to get to the gas station within 2 miles from my current location with the lowest prices for unleaded? How about downloading my Google Calendar for the day and planning my route for me (reminding me that I am driving by Home Depot between two points and have been meaning to pick up a new trash can)?

GPSes are incredibly useful. They have fundamentally changed the way I drive around town, especially in unfamiliar towns. But they're isolated islands in a connected world, and GPS manufacturers are leaving a lot of money on the table as a result.

HD output from cell phone

| | Comments (1)

I love where this is going. TI is building a phone that is capable of emitting, but not displaying, hi-def video. So you keep your favorite videos with you. Then when you're at a friend's house, you plug your phone into an 80-inch HDTV monitor and enjoy.

Even if cell phones someday have DLP capabilities, you'll still need a screen to project onto, and that takes as much real estate as a giant flat-panel TV. And a cell phone will never have an 80-inch display. Better to let each device specialize as much as possible: let cell phones get smaller and better at pushing bits around, and let displays get bigger and brighter.

Digital TV

| | Comments (2)

If you believe the hype, then your old TV will stop working on April 7, 2009. This is because old-style broadcasts (analog) will be replaced with new-style (digital), and your old TV receives only analog. Digital broadcasts have been occurring for years, but most people aren't aware of them because (a) their TVs can't receive them, or (b) they have cable or satellite.

This weekend I decided to look into what it takes to receive over-the-air digital TV broadcasts. I was optimistic because my setup is favorable: I live on the top of a hill in San Mateo, California, and gigantic Sutro Tower broadcasts several TV channels across the San Francisco Bay Area. So in theory it should work.

I bought a $70 digital TV tuner card for my computer and a $25 passive antenna. I plugged them in, put the antenna on the bookshelf in my office, and found I could tune in NBC, CBS, ABC, Fox, PBS, UPN, WB, and a bunch of independent stations. Moreover, many of them broadcast in high definition!

And it gets better. Digital reception is perfect. There is no fuzz, static, snow, or distortion. Even after transcoding the programs to MPEG-4, the reception is obviously better than my analog cable TV.

After some software twiddling, I now have a set of family favorites (Oprah for Mary, The Simpsons for me, and Sesame Street for the kids) recording automatically, after which they're recompressed and stored on my media server for later viewing. It's not as convenient as my Tivo, but the quality is better, and there's some satisfaction in knowing that I have the freedom to discontinue my cable TV service.

Unsubscribe Ars Technica

| | Comments (2)

I'm sad. One of my favorite RSS feeds, Ars Technica, decided to break their feed by adding advertisements that change every time Bloglines polls it. So every hour or so Bloglines thinks they have 50 new articles, which they really don't.

I unsubscribed, and I'll miss them.

Wizardry in Applesoft BASIC

| | Comments (8)

Long, long ago, probably 1982, a friend gave me a copy of a program that was supposedly a prototype of a role-playing game called Wizardry. I had just finished the real version of the game (which was written in Apple Pascal) and was astonished to see this crude, low-res graphics version written in Applesoft BASIC. It was done in way too much detail to be a forgery, and there were enough differences in the storyline that it really did seem to be something that could have involved into the final product.

Not recognizing the possibly long-term geek appeal of the program, I deleted it a few weeks later.

It's possible it was not what it appeared to be; maybe it wasn't a prototype but rather a knockoff programmed by an idle Wizardry fanboy who had neither the money to buy a real copy nor the moral makeup to pirate it. But either way, it would be cool to see it today. I wonder whether a copy of this BASIC program still exists on a dusty 5.25" floppy somewhere in the world.

Notebook drive recovery

| | Comments (0)

After helping poker buddy JJOK get the data off his dead laptop drive, I found to my delight that karma really works. Here's how I recovered all the data off my dead notebook computer (as well as how I killed it in the first place).

Sunday afternoon I decided to install Ubuntu 6 on my Fujitsu Lifebook p1510d. I deleted unnecessary data off the WinXP partition, defragmented it, and then did the installation. Ubuntu resized the NTFS partition, installed GRUB, and all was well. Unfortunately the Atheros wireless chipset on the notebook didn't play nicely with the Ubuntu drivers, and the only known fix was a recompilation of the drivers myself with a "+4" inserted in an obscure .c file to get around some seemingly superfluous extra bytes in the network stream. The author of the fix also blithely noted occasional kernel panics. So I applied my usual fix to Linux desktop issues like these, which is to uninstall and wait another three months.

But this time I did the uninstallation in a boneheaded fashion: I booted back into XP, deleted the Linux partition, and reformatted it as an NTFS volume. Those of you paying attention will note that the MBR was now pointing to a nonexistent bootloader. Everything worked great until a couple hours later when I tried to awaken the laptop from hibernation. Fortunately, I knew exactly what the problem was and exactly how to fix it.

Enter a deadly combination of laziness and hastiness. My notebook is an ultraportable and doesn't have a floppy drive, so I couldn't create a DOS floppy disk and type "fdisk /mbr," which would have fixed the problem. I didn't feel like burning a CD-R to do the same thing, so instead I found a utility on the web to turn a USB key into a bootable DOS volume.

This worked great except that it mounted itself as the C: drive, and my dead drive as a "second fixed disk." Apparently fdisk won't do much of anything with a fixed disk other than the first one. Remember, at this point I could have easily solved the problem by burning a CD-R. That was the laziness I spoke of earlier.

Now, here's the hastiness. In a moment of excessive cleverness, I booted my Ubuntu CD-R and copied the MBR from the USB key to my dead drive with the following command:

dd if=/dev/sda of=/dev/hda bs=512

Even if this had done what I'd intended, it would have erased the partition table from my drive. Instead, what it actually did before I frantically pounded control-c-control-c-control-c-control-c-control-c on the keyboard was copy 840KB of my USB key onto my dead drive, which not surprisingly now claimed to be not my trusty 30GB Windows XP installation, but a 32MB USB key circa 2002.

I came this close (holding index finger/thumb really close together) to shamefully hauling out the Fujitsu PC Recovery CD and just starting over, but I did the math and guessed that the cost even of contacting software companies for stuff I'd bought and asking for permission to reinstall would likely exceed the cost even of a couple hours of investigation, and the investigation route might even recover my personal data. So I pressed on.

Step one: find a Linux rescue CD. Boot into it. Run gpart -W /dev/hda /dev/hda and thus write an inaccurate but workable partition table to the drive.

Step two: fdisk /dev/hda and change the first partition from a 32-meg FAT partition to a properly sized NTFS partition.

Step three: do some research on the web and figure out that NTFS, bless its soul, writes a second copy of 16 critical files to the middle of each NTFS partition. Normally it keeps these 16 files at the front of the partition; my dd command overwrote one or more of those. So I was now confident that I'd lost no irreplaceable data.

Step four: find a Windows XP installation CD. Boot into recovery mode. Run fixboot, which rewrote the NTLDR file and probably pointed the MBR at it. At this point the shell seemed to agree with me that there was a C drive, but that it had some serious issues.

Step five: CHKDSK /R. I think what this tool did was notice that the critical files were missing or invalid, and restored them from the mid-disk versions. I ran it once more for good measure.

Step six: reboot. Not only was my laptop back, but it even resumed successfully from hibernation!

Thank you, NTFS designers, for creating a filesystem that can withstand this kind of abuse. Thank you, NTFS hackers who authored miscellaneous web pages that gave me hope that my drive was recoverable. Thank you, worldwide army of Linux hackers, for building the tools that destroyed my drive, and for building some of the tools that fixed it.

Amazon S3 as personal backup

| | Comments (3)

Jeremy recently wrote about using Amazon's S3 service as a backup server for his personal data. I ran the numbers and figured the cost was acceptable for my use case (about 15GB of digital photos with a couple hundred MB added each month), so I looked into existing frontend technology for S3 backups. There's JungleDisk and s3sync (sorry, getting too lazy to convert to links; use your favorite search engine), but neither was quite right for my requirements.

The principal problem is that my wife uses the file system (including filenames) as a filing system. This is probably what 98% of computer users on the planet do, too, but as I've written before, adequate search and automated organization technology (such as you'd find in Google's Picasa) make this work superfluous, so I don't do it -- I tend to dump poorly-named files into folders and let indexing software find them when I need them.

But my wife does organize files, and that means that she moves files around on the filesystem and occasionally renames them. This wreaks havoc with programs like s3sync that identify an object by its path. If the path changes, the object at the old path ceases to exist, and the one at the new path must be uploaded all over again. If you're paying for bandwidth, as you do with S3, this means a single top-level folder rename could be quite expensive.

I think the solution is a Venti-style layer over S3. It would work something like this:

- For every file in the directory to be backed up, compute a strong hash of the file contents.

- For each unique hash generated, upload the file corresponding to that hash, keyed by a hex representation of the hash. Rely on S3's built-in capability to avoid re-uploading objects whose contents haven't changed. Update 10/6/2006: As Antony pointed out, this feature doesn't exist; it was just wishful thinking. I will have to first list the bucket contents, and use the result to skip the files already uploaded.

- Upload a representation of the directory structure mapping paths to hashes, as well as whatever other metadata is needed to reconstitute the file at recovery time.

- Maintain a log of objects and refcounts to them in the directory structure. As objects are orphaned (meaning a file was deleted or revised), add them to a queue with timestamp. Once a certain amount of time has elapsed since addition to the queue, such as two weeks, remove them from the list. If they're still orphans, delete them.

If I've thought this through correctly, then this backup system lets you rename (and move) files all you want, and doing so won't cause them to be sent over the wire again. The recovery process isn't too onerous in terms of backup file format; just reassociate paths and metadata with each object, and you're done. You get versioning of individual files for free via the delayed garbage-collection mechanism. And in fact you could set up the system to back up several home PCs and not worry about double-backups of identical files on each PC, assuming the hash store were a big shared soup.

Disadvantages:

- Compression window is limited to a single file. Probably not a horrible loss for the average home dataset, where files don't have much relationship to each other.

- Granularity of versioning is per file. This would be expensive, for example, if you were making small daily edits to a giant Quark file that actually changed only a few well-localized bytes in the file. Perhaps a Bittorrent-style piece mechanism, or whatever rsync does, would address this issue.

- Not entirely convenient backup format. For example, s3sync ends up mirroring your directory structure on S3. So with appropriate security measures you could use your web browser as a convenient filesystem browser. This proposal would give you the browser structure, but the moment you wanted to actually get a file, you'd have to copy and paste the hash key to generate the path to another part of the S3 bucket.

I think this is about 50 lines of Python (famous last words). Maybe I'll try to write it this weekend, unless someone out there beats me to it.

Update 10/6/2006: Looks like the Perl version of s3sync first lists the bucket and collects all the etags (MD5 hashes), and then it skips files already uploaded. If the Ruby port preserves this behavior of the Perl version, then it might handle the move-triggers-reupload issue. So it's possible that s3sync already does enough of what I want.

My Sansa e200 rants and raves

| | Comments (27)

As you probably guessed from my last post, I got a Sansa e260 music player the other day. Here are my thoughts.

  • Size is just fine. I don't think smaller would do any good.
  • The screen is pretty nice in spite of its small size. I get a freaky stereoscopic effect when looking at it, though, which goes away if I close one eye.
  • You have to set the clock yourself. Why can't it do this automatically during a sync?
  • An alarm clock would have been nice, until you remember there's no speaker.
  • The media converter software sucks. The video is actually sort of OK, but landscape pictures always get rotated to portrait orientation on the portrait screen, which means they're very small with two big black bands on the top and bottom. Silly. I'd rather have to turn the player sideways than lose so much resolution on an already small screen.
  • I have to play a song to add it to the "Go List," which is the only playlist you can edit on the device. This means the Go List is useless as a jukebox-style list. I'd like to be able to listen to music and queue up more songs as I browse, but the Sansa won't let you do that. Edit #2 9/27/2006: Close but no cigar, SanDisk. A tip on an online bulletin board suggested a way to add music to the Go List while playing other songs. This seems like the feature I wanted, but it's fatally flawed. If you add to the Go List while simultaneously playing it, the Sansa fails to re-read the list -- it plays the Go List contents as of the moment you originally started it! In order to hear the music you added, you have to restart play of the Go List. Very non-jukebox-like. My criticism stands.
  • The buttons are too hard to press. They're too small and the wheel gets in the way.
  • The proprietary connector makes me angry. Every other applicable consumer device I own works with a mini-USB plug.
  • The proprietary connector is especially annoying because none of the e200 accessories that plug into it are available yet. And how about a second USB cable so you can sync at work and at home? Forget about it.
  • The volume resets to 50% every time you power off the device. Maybe they were trying to limit flash writes for this oft-changed setting. But wow, what a price to pay.

Overall, I'm pretty happy with it. It sounds good, it's small, and the battery life is apparently infinite -- or at least longer than I've gone between charging it.

Updated 10/1/2006 to remove link to site that apparently has moronic editorial policy.

Playlists on the Sansa e260

| | Comments (40)

This is how to put playlists on the Sansa e260 MP3 player (part of the e200 series) using an application other than Windows Media Player, such as Winamp, without having to switch from MTP to the less convenient MSC mode. I won't go into the reasons why you'd want to do this; if you've ever used WMP, the reasons are plain as day.

Some background why these instructions are even necessary: the e260 seems to have a bug with playlists. You can add .pla files to \PLAYLISTS, but no matter how correctly you've formatted them, they won't show up in the Sansa UI. The device seems to need a kick in the head to tell it to re-read the files in \PLAYLISTS. These instructions tell you how to conveniently deliver that kick.

Note that my e260 has firmware 01.01.11A, and these instructions work with Winamp 5.24 full version (full is the free version that supports WMA).

First, start up Winamp and add your songs to its library. You've probably already done this.

Next, create a playlist. Call it "Exercise" for this example. Drag a few songs from your library to it.

Next, connect your e260 in MTP mode. It should show up after a few seconds under the "Portables" item in the Winamp hierarchy. Right-click the Exercise playlist and send to your e260. Wait for the playlist and songs to sync, then disconnect your device.

(Optional) go to your e260's playlists and confirm that Exercise didn't show up. If you do see it, then you probably have a future version of the firmware that doesn't have this problem.

Here's the kick. Turn the e260 off by holding down the power button for a couple seconds until you see "GOODBYE." Release the power button. Switch the lock slider to the locked position. Press the power button and keep holding it down. The blue wheel light will come on, and then you'll see the SanDisk logo. Then the screen will go black and you'll see

Key LOCKED
System shutdown

Once you see that message, you can let go of the power button. Flip the lock slider to the unlocked position and press the power button again. Now navigate back to your playlists and you should see Exercise!

Fortunately you don't have to go through these hoops with every sync. You can freely edit existing playlists and add/remove music; these actions appear to work fine. This hack is necessary only to get new playlists to show up.

SanDisk, please fix this bug!

Online passport photos

| | Comments (4)

Bruce Schneier finally impelled me to take care of a task on my to-do list: Get passports for everyone in my family. This is a supremely annoying ordeal in terms of paperwork; you need a certified copy of your birth certificate (which to obtain these days in California actually requires a notarized affidavit, thanks to identity thieves and teens making fake IDs) and a fair amount of information about your parents that you may have forgotten or never known.

But the part that used to require the most legwork -- getting two 2-inch square photographs of yourself -- has gotten quite a bit easier in recent years. Here's how to do it.

First, get a digital camera and have someone take your picture. Stand in front of a white wall during the day, and use a flash so it's very well-lit. Heck, while you're there, take 20 pictures so you can pick the one you like.

Second, import your favorite into Picasa. Warmify. Apply the "I'm feeling lucky" auto-correction. Remove red-eye if necessary. Erase blemishes. Save a copy of the resulting photo.

Third, upload the photo to ePassportPhoto and fiddle around with the cropping until you get something that matches the State Department requirements. The cropping tool has a silhouette that makes this pretty easy (though I wish you could drag the crop square after sizing it). When you're done you'll get a link to download a JPEG to your desktop. This picture will have six copies of your cropped portrait in a two-by-three matrix.

Fourth, upload into Snapfish. Order a 4x6 photo. Now, notice that you can have the photo printed at a local Walgreens, and that it will be ready in less than an hour! (Or have it mailed to your house if you're not in a hurry.)

Fifth, get out some scissors, and you're finished!

Now that I write it up, I see that perhaps this method is no easier than having the pictures taken at a place that does them for you. But you do get tremendous control over the final result; no more half-asleep portraits haunting you every time you travel for the next decade.

(Updated to swap steps 2 & 3)

Free DVD player

| | Comments (1)

HDMI cables are very, very, very expensive at your local electronics retailer. I've discussed this before, but have found a way around it for 6-foot HDMI cables.

At the moment, Best Buy is selling 4-foot HDMI cables for $149.99 (search for SKU 7129029). Oppo sells its highly rated DV-970HD DVD player for $149.00, and includes a six-foot, 24 AWG (not 26!), gold-plated HDMI cable with it.

So you can pay $149.99 to Best Buy and get a four-foot cable, or pay $149.00 to Oppo and get a six-foot cable. Oh, and Oppo throws in a DVD player for free.

A couple months ago I bought a Buffalo Terastation. It's a bit on the expensive side for 750GB of storage (1TB in RAID-5 configuration), but it mostly satisfied my desire for a hassle-free, turnkey storage appliance.

Mostly. Two weeks ago it started accessing the hard drives constantly, and loudly. I unplugged the network cable. Drive access sounds continued. Hmm. Was it doing a RAID array check? No. Did it, uh, like catch a virus or something? No.

It turned out the power supply fan was rattling. This is a $1.99 part inside a $700 device. Since that device, moreover, was now holding hundreds of gigabytes of my precious data, I didn't really feel like mailing it back to Buffalo for repair.

My only option was to replace the fan. I guessed that it was an 80x25mm case fan with a 3-pin power connector, so I bought one at my local grocery-store-turned-computer-retailer. I disassembled the Terastation, removing all 240 screws (OK, I exaggerate. There are only 180 screws). I took apart the power supply and discovered that the fan actually had a 2-pin power connector -- it was missing the yellow connector that I suspect is for speed monitoring. So I clipped the old fan's connector and soldered it to the new one. I reassembled everything (well, almost everything; I had one piece left over at the end that now sits next to the Terastation), plugged it back in, and it worked, quietly.

So if your Terastation's fan starts acting up, and you're comfortable soldering wires together, this is a straightforward repair job. Other than the soldering, it's no more difficult than a drive replacement, which the user manual describes how to do.

Comment spam, Round 1

| | Comments (12)

I spent the morning hacking on my Movable Type CMS. The goal is to make it a tiny bit harder for low-life comment spammers to fill this blog with crap (which is my job). It should be unnoticeable to human users.

Help me test! If you're a well-intentioned human, please leave a non-spam comment on this entry. Otherwise, please don't leave a comment.

This article documents my installation of an auxiliary audio jack in my 2007 Honda Fit.

First of all, if you're thinking of buying a Fit and are trying to decide between the Base model and the Sport model, you should probably buy the Sport. You would have to be crazy to go through what I did to add this Sport-only feature to a Base model, even though the price difference between the two trim lines is over $1,000. If your time is worth anything at all, this modification isn't worth it. In my case, it was a challenge that appealed to the hacker in me, so I enjoyed it.

And second, you're probably asking why I bought the Base model if the higher trim line had features I wanted. The reason is simple: the Sport is not just a fancier version of the Base, but rather it's a car with an entirely different character.

The Base is an inexpensive, sensible, compact-yet-roomy car. It gets good mileage, but I can easily carry oversized boxes in it. Typical Honda. I suspect that people who miss the old Civic wagon will love this car.

The Sport, however, is tricked out with a bunch of cheeseball features that I don't want on any car I drive. It has a spoiler on the back. It has a leather steering wheel cover. It has steering wheel paddle shifters. It has alloy wheels. And so on. Pretty much all the goofy ads you've seen for the Fit are supposed to appeal to people who dream of paddle shifters at night. (Rather than people like me who dream of dollar-cost averaging index fund purchases in their Roth IRAs.) Honda attempted to reach two different kinds of people through different trim lines for the same model. So non-sporty personalities like me who want basic creature comforts like remote keyless entry and cruise control are out of luck. I chose to buy the car that matched my personality (boring, economical, etc.) and add the couple missing features I wanted.

That takes care of why. Here's how.

First, I ordered part 39112-SAA-J02ZA, the OEM aux jack itself, from my friendly neighborhood online Honda dealer for about $30. I won't mention who they are because they turned out to be not so friendly; moreover, the online price after shipping and a mysterious "handling" charge was more than I'd have paid buying it list from a local dealer.

Next, I took apart the console in the car. This was fairly easy; there are two clips in the front and two screws in the back. You have to shift into neutral to get it out. Don't forget to unplug the cigarette lighter.

My hope at this point was to find a nicely taped-up plug waiting to be inserted into the back of the aux jack. No such luck. Honda didn't foresee adding this jack as an aftermarket option, so they actually have a different dashboard wiring harness for the Base. What a pain in the neck.

Next I used the online MusicLink installation instructions to tell me how to pull out the radio (or "tuner assembly" in the local lingo). My naive hope at this point was to find either female RCA jacks or a 3.5mm audio plug. Instead, I found a different receptacle that looked unlike anything I've ever seen on Planet Earth. The pain in my neck had now migrated down to my ass.

Several weeks of browsing Digikey and Jameco catalogs followed. I found nothing resembling the right connectors. I wrote various car-audio stores on the web, and the few shops that wrote back said they'd love to hear it if I solved the problem.

Eventually, I decided to take matters into my own hands and soldered ten RS-232 female headers (about $4 for 100 at Fry's) onto the ends of five wires from a cat-5 cable. I wrapped each in electrical tape to prevent shorts. Using some info I found on the web, I concluded that the following pins matched up (5-pin on the aux jack, 20-pin on the radio): 1-15, 2-5, 3-3, 4-13, 5-14. (For the person who buys my car in a few years and wants to know which wire is which, the colors going into the aux jack are 1-O/W, 2-W/G, 3-G/W, 4-W/B, 5-B/W, O=orange, G=green, W=white, B=blue, and "O/W" for example means "orange wire with white stripe.")

Next came the hard part. I pulled out the head unit far enough to reach in behind it and held a mirror in back. Then after approximately 1,000 attempts I successfully pushed all five headers onto the right five pins on the back of the unit. Same with the aux jack, but that one was easier because I could look directly at it. I plugged in my MP3 player and confirmed it all worked, and then carefully reassembled the car (in the process breaking part 83442-SAA-003ZA, list price $3.20, and discovering that I must have broken two of part 91550-S50-000ZL, list price $1.68 each). I also dropped a screw down into the netherworld of the shifter assembly and spent about 45 minutes fishing it out.

I put on a motorcycle helmet and kissed the family goodbye, then drove the car around the block to make sure it still worked. No explosions or parts falling onto the road. The end result is identical to that of an OEM Sport, so I didn't take any pictures for you to see.

As I said earlier, don't do this. Just buy the Sport. But if you think as I do and decided that the Base model was right for you, but still want to play your MP3 player on your car stereo, this method definitely works. Final cost with parts (including replacements of the ones I broke) was about $50.

2007 Honda Fit audio head unit 20-pin connector

I want to buy a connector that mates with this one. Here are all the clues.

This is the back of a 2007 Honda Fit OEM audio unit.
The connector has 20 pins.
Note that the two rows of pins are offset.
It is *not* the 14-pin CD-changer/MusicLink connector, which in this picture is the white connector next to it.
I have reason to believe that the Honda Civic also uses this connector.

Other keywords for search-engine whoring: Honda Jazz, aux jack, auxiliary jack.

Futurama

| | Comments (0)

... is back! I dare you to watch Jurassic Bark without crying.

Poker chip shuffling

|

Beyond the Ultra-Silent PC

|

It seems like every other day another article appears about building a silent PC. Someone needs to complete this line of research once and for all, and invent the noise-consuming PC. It would be a combination of an already-quiet PC and a powerful noise-canceling circuit. Then your room would be quieter with the PC on than with it off.

I had some use-it-or-lose-it vacation time expiring in December, so I took a week off work. Usually, vacation days without plane tickets and an itinerary are a recipe for some serious couch-sittin', and when I rediscovered the PokerStars program on my home computer and started playing $1 No-Limit Texas Hold-'em tournaments, this break was looking to be a classic laze-a-thon. However, it didn't turn out quite that way, and today I'm in much better physical shape than I was two months ago. Here's how it happened.

The first day was bad. I played probably six tournaments over twelve hours, stopping from exhaustion at 3:00 a.m. It didn't help that I finished in the money the first time, and spent the next five tourneys failing to prove the first wasn't a fluke. But when I woke up the next day, rather than repeating the binge, I felt a twinge of guilt about the abuse that my slothlike habits were heaping on my body, and I did a curious thing: I dusted off the elliptical trainer in the corner of the living room, and worked out for 20 minutes.

Then it hit me: love poker, hate exercise. But poker bad, exercise good. So what... if... poker became a reward for exercise?

The rules are simple. I am now free to play poker all I want, without guilt. However, the price of entering a tournament (besides the $1.00 buy-in) is 20 minutes on the exercise machine. The house doesn't extend credit: I can't play and then promise to exercise later. But to encourage exercising even when I'm not in a poker mood, it's OK to bank exercise credits and redeem them later.

I've exercised almost every day since, sometimes twice a night when I'm still itching to play after getting knocked out when a fish moves in on me with 7s8c and catches two pair against my unimproved pocket aces. But the natural tension caused by coupling these two activities limits my ability to go overboard in either direction.

I know that the concept of rewarding work with play is hardly novel. But when properly applied, it's a marvelously effective way to introduce a needed virtue and an enjoyable vice into daily life.

Geometry Wars

| | Comments (0)

Over Christmas I finally got a chance to play an Xbox 360 that was properly configured with giant HDTV, wireless controllers, good sound, and a few semi-tipsy friends to scream twitch-reflex color commentary. The best game by far was Geometry Wars. It's a simulated vector-graphics game with some modern GPU effects that costs only $4 over Xbox Live, and as Eric said, it looks like someone coded it up over the long Thanksgiving weekend. You could port this game to a graphing calculator and it would be just as playable. The spirit of Eugene Jarvis lives! (Sorry, Eugene, I know you're still alive.)

Gadgets for 2006

| | Comments (0)

Here are some products/utilities/hacks I'd like to see this year. I've searched for them on Google, but I either didn't find anything or decided that what I found was too complicated.

  • A daemon Tivo. It runs in the background on a PC with a PCI TV tuner card. All it does it record programs listed in an XML file and encodes them as MPEG-4s in AVI containers. No weird containers (MythTV NUV), no attempt at a frontend, no nothing. Just new stuff to watch appearing every day in a directory on my fileserver, and all I have to do is open them in Media Player Classic.
  • An ISO generator that takes one or more AVIs or DVD ISOs and spits out a bootable Knoppix ISO that plays the videos when you stick the DVD in any PC. Think of it as a virtual DVD player that you can throw away when you're done.
  • A utility that lets you plug a PCI card (I think it's called an "FXO" card) into your home server, then your phone line into your the card, and it emails you MP3s of the messages people leave for you. Asterisk was about 800 times too complicated for this simple answering-machine replacement.
  • A video Squeezebox. Please don't make me get an MCE box.

Canceling XM Radio

| | Comments (0)

If you want to cancel your XM Radio subscription, don't bother going to their website. You can't cancel from the site; they make you wait on the phone and ask permission from a real person.

And don't try calling the number that the site lists for cancellation requests. After 10 minutes on hold, they'll tell you the department you called can't process cancellations.

No, instead, just call (800) 998-7900 to cancel XM Radio. That's the unpublished number that you get only after jumping through all the hoops. You still have to wait on hold for 10 more minutes, of course, and then listen to a script monkey try to talk you out of it.

Some reasons for canceling:

  • Their website doesn't support Mozilla Firefox -- inexcusable for a product that's still in the early-adopter stage.
  • (Slightly circular reasoning) As I described above, XM follows the cell-phone carrier mentality of making it as painful as possible for their customers to perform costly actions, such as canceling their service. Don't support companies that have attitudes like this!
  • The real reason I canceled: In December they replaced my favorite station, Luna, with Nashville Christmas. Good grief.

Cable Economics

| | Comments (0)

Why is it that adding a five-dollar Bluetooth chip to a $40 keyboard boosts the price to $75?

Sure, there are software costs, beyond just the silicon, to adding Bluetooth support to a device. But I still think this is the wireless version of "cable economics." Go to your local big-box retailer and try to find any cable at all selling for less than $20. It doesn't matter if the cable cost ten cents to manufacture; the fact is that you're using it to connect two devices that each cost hundreds or thousands of dollars, so chances are you can afford to pay the premium.

Mediagate MG-25

| | Comments (1)

As I wrote earlier, I've had the AL Tech MediaGate MG-25 for about two months, and have run it through its paces. Here's my review.

The MG-25 is a tiny, tiny 2.5-inch hard-drive enclosure that can play MPEG-2, MPEG-4, and DivX videos. It includes a remote control that's not ergonomic like the Tivo peanut remote, but it is well laid out and easy enough to memorize in the darkness of the living room. It includes several cables that adapt its minijacks to RCA plug outputs, as well as a USB cable and power adapter.

As a USB drive, the MG-25 is completely unremarkable. Plug it in to your computer's USB 2.0 port, and drag a few movies onto it.

As a video player, however, it's pretty good. The onscreen UI is reasonably attractive and easy enough to use for anyone who can navigate in Windows Explorer or the Macintosh Finder. Select a movie and it begins playing. It has up to 32x fast-forward, which isn't quite fast enough to get back to the middle of a movie without frustration, but it does remember where you left off when you stop viewing a movie, so in many cases you can recover from an accidental button press on the remote.

My favorite feature has turned out to be the ability of the device to play DVD ISOs. I can copy a DVD onto the device using a ripping program, then navigate the DVD menus from the MG-25. Playback quality is fine -- better, in fact, than my Philips DVP642 (which, admittedly, has notoriously bad video playback quality).

I did have trouble playing back one episode of Battlestar Galactica that turned out to have been mistakenly encoded with qpel. Otherwise, the device has been entirely stable.

The device has a slideshow feature. During playback of JPEGs, it seems to choose a random MP3 that it finds on the device and plays it, whether you like it or not. It also had trouble scaling 6-megapixel pictures from a Nikon D70; edges were jagged. Lower-resolution images looked fine.

The MG-25 is not as user-friendly as a Tivo. But it works well, and performs as advertised. I am happy with the purchase.

Slate, fix your RSS feed!

| | Comments (1)

One of the 134 feeds I subscribe to on Bloglines is Slate. They recently began including ads in their feeds, which is fine, except that they implemented it in a way that causes Bloglines to think that the article's been updated every time it crawls the feed. Specifically, the description tag for each item includes ad HTML whose href, img, and comments frequently change. The result is that Bloglines has a dozen or so "new" Slate articles every 10 minutes, and the mildly cute headlines ("QuagMier?" "Do Dogs Think?" "Doonesbury: Shock and awesome") have turned into my very own Groundhog Day.

Sonic.net: good customer service

| | Comments (2)

If you've ever had your DSL go south, you know that it's a painful world of trouble tickets, repeated queries whether the information provided was helpful in resolving your issue, threats of 8-am-to-4-pm technician windows, unsupported OSes, and Muzak. Or if you're a sonic.net customer, you can actually click on their website's "live chat" link and have an experience like this:

miket : How can I determine whether packet loss in my DSL line is a problem with my equipment or Sonic's? ** You are now speaking with John F, Technical Support. ** John F : Hi there, normally the best way to determine where packets are getting lost is through a traceroute miket : OK, I've done that, and when I try to traceroute www.yahoo.com for example, I get asterisks (which I suppose indicate dropped packets) at sjo.equinix.net, and even some at servers in the yahoo.com domain miket : Much of the time the traceroute completes normally miket : but the asterisks are not regularly concentrated around a single hop miket : so I get the feeling that it's something else miket : There I just did it again and the packet is dropped at 5 0.ge-0-1-0.gw4.200p-sf.sonic.net (64.142.0.198) 14.488 ms * 14.239 m John F : that's no good miket : Yeah and this time it was at 2 a.b.c.d.dsl.static.sonic.net (a.b.c.d) 12.501 ms 11.936 ms * miket : ... which is closer to my end John F : That would tend to support the idea that these packets are actually getting dropped between your computer and us, and that the other hops that are dropping just happen to be dropped packets John F : or rather, that they weren't necessarily dropped at the far end, but on the near end miket : My connection has been rock-solid for a year, and really nothing has changed that I know of miket : I can't rule out that a squirrel peed on my phone box or something like that, but for what it's worth my voice line doesn't sound static-y or anything like that John F : what's the IP of your connection, so I can try to ping it from here? miket : It's xxxx.xxxx.xxxx.com miket : Let me dig that, just a sec miket : www.xxx.yyy.zzz John F : that looks like a sonic.net IP John F : eyp John F : *yep John F : ah, and it also looks like it isn't set to respond to ICMP traffic miket : I can change that..... hold on miket : Sorry, X over DSL is slow John F : fair enough John F : I'm sending 100 ATM pings right now John F : miket : OK it should be working now. John F : Ok, this may be unrelated John F : but when you were configuring your system, I was getting 94-95% returns on ATM John F : right after you told me it should be working for ICMP, I got 100% returns on ATM John F : of course, your X connection shouldn't prevent ATM traffic from going through, but the coincidence struck me as odd miket : It's possible the router was rebooting or something goofy like that -- it's a Linksys WRT54G John F : But I'm not pingin g the router, I'm pinging the DSL modem (with the ATM pings) miket : Or is ATM at a lower level that that? miket : I see John F : ATM is lower-level miket : The original problem is sporadic but frequent miket : So maybe you were seeing it for a few seconds John F : and I dropping ATM packets left and right now miket : Traceroute failed entirely -- couldn't even resolve www.yahoo.com miket : So is this implicating the modem? miket : Or worse, the line between you and the modem? John F : I'm thinking it's not your router at all John F : I just simultaneously sent out ICMP and ATM pings, and when the ICMP was failing, so was the ATM John F : it's looking pretty solid right now John F : there's another hiccup... miket : Yup, I saw it too miket : during traceroute miket : there miket : now John F : yeah, that isn't your router, it isn't your computer John F : it's your modem, the line, the DSLAM, or us miket : OK, so here's what I'll do: miket : I'll check my wiring up to the demarc box and convince myself that nothing happened miket : Maybe I can hook the modem straight up to it with new wiring and I can ask someone at Sonic to repeat these tests miket : If the problem goes away then I'll fix it John F : that would be one good approach. I'm loading your line stats miket : Otherwise I suppose you need to do something? John F : well, the physical numbers look great miket : Yeah I get 350KB down on a good day with great latency John F : So I'm guessing it's not the physical copper line that's at fault here. John F : Yeah, you're noise margin and attenuation are both better than my line at home miket : I see. But no other Sonic customers in my neighborhood are reporting problems? John F : Not that I see miket : If the copper is good, then that suggests the problem is farther from me (if I'm understanding you correctly, and I don't really know squat about DSL) John F : I think that an alternate modem (if you happen to have one handy) would be a great test to narrow down the possibilities miket : OK. I do have one from a horrible Speakeasy experience miket : I'll give that a try tonight when I get home John F : Excellent. We want you to have no packet loss at all, so any progress on this is good! miket : Great. Are you a regular here if I join the chatroom again later in the week? John F : I should be on for the rest of the week. I'll leave notes in your "xxxx" account record so if you get somebody else they can pick up where I left off, though.

To summarize: this is good. It's much better than 20 minutes on hold. Even though my internet connection is still spotty, I feel that my ISP listened to my problem, and that I'm closer to solving it.

Don't buy Lexmark

| | Comments (0)

Went out on a limb tonight after reading Cory's article about hard drive enclosures that play DivX movies. I picked up a Media Gate MG-25 from Shop4Tech along with an 80 gig 2.5-inch hard drive from Directron. Total cost before tax & shipping: about $183. Both components should arrive before the end of the week. Yee haw, at last I have my video iPod!

Update: see two-month checkup.

Windows XP slow to wake up

| | Comments (1)

Is it just me, or have all Windows XP computers suddenly become very slow to wake up from sleep? It started with my Thinkpad t41p, which began taking from 2 to 5 minutes, and now my desktop and our family laptop are slow. Very strange. Perhaps it's a Service Pack 2 issue?

Buy Qurb

We meant the product, not the company, but this works, too.

apt-show-versions

| | Comments (0)

If you're having trouble getting apt-get to tell you what you have installed, it's because apt-get can't do that! Try this:

$ apt-get install apt-show-versions
$ apt-show-versions

WePod?

| | Comments (2)

Two of the current Apple iPod commercials feature multiple synchronized dancers.

How'd they do that with iPods? Each person in the commercial has his or her own. To the best of my knowledge no iPod can broadcast to another one, nor can iPods receive FM radio. So did all the dancers start the same song at the same moment and hope they stayed in sync? Is there an outtake where they're all quickly exchanging headphones to see if the beats match up? Hmmm, now that I look more closely, one of the rollerskating guys is a bit out of step with the other two. Yeah, that guy -- so you see it, too? Good, so it's not just me.

Maybe they're faking it and actually listening to a boom box on the floor behind the camera.

xterm & backspace key

|

If you're using xterm and hitting the backspace key doesn't do what you expect, add this to your .Xdefaults file:

xterm.*.backarrowKey: false

(Thanks, Kelly Felkins.) Another solution specific to Emacs is to add this to your .emacs file:

(define-key global-map "\010" 'backward-delete-char-untabify)

(Thanks, Ehud Karni.)

DNS fun

|

Diagnosing DNS trouble is especially fun because of caching. If you keep doing dig sowbug.org over and over, all you're usually doing is reading the cached value from your local DNS server, rather than confirming that the changes you've made at your registrar are taking effect. So I came up with the following method to try to trace exactly what was happening. It might be wrong, but it seems to make sense.

  1. dig sldfkjalfkajdfldsj.com: The hope in doing this was that I'd get an NXDOMAIN error from the highest possible authority (i.e., farthest from my local DNS). This returned the following:
    ;; AUTHORITY SECTION:
    com.      10800   IN  SOA     a.gtld-servers.net. \
    nstld.verisign-grs.com. 1120164931 1800 900 604800 900
  2. dig @a.gtld-servers.net sowbug.org: In other words, ask a.gtld-servers.net what it thinks about sowbug.org:
    ;; AUTHORITY SECTION:
    .         172800  IN      NS      k.root-servers.net.
    .         172800  IN      NS      d.root-servers.net.
  3. dig @k.root-servers.net sowbug.org: Lather, rinse, repeat:
    ;; AUTHORITY SECTION:
    org.      172800  IN      NS      tld1.ultradns.net.
  4. dig @tld1.ultradns.net sowbug.org: Ah, now we're getting somewhere:
    ;; AUTHORITY SECTION:
    sowbug.org.   86400   IN  NS  park4.secureserver.net.
    sowbug.org.   86400   IN  NS  park3.secureserver.net.

At this point I figured out that the root nameservers had the wrong nameservers listed for my domain. So I continued to fiddle with the registrar's self-service web page, and eventually got it right.

Server configuration

|

Some of what I've done to my new server so far. By the way, it's Fedora Core 2. I'm running Core 2 because Core 3 and later pretty much require yum rather than apt, and yum is a real resource hog and won't reasonably work in 64MB of DRAM.

  • As root: crontab -e, then add 25 3 * * * apt-get update && apt-get -y dist-upgrade.
  • Create a backup script on a different machine with several lines resembling this:
    rsync -az -vv --sparse --stats --delete --rsh=ssh root@<hostname>:/home .
    I put the public key for the archiving machine in root's .ssh/authorized_keys2, so that the script can log in automatically without needing to know root's password.
  • apt-get install ImageMagick ImageMagick-perl (note that they're case-sensitive!)

I'll update this entry as I do more stuff.

My server's back!

|

As all three of you noticed, my server died last Wednesday. It's a User Mode Linux server, and my trusty nightly rsync backup script sorta stopped working back in November 2004, so when the server disappeared, yeah, I lost some data.

Fortunately, November 2004 was just before my son was born, so blog entries dropped off dramatically around then, and there wasn't a lot to reconstruct. I got help from several sources:

  • Bloglines caches blogs in a format that's pretty faithful to the original. I was able to save their Javascript page, fiddle with it a little, then view the result in my browser. Then I copied the HTML into an HTML editor, and that was close enough to the original content.
  • For metadata like timestamps, I asked around and luckily a few friends had RSS and Atom feeds left over on their computers. It helps to know people working at a company developing blog software. :) Thanks, Antony and Erik!
  • Google Desktop Search's web history helped with some HTML recovery.

I was able to get all but about five late-2004 items perfectly recovered. Apologies in advance when those show up, incorrectly, as "updated" in your aggregator.

Oh, and by the way, I'm now hosted at Linode. No comment yet on their reliability, but their configuration pages are quite nice. I look forward to the commercialization of Xen; I suspect you get more bang for the buck than UML.

Update: For some reason my registrar decided to switch my domain to their parked host webserver, so anyone visiting sees a "coming soon!" page instead of mine. I believe I fixed the problem two hours ago, but their nameservers are still serving the incorrect address. What good is a 60-minute TTL if you can't get your changes published more quickly than that?

SMART-BURN is smart

|

This past weekend I was burning a DVD, and about halfway through I accidentally dropped something on the keyboard's sleep button. The CPU fan obediently spun down and the monitor promptly switched off. Sigh. I reached for a new DVD blank and prepared to throw away the now-ruined one in the drive. Imagine my amazement when I woke up the computer, it resumed burning, and verification succeeded!

We've come a long way since 1996, when moving the cursor over the wrong part of the desktop would kill a burn.

This tarball contains the Linkstation telnet binary and a script that inserts the binary into a Linkstation 1.4x firmware installer and configures inetd to run telnetd at system startup. Read the instructions at the top of the shell script. I haven't actually tested to see if this works, but if it doesn't it shouldn't take much more effort to fix it.

This approach saves bandwidth compared to downloading a new 37 megabyte installer for each tiny change.

Linkstation 145/146/147 password

|

I wanted to add a few features to my Linkstation HD-H120LAN, but the newer versions of the 1.4x firmware are password-protected and don't have the same vulnerabilities as earlier versions that allowed hobbyists to tinker with them.

So this is what I did. (These instructions assume you're already experienced with Linkstation/Kuro Box hacking.)

  • Download the 145_13 firmware update and extract firminfo.txt, ramdisk.image.gz, and vmlinux.gz from the firmimg.bin in it.
  • gunzip ramdisk.image.gz and mount it using sudo mount -o loop ramdisk.image /mnt/linkstation/.
  • cd to /mnt/linkstation/bin, and move unzip to real_unzip.
  • Add a new unzip with the following contents:
     #!/bin/bash
     echo "$*" >> /cmdline
     `real_unzip $*`
  • chmod a+x unzip
  • umount the image and gzip -9 it back up again.
  • Using setsum from the Kuro/Linkstation GPL toolchain, create a new firmimg.bin: linux-2.4.17_mvl21-sandpoint/arch/ppc/boot/utils/setsum/setsum firminfo.txt vmlinux.gz -r ramdisk.image.gz -o firmimg.bin
  • Flash firmimg.bin to /dev/fl3.
  • Replace the original firmimg.bin in the firmware update download and re-run HD-HLAN FWUpdate.exe.
  • When the setup is done, telnet into the Linkstation and cat /cmdline.
  • See the command line used to unzip image.dat: -P NFM_TUPSBHFNFM_TUPSBHF /mnt2/image.zip -d /mnt2

I confirmed the password works with 145_13, 146_10, and 147. Have fun.

If you send text/SMS messages to your formerly AT&T Wireless, now Cingular phone using xxxyyyzzzz@mobile.att.net, you may have noticed the address recently stopped working. Use xxxyyyzzzz@mmode.com instead and it should work.

Qurb 4.0

|

Congratulations to my friends and former coworkers at Qurb, who just released their 4.0 beta. As I understand it, 4.0's principal new feature is an RSS/Atom aggregator. "Feed reader" is a less techy term for the same thing, but it's less likely to be properly indexed by search engines ;).

It seems like just last week that 3.0 went final. Qurb is really picking up steam!

Who's locked that directory?

|

To figure out why you can't unmount a busy directory, try this:

fuser /mnt/share

You'll get back the process ID of the responsible party.

tar does bzip

|

This is embarrassing. For years I've extracted .tar.bz2 files by the two-step "bunzip foo.tar.bz2 && tar xf foo.tar" method, but it was annoying that tar didn't know what to do with .bz2 archives and thus wasn't as convenient as "tar xzf foo.tar.gz." Well, last night I discovered tar's -j option, which does the same thing for bzipped archives as -z does for gzipped archives. Hooray!

Buffalo Linkstation

|

If you are having trouble updating the firmware on your Buffalo Linkstation or Kuro Box using Windows XP, try turning off your computer's firewall. The setup program appears to use UDP in both directions, possibly sending and receiving on different ports, and the default settings of the XP firewall interfere with the traffic. I'm sure the setup program warns you somewhere to do this, but if you're like me, you typically ignore all those warnings. Well, this time they mean it.

Soldier killed in Iraq to get Medal of Honor

(since fixed... still cached in Bloglines)

MP3 Collection

|

I finally bit the bullet and started encoding my whole CD collection. I have 4,201 songs ripped with about 50 CDs to go. Mary's happy, because in the process I threw out all the jewel cases and put the ripped CDs in relatively compact binders.

Waiting until I was in my mid-30s was the way to go. Extensive A/B testing proved that I can't hear as well as I could in my youth, and this saves me hard drive space because I can pick a lower encoding quality. The setting I'm using is lame -h -V 5 sample.wav sample.mp3. This means variable bit rate (VBR) at level 5 (0 is highest, 9 is lowest). I also normalize the audio level to 100% after ripping, and strip leading/trailing silence. For 17,763 minutes of music, I have averaged 0.999286 MB (MB = 2^20 bytes) per minute.

iTunes can organize your directory and filename structure, and it has a good UI for fixing ID3 tags.

Other tips:

- Don't let albums titled "Greatest Hits" slip though. Change to "Britney Spears Greatest Hits," so your MP3 player doesn't try to play one week-long album entitled "Greatest Hits."

- Try to limit your genres. Who gives a crap if that Cure album from high school is "Darkwave," "Alternirock," or "Goth"? Just call it "Pop" along with virtually everything else you own. Picking broad genres saves a lot of tedious debates with yourself in your head.

- It's tempting to get the ID3 year correct for each song in greatest hits albums, but honestly, will you ever really need to make a playlist consisting only of songs from 1986?

- For God's sake, this is the time to start backing up your data. I'm not sure how I would react at this point if I suddenly lost 18 gigabytes of MP3s. If nothing else, at least copy your music folder to another place on the same hard drive from time to time, so that one stray mouse click doesn't delete the whole thing.

iTunes/Winamp feature request

|

When I'm listening to internet radio, I'd like a hotkey that copies the current song information into the clipboard so I can paste it into a "songs to buy" text file. Or take me to a web page that contains that information and/or tries to sell me the song, whatever. Just give me a way to say "I like this song and want to know more about it."

iTunes seems to do this pretty well for songs in your library, but it should do the same with the Shoutcast MP3 tag info in streams.

Shopping sites

|

Shopping sites and RSS are an evil combination. My favorite shopping site slogan is "How to go broke saving money."

DVD Shrink

|

The best part of DVD Shrink is that it scrubs your DVDs of "prohibited user operation," or "PUOP" flags. You know, the ones that effectively add 30 seconds to the boot time of your DVD player by putting that little stop sign up in the corner when you try to fast forward through the really unamazing CG animation sequence before the main menu.

I'm fascinated that DVD manufacturers (a) choose to punish the 99.9999999% of DVD viewers who are not members of counterfeiting rings by forcing them to watch some gobbledygook about Interpol and rebroadcasting every single time they pop a movie in their player, and (b) apparently think that the other 0.0000001% of viewers -- the target audience of the PUOP warnings -- will actually realize the error of their ways and leave their bootlegging careers because the DVD they're copying told them to. (There's also an possibility (c), which is that DVD manufacturers figure we're all on the verge of becoming copyright criminals and need reeducation through Intellectual Property Boot Camp Class before being allowed to watch the movie we bought.)

Never mind the completely pointless PUOP sequences, such as the ones on The Simpsons DVDs that spend 8 seconds of dead air telling us that the opinions of commentators are their own and not those of the publisher. Who in the marketing department decided that needed to be a PUOP?

Try DVD Shrink. You'll find that it's worth spending 30 cents on a DVD blank for DVDs you watch frequently just to get rid of the warnings. And guess what -- it's 100% legal to do so! (At least, as long as legislation like this doesn't take effect.)

Online ads

|

This article spurred me to write about something that's bugged me for a while. Why don't ad agencies host MPEGs of all the TV commercials they've produced? Or even better, why don't advertisers host their commercials online? Why wouldn't they want to distribute commercials to people who actually want to watch them?

I have seen a few archives of ads, but they don't cover everything, and they often seem to be low-quality encodings off a TV tuner.

There's a Denny's ad of a chicken dancing on a fence from the mid 1990s that I'd love to watch again. Or heck, any Old Navy ad with pre-supermodel-era Molly Sims in it (hi Mary! I'll just go ahead and make up my bed on the couch tonight).

I'm sure there's some sinister force at work I know nothing about that means it's legally, economically, and politically impossible to easily choose to watch commercials that aren't broadcast on TV. It can't be technological reasons, especially if BitTorrent makes hosting costs practically nonexistent.

Slashdot vs. RSS

|

For nearly seven years, Slashdot has been my primary source for geek news. Nearly everything I've read there was novel. But lately I've noticed that I rarely see anything on Slashdot that another RSS feed didn't already mention. Slashdot will continue to have some of the best commentary on geek topics, so of course I'll still read it, but currently RSS wins for timeliness.

Mount an ISO in Linux

|

As root:

mkdir /mnt/iso
mount -o loop -t iso9660 yourcd.iso /mnt/iso

AutoGK contains adware

|

I regret that I need to retract my earlier recommendation to use Auto Gordian Knot. The 1.84 beta installs a BHO at c:\windows\system32\dae.dll ("RESPONSETARGET") that pops up ads while you browse in MSIE.

It's the right of the AutoGK author to put whatever junk he wants to in his program (subject to licensing), so I'm not going to post instructions how to remove the adware. Instead I'll just state that if you don't want adware on your system, you should not use AutoGK. It's sad, because it was a useful frontend to a complicated toolchain, and I'm not aware of a comparable replacement at this moment.

MPEG-4 compression

|

I've done some research into backing up DVDs. The motivation was my observation that my daughter is sure to destroy at least a few DVDs in the coming months while she's toddling around the house. Here's the summary:

  • Buy a Philips DVP642 DVD player, which costs about $65 and plays MPEG-4 CDs and DVDs.
  • Get a DVD burner. This step is optional, but at a minimum you will need a DVD reader.
  • Download DVD Decrypter and AutoGK (Auto Gordian Knot), or buy Dr. Divx. (I did both.)
  • Make either 700MB backups using AutoGK's default settings, or 1400MB backups using Dr. Divx.
  • Get a whole bunch of blanks and backup to DVD or CD-R.
  • All done.

Notes:

  • The DVP642 is not perfect, but it's ideal for this application. The playback quality is not on par with some other players I've seen, as MPEGs seem a little too dark. But it's good enough for people who aren't videophiles like me.
  • Dr. Divx and DivX5 are not good enough for 700MB compression. Xvid definitely is.
  • I may change my advice to drop Dr. Divx entirely and back up with AutoGK and Xvid for both 700MB and 1400MB profiles. The only reason I wanted Dr. Divx was so I could produce files that were "DivX Home Theater Profile certified," whatever that means. But I've decided that larger backups might as well include AC3 audio, to avoid lossy transformation from AC3 to MP3. Yet the DivX Home Theater Profile apparently doesn't allow for AC3. I don't know why this is the case, because I can't imagine a Home Theater playback device that could play MP3 but not AC3 (since regular DVDs require AC3 for playback). If I'm willing to deviate from the profile by including AC3, then Dr. Divx offers me neither better encoding quality nor assurance of compatibility, so there's no point in using it at all.

Exchange your xmas lites

|

Apparently, if you go here, you can exchange up to five strands of old-style tree lights for brand-new LED strands, free!

Press release from last year, though they're doing it again this year.

Intellectual Property Protection Act

|

"Under the proposed law, skipping any commercials or promotional announcements would be prohibited."

more...

1100110011

|

Mark your calendars! Wednesday, November 10, 2004, at 6:06:51 p.m. UTC is 1100110011 in Unix time.

VH1 Motormouth

|

... is kinda funny.

Vote wizard

|

I want a website that asks me a couple dozen multiple-choice questions about my ideology, and then spits out a PDF of a filled-out sample ballot representing my probable choices for the election.

Update: Presidential Guidester is exactly the right idea, but I want it to go down to the state and local level.

Spooky LiveCD

|

Someone should make an ISO of a Linux live CD that, when booted, plays hours of spooky Halloween sound effects and music.

FR

|

My sister is never going to write about this (her own invention), so I will.

There's virtual reality, and lately "augmented" reality. For those of us on a budget, there's fabricated reality.

Example of an FR experience: "Oh, yeah, I've been to France; I went just last year!"

Comment spam

|

Blog comment spam is like death by a thousand cuts. In fact it's worse because it lasts for months. Here was my solution:

mysql> update mt_entry set entry_allow_comments=0;

One-way friends

|

I have a name for some of the people who read my blog: they're my "one-way friends." They've bookmarked my site, so know what's going on in my life and they may even know some of my most personal thoughts, but we never talk to each other; in fact, I may never even have met them. Do you have one-way friends? People whose blogs you occasionally check out, and learn that they've moved, or gotten in a fender bender, or seen something funny on TV, or gotten married and had two kids, and now after spending 90 seconds reading their web page you're all caught up with them and there's just no reason left to talk to them in real life.

There are occasional cases of mutual half-duplex one-way friendship, where I read someone's blog, and that person reads mine, but we never actually communicate with each other. The most likely case of MHDOWF is an old friend who I sent the "Hello this is Mike Tsao from _____, remember me?"-type email, and we ended up bookmarking each other's site, but the purest form is where some random person on the web mentions an entry from my blog, I learn about it from my referrer logs, and then I start reading that person's blog, and pow! new one-way friend.

And then where more than two people are involved, there's the unidirectional daisy-chain friendship...

Google and search

|

OK, OK, I'm the last geek on Earth to figure this out, I know. Bear with me.

Google changed the way people find things. The old way was by location. The new, Google way is by content.

Most computer users from the pre-Google era find things by location. They think it's perfectly natural to have to assign a filename to every item of content they create, such as resume.doc. They also must remember that they put that item in My Documents\work\jobs\resume.doc. If they forget that location, it's tedious and difficult to recover the document.

Likewise, they're trained to put every e-mail they keep in whichever folder it belongs. This is a shame. I'd guess I look at each mail I receive an average of 1.001 times; in other words, I very rarely search for old mail. But if I filed every mail I'd incur the time and expense of filing each time, no matter whether I ever actually look for it.

Google, Gmail, and Google Desktop Search make filenames, domain names, URLs, and URIs much less important than before. Now, I can start naming all my Word files using the following scheme: 1.doc, 2.doc, 3.doc, etc., and I'll still be able to find them. If a tower-of-Babel moment occurred and all domain names were garbled, that's OK -- once Google updates its index, I'll still be able to find everything. And I never sorted my email to begin with, so I've simply become more productive since moving to Gmail.

Will the next desktop OS eliminate folders and filenames?

Tivo too hot

|

If your Tivo starts stuttering, don't run right out to newegg.com and buy a new drive as I did. First, check and see whether your 15-month old toddler shoved the Tivo box back against the wall, covering the air vent.

That's what happened to me. After extensive testing of the drive and finding nothing, I remembered that in the past few weeks, Emily had been quite interested in moving consumer electronics around the house. Tivo moved again; problem solved.

Gmail Atom feed

| | Comments (2)

A couple days ago an undocumented feature appeared on Gmail. It's an Atom feed, which is a syndication format (compare RSS), and as implemented in Gmail it gives you a summary of the unread mail in your inbox. Here are my observations; I'd appreciate corrections if I've gotten anything wrong or left anything out. In particular, have you had success or failure with a particular aggregator?

  • The link to the feed is https://gmail.google.com/gmail/feed/atom.
  • The feed requires SSL. http:// rather than https:// won't work (though it will redirect if your aggregator supports it).
  • The URL must be exact. Adding a trailing slash won't work. Fixed this 10/21/2004.
  • For most aggregators, the feed requires HTTP authentication. Your aggregator should prompt you for your Gmail username and password when you first subscribe.
  • For most browsers or browser-integrated aggregators, the feed will work with your Gmail web cookie. You don't need to enter your username/password through HTTP authentication, but the feed will work only as long as you're logged in to Gmail, which isn't particularly useful.
  • The content of the feed is the unread messages in your inbox. If you don't have any such messages, you won't see any interesting content in the feed!
These are the aggregators that I've tested with the Gmail Atom feed:
  • Sage: this Firefox extension works through session cookies.
  • Feedreader: doesn't work because it doesn't support SSL.
  • SharpReader: yes, it works because it supports SSL and HTTP authentication.
  • Bloglines: doesn't work because it doesn't support SSL, and even if it did, I'm not willing to give my Gmail password to anyone else.
  • FeedDemon: I've heard this works but I haven't tried it.
  • NetNewsWire 2.0b3: works (Thanks, Matt!)
  • BottomFeeder: works (Thanks, JH!)
And finally, these are aggregators that claim compatible featuresets (SSL and HTTP authentication), but that I haven't tested or heard anyone else testing with the Gmail Atom feed:
  • Shrook 2
  • NetNewsWire
  • NewzCrawler
  • NewsGator

Home DNS

|

A few nights ago I got my Linksys WRT-54G router to do local DNS. This doesn't sound like much, but believe me, after spending an inexcusably long time working with raw IP addresses throughout my house, it's been positively intoxicating. Now I've got it all worked out so a particular MAC address gets a hostname and a fixed DHCP address, forward- and reverse-resolution works like a charm, mapped fileshares actually work, and I can use URLs with real hostnames in them instead of good old http://192.168.0.1/.

Idea: What to do tonight

|

RSS feed of the form:

http://www.example.com/feed/tonight.xml?zip=94123

Every day there will be a new article with a suggestion about something interesting to do in your area, and maybe an online coupon for a local restaurant.

P2P RSS

|

Certain concepts keep swimming around in my head lately. There must be some kind of wonderful union of them.

  • RSS/Atom: subscribe to content so you don't have to keep checking websites for updates.
  • RSS 2.0 enclosures: set up a daemon on your machine to download files linked in RSS feeds at night when you don't care about bandwidth usage.
  • Bittorrent: swarm content quickly from peers.
  • Peer to peer: if Bittorrent could be purely peer to peer, it would be easier to use it.
  • Venti: file data (as opposed to metadata) is identified by SHA-1 hashes rather than locations.
  • Zeroconf: easy discovery of people on your subnet.

The "wonderful union" is something where every morning you go to a local page on your browser that is like a newspaper containing all the channels you've subscribed to, and if the big files mentioned in the page (mp3, video) aren't downloaded yet to your local machine, they're swarmed to your machine from people close to you so you get them really quickly and without crushing some poor server that got mentioned on Boing Boing.

Become a diamond when you die

|

woot

|

Woot is a really interesting use of RSS. The company sells one product a day, and as far as I can tell doesn't advertise except through their RSS feed. It's a bare-bones shop; no customer service to speak of, no backorders, no rain checks. If you want today's product, order it now. If not, it's gone by tomorrow.

It's like the best of spam (low-cost marketing) without its many problems (lies, cheating, stealing).

I'm probably the millionth person to figure this out, but if you want to know how long a particular compounded rate of return will take to double your original investment, divide 75 by the percentage.

Example: 16% annual return, compounded annually.

Thus: 75 / 16 = 4.6875.

Proof: 1.16 ^ 4.6875 ~= 2.01.

Synchronized entropy

|

We Linux users have a zillion screensavers to choose from, but many of my coworkers have winnowed their configurations down to the really cool ones. Sometimes my favorite, Helios, is running on a couple monitors side-by-side, and the effect is neat.

This got me thinking: the random number generator in Helios should simply be Unix time div 60. Then on LANs where most computers are synced with NTP, they'd all show the same view. You'd actually want to make the Helios parameters all derived from the same seed, so that all the screens would be showing the exact same picture no matter when they kicked in. This would give the appearance that all the computers were communicating with each other to keep the screensaver in sync.

I think this would look cool. Or maybe it wouldn't, I don't know.

Segway price dropped

|

The Segway p Series at Amazon is now $3,000 (a price drop of $1,000).

FrogPad

|

FrogPad one-handed keyboard.

Robotron, Part 2

|

The grunts are here

USB Aquarium

|

Someone please buy me this.

SVCD bitrates

|

For a single 700MB CD, you can fit the following number of minutes of video encoded at a particular bitrate, assuming 224 Kbps audio.

  • 42 min or less: 2,376Kbps, the maximum under the SVCD spec
  • 43 min: 2,329Kbps (2,553Kbps with audio)
  • 50 min: 1,971Kbps (2,195Kbps with audio)
  • 55 min: 1,772Kbps (1,996Kbps with audio)
  • 60 min: 1,605Kbps (1,829Kbps with audio)
  • 63 min: 1,518Kbps (1,742Kbps with audio)
  • 64 min or more: don't bother; below 1,500Kbps looks awful

In general you can calculate this yourself by multiplying the number of megabytes on the CD by 156.8, and then dividing by the number of minutes you'd like to record on one CD. For example, for a 700MB CD and a 45-minute movie, (700 x 156.8 / 45) = 2,439.111. Subtract 224Kbps for audio and you have 2,215.111Kbps left for video.

(The derivation of this formula comes from MB/CD x 1024 bytes/KB x 1024 KB/MB x 1/2048 sector/data byte x 2352 video bytes/sector x 8 bits/byte, and then solving the equation for a particular set of constants.)

Note that CDs have a little more space than advertised. So these numbers are fairly conservative.

Super Video CDs

|

I've been messing around with SVCDs for the past few nights. An SVCD is to a DVD what an MP3 is to a CD: you scrunch a giant movie file down to a small movie file, and that makes it convenient to do more things with it, such as store it on your PC, put it on a CD that many standalone DVD players can play, etc.

The technology is interesting to me because it lets me encode our kid DVDs onto CD-R and put the originals in safekeeping. When Emily destroys them, no problem -- just burn another copy!

Important data points:

  • Only about 40-45 minutes will fit on a 700MB CD-R. That means most movies take up 3 CDs. I suspect this is a fatal flaw for movie archiving, but it's perfect for kids videos, which are typically made for TV. Because an hour of TV is usually no more than 44 minutes of programming, they'll fit just fine on a single disc.
  • DivX (which I understand is a deviant version of MPEG-4) can fit a whole movie on one CD-R, but very few standalone players can play it.
  • DVDx is a very nice all-in-one ripper/encoder, but it couldn't produce working files for me when I tried to encode an NTSC 23.976 fps movie.
  • CladDVD .NET is a nice ripper. That site also has a trial version of TMPGEnc, which is a good encoder with copy protection that is so inconvenient (it periodically rechecks the server to make sure your license key is still valid, presumably to discourage you from publishing your key) that I may choose not to buy it on principle.
  • Encoding movies is slow, and error-prone. It wasn't until just this morning that I successfully produced a watchable SVCD -- the first 40 minutes of Starship Troopers. This was maybe my sixth or seventh try. The previous attempts failed because of dropped frames, poorly synced audio, dropped audio, low-quality encoding, or bad aspect ratio.

DSL, VoIP decision

|

After much research and rationalizing, I ended up going with the least geeky solution to connectivity at my new address: plain old SBC phone service, no long distance, flat rate, for $11/month. The phone line comes to about $18/month with taxes (a whopping 63.6% tax rate). Then it looks like I'll be going with Sonic.net for DSL: 1.5/384, 8 static IP addresses for an introductory price of $45 later going to $70 a month. Total monthly: $63.

Other options were SBC all the way: $18 + $75 for "Pro-S" DSL = $93/month, or Speakeasy dry-pair DSL and Vonage: $66 + $15 = $81/month.

As much as I'd like to try VoIP, the numbers don't work out. My wife and I don't have a big phone bill to begin with, so there isn't much economic incentive to try it.

Thinkpad Keyboard Remapping

|

My Thinkpad T41p is a fine laptop, but for some really weird reason IBM forgot to put on the Windows key and the Application (a.k.a. Context) key. Add this to your registry to convert the two useless buttons next to the arrow keys (I think they were page-back and page-forward) to the Windows and Context keys:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,\
00,5b,e0,6a,e0,5d,e0,69,e0,00,00,00,00

Then restart your computer and it should work.

Dry pair DSL available!

|

Speakeasy's new OneLink service (Thanks, Erik, for the link.)

Robotron

|

Distributed Tivo, take 2

|

OK, let me try again.

You know what Tivo is: an appliance that records TV shows as files on a hard drive.

You might know what Bittorrent is: a program that makes file downloads fast by swarming bits of them from your neighbors to you.

Combine the two and you have a very cool gadget. Plug one end into your home network connection, plug the other into your TV, wait a while, and start watching prerecorded programs.

Key points:

  • You don't need cable anymore.
  • Depending on your connection speed, you can probably watch a live program delayed by a few seconds, assuming a neighbor is recording and sharing it.
  • Advertisers can divert their distribution budget into their production budget. In other words, they'll take the money they save on airing commercials and spend it on making commercials that are more enjoyable to watch.

I wish someone would do this!

Noodles

|

Cup-a-Noodle products typically have the following instructions:

  1. Add boiling water.
  2. Cover and wait 5 minutes.
  3. Enjoy.

So if I don't enjoy them, is it the manufacturer's fault for producing a bad product, or is it my fault for not following the directions?

Cool - unlock your phone

|

DSL & "dry pair"

|

I've been researching VoIP for home. The dream scenario is being able to justify a huge broadband pipe to the home that, among other things, removes the need for a landline.

Prefab houses

|

Webby Awards

|

Nominated for a Webby: Jeff Harris's web site. My favorite journal entry (submitted by random people): "I got an e-mail from my sons teacher. She says that he said 'crap' and she heard him mention something about a training bra. Please, sister, don't waste my time!"

Semacode

|

E-mail etiquette

|

These are two of the rules you should follow if you want to be polite when using e-mail.

1. When replying to a mail, don't add other recipients.

2. Don't forward mail.

Exceptions to these rules are (a) the original sender asked you to add other recipients or forward the mail, and (b) you've already asked permission from the original sender to do either of these things.

Examples:

"Hey, Mike, that's a great question. OK if I forward to largergroup@example.com?"

"Hey, Mike, interesting comments. Mind if I forward to your boss?"

SB 1822

|

From this press release:

"Google defends its unprecedented intrusion into private e-mail conversations by arguing that Gmail subscribers knowingly consent to it. But those who send e-mails to Gmail subscribers from elsewhere (like Earthlink or Yahoo!) will not be asked for their consent before the whole e-mail conversation is analyzed."

Guess what: senders aren't asked for consent when recipients do anything with e-mails. I can post my e-mail on the side of a bus if I want to, and there's nothing anyone can do about it.

As long as Sen. Figueroa is at it, why not outlaw the "forward" button on all e-mail clients?

Aaargh!

As We May Think

|

As We May Think

This was written in 1945.

hugeurl.com

|

http://www.hugeurl.com/?ZWY3ZTE0NWFmOTg5ZDU2M2QxYWI3ZTNhMGJj
ZjlhNGMmMTImVm0wd2QyUXlVWGxXYTJoV1YwZG9WVll3Wkc5alJsWjBUVlpP
V0Zac2JETlhhMUpUVmpGYWMySkVUbGhoTWsweFZqQmFTMk15U2tWVWJHaG9U
VmhDVVZadGVGWmxSbGw1Vkd0c2FsSnRhRzlVVjNOM1pVWmFkR05GZEZSTlZU
VkpWbTEwYTFkSFNrZGpTRUpYVFVad1NGUlVSbUZqVmtaMFVteFNUbUY2UlRG
V1ZFb3dWakZhV0ZOcmJGSmlSMmhZV1d4b2IwMHhXbGRYYlVaclVsUkdXbGt3
WkRSVk1rcElaSHBHVjJFeVVYZFpWRVpyVTBaT2NscEhjRlJTVlhCWlZrWldh
MVV5VW5OalJtUllZbFZhY1ZscldtRmxWbVJ5VjI1a1YwMUVSa1pWYkZKRFZq
QXhkVlZ1V2xaaGExcFlXa1ZhVDJOdFNrZFRiV3hYVWpOb1dGWnRNSGRsUjBs
NFUydGthVk5GV2xSWmJHaFRWMVpXY1ZKcmRGUldiRm93V2xWb2ExWXdNVVZT
YTFwWFlrZG9jbFpxU2tabFZsWlpXa1prYUdFeGNGaFhiRnBoVkRKT2RGSnJh
R2hTYXpWeldXeG9iMWRHV25STlNHaFBVbTE0VjFSVmFHOVhSMHBJVld4c1dt
SkhhRlJXTUZwVFZqRmtkRkp0ZUZkaWEwcElWbXBKZUUxR1dsaFRhMlJxVWtW
YVYxWnFUbTlsYkZweFUydGthbUpWVmpaWlZWcHJZVWRGZUdOSWJGZFdSVXBv
VmtSS1RtVkdjRWxVYldoVFRXNW9WVmRXVWs5Uk1rbDRWMWhvWVZKRlNtRldh
a1pIVGtaYVdHUkhkR2hpUlhBd1ZsZDRjMWR0U2toaFJsSlhUVlp3V0ZreFdr
dGpiVkpIVld4a2FXRXdjRWxXYlhCS1pVWkplRmRzYUZSaE1sSndWV3RhUzFZ
eFVsaE9WemxzWWtad2VGVXlkR0ZpUmxwelUyeHdXbFpXY0hKWlZXUkdaVWRP
U0U5V1pHaGhNSEJ2Vmxod1MxUXhXWGhqUld4VllrWmFjRlpxVG05a2JGcEhW
bTA1VWsxWFVucFdNV2h2V1ZaS1JsTnRSbGRpV0U0MFZHdGFXbVZIUmtoUFYy
aHBVbGhCZDFac1pEUmpNV1IwVTJ0b2FGSnNTbGhVVmxwM1YwWnJlRmRyZEd0
U2EzQjZWa2R6TVZZeVNsbFpNMmhYVFc1b1dGWnFSbEpsUm1SWldrVTFXRkpZ
UWxsWFZtUjZUVlpzVjFWc1dsaGliVkpZVlcxNGQyVkdWblJOVldSWFRVUkdl
VlJzVm05V01VbzJVbXRvVjFaRldreFdha3BQVW14YWMxcEhiRk5OVlZZelZt
eGFVMUl4YkZkWGJrcE9WbXh3V0ZsWWNGZFdSbFp5Vm10YVQxVlVNRGs9

23 Prisoners, in code

|
And here is a C program that tests my solution.

The 23 prisoners problem

|

Adam next posed this problem:

The warden meets with the 23 prisoners when they arrive. He tells them:

You may meet together today and plan a strategy, but after today you will be in isolated cells and have no communication with one another.

There is in this prison a "switch room" which contains two light switches, labelled "A" and "B", each of which can be in the "on" or "off" position. I am not telling you their present positions. The switches are not connected to any appliance. After today, from time to time, whenever I feel so inclined, I will select one prisoner at random and escort him to the "switch room", and this prisoner will select one of the two switches and reverse its position (e.g. if it was "on", he will turn it "off"); the prisoner will then be led back to his cell. Nobody else will ever enter the "switch room".

Each prisoner will visit the switch room arbitrarily often. That is, for any N it is true that eventually each of you will visit the switch room at least N times.

At any time, any of you may declare to me: "We have all visited the switch room." If it is true (each of the 23 prisoners has visited the switch room at least once), then you will all be set free. If it is false (someone has not yet visited the switch room), you will all be executed.

Devise for the prisoners a strategy which will guarantee their release.

(My solution follows.)

The Monty Hall Problem

| | Comments (1)

I heard of the Monty Hall Problem years ago, and believed that Marilyn vos Savant was full of crap. Today my friend Adam Dingle explained to me why she wasn't. It took me a long time to understand, and even longer to believe. But here's my explanation.

You have a 1/3 chance of picking the right door. Therefore you have a 2/3 chance of picking the wrong one. If you've guessed wrong, the host eliminates all but the winning door. This is true because he's promised that after you choose, he'll narrow it down to two doors, one of which contains the winner.

Thus, you now have two choices: stay with your original choice, which you knew had a 1/3 chance of being right; or switch to the other door, which must be the winning door if you earlier picked wrong.

Marilyn's million-door example is excellent, but she chose a rhetorical rather than clear explanation for it.

You have a one-in-a-million chance of picking the right door on the first guess. Then the host eliminates all but your pick and another door, one of which is the winner. If you stay, then you believe that you picked the winner on the first guess. If you switch, then you believe that you picked wrong, and are now switching to the winning one. It's much more likely you guessed wrong, forcing the host to reveal the winning door (since he had to make sure that the remaining two doors contained the winner).

The devilish part of this problem is that there are three doors, not a million. This means that the host eliminates only one door of the remaining two, so you don't realize that he's actually eliminating every remaining door that's a loser.

Distributed Tivo

|

I haven't heard of this idea before in this exact form.

Background: the other day, Red Hat released Fedora Core 2 test 1 (the hobbyist version of Red Hat Linux), so in the height of optimism I tried downloading all 2GB of it over my DSL line at home. I normally get 26 KBps, but this time I used BitTorrent, and because so many people were simultaneously downloading it, I averaged about 100 KBps and completed the download easily overnight. I have _never_ had such high download rates over my DSL line.

Then this morning the FCC shut off Howard Stern, and there are talks in Congress of a 10X increase in fines for showing "indecency" on TV, and they want to require a digital delay on all live broadcasts. I don't like Howard Stern myself, but I don't like where this is going. Puritans can go believe whatever they want, but when they use Janet Jackson's revealing costume as a pretext for imposing blanket censorship rules on publicly-owned bandwidth, I get mad, and I want to take the government out of the equation.

Tiny computer

|

This guy built a little computer like the PDA I wanted to build last year. I wish I knew how these people assemble these BGA-component-based boards. Do they send them out somewhere?

Mars Rover dead?

| | Comments (1)

The Mars rover has been silent for 24 hours. I hope it's not dead!

Close Elections

| | Comments (1)

The Iowa caucus is tomorrow. Polls say that the four leading Democratic candidates, John Kerry, John Edwards, Dick Gephardt, and Howard Dean, are neck-and-neck in the polls. One might interpret this as negative for Dean: if he has captured the lion's share of press in the past few months, why isn't he farther ahead? I have an answer.

Rackmount Server

|

Motivation

  • Inexpensive: I don't want to spend more than $700.
  • Excellent performance: it's going to be mostly just a web server, rather than a compute server, so the requirements are fairly low.
  • High-quality components: all name-brand.
  • Not expandable. The odds of being able to upgrade economically are probably very small, so I'm not willing to spend extra for expandability in the future.
  • Something I'd be proud to have built (no bolt cutters, duct tape, or homemade moving parts).

Components

Benchmarks

  • (coming soon)

Colocation

  • (coming soon)

Stuff I learned while building this server

  • The Intel D815EEA2LU seems like a perfect board for a rackmount server, but it doesn't fit in a 1U case. The audio riser is too high.
  • I bought the retail version of the Celeron because I wanted a fan with it, but the fan doesn't fit in a 1U case. So that was a waste of a couple of dollars.
  • It turns out that the Celeron 1.2GHz has an "integrated heat spreader" that plays more nicely with this particular board's built-in heat sink. Oh well.
  • I didn't bother with a floppy drive. I will probably regret it.
  • Pricewatch is pretty cool, but it doesn't list every company in the world, so it still pays to do a search or two on Google.
  • There are a couple of barebones 1U servers out there by well-known manufacturers, such as the Intel ISP1100 (here is one for sale) and the Supermicro 5010E, but they're just plain more expensive than building it yourself. I looked at the 5010E at Fry's Electronics and it didn't give me an impression of being high quality -- the stickers were put on crooked and it looked like it was all plastic.

Compaq iPAQ Personal Mini-CD Player PM-1

|

My fellow gadget-head officemate Robert showed up this morning (mid-December 2001) with a new toy: a portable Sony CD/MP3 player. This set off the usual string of thoughts in my head: me want toy too; must find "Christmas gifts" for "friends" and "family" after first "testing" them myself; must shop online now.

A few links later and I came across the Compaq iPAQ Personal Mini-CD Player PM-1. This is a portable CD/MP3 player that uses those cute little 80mm CD-R discs that music companies tried to use for CD singles in the late 80s and early 90s. Each mini-CD holds 185MB of data, which is about three hours of MP3 or six hours of Windows Media Audio (WMA) music. The discs are about as big as the top of a coffee cup, and the player itself is slightly larger than a wallet.

The first notable thing about the PM-1 is that its blister packaging must have been designed to survive a close-range bomb blast, rather than to be opened easily by the purchaser. Conventional tools won't cut it. I first tried a ballpoint pen to split the seam, then a small knife to cut through the plastic, and then a Swiss Army knife's scissors. I didn't even leave a mark on the packaging. I'm not kidding -- didn't Compaq run this packaging by any focus groups? If they had, I'm sure the comments would have been just like mine: "Gee, it looks like a fantastic product. Unfortunately I can't open it." Finally I borrowed some large sewing scissors and carefully cut around the seam. I was able to get just enough of the plastic opened to pull out the player and all the accessories.

Any-who, if you get the package open and don't slice yourself up in the process, the player comes with a pair of AAA rechargeable Ni-MH batteries, a wall-wart-style AC adapter, three blank mini-CD-Rs, an installation CD, a remote control, a pair of headphones, and some documentation. The remote is very cool: it plugs into the player's headphone jack, and then in turn it has a headphone jack. That means you can use the remote if you like but you don't have to. The remote has a nice, though smallish, LCD display, and there's a clip on the back of it. The idea must have been to stick the player in your backpack and clip the remote onto your coat. It makes sense.

I've had the player for only a couple of hours now. So far it works great. It feels solid and well-engineered, except for a "VOID WARRANTY IF REMOVED" sticker on the back that will definitely get scraped off soon if I carry it around in my backpack. I wish, as I do with all handheld devices, that it had a cradle instead of a plug for recharging, but if you leave the plug on your desk and don't let it fall on the floor, it'll still be convenient enough. I have shaken the player as hard as I can and can't get it to skip. Sound quality is fine. With the headphones off in a quiet office, I can't hear the disc spinning; in fact, it's hard to tell through the window on the player's door that a generic unlabeled disc is even moving. The LCD display could use backlighting.

One spooky experience you'll have with the player is listening to a song, looking down at the player, and noticing that the CD isn't spinning! The Compaq advertises an 8-minute buffer (probably a 4-minute buffer with 128K MP3s), so if it reads ahead all the way to the end of the current song, it does the smart thing to save batteries and spins down the CD. Pretty neat.

I haven't tried the installation CD yet. According to the packaging, there's a copy of MusicMatch and Windows Media Player. Since I've already grown an MP3 collection, I probably won't try out the bundled software. I've heard WMA format is pretty good, though, especially considering that the files are half the size of same-length 128Kbps MP3s.

Something else I'm trying now is called the MP3 Stream Recorder, which if you know Shoutcast does exactly what you think: downloads the content of streaming MP3 servers to your hard drive. Right now I have a couple of instances of this application each grabbing three hours' worth of one of my favorite Shoutcast stations (Groove Salad and Bassdrive). Burn them to mini-CD and I have mobile Shoutcast. In fact, in a year or two when I'm able to receive Shoutcast wirelessly through Bluetooth while taking CalTrain or BART to work, then humankind will have officially invented what I'll call radio.

I have one complaint about the product. In the "Getting Started" guide we are warned "Do not charge the batteries for more than 8 hours to avoid reducing battery life." Great. Compaq couldn't spend a little more engineering time to make the built-in charger intelligent enough to switch to trickle-charge once the batteries had reached capacity? That's very annoying -- one more thing to worry about that technology should have been able to take care of on its own.

Cost is about $99. I got mine at Circuit City through Amazon.com. That's right -- you order and pay through Amazon and then pick up the merchandise right away at your local Circuit City. I expected to save a little time through this method. I didn't. That experience merits a separate review of its own.

Update

March 6, 2002, after owning this device for about three months: Other problems are that it doesn't support UDF (which I believe is the usual format that Windows XP uses to burn CDs), and it doesn't have any concept of playlists, so you have to either live with shuffle play or carefully arrange the names of tracks to be in alphabetical order (01songA.mp3, 02songB.mp3, etc.). But other than these problems, the product works as advertised.

Tivo

|

These are notes, mostly to myself, about the Tivo I got on August 21, 2001.

  • Model HDR31204 (standalone, Phillips, single-drive, 30 gigabytes, Quantum LCT20, version 1.3).
  • Quantum drive is really, really quiet.
  • Downloaded MFSTools and backed up.
    • Backup was going to be 6 gigs but it failed (couldn't write more than 2 gigs to a file on Windows FAT32 partition).
    • Tried again with -Tl32 option and the backup was 1.1 gigs, compressed (gzip -9) 383 megabytes.
  • The CR2032 backup battery was never installed in my Tivo. They just plain forgot to do it! I had to go to Target and buy one.
  • The setup screens are very slick.
  • I have a AT&T Digital Cable General Instruments cable box. This product/service already sucked ass, but it's so much worse with a Tivo:
    • Can't change channels above 99
    • Channel changing is slow
    • Already-annoying banner following every successful channel change is even more annoying)
  • The program-grabbing stage takes a very long time (about 4 hours for me). It ends up being an almost out-of-body experience. The estimated time never seems to admit that it's going to take longer than it originally thought. Rather than using actual elapsed time as a basis for estimating remaining time, it seems to use original estimate multiplied by percentage remaining, so you get subjective minutes that objectively last 2-3 minutes, kind of like the clock in my grade school.
  • The next scheduled update call was June 15. I assume that means that if I hadn't manually started an update, it wouldn't have updated for 10 months.
  • There was a bunch of demo videos on the machine. The content wasn't very interesting but it was really nice to see how high-quality the video was. It looked much, much better than my cable, which I may have mentioned sucks ass.

About this Archive

This page is a archive of recent entries in the geek category.

fly is the previous category.

home is the next category.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2-en