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.

Benjamin

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

task<task-number>,1:task:<dbid>

This form itself is derived from the general object form of

<object-name>,<object-version>:<object-type>:<object-instance>

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 :)

Benjamin

Sun, 2005-Jun-26

del.icio.us

I started to use del.icio.us 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 del.icio.us 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 del.icio.us 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.

Woot

Benjamin

Tue, 2005-Jun-21

Indianapolis '05

Well, what a race.

It was pretty exciting seeing six cars circulating around the track. One was emitting smoke from the starting line, so we all hoped to see attrition. The two Ferraris almost took each other out at the end of the second round of pit stops. That was exciting. Seeing water bottles explode on formula1 tyres and marshalls scooting across the track to retreive beer cans was a hoot.

My favourite part of the grand prix was a Michelan ad. Its slogan "A better way forward" really seemed appropriate.

So, my take?

As far as the sporting side goes, if Michelan has been able to squeeze extra pace out of their cars and give their teams an advantage by undertaking a stragegy that risked this kind of situation then Bridgestone teams have the right to see a reward for their conservatism. As for the race, it should have gone ahead and everyone agrees on that. It's just that noone can agree on how it should have gone ahead.

You can't just add a chicane to a race track less than twelve hours before the event and after final qualifying. You can't allow the Michelan runners to take points after a failure of this magnatude, nor can you allow them to interfere with the Bridgestone cars. In that sense the actual outcome serves the sporting competition better than any alternative... but to have a six car race in such a senstive place in the world and in this day and age of F1 is crazy. Should the Michelan teams have been able to use new tyres and start from the pit, and be awarded no points for their effort? I don't know. In the end, I don't see the points awarded to Ferrari on Sunday as a farce. They were earned through a better tyre strategy than those of their competitors.

The man I feel most sorry for is Tiago Monteiro who placed third. He deserved to enjoy his first and probably only podium for the forseeable furture more than he was really permitted to by circumstances. As for the politics, I'm sure the americans are furious and not just the fans. I'm sure that the FIA and the rogue teams will continue sniping. It's unclear who will bear more of the brunt: The FIA for not putting on a show, or Michelan for not coming to the track ready to race. A 70% retirement rate on the formation lap just doesn't look good anywhere or at any time.

Benjamin

Sat, 2005-Jun-18

Max Sharam - A million year girl - (11) Learning to let go

Max Sharam
A million year girl
Track 11: Learning to let go

I want to think you're on my side.
The world's work hasn't begun to be done.

Some people hold on to life so tight
that they squeeze the life right out of it.
Some people hold on to love so tight
that they squeeze the love right out of it.

Is it true?
Is it a catch-22?
Do only the dying know when to let go?
Is it you?
Is it the wind whistling through?
Do only the dying know?

Some people hold on to life so tight
that they squeeze the life right out of it.
Some people hold on to love so tight
that they squeeze the love right out of it.

You know I cried so hard?
cried so hard?
cried so hard?
You know I tried so hard?
tried so hard?
tried so hard?
To let you go.
To let you go.
To let you go.
I'm learning to let go.
To let you go.
To let you go.
To let you go.
I'm learning to let go.

If only good things die young
dying to find out about it.
Did I love you too much?
Did I love you to death?
I'm dying to know.

You know I cried so hard?
cried so hard?
cried so hard?
I'm learing to let go.
You know I tried so hard?
tried so hard?
tried so hard?
I'm learing to let go.
to let you go.
to let you go.
to let you go.
I'm learning to let go.
to let you go.
to let you go.
to let you go.
I'm learning to let go.

Like a tiger running wild.
Like an infant on a swing.
I'm clean.

If you were loving me right I wouldn't hold on so tight.
If you were loving me right I wouldn't need to learn to let you go.

Sat, 2005-Jun-18

The Nature of Conscious Thought

Philosphers have wondered for millenia about the meaning and nature of conciousness, or specifically of concious thought. As a software developer with no practical experience in congnative science, I thought I'd scratch my own theory together.

The brain seems to be divided into regions that basically each have their own purpose. These regions are connected to each other through a variety of interesting busses and interconntects. Science has followed on the heels of philosophy, searching for the home of consciousness and coming up empty. No particual region of the brain seems to be the home of consciousness. The brain keeps on working just about no matter which parts you knock of out of commission.

