Swipe This

September 16th, 2005

Have you ever looked at your credit/debit card or driver license and wondered what data lie within the magnetic stripe or barcode? Cards are convenient, and you probably swipe them at a lot of stores. Some stores now require that they swipe or scan your driver license for alcohol purchases. What data is on your card, and what is the retailer storing in their system?

To find out what’s on your cards, you can build a magstripe reader for under $50 and use open-source software to read them. Stripe Snoop is software that not only reads your card’s data, but also parses it, identifies the card issuer, and tells you what the content means. On the hardware section of the site, you’ll find instructions for using some inexpensive components to make your own card reader. Make Volume 1 from O’Reilly has an article by the same author with nice detailed illustrations and directions (the link is just an excerpt).

At work, I have access to a retailer commercial card swipe and barcode scanner, so I decided to take a peek at some of my cards. Read on to find out what I found.
Read the rest of this entry »

Gnutella really whips the Donkey’s ass

August 23rd, 2005

I wanted to see what all the fuss was about, so I tried out a couple peer to peer networks. I wanted to see what has changed. In first generation P2P, searching took place on central servers, which kept track of all the peers, like Napster. Actually, bittorrent still works this way. In second gen P2P, the network is decentralized, but not very secure or anonymous, like Kazaa, Donkey, and Gnutella. The next gen will thwart any efforts by RIAA or MPAA by using a distributed architecture that is also untraceable, like Freenet and Waste.

So I tried the eDonkey2000 peer to peer network. Certainly a lot of files on the network. But I found the download speeds to be slow. While my download queue was filled, I only got 10 KB/s on a cable modem, but I was sending up 50 KB/s. That’ll teach those leaches. Of course, who wants to use a P2P network that you have to sit on for weeks to get any files? To make matters worse, I thought the user interface was a bit clumsy and complicated.

My friend mentions Limewire, so I try it. It’s written in Java, so it has no problem supporting multiple platforms. It’s actually using Gnutella network. This time, I got over 400 KB/s down and under 50 KB/s up! The user interface is very well done. It even lets you preview music and video files that you’re downloading.

The Donkey network seems to have a community that likes to sit on the network and share, so it has more files and downloading large files is no problem if you can wait a few days. The Gnutella network is about speed, but you have to get those files during prime time before all the peers disappear off the network. Files that were on Gnutella one night could be gone the next time you check, while Donkey seems to be an archive.

Even though Gnutella network may not have as many files, it’s still the clear winner. It really does whip the eDonkey.

