Thursday, February 08, 2007

Tonight I am coming back to Edmonton from Maui. Besides coming in during a big storm, the weather here has been nothing but good to us. Check out what it was like when we got here: http://www.west-wind.com/weblog/posts/10516.aspx

I'll post more later but I wanted to link to Rick's post now so I don't forget.

Thursday, February 08, 2007 1:18:59 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Tuesday, January 30, 2007

Call me crazy right now before you even start reading this post just to get it out of the way.

I think it would be great if comments were removed from programming languages entirely. I think they do more harm then good and that if we removed the ability to use them a lot of us would have to be more disciplined when we code. Now, before you get all worked up hear me out. Here are my reasons for abolishing comments into programming language history.

1: If you couldn't use comments in a programming language you wouldn't get people admitting that they don't know what they are doing like this.

2: Comments are a code smell. If you couldn't use them you would have to explain what you are doing in a method name or with your code. 

3: TODOs are more often than not forgotten and rot inside the code. Maybe a TODO is better off as a story. Do people really need to know that you "hacked" something to make it work?

4: No one deletes commented out code, if you couldn't use them code would be a lot cleaner.

5: Comments are a way to temporarily get your code to compile but does it really need to compile or do you just need to write a test and some functionality that isn't there yet?

I would like to hear some arguments for keeping comments in programming languages. If not lets get rid of them! Viva Le Revolution!

Tuesday, January 30, 2007 8:06:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [7]  | 
Monday, January 29, 2007

DSCF1038Last weekend Catherine and I went to the Bridal Fantasy here in Edmonton. We went mostly to get ideas for the wedding and enter draws. One of the draws we entered was for a trip to the Bahamas, and on the ballot it said "Only one entry per phone number" so I told Catherine to put her cell phone.

This week to our surprise we both one trips to the Bahamas! Well not really, we both won the opportunity to be scammed. The people that phoned us wanted us to give them a processing fee of only $399 US and to take care of our flight to Florida. Only after that would they take care of our hotel and send us on a cruise. Doesn't sound like we won anything to me especially since not everything on a cruise is taken care of.

Hopefully other couples that are getting married in Edmonton are smart enough not to fall for this scam because weddings are expensive enough already without someone trying to scam you. On that note, I am off on a real vacation to Hawaii next week, watching the Super Bowl in the US is going to be sweet.

Monday, January 29, 2007 12:08:03 AM (GMT Standard Time, UTC+00:00)  #    Comments [3]  | 
Friday, January 19, 2007

Open Command Prompt Here Power Tool: CmdHere.exe

TimeSnapper: http://timesnapper.com/

Replace you regular command window with the Visual Studio 2005 command window by creating a bat file and adding this snippet:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"AutoRun"="\"C:\\Program Files\\Microsoft Visual Studio 8\\VC\\vcvarsall.bat""

 

The Parchment theme and the rest of the Visual Studio 2005 themes form: http://idehotornot.ning.com/

 

Others that I can't live without but you probably already know about:

NUnit, NAnt, MSBuild, Resharper, and SlickRun.

Friday, January 19, 2007 8:42:59 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

<Disclaimer reason="I normally don't do these" exception="but its about programming languages" />

 

You are Lisp.  Very few people like you (Probably because you use too many parenthesis (You better stop it (Reallly)))
Which Programming Language are You?

Friday, January 19, 2007 5:28:26 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Sunday, January 14, 2007

If you are free tomorrow (Monday, January 15th) from 6-9pm make sure to come check out Miguel Castro at the Stanley Milner Library. He will be talking about designing applications for extensibility. As always there is also the chance to talk and network with your .NET developer peers before and after the event.

You can get a sneak preview of the kinds of things he will be talking about from his appearance on the Polymorphic Podcast. Also if you would like to study his code and presentation material before the presentation so that you understand it better you can view it at SteelBlue Solutions under the Downloads->Presentations link.

Sunday, January 14, 2007 8:33:10 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Say you have the following directory structure:

DirStructure

To compile all projects under the src directory you can use the following code:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ProjectFiles Include="C:\YourApplicationFolder\src\**\*.csproj" />
  </ItemGroup>

  <Target Name="Compile">
    <MSBuild Projects="@(ProjectFiles)" />
  </Target>
</Project>
This will loop through all the folders and build each project file. Since MSBuild automatically resolves dependencies between projects, it will build everything in the correct order.
Sunday, January 14, 2007 6:12:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
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]  | 

Theme design by Jelle Druyts

Pick a theme: