Friday, December 28, 2007

Why is Christmas slow to come and fast to go?

We look forward to Christmas all year and it's over in an instant. But think about the event we celebrate (New International Version). A young girl gets pregnant without being married (yet). She's visited by an angel who tells her how she became pregnant and who she is carrying. She was, probably, harassed by friends and relatives and her husband-to-be considered divorcing her. She held all these joys and troubles in her heart for nine months and, then, she had to take a long journey at the end of the pregnancy and, when they got to their destination, they had no place to stay and had to settle for a stable. Then, she had her baby in the stable. So, there was a long wait and a lot more trouble before Jesus was born than what we go through before our celebration of Christmas. But there was an even longer wait and more anticipation for the Jewish people whose prophets foretold the birth of a Savior for thousands of years.

While Christmas is quickly over for us, for Joseph, Mary and their baby, it was not over so soon and we can be thankful we don't have such trouble at our celebration. They were still in the stable for as long as it took to register for their taxes. Then they had the long journey (70 miles as the crow flies but longer depending on their route) back home with a newborn. I used to complain, in our nice, warm house, when I had to get up in the middle of the night to help take care of our kids. What was it like on a trip at that time?

Of course, there is no need to worry about Christmas "coming and going" if we truly celebrate Christmas year 'round. We often hear stories about "the true meaning of Christmas" around this time where people are being kind to each other and helping those in need. While that is laudable and is the right thing to do, it is the right thing to do every day and for every season - not just at Christmas (or during the Thanksgiving season) and not just while a reporter is watching. Being kind and helpful to the needy is the true meaning of being a Christian (or a human being for that matter) at all times. The true meaning of Christmas is that a child was born of a virgin. That child was our Savior who was God himself.

Merry Christmas!

Monday, December 17, 2007

And another great computer book

This entry is a follow-on to my earlier article titled "I'm going to read through Keeton this summer" where I talked about The New Turing Omnibus. Now, I want to talk a bit about another book I really like titled Practical Algorithms for Programmers by Andrew Binstock and John Rex

I've always been fascinated by algorithms - lists of instructions for carrying out a process or solving a problem. In one sense, a recipe is an algorithm for preparing a meal (or at least part of the meal). The best algorithms aren't just dry lists of instructions, though. Good algorithms explain why you are doing each step (much like how The Joy of Cooking handles food preparation). But sometimes, the reasons for each step of an algorithm are lost and someone has to go in and figure out why the algorithm is written as it is. Or, perhaps, the original explanation of the algorithm is poor and someone comes along and does a better explanation.

This book looks at some classic algorithms and explains them clearly and lists alternatives that may work better in some cases. It isn't a huge book and it doesn't cover a large number of subjects, like the famous Numerical Recipes series (with version for various programming languages from FORTRAN to C++). What Practical Algorithms for Programmers does is take the most useful algorithms and take the time to explain them well. It teaches you how to decide which of the algorithms to use for a given subject. It gives you background information on how the algorithms were developed. The subjects range from the basic (linked lists, stacks, queues, hashing, searching, sorting and trees) to the more advanced (date and time, arbitrary-precision arithmetic, data compression data integrity and validation). Each one is handled in a way to help you understand why you would want to use a certain algorithm and not to overwhelm you.

This is one of the books I bought because I was in a bookstore looking through all the books in a certain subject area. I didn't read other people's recommendations or do a search for any book with "algorithm" in the title. I was able to leaf through all the books and compare them. You can do this with many books on Amazon but not all. Of course, Amazon will have more books than can fit in a bookstore. But that can be part of the problem, too. Amazon often gives you too many choices. In a good bookstore, they have someone knowledgeable about a subject to pick the best books to stock. As I read through it and compared, Practical Algorithms for Programmers almost jumped out at me, grabbed me by the shoulders and said, "I can help you right now with this program and that program you are working on." That was enough for me.

Friday, December 14, 2007

Snow and the woods

We got our first real snow of the winter last night.It was so nice to see my wife, the kids and our dog out playing in it when I got home. I couldn't play, though. I needed to continue the shoveling my wife and mother-in-law had started. The kids spurred me on to keep moving by pelting me with snowballs. And Charlie Dog guarded me (and barked when I slowed down or did something he disagreed with). It's nice to be out in the snow. It looks so nice and muffles all the sounds. Also, it cuts down the volume of the traffic in front of our house - both the number of cars and the noise they make. But the worst part of shoveling snow is dealing with the heavy, wet, gritty snow that the town snowplows throw back into our driveway after we've cleared it. Am I the only person bothered by this? Am I a lunatic to think that there must be a better way to remove snow from the streets of our town? Not only did they cover up the end of our driveway but also the end of my mother-in-law's driveway and our neighbor's driveway (which I had also shoveled because he is elderly). Not only did they cover up the end of those driveways but they covered up the town sidewalk that I had just shoveled. Not only did they cover up the sidewalk but they covered up the street drain (which I had also shoveled out). So, when the street starts to melt, where is the water going to go? The worst part of this is that the plows make passes down the road even after the snow is gone - they come by to throw the snow at the side of the road even farther into our driveways and the sidewalk. Perhaps they get paid by the number of passes they make - not by the usefulness of the passes.