[Sidebar. The phrase is a reference to Winamp, which has an mp3 that plays on startup, "Winamp, it really whips the llama's ass." Kindof a funny thing to say. Apparently, a music artist in Chicago named Wesley Willis wrote lyrics like that. One of his favorite phrases was, "It really whips a [insert animal here]’s ass.”]

Boom Goes the Dynamite

July 26th, 2005

Here’s a meme that you’ll notice after I tell you about it. It started with a student at Ball State Univerisity named Brian Collins who filled in for a sports spot on a student news show. As the sports clips flashed by, he choked and tried to cover with ad-libbing. As a final attempt at saving his performance, he threw out a catch phrase as a basketball shot was made: “Boom goes the dynamite!”

The clip was posted on the Internet and the phrase was quickly picked up in broadcast and news. Brian found himself telling his story to The Early Show and Late Nite with David Letterman. On Late Nite they played the original news broadcast and followed it with clips from other broadcasters using his catch phrase, which was hilarious. The best copycat was a weatherman describing a stormy forecast with, “As they say, ‘boom goes the dynamite!’”

You can watch the original video at ebaumsworld.

CtrlAltDelete Annoyances

July 24th, 2005

In the old days, CtrlAltDelete was used as a last measure with an unresponsive computer. If things were locked up, CtrlAltDelete would do a “soft” restart. It worked because the key combination was captured by the BIOS to run an interrupt routine in the operating system. Today, the “three finger salute” does a lot more than a restart. CtrlAltDelete is also used for everything from logging in to changing a password.

It’s loosely forwards-compatible with the old method. CtrlAltDelete now brings up a menu where the “Shutdown” button can be pressed, which then opens a dialog where you select the “Restart” function and click “OK”. Not so simple anymore! And not as effective on an unresponsive machine.

The additional functions are definitely not backwards-compatible, and it creates problems. I had a Linux box in the server room that was mysteriously rebooting, and everything I checked looked okay. I finally figured it out one day while watching the Windows administrator fumble with the KVM switch. He kept switching to the wrong machines and hitting CtrlAltDelete to get the screen to come on. Of course, this was causing the Linux machine to faithfully reboot! Fortunately, I was able to disable the CtrlAltDelete reboot in Linux.

Speaking of Linux, it doesn’t bother with the nonsense of extending CtrlAltDelete past its original intent. To login, I simply enter my login information. To change my password, I simply run the change password program. If an application locks up, the window manager will let me kill it. No need to overload a single key sequence to handle everything.

One more CtrlAltDelete annoyance to mention. I like keyboard shortcuts, so when I want to leave my Windows machine, I hit CtrlAltDelete and then Enter, which defaults to locking the screen. Sometimes the dialog doesn’t come up quickly enough and my Enter keystroke is lost. Unfortunately, I’m in a hurry when I do this, so I don’t notice the mistake. I come back to a monitor that has gone to sleep. Thinking I will be typing into the Locked Screen dialog, I hit CtrlAltDelete followed by my password and Enter. By sheer luck, my password contains the letter “s”, which is the quick key for “Shutdown”.

Let me leave you with a quote from David Bradley, who invented CtrlAltDelete while working for IBM: “I may have invented it, but Bill made it famous.” I doubt Bill saw any humor in that comment.

Ancient Wisdom

June 18th, 2005

Chinese ProverbThe Tao Te Ching is an old book probably written in the sixth century by Lao Tsu. It is about ancient Chinese philosophy that says to accept what is in front of you without wanting it to be something else. Or simply put, just be.

There are many translations of the Tao Te Ching (only the Bible has been more frequently translated), but I chose the one by Gia-Fu Feng and Jane English. Along with the English translation, the book has typography of the original Chinese text set on beautiful black and white photographs.

On the right, I scanned in a verse that has particular salient meaning. If you are having trouble understanding it, try tilting your head sideways to the right.

Okay, maybe it didn’t really come from the book! :)

SymLeak

June 1st, 2005

Symbolic links, or just symlinks, are a nice way to link to a file or directory in the Unix file system. For example, you might install software in a directory called “fuzzy-wuzzy-1.2.3″ and then create a symlink called “fuzzy-wuzzy” that points to it. That way, you can just use the symlink, and when the software is upgraded, the same symlink can reference the new version.

But symlinks are an abstraction that make it seem like the same file or directory is in multiple places at once. When the abstraction is not complete, and it fails in a situation, it is said to “leak”. Let’s look at symlinks a little closer.

Let’s say you are migrating from fuzzy-wuzzy version 6 to version 7. The new version has many new features, so you decide to run both versions in parallel until the users can switch over. But there are some common files between the two, so instead of making copies of the common files, you use a symlink, like this:

/fuzzy-wuzzy-7/common -> /fuzzy-wuzzy-6/common

You have a symlink named “common” that lives under the directory “fuzzy-wuzzy-7″ and references the directory named “common” in “fuzzy-wuzzy-6″. Now, say you run these commands:

cd /fuzzy-wuzzy-7/common
cp datafile ..

You are trying to copy the file named “datafile” to the parent directory named “fuzzy-wuzzy-7″. But where do you suppose the file actually gets copied to? Yep, the file gets copied to the directory named “fuzzy-wuzzy-6″! Oops, you meant to modify version 7 and you accidently modified version 6! How awful of you. (I would never do something like this.)

While the “cd” and “pwd” commands respect the symlink, reporting a directory under version 7, you are really sitting in the version 6 “common” directory. And the “..” entry for that directory links to “fuzzy-wuzzy-6″.

