Friday, May 30, 2008

Bots and animals

Even though it is available since 2007, I haven't heard of Asirra until today, when I read someone's blogpost on spam.

Asirra is a database of pictures of cats and dogs. Each picture comes labeled with the type of animal it contains. You can't see the database directly; but you can access it through their webservice. The idea is to help fight bot spam by requiring the user to flag 12 images as either cats or dogs. I encourage you to test it out here.

I tried their demo and it is kind of cool. I didn't make any unintentional mistake in about ten tries and it is really quite a joy to look at the pets. Their academic paper is available here and it is a light read if you are interested in the details. In my opinion, Microsoft's researchers did quite a good job of analyzing the technical advantages and disadvantages of their scheme.

However, I believe Asirra will only remain safe if no high-profile website starts using it. Three million pictures is really not a lot, if you have the financial incentive to label them all. Furthermore, the database servers themselves could be compromised. Also, it is a poor business decision to rely on a single service that, at any time, may close shop or decide to charge a possibly absurd amount of money for their service.

All in one, I believe Asirra is a good alternative to CAPTCHAs for smaller sites or amateur projects and I hope the state of the art in the field advances well beyond the annoying text recognition systems we have today.

Sunday, March 16, 2008

"How I invented the personal computer, co-founded Apple, and had fun doing it"

It's been about nine months since I posted my last entry. In the meantime, a lot has happened. I graduated the Faculty of Computer Science from Iasi, Romania, I had a great summer holiday (except I fucked up my Ocaml summer project because of a lack of time), I got a scholarship for a computer science research master at ENS Cachan and I started my internship at LSV.

I now live close to Paris and, of course, it's quite nice. This blog post is about a book I bought and read more than a year ago (and which I'm re-reading right now). I bought it in the US, at the time when I was doing my second internship at Microsoft.

Steve Wozniak was on the Microsoft campus in Redmond to give a talk (I think it was part of the process of promoting his book). I went there, but the room was too small. It seemed that every other person in the campus decided to participate (ok, this is an exaggeration).

Anyway, frustrated I couldn't find a place, I decided to buy the book anyway, and try to see the cast online (which I couldn't, due to technical problems). I'm sorry even now that I didn't have the inspiration to go earlier, to get a seat.

Anyway, the book is simply awesome. It's written by Steve Wozniak (with Gina Smith). I'm not sure about the "official" title, but the cover reads something like this:


How I invented the personal computer, co-founded Apple, and had fun doing it


I knew a little history about Apple and Steve Wozniak and Steve Jobs, but to read it from Steve himself was really cool.

He starts by describing how his father would teach him electronics at a very early age and how much this mattered to him:
"He pulled out a blackboard from time to time, a tiny little blackboard we had in our house on Edmonton Avenue, and when I asked, he would answer anything and make diagrams for it. I remember how he showed me what happened if you put a plus voltage into a transistor and got a minus voltage out the other end of the transistor. There must have been an inverter, a type of logical gate. And he even physically taught me how to make an AND gate and an OR gate out of parts he got -- parts called diodes and resistors. And he showed me how they needed a transistor in between to amplify the signal and connect the output of one gate to the input of the other.

To this very moment, that is the way every single digital device on the planet works at its most basic level.


It's amazing, really, to think that my dad taught me about transistors back when almost no one saw anything but vacuum tubes. So he was at the top of the state of the art, probably because his secret job put him in touch with such advanced technology. So I ended up at the state of the art, too."

There are books you read, and they forever change the way you think. For me, this was one of those books. Aside from the historically interesting technical content, the book also excels in entertainment value. Wozniak describes some of the pranks he loved to pull:

"I got the idea to build a little electronic metronome -- you know, the thing that goes tick, tick, tick, to keep time when people take piano lessons. I built it, heard the ticking, and thought: Hey this sounds like a bomb. So I took some batteries, took the labels off the batteries so they looked like plain metal canisters, and I taped them together. And then I wrote in big letters on it: CONTACT EXPLOSIVE.

I thought: Oh, this will be funny. I'll stick it in Bill Werner's locker. I just happened to know his locker code. Bill's locker was near mine so I put my so-called electronic metronome in. Now, this was in the morning before school, and after I put it in there, I could barely hear it ticking. Nobody was going to be tricked by this if they couldn't even hear it! I'm thinking: What a bummer and what a waste if this thing isn't going to work. But when I came out of my last final that day, my counselor walked up to me and said: "Steve, the vice principal wants to see you in his office." This was a bad sign. [...]

And the principal starts telling me how the English teacher, Mr, Stottlemeier, had heard a ticking sound in the locker. The principal, Mr. Bryld, told me how he opened the locker, clutched the device to his chest, and then ran all the way out to the football field and dismantled it!

I started laughing, even though I was trying not to, so then I tried to cough to cover it up. But I couldn't even do that, because I knew I had rigged the metronome with a switched resistor to start ticking faster when someone opened up the locker door."

I'm not going to ruin the pleasure you'll get reading this book by quoting more stuff. I'll let you enjoy the chapters on TV jamming, phone phreaking, creating the Apple I and II, crashing a plane and other delicious topics ;-)

Even if you do not understand computer science or maths or physics, I think you will appreciate this book and I hope you enjoy it as much as I do.