AVR Dragon: Fixing Bad Fuse Settings

This post isn’t about the usual kind of dragon (if there even is a “usual” kind). The AVR Dragon is a gizmo made by Atmel, useful for programming their AVR line of microcontrollers. It’s relatively cheap (around US$50 at the time of this writing) and does many useful things. The specific application I’m going to talk about here is using it to “fix” parts when you’ve set the fuses in such a way that said parts won’t talk to simpler programmers. Details after the jump.

Netbook Décor

If this site has a topic at all, then it’s technology and dragons. (It’s right there in the tagline, after all.) Usually I have to make do with one or the other. This is the rare post where I can get both involved. Pictured right is my Acer Aspire One netbook. You might note (“Just look at it!”, etc.) that it has gone from being plain and corporate and boring to being attractively decorated. The process involved a Sharpie permanent marker, and the considerable skill of an artist (not me) who made me swear to conceal his identity, on account of — and I quote — “not being able to draw dragons.”

Much happiness. Your netbook is not as nice as mine. (If you believe otherwise, I want to see pictures.)

Linux on Zipit

Update: Please see my newer Debian on Zipit article for a better installation process.

This is an article about running Linux on the Zipit Z2 instant messaging device. Or rather, it is about running a general-purpose Linux distro, since the device out-of-the-box runs a Linux kernel with proprietary userland software.

Why is this interesting? With a list price of US$50 (and sale prices approaching half that), this device can be an SSH client, DOSbox, NES emulator, video streamer, music player and/or IRC client.

Since the state of documentation seems to be lagging behind the state of development on this device, I’m using this post as an information dump about all the things I found a hassle to figure out (and hope to save others that same hassle).

I Was Told There Would Be No Math

The so-called “impossible puzzle” (also known as the “sum and product” puzzle) has been kicking around since 1969. It isn’t actually all that hard, but the statement of the puzzle can make it seem intractable when first encountered:

Consider a pair of integers X and Y such that 1 < X < Y and X+Y < 100.
P and S are mathematicians, who know the above constraints and who won’t deliberately lie.

In secret, P is told only the product X*Y and S is told only the sum X+Y.

P: “I can’t find the numbers.”
S: “I knew you couldn’t.”
P: “Then I know the numbers.”
S: “Then I do, too.”

Find X and Y.

Note that there are spoilers after the jump. Please read no further should you wish to attempt a solution on your own.

Backups on the Home Front

In computing, you have exactly two options: 1) Have current, working, tested backups or 2) don’t care if your data is there tomorrow. There is no third option. Pretending that there is leads only to substantial cussing.

Unfortunately, people mostly either know this already, or won’t be convinced of it until they learn from the school of bitter experience. So, this isn’t a post to try to convince you to take backups; it’s a post about how I do it, presented in the hopes that it’ll make doing so easier and safer. (As with many of my computer-related posts, the actual implementation is somewhat specific to UNIX-like systems, though many of the general principles apply universally.)

Finding files with identical contents

Need to search a filesystem for all the files which have identical contents? Read on for a Perl script that does that.

Note that this isn’t just a solution to the (much simpler) problem of finding files in different directories which have the same name; I’m talking about the actual data inside the file being duplicated. This script also works reasonably efficiently, so it’s still useful in cases where you have an extremely large number of files and/or the files in question are very large.

Barbarians at the gate: Excluding Bing via robots.txt

This isn’t about the variety of cherry. If you haven’t heard of Bing.com, it’s Microsoft’s recent attempt at a search engine. (If you’re curious, Google it.)

If you are not particularly pleased with the idea of a company like Microsoft making money from your creative work, then my strong suggestion is to create a robots.txt file in the root of your web-space, with contents not unlike:

User-agent: msnbot
Disallow: /

User-agent: *
Disllaow:

The robots.txt is a voluntary standard which allows web page authors to exclude search engines from part or all of their sites. There’s a helpful website that has details about why you might want to do this, and how to go about it.

Of course, there have been some allegations that Bing isn’t honoring the robots.txt standard. But announcing that they’re unwelcome is a fine symbolic act, even should they fail to honor your wishes.