Thursday, January 11, 2007

Today I was inside an Air Canada plane that had its door open in -30 degree weather waiting to take off for 30 minutes when the following Air Canada recorded announcment came on over the speakers:

"Thanks for flying Air Canada, if there is anything we can do to make you more comfortable please let us know."

Maybe they should have held off on that recording until the plane door was closed and the heaters were turned on!

Fun
Thursday, January 11, 2007 11:50:40 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Monday, January 08, 2007

The current project I am working on has been my first chance to work with .NET 2.0 in a real world environment and I have to say that I am really digging the generic list functions. Check out the hockey player class below:

public class HockeyPlayer
{
        private int number;
        private string name;
        private int age;
        private string position;

        public HockeyPlayer(int number, string name, int age, string position)
        {
            this.number = number;
            this.name = name;
            this.age = age;
            this.position = position;
        }

        public int Number
        {
            get { return number; }
            set { number = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public int Age
        {
            get { return age; }
            set { age = value; }
        }

        public string Position
        {
            get { return position; }
            set { position = value; }
        }
}

An easy way of finding all draft eligble players (players over 18 year of age) in a list is to take advantage of delegates and the methods in the generic list class:

[Test]
public void ShouldFindAllDraftEligibleHockeyPlayers()
{
     List<HockeyPlayer> hockeyPlayers = new List<HockeyPlayer>();
           
     hockeyPlayers.Add(new HockeyPlayer(10, "Angelo Esposito", 17, "Left Wing"));
     hockeyPlayers.Add(new HockeyPlayer(9, "Andrew Cogliano", 19, "Left Wing"));
     hockeyPlayers.Add(new HockeyPlayer(10, "Jonathan Toews", 18, "Center"));
     hockeyPlayers.Add(new HockeyPlayer(24, "Sam Gagner", 17, "Right Wing"));
            
     List<HockeyPlayer> draftEligiblePlayers = 
         hockeyPlayers.FindAll(delegate(HockeyPlayer player)
                               {
                                    return player.Age < 18;
                               });
           
     Assert.AreEqual(draftEligiblePlayers.Count, 2);
}

The delegate method searches through the list and finds all draft eligible players, this saves you the time of creating a for loop to search through the list.

[ Currently Playing : Shampoo Suicide - Broken Social Scene - Half Nelson (Original Motion Picture Soundtrack) (04:07) ]
Monday, January 08, 2007 1:57:07 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Wednesday, January 03, 2007

Sorry D'Arcy but I got this in my email today. I attribute it to my unique ability to take Nabob coffee and make it taste like its Starbucks.

------------------------------------------
Dear Steven Rockarts,


Congratulations! We are pleased to present you with the 2007 Microsoft® MVP Award!


The Microsoft MVP Award is our way of saying thank you and to honor and support the significant contributions you make to communities worldwide (or just at work). As a recipient of Microsoft’s Most Valuable Professional award, you join an elite group of technical community leaders from around the world who foster the free and objective exchange of knowledge by actively sharing your real world expertise with users and Microsoft.  Microsoft salutes all MVPs for promoting the spirit of community and enhancing people’s lives and the industry’s success everyday.  To learn more about the MVP Program, visit: www.microsoft.com/mvp.


Your extraordinary efforts in Making coffee every morning at the office and making it PERFECTLY during the past year are greatly appreciated. The benefits you will enjoy as a recipient of the MVP Award are outlined below.
--------------------------------------------

The secret to achieving this MVP status is actually to go above and beyond in the coffee making newsgroups and forums. Its not actually about making coffee.

Fun
Wednesday, January 03, 2007 5:24:47 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Sunday, December 31, 2006

I just finished watching a great presentation by Mark Russinovich on malware removal. This is a must watch if your family sees you as the go to computer tech support. Check it out here.

Sunday, December 31, 2006 10:32:29 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Saturday, December 30, 2006

Last week, a trial version of the Opera web browser was released for the Wii. I was able to successfully control my mouse on my laptop using a bluetooth adapter and today I found a media center has been released for the Wii by Red Kawa.

I installed the media center and found that the music functionality does not yet work on the media center, its no big deal because I was planning on using it for movies/tv anyway.

Converting the videos takes about 20 min with the Red Kawa Wii Video Converter, a couple of games of Wii Sports Tennis should make that go by quickly.

Apparently you can combine the Red Kawa converter with Videora and it will automatically download and convert Bit Torrent RSS feeds for you. The downside is that Videora is not free but there are other programs out there that can do the same thing.

Once you have your video converted you use the Wii browser to access the media center and play your videos. It works pretty well but the Wii browser controls never go away so you have to deal with them while watching your videos.

I would be very impressed if Nintendo built its own media center and made it available for download from the Wii Shop Channel. Hopefully Nintendo provides a better experience.

Saturday, December 30, 2006 9:25:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Friday, December 29, 2006

I've been tagged by D'Arcy, so here we go with 5 things you may not know about me.

1 - I originally went to school to be high school teacher majoring in history. As part of my curriculum I took a programming course which I enjoyed more than teaching so I decided to take my current career path.

2 - I love hockey (maybe thats a bit obvious). I grew up playing and I still play today. I played against a couple of guys that are in the NHL today but no one really special. I also think that Steve Yzerman is the best all around player to ever play the game, and don't say Gretzky was better because all he could do was score goals, his defensive game was WEAK!

3 - I am a big fan of Tennis but have never really played. Maybe thats why I am addicted to Wii Tennis. My ranking is 2034 (pro is 1000).

4 - Like D'Arcy I grew up on Macs. I didn't get my first Windows machine until I was 18.

5 - I am a big supporter of dropping Africa's debt and providing them with cheap drugs for treatment. I am a proud Canadian but I think it is embarrassing that Canada originally authored the promise that all G8 countries should contribute 0.7% of their GNP to Africa in 1969. Yet,we have failed to meet that goal despite budget surpluses. 4 countries that are not members of the G8 and with weaker economies than us have met that goal. We are being embarrassed on the world stage.

I will now tag Catherine, Jean-Paul Boodhoo, James Kovacs, Dave Woods, and Kyle Bailey. Sorry, again sorry.

Friday, December 29, 2006 9:43:06 PM (GMT Standard Time, UTC+00:00)  #    Comments [3]  | 
Sunday, December 24, 2006

A lot of programmers are not familiar with the term immutable when it comes to software development the terminology often confuses them. I am going to try and explain it in this post.

An immutable object is an object that once it is created none of its values should change.

A simple way to do this is to only assign to the variables of that object in the constructor so that once the object is created its variables cannot be changed:

public class GPSCoords { private readonly int longitude; private readonly int latitude; public GPSCoords(int longitude, int latitude) { this.longitude = longitude; this.latitude = latitude; } public int Longitude { get { return longitude; } } public int Latitude { get { return latitude; } } }

 

You can also achieve the same goal in .NET by making the class GPSCoords a struct:

public struct GPSCoords { public readonly int longitude; public readonly int latitude; public GPSCoords2(int longitude, int latitude) { this.longitude = longitude; this.latitude = latitude; } }

If you have worked with the string class in the .NET framework you probably didn't realize that you were working with a immutable class. So the next time someone asks you in an interview to explain the behaviour of the string class you will be able to explain it to them. 

[ Currently Playing : Window in the Skies - U2 - U218 Singles (04:07) ]

Sunday, December 24, 2006 10:17:25 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Sunday, December 17, 2006

Today I have been  checking out all the fun stuff at WiiLi.org. You can control various applications on your computer using the Wiimote! All you have to do is buy a Wii compatible bluetooth adater and hook it up, follow some setup instructions and download some apps. Check it all out here. I wonder if I will be able to use it at work?

Sunday, December 17, 2006 6:39:39 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: