Recommend fail

Amazon:

We recommend: Pony 8510BP Cabinet Claw (2-Pack)

by Pony
http://www.amazon.com/dp/B0000224BN/ref=pe_ar_x1

List Price: $73.77
Price: $54.39
You Save: $19.38 (26%)

Recommended because you purchased or rated:
* Align-Rite DG-101 Drill Guide with 3/16-Inch Holes for 12-Inch Drawers and Doors


New business idea: a collaborative filtering engine that lets you, the user, customize the idiocy away. Actually, eTantrum’s music recommendation app (Linux version only) had sliders to control the weights of various things. Still an awesome idea.

Update: yeah, amazon lets you customize it too. I still want sliders though!

resize wtf

I get amused whenever I see another open-coded version of this in our codebase, a method for determining the resolution of a scaled-down image while maintaining aspect ratio:


while (x > targetx || y > targety) {
x *= 0.99;
y *= 0.99;
}

It’s pretty easy to discern that it will take a lot of iterations to accomplish this task. In fact I put it around 250 * log (x/x') where x’ is the target width. That’s maybe as many as 2000 FP multiplies depending on the difference in sizes between source and target image.

I guess computing the smallest scale factor and using it once was just too hard…

SF recap

I spent last weekend in San Francisco for a convention. Nope, not WWDC, or JavaOne. Angeline was giving a presentation at the American Diabetes Association conference, and I stole along. Here’s the breakdown:

day 1:
Landed in SF about noon localtime after many hours of flight. Took BART to the hotel, checked in and headed to the conference for registration. Then off to the Mission district for lunch at Tacqueria Can-cun, where the burritos are excellent. Too full and tired for dinner, we went to bed early.

day 2:
Walked around the city a lot, saw a 15-person “parade” in Chinatown. Homeless guy said of me, “I can tell, that guy is law enforcement.” Met DA for lunch at Mo’s grill, then chilled in the park. Homeless guy tried to sell us his “book” — aka stapled sheets of paper — of poetry. Saw several random people on the street not wearing clothes, and ballet dancers. Got a nasty sunburn.

Went to Sultan’s for Indian food – not bad, but the place was empty. Cheaper place next door, Naan & Curry, had all the business.

day 3:
Hopped on BART this morning, then took Caltrain to Mountain View. There, in the drab, continuous office park that is Silicon Valley, just a few blocks south of the Googleplex, is the Computer History Museum. Wandered through it taking pictures of computers from my childhood, and saw a demonstration of a Babbage difference engine.

Went to R&G Lounge in Chinatown for dinner with Ange, her sister, and a third doctor. Food was great but the staff was a little bit racist. (They are only serving the red bean soup to persons of East Asian descent now? And, “Fried noodles are crunchy. I recommend the soft noodles for you [, white guy].” WTF.)

day 4:
Met up with more doctors for lunch in the mall near the conference center. Quite good for food court.

Ange had her presentation at 5pm. I sneaked in with her sister’s badge, which I had to flash at Security. Thankfully, they didn’t ask why I had a girl’s name. Angeline gave an excellent talk though all way over my head.

Had dinner at Ame, very expensive but possibly the best food we’ve ever had. Sashimi, potato soup, black cod, braised pork cheeks, chocolate cake and rhubarb-strawberry pie were consumed.

day 5:
Sitting here on the plane back. Not writing complete sentences.

Some photos of computers are on my flickr stream.

Going to California

We’re in San Francisco this weekend through Tuesday. If anyone else is, or has suggestions of locations to visit, drop me a line.

Stepper motor


Stepper motor
Originally uploaded by bluesterror

For a future project, I pulled a stepper motor from an old 3.5″ disk drive and hooked it up to my Arduino. Turns out it’s quite easy to control these things: just periodically write bit patterns 1010, 0110, 0101, and 1001 to the 4 control wires and you’ve got a spinning motor.

I also baked six loaves of bread this weekend thanks to a cooking class on Saturday. I’m drowning in potential croutons.