11.04.08

I nominate Fivethirtyeight.com

Posted in Uncategorized at 11:10 pm by ducky

I nominate fivethirtyeight.com for a Pulitzer Prize for their absolutely outstanding electoral poll coverage.

09.17.08

Good deeds remembered

Posted in Random thoughts, Uncategorized at 11:15 am by ducky

Twenty-five years ago, I was 19 and working in Delft, Netherlands for a summer. I don’t remember exactly how it happened, but I ran low on cash a week before it was time to go home. This was before ATMs, so it was tricky to get more. There were no places in the Netherlands that would advance me cash on my Visa, but I heard that there was in Brussels.

I took some of my dwindling supply of cash, bought a ticket to Brussels, and discovered that the place I needed to go wasn’t open. (Maybe I had been foolish enough to try on a Sunday? I don’t remember.) Worse, I was about USD$0.50 short of the fare I needed to get back to Delft.  I asked a stranger for 50c, he handed me a buck and I immediately took off to the ticket counter and got a ticket.

When I got my ~50c change, I realized I should have given it back to the stranger.  Ooops.  But he was lost in the crowd, so I instead got myself an ice cream cone — the only food I’d had all day.

I think he spotted me a bit later, eating the ice cream cone.  I was embarrassed to have him see me eating the cone, so I hid my face.  He probably figured that he’d just been had.

So Mr. Stranger?  Whoever you are?  If that was you 25 years ago in August in the main train station in Brussels, I wasn’t a runaway or drug addict or anything — I was exactly who I said I was.  To this day, I remain very grateful for your generosity on that day.  The buck might not have meant a huge amount to you, but it made all the difference in the world to me.  Thank you.

08.24.08

dogs rolling in stinky stuff

Posted in Uncategorized at 9:23 pm by ducky

I don’t think I’m the only one who thought it was odd that dogs like to roll in stinky stuff, even feces. This seemed like a bad idea — it would let their prey smell them from afar, right?

I just came up with a hypothesis for why dogs roll in stinky stuff: as defense against other biting animals (including other dogs). If dog A is covered in feces, and dog B bites dog A, then dog B might get sick from the feces. This might discourage dog B from biting dog A.

Yes, it is true that if dog B bites dog A, then dog A could get fecal material in the bloodstream from the bit, but if dog B punctures dog A’s skin, dog A is already in a heap of trouble. We forget, since modern antibiotics are so good at eliminating infections, that infections are A Big Deal. (For example, Calvin Coolidge, Jr. died of an infection from a blister!) So it might be that its use as a deterrent is worth the extra risk of greater infection.

So why don’t cats roll around in stinky stuff? Perhaps because cats fight with their claws, while dogs fight with their mouths. If cat A rolls in feces, and cat B scratches cat A, then cat A is at higher risk for complications, while the feces pose no risk for cat B.

07.29.08

geek cool alert: Triage

Posted in Hacking, Technology trends, Uncategorized, programmer productivity at 11:01 am by ducky

There’s a cool paper on a tool to do semi-automatic debugging: Triage: diagnosing production run failures at the user’s site. While Triage was designed to diagnose bugs at a customer site (where the software developers don’t have access to either the configuration or the data), I think a similar tool would be very valuable even for debugging in-house.

They use a number of different techniques to debug C++ code.

  • Checkpoint the code at a number of steps.
  • Attempt to reproduce the bug.  This tells whether it is deterministic or not.
  • Analyzes the memory by walking the heap and stack to find possible corruptions.
  • Roll back to previous checkpoints and rerun, looking for buffer overflows, dangling pointers, double frees, data races, semantic bugs, etc.
  • Fuzz the inputs: intentionally vary the inputs, thread scheduling, memory layouts, signal delivery, and even control flows and memory states to narrow the conditions that trigger the failure for easy reproduction
  • Compare the code paths from failing replays and non-failing replays to determine what code was involved in that failure.
  • Generate a report.  This gives information on the failure and a suggestion of which lines to look at to fix it.

They did a user study and found that programmers took 45% less time to debug when they used Triage than when they didn’t for “real” bugs, and 18% for “toy” bugs.  (”…although Triage still helped, the effect was not as large since the toy bugs are very simple and straightforward to diagnose even without Triage.”)

It looks like the subjects were given the Triage bug reports before they started work, so the time that it takes to run Triage wasn’t factored into the time it took.  The time it took Triage to run was significant (up to 64 min for one of the bugs), but presumably the Triage run would be done in background.  I could set up Triage to run while I went to lunch, for example.

This looks cool.