There is a fundamental assumption, I think, in the approaches taken so far. They asssume that consciousness is a unit. One that serves the function of thinking, of reasoning. The bit of the brain that really represents "me". I take a different view. It aligns more closely with the idea of conciousness as an emergent phenomenom, but I think is a fair middle road between the two.

I see conscious thought as something we experience. Everything else we experience is a sense, so my reasoning leads me to see conscious thought not as a whole process of rational thought. Instead, I see it as a passive sensory input (for as much as sensory input is passive). I see consciousness as "the sense of what my brain is doing", or "my perception of what I'm thinking".

The sense has its tendrils everywhere. It seems to be connected to everything. Perhaps the connections are made directly, or perhaps it is emergent from the interactions of system busses and interconnects. If I were to guess, I would say that this sense is centralised in the frontal lobe. That's the part of the brain we traditionally associate with inhibition, but perhaps another way of thinking about it is to say that it is the home of the sense that tells our brain it is behaving badly.

When we are drunk, we become disinhibited. We get fuzzy. We become easily confused because we don't know what's going on in our brain. This can become so advanced that we end up with no memory of the night. I see this not as a loss of memory, but primarily as a loss of the sense that would be recorded into memory. We assume we're still conscious because we're still moving around. We're still carrying on conversation, and perhaps sophisticated physical activities. My theory is that the brain doesn't need consciousness to perform those activitites. Consciousness is what closes the loop and lets the brain understand itself, but it is still a passive process. The real thinking and reasoning and acting is an entirely unconscious activity.

We have long been aware of some kind of "sub-conscious". It is most obvious in the reptillian brain that controls our breathing and circulation. We're not aware of the processes. They aren't part of conscious processes. It is harder to define when it comes to sub-conscious thought. We see theories that essentially tell us we have two brains. One does a lot of hard work in the background. The other is the "us". One we train, the other is what does the training. We are arrogant to think that of the two "us"s that we are the thinking and reasoning part. In fact, if we are to divide ourselves into two it is the subconscious that more "us". It is the thinking and active part of our brain. What we have traditionally thought of as consciousness is the combination of our consciousness sense, and the parts of the rest of us that we have sensory "wires" into.

I think that we can have some influence over the connections that are made between the consciousness sense and the reasoning engine of our brain. I think that inhibition is the classic example. We can stop ourselves reasoning in certain ways, if we understand the evil of those ways. We can exercise self-restraint, up to self-censorship. I think that there are some connections we have little control over, though. To examine my own mental processes, I am completely unaware of most vocal processes until the words pop out of my mouth. I'm more of a visual thinker. I'm aware of the reasoning processes that go into the formation of thoughts for speech, but the formation of words I find disturbingly hard to observe of myself. That is not to say they aren't what I mean. Those parts of my brain are well trained, and I don't often find myself saying things I don't mean. I do, however, find myself up in front of a group of people waiting for the words to come. I can't think ahead about what I'm saying, even to the end of my current sentance.

Benjamin

Mon, 2005-Jun-06

Why Pimp my Blog?

Nicolai noticed my previous post and noted that his own blog seemed to get plenty of interest from web browsers, and that for him pimping is probably not required.

I used to be in that boat, but as I've indicated I haven't been entirely happy with the amount of feedback I had been getting[1]. I'm looking for less in the way of quantity and more in the way of a focused technical set reading what I write. Otherwise for me it's like writing software that only I use. I know the quality won't be what I really want, but my care factor and self-editing are reduced when my ramblings are only for myself :)

As I recall, it was Andrae who put me on to it, but for actual non-feed readers of my blog I do keep track using an icon down the left side of the page. It currently sits just below my blosxom credit and if you click on it you can get quite an interesting traffic breakdown. Thanks Extreme Tracking.

Presently, it shows that over the lifetime of my blog I have averaged eight (8) apparently-unique hits per day, or two hundred and twenty two (222) per month. It hardly puts me on the "A" list shared by folk like Tim Bray or Miguel de Icaza, but it does give me some encouragement to keep putting pen to paper.

Interesting statistics:

Benjamin

[1] zero :)

Sun, 2005-Jun-05

Pimp my blog

In an effort to gain a wider audience for my blog I have been pimping it a little lately. I've posted comments to a few popular blogs I read. I've made some in-links accessable from my blog. I've joined technorati. I've even gotten around to moving my bookmarks to del.icio.us as another marketing scam.

