Is the Compiler Wrong?

Consider the following C# program.

class Program
{
    static void Main(string[] args)
    {
        ThisWillNotCompile(MyEnum.Foo);
    }

    private static string ThisWillNotCompile(MyEnum input)
    {
        switch (input)
        {
            case MyEnum.Foo:
                return “Hello, world.”;
            case MyEnum.Bar:
                return “Howdy, world.”;
            case MyEnum.Baz:
                return “Hi there, world.”;
        }
    }

    enum MyEnum
    {
        Foo,
        Bar,
        Baz
    }
}
 

This code will not compile.  The compiler returns, “Program.ThisWillNotCompile(Program.MyEnum)’: not all code paths return a value.”  Is this wrong?  Discuss…

17 June, 2008 (14:00) | Uncategorized | 2 comments

Codenames and Ship Dates

If you look at some of the back-end structures of Group Policy Manager, you may notice some odd names.  First off, most of the dll’s in the Program Files directory start with "Quest.Avalanche".  Avalanche is the internal code name for the product.  Like many software companies, we don’t necessarily know what the final product name is going to be when we start development.  In addition, the dev team often doesn’t know what the version number will be at the beginning of a cycle.  Therefore, we rely on code names for versions as well.  On the Avalanche team, we use the names of mountains.  Here is the list of code names we’ve used over the last four years:

  • 1.0 - Citadel Hill (named retroactively) - Sept, 2004
  • 2.0 - Wentworth - May, 2005
  • 2.5 - Matterhorn - Nov, 2005
  • 3.0 - Stoneham - June, 2006
  • 3.1 - Fuji - Dec, 2006
  • 4.0 - Nevado - Dec, 2007
  • 4.1 Mont-Blanc - April, 2008

Given that development began in June 2004, that works out to seven releases over a period of 46 months - or about one release every 6.5 months.

7 June, 2008 (13:32) | Tech | No comments

Dylan

IMG_1124 Bob Dylan is one of the world’s great songwriters, but as a performer he can be hard to love.  Some of my friends were disappointed with his performance at the Metro Centre last week, but I knew what to expect.  He doesn’t look at the audience.  He doesn’t talk to the audience.  He just plays the tunes.

Of course, when your first song is Rainy Day Women # 12 & 35 and your encore is Like a Rolling Stone, you can afford to be a bit eccentric.

27 May, 2008 (13:03) | Entertainment, Local, Music | No comments

Word of Warning

My, oh my!  Our venerable legislature surely attracts its share of outspoken folks.  This affable gentleman makes me want to go to work for Google.  Moral of this story — don’t be evil.

IMG_1073_resize IMG_1074_resize

28 April, 2008 (12:10) | Local, Religion | No comments

Garbage Fire

IMG_1028 My neighbours had a wee fire in their dumpster on Saturday afternoon.  Thank goodness our excellent fire department was able to get it under control in no time.

21 April, 2008 (12:02) | Local | No comments

Seal Hunt Supporter

IMG_1022_edit

This enterprising soul was standing in front of the Nova Scotia Legislature, across the street from my office.  We spotted him from above, thanks to his shiny silver shoulder pads.  He was kind enough to let me take his photo.

 

17 April, 2008 (11:22) | Uncategorized | No comments

Windows Complete Backup

A while back, the hard drive in my new laptop started to make a scary-sounding clicking sound.  Rather than wait for it to fail, I decided to contact my friendly IS rep and have the machine replaced.

Now, normally, this would entail a few days of reinstalling Windows, copying my data over, reinstalling all my apps, and tweaking all my preferences to get things back to normal.  However, I’ve been running Vista Ultimate almost since the day it came out — and Ultimate comes with Windows Complete Backup.  Time to put it through its paces.

I had already made backups on an external USB drive I keep for the purpose.  However, like a moron, I’d never used it before to restore anything.  No matter.  I refreshed the backup with my latest data.  Then I hooked the drive up to the new laptop and inserted the Windows DVD.  After a few seconds, I was presented with a menu giving me the option to restore from a backup.  I selected the external drive and hit ‘Go’.  Thirty minutes later, the machine rebooted and it was exactly like before!  Woohoo!

From my scientific sample of exactly one instance, I can conclude that Windows Complete Backup works and works extremely well.  That being said, there may be some caveats.  The machines I was working with were nearly identical.  I’m not sure if it would have been so smooth if the machines had contained radically different hardware.  Also, if you use BitLocker, your backup will not be encrypted and should be stored in a secure location.  You will need to reinitialize your TPM and re-encrypt your new drive.

Compute safely!

12 April, 2008 (12:02) | Tech | No comments

Windows installers in less than one beer with WiX

I am building a PowerShell SnapIn (more on that in another), and decided it should have a proper Windows installer.  Of course, at the time I decided this, I was at the Shoe.  No matter.  I pulled out my trusty laptop and added a WiX project to my snapIn solution.  Next I added my files and registry keys and hit build.  Built OK.  Tested OK.  Laptop back in the bag.

Then I ordered another beer.

8 April, 2008 (13:07) | Tech | No comments

Best Forecast Ever

Sunny Forecast
It might not seem like much, but if you’ve lived in Halifax in the spring, you understand.

6 April, 2008 (12:20) | Uncategorized | No comments

No More Starbucks

Halifax has plenty of coffee shops.  Most every one of them offers free wireless internet access.  When you think about it, this seems like a reasonable service to offer when your customers are willing to shell out five bucks for what is, essentially, a big glass of milk.

Unfortunately, Starbucks has recently partnered with Bell Canada to offer paid WiFi in all their Canadian stores.  For a mere $7.50 an hour, you too can have the privilege of using your laptop from their hallowed halls.  Take a look at the full pricing schedule.

I won’t be going back.  I really like the Wired Monk anyway.

16 March, 2008 (12:45) | Business, Local, Tech | No comments