Sunday, August 21, 2005

static typing is unittesting

I'm surprised when people advocate unittests while disliking static typing. From pythonforum:
IMHO it helps to think about static typing as a special kind of unit tests. Like unit tests, they verify that for some input values, the function in question will produce the correct output values.

Saturday, August 20, 2005

assert 2*2 == 5

I just realized that in Java, assertions are disabled by default. That is not unlike advertising a safety lock on a gun and then, on page 17 of the manual, providing instructions on how to enable it. Performance considerations or RTFM don't provide an excuse: this is just bad user experience.

Thursday, August 18, 2005

Procyon Lotor

When I grew up, racoon was an exotic animal. I went to the zoo to see racoons -- they looked smart and were almost as exciting as tigers and zebras (stripes are really cool when you are seven years old.) Both English and Russian names for the animal sound funny (Russian name, енот, has an unusual phonetic structure.) As a teenager, I listened to "Rocky Racoon", although I didn't quite understand what it meant.

When I drive by the trash bin at night, I often see a couple of racoons there. What a letdown.

SHA-(n+1)

There is an even faster attack on SHA-1. It's major news for cryptanalysts. But why do I have to care? Choosing a hash function is orthogonal to other system decisions. Why is it not possible to transparently upgrade the hash function on all the computers in the world, once a replacement is designed and before the attacks become truely practical?

Enabling graceful software evolution would help address many security problems. Cryptanalysis can be done by small team -- making systems evolvable requires coordination by large companies. Unfortunately the problem is more political than technical.

Wednesday, August 17, 2005

The Humane Interface

I've been reading Jef Raskin's "The Humane Interface" with mixed feelings. On the one hand, Raskin's Laws of Interaction should decorate every office of every computer company.
A computer shall not harm your work or, through inaction, allow your work to come to harm.
He is just right: about getting rid of all the modes, unlimited undo forever, file systems as a broken metaphor etc. It's funny how most of commercial UI goes in exactly the wrong direction -- with more chrome and less efficiency. Unfortunately Apple is moving in this direction to, with the most recent dashboard fad.

On the other hand it doesn't help that the book is badly edited and he jumps from topic to topic all the time. And it doesn't help that from time to time he's wrong. For example, suggesting that the user types just the password instead of username/password, and that the passwords would be system-assigned, is ridiculous. First, nobody would use a system rude enough to prevent them from picking a password. Second, to be both secure and memorable, the system-assigned passwords have to be long, which negates the savings of not having to type the username in the first place. The correct solution is simple: use two-factor authentication, with a token (such as a smartcard) that knows your username so you just have to type in the password.

Unfortunately I can't play with Archy since there's no Mac version. But there's a problem, right in the first paragraph:
a system that effortlessly boosts your speed and productivity by 20 percent or more.
20 percent is not big enough to make me switch. Revolutionary technologies must offer a 10x improvement to be successful. I hope that the Humane Interface catches on nevertheless.

Friday, August 12, 2005

vi users, rejoice

Mac OS X 10.4 allows you to reprogram modifier keys in the "Keyboard and Mouse" control panel. Evil CapsLock key, you are a "no action" from now on!

Sunday, August 07, 2005

Ctrl-Alt-Del hell

I connected a USB mouse to my parents' 3-year-old Windows 98 computer. It started freezing, first two minutes after boot up, then thirty seconds, eventually stopped working at all. Msgsrv32 [Not responding] is self-explanatory.

In safe mode, at least the keyboard worked. Using the keyboard shortcuts, I've unistalled the Logitech driver, which I had no business installing in the first place. It appears to work better, although the mouse just froze again.

This post can end in one of two ways:

I can mention that I need the USB mouse so I can plug into a KVM switch which would allow me to gradually transition my Mom to a Mac mini. This would imply that switching to a Mac would be a solution to software quality problems -- unfortunately that isn't true.

Or I can write that dealing with a screwed up Windows 98 install is a punishment for writing buggy code over the years. It isn't, really -- it's yet another reminder that our tradeoffs are wrong. I'll pick correctness over performance in most applications -- definitely in a mouse driver.