## Saturday, December 1, 2007

### More things not working

Today, I decided to make a list of things that didn't work right.

When trying a new web application, it failed with a nasty stack trace including the information, "Unable to find class for xyz.jsp" (name changed). Ok. But, where did it look? Why not give more information?

Leaving the office building, I hit one of the four exit doors and it was stuck. The one next to it was too. That's fine because after hours I need to swipe a badge to get it. Still, shouldn't you be able to get OUT? Well, the other two doors worked for getting out. After they closed, I turned around and tried opening them. That's right, they both open just fine.

Then, I need to cross a busy intersection, in two directions, to get to the opposite corner. The pedestrian lights don't operate automatically. You have to hit a button. That's fine, but the button to cross East is 15 feet away from the button to cross South, and I have to do both of those. That's a lot of steps to hit the buttons. Then, when I hit it, I just miss the green light for the cars. It doesn't work, even though there would be plenty of time. Apparently a pedestrian has to hit the button BEFORE the light changes. So, I wait to cross the other way first. When the light changes, there is the little chirp for blind people. But it is the WRONG CHIRP! Good thing I'm not blind, or I might have started crossing the wrong way and been hit. Having crossed, I race the extra 15 feet to get to the other button and get it in time. But the crosswalk leads directly into construction, so I have to take a big detour. Again, good thing I'm not blind.

Got home and my cell phone gave another little chirp. Oh yeah, that's right. It had been chirping like that the whole time I was trying to work on the web application. But, there wasn't anything I could do to get it to stop, and the charger was at home. Now, it's plugged into the charger, but I will most likely forget about it, and if I don't get the ONE chirp when it finishes, it will sit there for days maybe.

Well, I'm just going to have to deal with cell phones needing to be recharged.

But, somewhere, someone probably cares about doors not opening and opening when they shouldn't. And someone probably cares about blind people getting hit by cars. But, I don't know who it is. Who does one report this kind of thing to?

## Thursday, November 29, 2007

### Things stop working

Reminds me of a time almost 35 years ago when I had trouble with a particular computer. Back then, very few people owned a personal computer. I was an undergraduate in a new Computer Science department, and one of my professors owned a mini-computer, a PDP-8. It was available for student use, and we had to sign up in advance for 50 minute time slots.

Every time it was my turn, I would walk in, set my notebook on top of the console, and start to work. After just a few minutes, the machine would crash, and I would have to spend the rest of my time slot trying to get it working again.

I asked my fellow students, but no one else had that problem.

What was going on? It turns out, that you already know enough to figure it out, if you'd like to take a minute to think about it before reading on.

Yeah, it was the notebook on top of the console, causing it to overheat. Stopped putting the notebook on the console and never had the problem again.

It's not always quite so easy to figure out why something that always worked before doesn't work any more.

Recently, my email client software, Mozilla Thunderbird, has stopped doing its automatic updates. Here's what happens instead. Without telling me, it goes out to the network and downloads the latest version. Once that's all been received, it pops up this alert (interrupting whatever I happen to be doing at the time--ARGH!):

I've tried it both ways. Closing everything and giving it the go ahead, and clicking on Later. Choosing "Later" gives this response:

Okay, that's fine. Either way, I am always very careful to shut everything down before restarting Thunderbird.

Doesn't matter. It always fails. After a few moments, it lets me know that it didn't work. Again. I've lost track of how many times it has tried. The bottom line is that Mozilla Thunderbird update doesn't work.

The error message is not helpful. All other applications ARE closed. WHICH files do I need permission to modify? It doesn't say!

And, I have no confidence that restarting Thunderbird makes it actually try again. Because all future attempts to restart Thunderbird happen without incident. And yet, over and over again, it is downloading and readying the update. Only to put me through the same process and the same failure yet again.

Where can I turn for help with this kind of problem?

## Wednesday, November 14, 2007

### On being average

I have recently heard a couple of jokes about "average" that bear repeating.

One claims that a national leader expressed dismay upon learning that half of all Americans are below average.

Another claims that 80% of university professors surveyed rated themselves above average as professors.

What makes these jokes funny is that, in any population, half are below average and half are above average. That's just what "average" means. In particular, 80% of the population cannot be above average; exactly 50% are.