So, the next time you want to use the “..” directory, remember that abstractions can leak, and absolute pathnames can sometimes be better. If you dislike the extra keystrokes, you can always use TAB (bash) or ESC-\ (ksh) to save some typing. Filename completion is your friend. Or, you can try to always be aware of parent directories that are symleaks, I mean, symlinks.

Overcompensation

May 27th, 2005

What is it about humans that makes us exaggerate and overcompensate? If I apply force to something and it doesn’t budge, I will next apply too much force and bust the thing to smithereens. I did that with a bag of chips once. As I grow older and wiser, I learn to make smaller movements, but many people don’t learn or they forget to apply that philosphy in new contexts.

I am tired of listening about gas prices on the news and people complaining about it. They drive around in their $50K SUVs, pick up $4 lattes at Starbucks, and complain that gasoline costs $2/gallon. Puhleez!

Let me explain it this way: If you adjust for inflation, gas prices are at a historic low. Believe it. In 2004, gas was about $1.88 per gallon, and in 1980 it was $2.87 after adjusting for inflation. After the low in 2004, the price per barrel rose from $20 to about $50, and people freaked out. If we had spread out the increase over 25 years, nobody would have noticed. But the market overcompensated, and so has our perception of what happened.

Besides the recent jump in price, another reason people think gas is expensive is because other things cost about the same now. This article has a chart of prices after inflation that shows how things like bannanas and eggs are cheaper in price while the price of other things rose faster than inflation.

Maybe I shouldn’t complain that people are complaining, because some good has come from it. The hybrid gas-electric vehicles are having some success. Especially, Toyota’s Prius. While Honda’s Insight is technically superior in gas mileage, it went too far with redesign. Prius is practical and cool, and it significantly outsold Insight. Small movements.

So while gas prices aren’t really as high as we think, let’s continue overcompensating by buying more fuel-efficient vehicles that will lead to alternate fuels. We’ll be better off for overreacting. Now, I wonder if I can convince my boss to overcompensate on my salary. Hm…

Tagging

May 11th, 2005

My buzzword sensor has found enough occurrences of people using the term “tagging” to investigate further. Tagging is just classifying things, but in the way that most people see the world instead of how scientific taxonomies distinguish it. When you get a highly collaborative, self-organizing community like the Web to start tagging, then you have something interesting called a folksonomy. And it’s the latest rage for social network websites.

For example, del.icio.us is a social bookmarks manager where you store and categorize your collection of links. Because links are tagged, you can find links that other people tagged with categories that interest you. Of course, bloggers have been using tags all along, tagging their posts, photos, and links automatically, because most blog software uses RSS/Atom. To manually tag things like links, people are using a new attribute of rel=”tag”.

The current fad is to measure the use of tags and display a weighted list, also called a tag cloud. It’s a list of popular tags, with the most popular tags receiving a larger font size and weight. Some examples of tag clouds are at Technorati, Flickr, Craigslist, and 43 Things. Perhaps we have gotten a small step closer to the semantic web.

C=64 Joystick for your TV

May 4th, 2005

LOAD “*”,8,1
SEARCHING for *
LOADING

If you just enjoyed a blast from the past, then have I got a new old toy for you. A joystick loaded with 30 Commodore 64 games, ranging from Impossible Mission to Summer Games, that can be played on your TV. A hot seller on QVC, it was designed by Jeri Ellsworth, a high school dropout and self-taught chip designer. She created the device for Mammoth Toys from her Yamhill, Oregon home. There’s an interesting writeup about her in a local paper.

Tom’s hardware did a review of the C-64 DTV that goes even further to detail some fun easter eggs. The article calls it an emulator, which is how most of the all-in-one device are done, but some web writeups claim Jeri’s device is running the software natively. People have figured out how to add a keyboard and 1541 disk drive to the joystick.

Hot Shot

April 27th, 2005

Time for this week’s safety briefing. Remember, kids, always blow out the flame on your shot before drinking it. If you don’t… well, you could end up like this poor sap.
Read the rest of this entry »