Sound advice - altblog

Tales from the homeworld

My current feeds

Sun, 2005-Jun-26

Statistics is complicated

Mark Greenaway writes:

If there's a probability p that something will happen when doing something once, then the probability of it having happened after having done it n times is 1 - pn. So there's an exponentially decreasing chance that you'll evade the risk you've been taking, every time you take it.

While the maths may be sound, the conclusion is not.

When you toss a coin it is unlikely that the next two tosses will both result in heads: a 1 in 4 chance. It is less likely that that you will toss four heads in a row: 1 in 16 chance. This is where it gets complicated, though. If you've already tossed two heads, that sequence of four heads is back down to 1 in 4. You've already traversed several of the unlikely possibilities and made them certainties. You now only have to traverse two more tosses and three unfavourable possibilities.

Every time you toss an unweighted coin there is a 50% chance of a head, and a 50% chance of a tail. The coin doesn't have a memory. It doesn't say "well, we're about due for a tail now". Even after a million tails, you still have a 1 in 2 chance of getting another tail. The sequence overall is unlikely, but the final toss is not.

The upshot is that while you can predict someone's risky behaviour will end in pain should they continue and even calculate the odds, the act of surviving the activity does not mean their end is closer or more likely than it was before. Statistics isn't relevant when it comes to this sample size of one. This is balanced by the fact that when someone dies due to risky activity the chance of death becomes a certainty, just as a survivor's chance drops to zero. Everyone who lives gets a fresh slate.


Sun, 2005-Jun-26

Google: ccm how to print out all my working tasks continuus

Search link

I've been interested by the number of google hits I get to my site that aren't relevant. Every so often I take a look at recent queries. This section of my blog is a small attempt to improve relevance for people who are visiting my site for all the wrong reasons. I may or may not do this again, and I may or may not accept further inquiry via email.

This entry's query was "ccm how to print out all my working tasks continuus". I don't have either CCM or a CCM manual in front of my to verify my syntax, but I think I can still help. CCM has a fundamental model of objects and relationships that in some ways resembles the Resource Description Framework (RDF). Tasks are a type of object in the database, so can either be accessed by the general ccm query command or via the ccm task commands. For DCM-enabled databases, task object names take the form


This form itself is derived from the general object form of


Maybe URI-based scheme would have been better, perhaps "ccm:/<dbid>/task/<task-number>" and "ccm:/<dbid>/object/<object-name>/<object-instance>/<object-version>". Well, that's by the by.

The simplest answer in this case would have been something like

ccm task -query <somehthing-or-other>

but I don't use that form myself very much and don't remember the precise syntax. The form I would actually use is:

ccm query -t task -s working "assigned_to = '<me>'"

That should pretty much do it, assuming "working" is the right name for this task state. It will come out as an object list. You can use -u to drop the numbers, and -f "..." to format the output as you like. "ccm attr -l @<query-result-row-number>" will show you the attributes a particular task object has that you can use in the -f string.

Well, I hope that little snippet will be useful to someone :)


Sun, 2005-Jun-26

I started to use a few weeks back to store my bookmarks. Most of what I bookmark is technical, and I don't feel any need to keep it secret. In fact, I have the vague hope that it be useful to people who read my blog.

At first I was put off by the pretty basic user interface. The worst UI crime, I think, was a page that I can't find now. It was a several-screen-length piece of prose presented to me as my registration completed that offered at least three apparently-equivalent methods for posting new links as well as going into far too much detail about what the site was about and how it should be run. I just wanted to store my bookmarks in there and I didn't need the aggravation.

That said, I've been quite happy with the effects of so far. Yesterday on IRC someone raised the question of whether you could do GUI programming with python. It was trivial to be able to point them at my PyGTK links. It's also easier to make sure that the bookmarks I have at home are available at work and vice versa.

The main joy for me is that once you're over the initial hump you don't have to deal with the actual web pages too much. The post link is a bit of javascript that jumps you from a page you're looking at to the delcious post with all field except the tags filled out for you. Tags themselves are easy to select from your own list of tags, or the list of suggested tags for the page. I've been struggling a little bit with the other side of things, though, the bookmark lookup.

That changed with the wonders of rss and mozilla. Here's the procedure:

  1. Open your page for a particular tag
  2. Notice the rss button in the lower-right-hand corner of your firefox window
  3. Select "Subscribe to 'RSS feed of ... boookmarks'" (not to tags). This opens a dialogue box.
  4. Cut the name down to something appropriate, say just the tag name
  5. Create in "Bookmarks Toolbar Folder"

Hey, presto you have your bookmarks back in your bookmark folder again. You can even use mozilla's "open in tabs" feature to get to your favourite reference material.