Tag Archives: software

thoughts about particular software products

Reinventing the sixteen-sided wheel

I found this while Googling for the way to convert an integer to hex in JavaScript. Not only is it basically unreadable code, but it’s stupid: this functionality is built in to the language — just pass the desired base into the toString() method:

i = 255;
i.toString(16); // 'ff'

But who am I to contradict about.com and “Stephen Chapman, your Guide To JavaScript?”

Update 2008-01-20: about.com has updated the page linked above and removed their long, obtuse code, in lieu of our friend toString(). Keep up the good work!

Impromptu OS wireless comparison

Two of my housemates knocked on my door together a while back. They wanted help getting their computers on the house’s WEP protected wireless network. I pulled out my Ubuntu 6.10 laptop and sat on the couch with them, after writing down both the passphrase and the 26-character hex passphrase on a piece of paper.

Continue reading

A Receipt

Why do you get a receipt when you go to the supermarket? Why does your credit-card company send you a monthly statement?

Imagine when you were rung up at the supermarket, the cashier simply declared the final total that you were owed. Imagine you were expected to just pay the total and walk out, without a receipt. You might trust your neighborhood grocer, but do you trust them enough to participate in a transaction like that? Continue reading