“Two Generals’ Problem” doesn’t make sense

July 31st, 2007

Two armies are preparing to attack a city from opposite sides. The General of army A is orchestrating the attack, and has decided that they must attack simultaneously at noon on March 3rd to succeed. He sends a sealed, encrypted letter by messenger across the valley to the General of army B, informing him of the plan, but worries that the messenger might be intercepted, so General B may not be informed. (If the attack is not simultaneous, both attacking armies will be destroyed by the defenders.)

As it so happens, General B does receive the message, but knows that General A cannot be sure of this. He sends back a receipt of the attack plan. Then he wonders... will it go through? What if General A does not receive it and decides not to attack, being unsure of B's knowledge? And even if General A sends over an acknowledgment of the plan's receipt, there is no guarantee it will arrive.

Given this faulty communication channel, how will the generals coordinate their plan?

Read full entry »

Comment tokenizer algorithm

July 5th, 2007

The existing comment-tracking systems that I know of just aren't enough. CoComment is buggy and fails to properly parse out comments for a number of blogs, and is missing a number of important features. (Float unread to top of list, for example, or track a URL without visiting it.) Co.mments.com has a much nicer interface and tracks better, but lacks a Firefox extension and some of the advanced features of CoComment.

Rather than simply whining about the lack of excellent trackers, I want to help the existing ones improve. Here I present most of algorithm to parse out comments from an unfamiliar blog template.

Read full entry »