Archive for the ‘Uncategorized’ Category

rssCloud Meeting Wrap-up

Wednesday, September 9th, 2009

I caught the audio of the rssCloud get-together in Berkeley tonight and it was very enlightening.

One of the first points brought up was the problematic subscription API. The subscription API requires that the endpoint live at the the same IP address as the system making the subscription request. Dave Winer’s response was basically “we can’t and won’t change the protocol because it’s too widely deployed”. He asked that anyone who wanted to change this fork the protocol. Unfortunately, the lack of flexibility in assigning endpoint URLs makes this a very difficult sell for larger organizations where outgoing and incoming HTTP requests are routed differently. I think this was a big mistake on Dave’s part here. There’s a great opportunity to fix the glaring holes in the protocol (those 7.5 million blogs on WordPress run the same WP rssCloud plugin that I do).

Some other interesting points were brought up, such as the lack of a block button (useless in a distributed web) and ideas for distributed identity. Tunneling was quickly brought up, but the discussion moved on just as quickly.

At one point, someone asked about rssCloud support in Atom. Dave Winer suggested using a namespace for the element and some discussion took place on it. I’m not sure who brought it up, but it will likely be blogged and Dave will point to it to make it official. Noone brought up the already-specified <link rel= tag as an alternative, unfortunately.

Another interesting item brought up was that WordPress will be supporting Pubsubhubbub as well at some point in the future. It was more convenient to support rssCloud first, so they went with it. Dave Winer and Matt Mullenwag joked that when they do, “just don’t say rsscloud is dead”.

More notes are available from @susiewee‘s live twittering.

Disable controls with a CSS-only glass panel

Monday, July 20th, 2009

Here’s a neat CSS-only panel that you can use to disable controls within a given <div> element.  It uses a position:absolute <div> within the container of controls you’d like to disable. The glass panel is positioned using CSS to overlap the controls, and set partially transparent to give the controls a disabled look.

Note that this only works in standards mode, <!DOCTYPE html>, due to IE’s painfully outdated quirks mode. Additionally, your container of controls needs to be styled as “overflow:hidden” to work around the limitations of the height expression and “position:relative” so the parent can become a CSS positioning parent.

Click here to view the demo (works in standards-compliant browsers + IE)

<!DOCTYPE html>
<html><body>
<style>
.disablable {
position:relative;
overflow:hidden;
}

.disablable-disabled .glasspanel {
display:block;
position:absolute;
top:0px;
bottom:0px;
opacity:0.4;
filter:alpha(opacity=40);
background-color: green;
height:expression(parentElement.scrollHeight + 'px');
width:100%;
}

.disablable-enabled .glasspanel {
display: none;
}
</style>

<button onclick="document.getElementById('control').className='disablable disablable-disabled';">Disable</button>
<button onclick="document.getElementById('control').className='disablable disablable-enabled';">Enable</button>

<div id="control" style="border: 1px solid black;">
<div></div>
These are the controls to disable:
<br>
<button>Hi!</button>
<select><option>Option 1</option><option>Option 2</option></select>
</div>

<button>Won't be disabled</button>
</body></html>

Phone number birthday paradox

Friday, July 10th, 2009

After receiving my Google Voice invite tonight and picking a phone number, seemingly at random, I discovered that I had picked a number with the same last four digits as one of my friends’ numbers.  If you are familiar with the Birthday Paradox, you might recognize the form of the problem.

So, what are the chances that given a number of friends, n, you don’t pick a number that ends in the last four digits as the number of another friend? Well, if it’s just you, the probability that you pick a number that noone else has is 1. With a single friend, the chances that you pick a safe number are 9999/10000. With two friends, the chances are (9998/10000) * (9999/10000), modeling it as on trial after another.

It turns out that you can expand this sequence out and wrap it up in a nice factorial equation. I won’t bore you with the details- it’s idential to the technique used on the wikipedia entry. You’ll end up with the following equation:

MSP2161196baa63hdig2faa000026gb7fb33bga0a10

While having the equation on hand is nice, computing BigInt-magnitude factorials is outside Google’s math evaluation query and Apple’s Calculator application. Fortunately, Wolfram Alpha comes to the rescue (the first time I’ve been able to use it for a real question!):

Enter “10000! / (10000^n * (10000 – n)!)” and you’ll get a detailed analysis of the equation, along with a pretty graph:

MSP295196bcfa23i9b66c000002f97g8i43e74273h

After some research, I figured out how to limit the plot to get a better idea by using the “from” keyword: 10000! / (10000^n * (10000 – n)!) from n=0 to 300:

MSP333196bcb4a0a96dfb60000484f999622iiaf47

So, as you can see, if you’ve got 120 friends, your chances are pretty much 50/50 that you’ll have the same last four digits as one of them.

Fantastic Rainbow in Calgary #yyc

Wednesday, July 1st, 2009

Check out the double rainbow from today’s weather. Fantastic!