Suppose you look at an entire population and measure any naturally occurring property (height, weight, intelligence, bank balance, etc.). Suppose you then count the number of people with each possible measurement. Now graph the values of the property across, from smallest to largest value. Finally, show the number of individuals at each measurement as the height of the graph. When you do this, the graph will look something like this:

This graph is called the "normal distribution" by statisticians. You may recognize it as the "bell curve," so called because of its shape.

The vertical line at the very center is labeled with the Greek letter mu, which is the symbol used for the "mean value" (which is what statisticians call the average measurement).

This is the highest point in the graph, which means that there are more people who have the average measurement than any other measurement. Fully 68% of the people are "close" to this average measurement. Most people will be close to normal.

And, as I have said, 50% of the people have measurements above average; the other 50% are below average.

To indicate how far a measurement is from average, statisticians use the term "standard deviation," indicated by the Greek letter sigma. Only about one in a thousand people will be more than three standard deviations above average.

More than 2/3 of the individuals in the population will be within one standard deviation of the average measurement. Only one in six will be abnormally above or below average. Of these, only one in fifty will be "way" above (or below) average. And, as mentioned earlier, only one in a thousand will be off the chart.

Almost everyone is average. That is normal. And being normal is nothing to be ashamed about.

Disclaimer: The statistics here are simplified, as this is just meant to be thought-provoking.

## Saturday, November 3, 2007

### Time travel

This awareness is so much a part of my life that I chose this tagline: "traveling through time at the usual rate of one second per second," hoping for something pithy, memorable, and evocative.

Looking back at the past, and looking forward to the future, are both favorite passtimes. And I mean "passtime" in the more literal sense of something to do while time passes; for meanwhile, the world continues to move forward at the usual rate, etc.

There is nothing like a photo to plunge me into a state of nostalgia and reflection.

Pictured are four of my favorite people. I think I was the photographer. I was certainly present when the photo was taken. That was a wonderful moment that was captured; one of many that day, visiting my parents in Canada.

All of the people in the photo are gone now. My children's grandparents gone the way of all the world: dead and buried, but not forgotten. The children are still living, so they are not gone in the same sense of the word.

But the children are now adults. Of course, I love them just as much now as I did then.

It is them as they were then that I miss. Gone is the naivetÃ©, the innocence, the simple delight in being alive. That moment, that day, those innocents, are gone forever.

And that is one of the consequences of traveling through time--not that I have any choice--at the usual rate of one second per second.

## Tuesday, October 23, 2007

### Elizabeth does mathematics

Over the years, my daughter, Elizabeth, has shared with me an interest in mathematics. Here is a republishing of a discovery of hers. Mathematics is not just about solving problems set by other people. It is also about discovery and invention.

On March 11, 2002, Elizabeth discovered that the difference between two [consecutive] square numbers is the sum of their square roots.

Another way of looking at this is:

(x + 1)

^{2}= x^{2}+ 2x + 1 = x^{2}+ (x + (x + 1))This can be generalized:

(x + k)

^{2}= x^{2}+ 2kx + k^{2}= x^{2}+ k(x + (x + k))In particular, if x=48 and k=4, we get:

52

^{2}= (48 + 4)^{2}= 48^{2}+ 4(48 + (48 + 4)) = 2304 + 4(100) = 2704Another way of looking at this is geometrically:

As a practical example, we know that 20^{2} is 400.

So, what is 25^{2}?

By Elizabeth's law, the difference between the two squares must be 5 (that is, 25-20) times their sum.

In other words, 25 squared must be 400 + 5(20 + 25).

Regrouping, this is 400 + 5 x 20 + 5 x 25.

So, 25^{2} is 400 + 100 + 125 = 625.

Fun, huh?

Just noticed that another way of writing this is: 400 + (25-20)(25+20), which has a kind of pleasing symmetry.

## Thursday, October 18, 2007

### Powers of two

As an aside, my first personal computer (an Apple ][, acquired in 1979) came with 4K bytes of memory and no disk drive at all (a cassette tape interface was all there was for storage). I spent a couple of hundred dollars to upgrade the memory to 16K bytes. My first IBM-compatible PC (1988) had 256K (bytes) of memory and a 20Mbyte hard drive. How times have changed!

