Archive for August, 2005

Still a magic number?

Friday, August 26th, 2005

So Sam and I were programming today, and we found a place in the code where we were using a magic number. Something along the lines of:

function TMyObject.IsEditable: Boolean;
begin
  Result := obj.IsEditable(1);
end;

Wanting to replace the magic number with a meaninful symbolic constant, we looked around for what the magic number could represent. After failing to find what exactly the magic number meant, and not wanting to leave a magic number in the code, we replaced it with our own meaningful constant. The code now looks more like this:

function TMyObject.IsEditable: Boolean;
const
  MagicNumber = 1;
begin
  Result := obj.IsEditable(MagicNumber);
end;

So, if we replace a magic number with a poorly named constant, is it still considered a magic number?

Tiger goodness

Thursday, August 25th, 2005

I finally bought Tiger and got it installed last night. No doubt that it was worth the money. I didn’t buy it right away because of the performance concerns with my mini, but that is not an issue at all. The upgrade went very smoothly, but I had to wonder why it needed to install all 14 some language packs, especially after it asks what language to install.

I got Safari to crash within five minutes, but after installing all of the software updates, I have had no problems. It is so much easier to install one update patch than it was when I re-installed XP on my PC a couple of months ago. One update patch as opposed to 17 patches so that I could install SP2, and then another 22 patches after that. Needless to say, Microsoft could learn a few things from Apple.

Some of the hightlights:

  • Spotlight: Haven’t used it too much yet, but initial impressions are that it is superior to any other desktop search engines that I have used.
  • Dashboard: One of the coolest features of Tiger, and since I waited a few months before getting it, there are already lots of cool widgets available.
  • Finder: The new smart folders show a lot of promise.
  • Mail: Love the new style. I never really did like the old layout, and the new interface seems a lot cleaner.

Hello, blog world!

Friday, August 19th, 2005

Ever since he started his blog last year, Joe has telling me that I needed to set up my own blog. I have always thought that I wouldn’t have very much to blog about, but several times in the last couple of weeks I have thought “if I only had a blog, I would write about this.” So here I am, entering into the world of blogging.