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.


Sat, 2004-Oct-16

Blog Spam

It looks like some of us on planet humbug are being affected by blog spam. I noticed this when some of my rss feeds kept having articles being marked unread in liferea. I figured that it was probably comment-related, and found this garbage creeping in.

I suggest that humbuggers with comment-enabled blogs take a look to see if they are affected.

Thu, 2004-Aug-26

Everyone is talking about the control key

By "Everyone", I at least mean Adrian, Jason, and some guy named Tor that I hadn't heard of until reading the blog entries from the previous two individuals :)

Well, I might as well put my two cents in. I've been doing some pretty long hours at work lately. I've had software releases going on and a lot of documentation being written that previously didn't exist in any way, shape or form. I was starting to feel it pretty badly in my wrists and hands.

To avoid the kind of strain that requires surgery (I know at least one person who is not quite the same after that outcome) I took particular note of my posture and usage of my hands over the next few days. Making sure my shoulders were relaxed and not leaning forward made a big difference, but the biggest single impact I felt from the work I was doing was to make sure I used alternating hands for my control keys.

By alternating hands, I mean that I've been using the control key like the typing tutors teach you to use shift. When you press a captial "Q", you press the "q/Q" key with your left hand while pressing right shift with your right hand. When you press a capital "P", you press the "p/P" key with your right hand while pressing the left shift with your left hand. Simple, really, but I feel that my constant pressing of Ctrl-C, Ctrl-D, Ctrl-Z and the like using only my left hand to press both keys was a major cause of fatigue and stress on those important anatomical features.

When it comes to control keys, I don't really mind where they are so long as there are two of them. I need to have two to minimise the impact on my body of pressing those awkward combinations. Given that, the closer the control key is to "Shift" I think the more natural things are. In my opinion, any key that must be pressed in combination with alphanumeric keys should be pretty close to where we see control and alt on the old 104-key keyboard.


Sat, 2004-Jul-17

Welcome, Andrae

I keep my own list of the planet humbug bloggers' rss feeds in my liferea configuration, so I missed the introduction of Andrae's blog to the community (or was he always there in the first place?). Andrae is an interesting fellow with a hobby of understanding some of the fundamentals of computer science.

By way of a welcome, I thought I'd respond to a few of his posts:

Impressive rant: Hrrmm... the context quoted here is basically saying that C++ is bad because it allows class authors to protect their data. I don't find it particularly impressive. I think that code and data structures behind an API should be able to change over time without recoding the entire system. The form of object-orientation that lead to the development C++ was centred around earlier practice of "Abstract data types". The idea was that the fewer pieces of code that knew the specifics of the data structure, the less places you'd have to stuff things up. Object orientation of the C++-world kind is built around the idea that you can push this forward a couple more levels. The article does make some good points, for example the idea that you have to recompile your entire system because you've changed some part of an object that doesn't form part of the public API, but instead is a private data structure does feel like the result of premature optimisation. I guess that's why the use of privates classes is encouraged. <shrug/> Actually, I guess you are more-or-less right. Classes with a lot of private data shouldn't really exist in a true object-oriented system, and the language should support a reasonable notation for separating the two so that the private bit is really really private. Perhaps C++ could do this better. As it is, the use of private data in this way is a kind of still-born shortcut for it.

What do you do for a living?: I say "you know how a rail system has a central control system to turn on and off the power, and monitor the air conditioning, and possibly even exert some control over the trains?" "Yeah..." "Well, I make software to go into that central control room." "Ahhh...." "So I'm not just a useless abstract software person" "No?" "Yeah, I'm really kind of like a civil engineer..." "Yeah, and my father is the pope."

UML Editors: I personally use visio with the UML templates found here. They support UML2, which is a big improvement in many areas over the 1.x series of UML and don't try to be a sucky development environment.

Happy blogging Andrae, and thanks for the OO & relational CS theory links