That was all last night and this morning. Today, at lunch, I went for a walk in the woods behind our office. I was the first person to use some of the paths. Here are some pictures. I always think of the Robert Frost poem Stopping by Woods on a Snowy Evening at these times. I've loved this poem since I first read it in high school. A Men's Chorus I used to belong to even did a musical version. It was a terrific arrangement. So quiet and peaceful.

I forgot how hard it is to walk in a deep, new snow. My walk usually takes about thirty minutes. Today it took fifty minutes. But I couldn't stop or rest. I had promises to keep. And code to write before I sleep. And code to write before I sleep.

Stopping by Woods on a Snowy Evening
By Robert Frost

Whose woods these are I think I know.
His house is in the village though;
He will not see me stopping here
To watch his woods fill up with snow.
My little horse must think it queer
To stop without a farmhouse near
Between the woods and frozen lake
The darkest evening of the year.

He gives his harness bells a shake
To ask if there is some mistake.
The only other sound’s the sweep
Of easy wind and downy flake.

The woods are lovely, dark and deep.
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep.

Tuesday, December 11, 2007

The tale of the check

Today, my company ended a strange little episode with Microsoft and a "missing" check and it reminded me of another strange little episode of my own with a check, a US Government agency and a small bank in Northern Virginia.

I used to work for the US Geological Survey in Reston, Virginia. Our lab was being closed and some of us were being transferred to other labs around the country. My good fortune meant I was being transferred to the Marine Geology office in Woods Hole, Massachusetts. Since it was a transfer between USGS offices, they agreed to pay my moving expenses. I tried to get them to pay a little extra to have my things packed but they refused. So, I paid the extra myself. The move went well and I was quite happy in my new location.

Then, out of the blue, I got a note from the main office of the USGS that they had reconsidered and would pay for the packing of my belongings. They just needed proof that I had really paid for it. Here is where the stupidity started - with me. I sent them the canceled check. This was back when the bank sent you the real, canceled checks at the end of the month. I should have sent a copy but I figured it was OK because it was canceled. No one could use it.

A long time later, long enough for me to forget about sending the check, I got a call from my old bank in Reston (I'm not sure how they got my phone number) explaining that my account was overdrawn. I explained that I had closed the account and moved. They said I still owed them the money and gave me the check number that caused the problem. I told them they had to be mistaken because I had all my canceled checks and would find it and prove them wrong. But, of course, when I went to find it, I couldn't find it - I had sent it as proof of paying for packing my stuff for the move. But I didn't know how the check was used yet. I just knew I didn't have it and couldn't figure out what I would have done with it.

A few days later, while I was trying to solve this mystery, I was contacted by the USGS accounting department that a check I had sent to them had bounced and I'd better send them a new one on a good account. I asked them for the check number and, lo and behold, it was the same number as the one the bank was complaining about. But I couldn't remember sending a check to USGS to pay for anything. In fact, they were supposed to pay me...WAIT A MINUTE! It finally all clicked into place. The check I had sent them as proof of payment somehow ended up in their pile of checks to cash - even though it wasn't made out to them. It was made out to the moving company! And it was canceled! Then, the check got to my bank and, even though it wasn't made out to the USGS, the bank attempted to satisfy the check - even though it was canceled and I no longer had an account there! And they both had the nerve to complain to me!

This happened about 29 years ago so I don't remember exactly how long it took to resolve this but I know it wasn't finally resolved for weeks after I had first figured out what had happened. None of them ever admitted making a mistake. I do recognize, though, that none of it would have happened if I hadn't sent a real, canceled check. Maybe it is good that we no longer get real checks back from the bank. If I was a little more paranoid than I am, I might even believe that banks don't send us real checks because of what happened to me :-)

Thursday, December 06, 2007

Evaluation day

Today I got my 6-month performance evaluation. We missed the one that was supposed to happen in May, though, so really this was my yearly review. The project we are still working on was originally planned to be released in April, 2007 and, I assume, the review was postponed because the project was late and they probably thought doing the reviews then would have made it even later. Well, NOT doing the reviews may have been the problem because we're still working on the project!

My review went well, by the way. I'm doing OK. Not stellar but they're not going to reprimand me. We talked about how the last year has gone but also about upcoming projects and where I fit in with them. Part of the problem is that so much of the work sounds so interesting, it is hard to decide which projects to be considered for. We also talked, in general, about how difficult some of the aspects are of the various projects. It brought up two points I had just been thinking about while reading one of the recent Joel on Software articles. The main point of the article was that projects that have a lot of problems to overcome are the ones that are best to do. That is because if it was easy, it would either be worthless or everyone would be doing it. The more difficult the project is, and if you can overcome the difficulties, then people will be happy to buy your product because you'll be helping them do something they didn't think they were going to be able to do.

Another point was that the areas of any project that are the most difficult are the ones you don't have control over. Their point was that it was more difficult to produce a program that runs on the customer's hardware and not on your own hardware (servers) that you control. The question you have ask is how do you get control of those difficult aspects? One method is to limit the types of hardware your product will run on. Another way is to make sure you have as many types of hardware for testing.

I'm writing this without thinking about it much. Maybe I'll get a chance to write more about this in another entry.