I recieved my first email in quite some time over the blog last night, regarding the possibility of using SRV DNS records to handle ad hoc services. On first glance the definition of service assumed in the RFC has a different emphasis to the definition I would use. It seems that they would call http a service, whereas I would tend to think of it as a protocol. I would see something like myname_sqlite as a service, in this case one to look through the files of user "myname" and treat them all as sqlite databases to support SQL query.

The difference in emphasis may be inconsequential, however, if I can work out how to use this kind of lookup in a URI. I would prefer to use "http://localhost:myname_sqlite/mydb?myquery" (which as I mentioned previously is not a valid URI because it has non-digit port content) over "myname_sqlite://localhost/mydb?myquery" for obvious reasons. I want clients to understand which protocol to speak when they get to the relevant port. So far in my brief browsing I haven't found a definitive resource. Does my URI become "http://_myname_sqlite._tcp.localhost/mydb?myquery"? I'll have to look into this further. If a defined relationship does exist this may reinvigourate DNS in the small network environment for me, where NIS and LDAP rule alongside their more literal /etc/hosts and /etc/services file counterparts. I'll also have to look into the libc apis for this again. At first glance, this port information does not appear to be available from getaddrinfo(3).

Anyway, back to the pimping. The gentleman who contacted me appears to be a SLUG member. I've put a planet SLUG entry into my liferea feeds list to see what other interesting folk I might stumble across. This lead me to also look into Linux Australia's planet and wonder if I might be advised to request membership.

Surprisingly to me, I found I was already a member :) I must have missed that memo, as all planet HUMBUG members seem to have made their way there. I'm pleased at the outcome but a little but put off by my lack of fore-knowledge.

Anyway, off to do more pimping...

Update:
On second reading of the gentleman's email, I notice that the URI scheme would just be a matter of host aliasing. My sample URIs above could be made to look like "http://sqlite.myname.localhost/mydb?myquery" in combination with the DNS record
_http._tcp.sqlite.myname.localhost. IN SRV 0 0 1717 localhost.
Very nice, indeed. With a dynamic edit of bind's configuration at application start-up it should be possible to access these ad hoc services in an entirely appropriate and convenient manner. Compliant clients would resolve their http URI to port 1717 of host 127.0.0.1. So long as the DNS changes can be propagated to relevant clients (and remember we're talking about a small network situation here) we should be able to access services fairly reliably.

Another link.

Benjamin

Sun, 2005-Jun-05

In Links

I've been fairly disillusioned with the blogging process of late through lack of interaction with my readers. These entries are basically notes to myself. I haven't been getting the kind of feedback on this blog that I initially envisioned, so I haven't found myself tailoring the content to any particular interest group. I haven't been polishing by entries at all, either. If I'm the one that will be reading it, it need not be for anyone else :) If you are a regular reader and feel you want to see the content reflect your own thought processes, do drop me a line and let me know your reactions. I don't support comments on this statically-rendered blog, but I would like to hear about any blog entries that are written in response to mine. There's a good chance I won't hear about them if you don't write to me.

I have been thinking about whether the use of google's link: search token could form part of the blog content. Perhaps each page could contain a link to the relevant google search for links to that page. I'm not sure I want to get into bloxsom that heavily, though :) Personlly I only use the RSS feed to view my blog (any anyone elses, for that matter).

(time passes)

Ok, here's what I've done to try and get more interactivity into the blog:

  1. I've added in-link links for google and technorati. You should see them at the bottom of each post (although not in the rss).
  2. I've created myself a technorati profile, and I'm now watching technorati for new links to my blog.

It was quite simple, actually, and technoratiy on the face of it looks like a decent RESTful interface. The GET side of it certainly is, where everything you create in terms of watchlists and the like becomes a URL you can link to. It would be nice if I could get the kind of rss-feed subscription to links to my blog from google that technorati provides.

Interestingly, the two datasets seem to intersect. Neither is a superset of the other. Google finds links from Adrian Sutton's blog regarding my criticism of exceptions back in October 2004, while technorati shows zilch. When I described the approach taken to describing RESTful web services in xml.com article as "damn foolish" techorati finds this link which I was previously not aware of but this time google folds, finding only the generic link from planet humbug. I suspect that Dwight Gunning's technorati membership resulted in better performance for this query.

How do HUMBUG bloggers rate when it comes to technorati membership?

Benjamin