Citation spotted

We interrupt this blog for a moment of self-congratulation…

I was checking google to see if anyone had made any links to a directory on my web server I was considering deleting, and I discovered a link to a lampoon article I wrote on the RIAA back in 2002, RIAA sues makers of black magic markers, from an unlikely source, the prestigious (because they cited me) Rutgers Computer & Technology Law Journal. Their article Harmonizing fair use and self-help copyright protection of digital music cites my spoof as one of three thorns in the side of the RIAA. Yes, they got the joke, and no, I did not actually read their paper before posting this entry.

Damn, now I have to maintain that link. 🙂

Don’t buy recycling code 7 products

You learn something new every day.

While investigating Bisphenol A and trying to figure out what bottles I owned contained it, I came across an article on the seven resin identification codes (or “recycling codes”) put on the bottom of plastic containers. I had always assumed that if a container had the recycling symbol on the bottom that it was recyclable. As it turns out, that’s not always the case.

Resin code 7, even though it is commonly drawn as a 7 within the chasing-arrows recycling symbol, is never actually recycled and ends up in the landfill. Code 7 means “other plastic”, which means its not one of the typically found 1-6 plastics, or its a combination of plastics.

And even though resin codes 3-6 are recyclable, not all municipalities will recycle them. Check with your local recycling authority to see if they accept products with resin codes 3-6. But even if they do, according to this article, they might not actually do anything productive with it–they might just be putting them in a separate pile until they figure out what to do with them.

The only guaranteed guilt-free plastics you can buy right now are ones with resin codes 1 and 2. So next time you’re in the store and looking at a plastic product, check the bottom. Give preference to products using type 1 and type 2 plastics, and definitely do not buy type 7 plastics.

Unknown password requirements prompt phone call from the bank

My debit card uses Verified by Visa, a service where online purchases through member banks ask you for a password to complete the purchase. One problem with this service is they have some lame password restrictions (a-z, A-Z, 0-9, no special characters) so I can’t use my “common” set of passwords with the system, and I don’t use the system often enough, therefore I’m always “forgetting” my password.

So I just did a transaction with a domain registrar in France, failed the password check, reset my password, and then completed the transaction. Two minutes later I got a phone call from Visa wanting to verify that it was in fact me who performed the transaction. It all could have been avoided if they had just posted their password requirements when you go to login. I wish all websites would post password requirements on their login screens.

I don’t think posting password requirements would be that big of a security risk, since if you’re trying to break into the system you probably figured the requirements out through other means (like another account you created on your own, or bozos like me that post the password requirements elsewhere–see above). Almost every single time I have to click the “forgot your password?” link on a login screen I didn’t actually forget it–I just couldn’t figure out which password I had used because I didn’t know their password requirements. It usually goes like this:

“Oh yeah, this is the site that only allows letters and numbers, and you have to have at least two of each. I want these last two minutes of my life back thank you.”

Sometimes they add insult to injury by forcing me to change my password when I click on the “forgot your password” link. When I pick a “new” password I end up discovering my old password when they say, “your new password can not be your old password.”

Grrrr!!!

How do you define reentrant code?

I’ve found several places around the net where claims are made that Lua is reentrant, but I just found a case (on my platform at least) where Lua is not. I discovered a bug in our system where Lua was being preempted right in the middle of a number to string conversion and the end result was invalid. (Of course, this only occurred about 1 in 200 runs of the code, which made it challenging to figure out what was going on).

The number to string conversion is performed with sprintf(), and sprintf() is not required to be a reentrant function. I’m sure it is on major platforms (Windows/Linux) but unfortunately it is not on ours.

The problem occurred when this sequence of events took place:

* Thread 1: Call Lua, Lua calls sprintf()
* Thread 1 is stopped within sprintf()
* Thread 2 is started
* Thread 2: Call sprintf()
* Thread 2 is stopped after sprintf() completes, Thread 1 resumes

Lua script like this would frequently exhibit the problem:

for i=1,10,1 do
local string = foo .. i
end

The concatenation operation would result in foo + bar instead of foo + i, where “bar” is a fragment of the sprintf() operation left over from Thread 2.

A possible fix for this would be to have Lua use an ftoa() implementation instead of sprintf(). However I fixed it in our case by simply not performing sprintf() in the second thread (this issue was isolated to one portion of our execution fortunately).

If your code is “proven” to be reentrant, but you rely on another library that is not proven, can you still claim your code is reentrant?

Kinesis Freestyle is the best keyboard I’ve ever used

I’m going to “officially” endorse a product that I use, and love to use: The Kinesis Freestyle USB Keyboard is hands-down the best keyboard I’ve ever used. I’ve had the keyboard for about 6 months now and I’m 95% satisfied with it.

There are two things I like most about the keyboard:

1) Ultra-low force keys. The keys on the Freestyle are really easy to depress, but they still have a lot of spring to them and the perfect throw distance.

2) Low profile. There aren’t that many adjustable ergonomic keyboards available that are low profile. I have a hard time typing without resting my forearms on my desk, and a low profile keyboard allows me to do that without bending my wrists back too much.

There’s only one thing I don’t like about the keyboard: The position of the Windows key. (I hate the Windows key. I don’t know why, I just do. I wish it wasn’t on any keyboard.) I wish the key was more off to the side, because I find myself hitting the edge of the Windows key when I’m trying to hit the Alt or Ctrl keys. If I could reprogram the keyboard to make the Windows key a second Ctrl key I’d be 100% satisfied with it.

A note to Kinesis: I almost didn’t buy your keyboard because of this stupid ad you put on YouTube. In it you make fun of the Key Ovation GoldTouch Keyboard. The GoldTouch is my third favorite keyboard*, and I thought it was highly unprofessional of you to trash your competitor in that fashion. What did they do to deserve that? Did the GoldTouch team noogie you at the ergonomic products convention last year or something?

* What’s my second favorite keyboard? The keyboard on the Aluminum 12″ PowerBook G4!