The (Intel) processor in an IBM PC could only use 16 bits to form a memory address. It turns out that this is enough capacity for there to be a unique address for each of 64 Kilobytes (about 64 thousand bytes).

Each bit can have only one of two possible values, typically written as zero or one. Here is a little table showing how many different bit combinations there are for different numbers of bits:

1 bit gives you two possible values (0 and 1)

2 bits give you four possible values (00, 01, 11 and 10)

3 bits give you eight possible values (000, 001, 011, 010, 110, 111, 101 and 100)

and so on

In each case, I have been able to show all of the possible bit patterns. But the number of possible bit patterns doubles each time we add on an additional bit. The numbers get big quite quickly, and it would soon become very tedious to write out all of the possible bit patterns.

Mathematicians would express this relationship--number of bits and the number of possible bit patterns--using powers of two. The sidebar shows a chart from 0 bits through 9 bits.

You'll recognize three of these lines from the earlier table (showing 2, 4 and 8 possible values, for 1, 2 and 3 bits, respectively).

Above those lines, there is a bit of an oddity for zero bits, allowing only one pattern.

Now, if you want to learn my little memory trick, you will have to memorize these ten lines. This effort will be well repaid, as this will allow you to mentally state memory or disk sizes from the smallest to the largest in use today.

Where things get interesting is at 10 bits, which allow us to produce 1024 possible bit patterns.

What is interesting about this is that 1024 is the number commonly known as "Kilo". And, this is really quite close to one thousand.

Now, the power of 2, as represented by the exponent--the number shown attached to the upper right hand corner of the 2--can be interpreted as the number of bits that we have available for producing possible bit patterns. The other number--after the equals sign--is the number of possible bit patterns.

If you've studied powers and exponents, you'll know that you can add exponents (on the left) by multiplying numbers on the right of the equal sign. So, for example 2 to the 16 will be equal to 1024 (2 to the power 10) times 64 (2 to the power 6). This yields the number 65536, but which is more commonly expressed as 64K.

This is just another way of saying that 16 bits allow us to have a distinct address (bit pattern) for each of 64 Kilobytes. This is approximately 64 thousand bit patterns, because 2 to the power 10 is approximately one thousand. Similar approximations hold for 2 raised to 20, 30, 40, etc.

As it happens, 10 bits allow us about a thousand possible bit patterns, 20 bits allow about a million possible bit patterns, 30 bits allow about a billion possible bit patterns, and so on.

Now we are ready for the trick. When you have some number of bits (between none and 69), you can combine what you know from these two figures.

Let's try a few examples. If you have 24 bits, that would be about 16 million possible bit patterns. The "16" comes from the first figure, where 2 raised to 4 gives us 16. The "million" comes from the second table where 2 raised to 20 gives us about a million. Of course, 24 is just 4+20, so the law of exponents will be satisfied. This is also written "16M" or "16 megs" or "16 megabytes".

If you have 32 bits, that would be about 4 billion possible bit patterns. This is also written 4G, or "4 gigs" or "4 gigabytes".

Now, what if you have 64 bits? Would that be twice as many possible bit patterns as 32 bits? No, 64 bits would be about 16 thousand quadrillion possible bit patterns.

It works the other way, too. How many bits would you need for twice as many bit patterns as you get from 32 bits? Well, 32 bits gives us about 4 billion patterns, so we need about 8 billion bit patterns. Using the two figures, we can see that it will take 33 bits to give us about 8 billion bit patterns.

Did anyone actually get this far? Hope you find this useful.

## Wednesday, September 26, 2007

### On early adoption

As a youth, I was the first boy in the town of Taber to own a tape recorder, and my friends and I had a lot of fun with it. With an interest in computers, I read all of the books on computers in the town library--both of them!

Much later in my career, I worked in the Advanced Technology Group at WordPerfect Corporation, and was trying out cell phones with integrated web browsers in 1995.

But, that was twelve years ago.

Lately, I've been falling behind. As witness, I am only just now starting a blog. In this, I have been inspired by my niece, Nancy Heiss. Thanks, Nancy.