Archive for September, 2006

Can’t Unsubscribe

Saturday, September 30th, 2006

Is there a new trend for mailing lists to stop supporting unsubscribing?

I don’t like that Seapine added me to their mailing list, but it’s most annoying that I can’t unsubscribe from it. There appears to be an Unsubscribe link at the bottom of the message, but it doesn’t link to anything:

<A href=”">Unsubscribe</A> if you do not want to receive email communications from Seapine.

I’m also getting weekly updates on sports news on South Carolina Gamecocks, and those message contain no mention of unsubscribing. For Seapine, at least I did get a eval product at some point, but I can’t figure out how I got on the Gamecocks list. Maybe it was a practical joke by someone who knows I’m a Clemson graduate (archrival of South Carolina).

I’ve been trying to Bounce these messages, but they haven’t gotten the hint, yet.

Time for a Bigger TV

Wednesday, September 27th, 2006

After my continuing procrastination over getting a big screen HD TV, Bonnie couldn’t resist taking this pic of Scott, Serge and I watching the Ohio State game last week-end at Hyco Lake. The game was still fuzzy even with the tinfoil on the rabbit ears.


Watching game on small TV

From Hayseed to Ubergeek

Tuesday, September 12th, 2006

What a journey! From being labeled a “hay seed” [sic] by an anonymous blog commentor to being recoginized as a “ubergeek” in print by the Raleigh News & Observer. The G.D. Gearino column in today’s paper traces his steps to track down my gender-neutral first name analysis that a fellow reporter somehow got whiff of at a bar or party.

I don’t know who leaked the exercise, but now it’s out there. I used the Wake County registered voter database to analyze gender distributions of various first names to see which one was the most gender neutral. Of course, there are lots of ways to measure neutral, but I used the statistical definition of independence, looking for the name whose female/male ratio was most similar to that of the population (53% female) with the smallest confidence interval. Casey was the top name followed by Carey.

I explored the time component, but didn’t factor it into my analysis. Just as names go in and out of favor they also change genders over time. For instance, Morgan was more male, but these days it’s more female. That is, an older voter named Morgan is likely to be male, and a young voter named Morgan is likely to be female. Most neutralish names move toward female. The only names that I remember going from female to male over time were Frankie and Robbie.

Orange County doesn’t seem to have voter names on-line — just summary statistics by precinct.

Google Code Jam 2006

Thursday, September 7th, 2006

I competed in the Google Code Jam this week, but failed to make it through the qualification round. It looks like there were five divisions containing about 1000 competitors each and 200 from each division qualifying for the next round. Each division had different but similar problems, one worth at most 250 points and the other worth at most 750 points, with scores depending on how long it took you to submit a solution. Contestants were given an hour total to submit solutions.

The first problem was fairly easy, and was basically to minimize K + N/K for a given N ≤ 1,000,000. I probably wasted too much time being careful and double-checking things and solved it in 15 minutes or so. Instinct told me to set K to sqrt(N), but I took the time to take the derivate with respect to K and solve for zero. The only trick, I think, was to check nearby values in case of integer rounding weirdness.

The 750-point problem was pretty hard and was to count the number of ways to place K bishops on an NxN chess board, N ≤ 8, given a set of disallowed squares. A number of errors derailed my effort, but I almost got my brute-force solution working before the rest of my hour was up, but even then it wasn’t fast enough on larger boards. Solutions had to run in under 2 seconds for each invocation.

I later sped up my solution off-line. First I used bitboards throughout, getting the 7×7 case under a seconds and the 8×8 case down to 35 seconds. Then I changed from iterating over rows to iterating over diagonals and got the 8×8 time down to 8 seconds. Other tricks shaved off another second or so, but I found the real trick only by looking at successful solutions: memoization.

The other divisions’ 750-point problems I looked at also required memoization, but maybe it was more obvious in their non-chess problems. Only 31 coders succeeded at that problem in my division, whereas over 100 got it in each other division.

I was #221 in my division — guess I should have done less testing for the easy problem. Actually, the best strategy in general would be to do the hard problem first, and save 10 minutes for the easy problem as a back-up. If you only solve one problem, you have to solve the hard one or solve the easy one very quickly to qualify.

I thought the TopCoder contest framework was pretty good, though the primitive online IDE was biased against Mac users by supporting only the Control key for shortcuts like Copy and Paste. I really should have just done all my initial work offline and pasted it in when ready to run the built-in unit tests, but I wasn’t thinking it would matter that much. And it didn’t matter in this case, since I never did get a good solution, even afterwards off-line.

It was fun trying though, maybe I’ll try a few other TopCode contests.