Saturday, October 16, 2004

Laika Update: She's settling in well to her life here. Our afternoon routine usually consists of going to the off-leash dog park where she can run around like mad with the other dogs. She already has more friends here than we do, and it's very nice to see that she gets along well with other dogs. Today we went to the off leash beach where we ran into one of her park buddies and she was able to run like mad on the beach and in the water (definitely a waterbaby), and eat lots of disgusting things like starfish.
She's a funny girl, and she's fairly well behaved. We just need to work on a few things.

In other news, I'm looking hard for a job. Hopefully I'll get an interview soon. And we both really like Melbourne. I think once we get settled in, with two jobs and furniture, we'll be really content.
I love articles like this: Endangered species: US programmers. To quote in part:
Since the dotcom bust in 2000-2001, nearly a quarter of California technology workers have taken nontech jobs, according to a study of 1 million workers released last week by Sphere Institute, a San Francisco Bay Area public policy group. The jobs they took often paid less.

What they don't realize is that the quarter of the programmers they said were forced to take other jobs were the quarter who didn't belong there in the first place. The business was overrun by people from other fields who had no business or aptitude for the subject, but just wanted their piece of the pie in the dotcom boom. At my old job we rejected hundreds if not thousands of applicants.

Anyway, I really do love articles like that, because they tend to discourage other career opportunists. And as for offshoring, I know a lot of companies that have tried it once, but not many that have tried it twice.

My job here seems to be going exceedingly well, all in all. It's a good bunch of people, and they seem to be really happy with the work I'm doing. I've gotten my groove back, and have also discovered the key to happiness at work, for me: stop screwing around on the net. I've had jobs in the past with free reign to surf at will, and it's a dangerous lure. Without it I'm considerably more productive, and more content as a result.

This new work philosophy comes at a price, though; in idle moments where formerly I would wander out on the web, I now take to biting my nails. It got bad for a while, but I'm stepping up the battle -- I mark up my hangnails with a ballpoint pen so I don't bite them, and have even taken to covering them with band-aids.

Friday, October 15, 2004

Speed. Hoorah! Just got our DSL connection going. The hardware was delivered this morning, and Marjorie got it set up all by herself (almost). Speed is good. We also got the wireless modem, but are just wired in at the moment. Will try to get the wireless working tomorrow, which will be nice.

Yesterday at the dog park Laika noticed for the first time a metal statue of a dog that sits off to one side. It was hilarious -- she started by barking at it, then circling around it growling with her teeth bared and hackles raised. She was totally freaked out by it.

We're getting to know everyone who goes to the dog park regularly. The people we talk to, but no one knows each other's names, just the names of everyone else's dogs. Funny how that works.

Tuesday, October 12, 2004

Geek alert. I was reading in a book that the late great physicist Richard Feynman once invented a computer science algorithm for computing logarithms that's still being used. While I can hardly hope to match his brilliance in just about any area, it did remind me of an algorithm I came up with, way back in high school I think, that (as far as I know) is mine (although it's probably been invented independently a number of times). I doubt it's of any serious significance but I like it just the same. So here it is.

I was writing a routine to compute the average of a big list of numbers. The typical way you do it is to just sum the numbers, and divide by the size of your list, like this:


sum <-- 0;
for i <- 1 to n
sum <-- sum + number[i];
average = sum / n;


This routine didn't work for me, because I noticed that sum kept overflowing. But I realized that if you compute the average as you go along, you don't need to keep the the running sum, because sum is always going to be equal to average*i, where i is the number of items you've processed so far. So you can compute a new average by using that as your sum, adding the new number, and dividing by the new count of items, like this:


average <-- 0;
for i <-- 1 to n
average <-- ( average*(i-1) + number[i] ) / i;


But here average*(i-1) can just as easily overflow as the running sum we kept in the first example. However, at this point you can just manipulate the algebra terms so that no big multiplication needs to take place:


average <-- 0;
for i <-- 1 to n
average <-- average - average/i + number[i]/i;


So there you go -- an averaging routine that can compute the average of just about as many numbers as you want without overflowing. I've actually used this in real applications before.

We now return you to your regularly scheduled dog stories.