Friday, June 22, 2007

I love the close all but this menu option that Visual Studio gives you when you right click on a tab but I have been looking for a keyboard shortcut for it for awhile. To set one up go to Tools > Options > Environment and type in File.CloseAllButThis and enter in your shortcut keys, I chose Ctrl + Shift + Y for mine.

CloseAllButThis.png

Friday, June 22, 2007 4:53:15 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Thursday, June 14, 2007
I can now use the Alt key to access the menu options!


safariwindows

Thursday, June 14, 2007 6:27:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Tuesday, June 12, 2007

I just noticed that ITunes has a new section called ITunes U. I checked it out and I was happy to see that they have a couple of Computer Science MIT Open Courseware courses available for download.

In addition to MIT there is a number of other Universities from the US offering courses for free download.

Tuesday, June 12, 2007 7:03:36 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

In the 4 hour work week Tim Ferriss talks about Parkinson's Law. Parkinson's law states that  "work expands to fill the time available" which seems to hold true for me. I figure that if I have time to spare I can read RSS feeds for just a little while or check email. 

To combat this I have been setting fake deadlines to challenge myself. In the morning I usually have a lot of meeting so setting a deadline of noon to finish things is really challenging, if I finish the task before then it is a lot more rewarding than if I let it swell to the time allotted for it.

Tuesday, June 12, 2007 4:40:16 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Friday, June 08, 2007

A concept that I like from the 4-Hour Work Week book is that we are not naturally multitaskers but we convince ourselves that we are.

Try and take one task during your day and do it without getting distracted by anything else, I bet you can't. The distraction can include other people, outlook, or meetings try to eliminate it!

As a developer if I am working on a piece of code is there really a reason for me to have Outlook open? It is natural to say yes, but

The first thing that I tried to implement in my life from the book was setting times that I could check email and sticking to them. My times were 11:30am and 4:30pm. How did it go? It went really well and I quickly found out that email wasn't as important as I previously thought it was. I also found out how hard it was to change the habit of letting things like email take a backseat to the task I wanted to accomplish. My best advice is to disable the popup that comes up when you get email and to disable any sound notification

Friday, June 08, 2007 10:42:33 PM (GMT Standard Time, UTC+00:00)  #    Comments [3]  | 

Last week I finished reading the book 4-Hour Work Week by Timothy Ferriss. The book is very motivating to say the least, I highly recommend it.

After I read it I stepped back and took a look at my profession and my life to try and find out what makes me happy professionally and personally. Over the next little bit while I am waiting for my foot to heal, I am going to post on various topics from the book that I have tried implementing in my life as a software developer. Hopefully they help out someone else as well.

Friday, June 08, 2007 6:54:59 AM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 

Last year I had an unfortunate incident where my foot met a puck. Once again my foot has met a puck and I will be in a cast for a yet to be determined amount of time. If I have any advice for other software developers that need to get a cast it is to bring a book that you haven't been able to find the time to read. I guarentee you that getting a cast will take a lot longer than you expect and you will be able to finish your book.

brokenleg

Friday, June 08, 2007 5:43:25 AM (GMT Standard Time, UTC+00:00)  #    Comments [4]  | 
Monday, May 21, 2007

One thing that makes me a better developer is keyboard shortcuts, the problem is that they aren't very discoverable and you usually have to download a keymap for each application.

After using my Mac for awhile I really missed the alt key from Windows to pull down menus. Jonas introduced me to Keycue for Mac OSX, it is a utility that shows all keyboard shortcuts for the application that you are using after you hold down a hotkey (the Apple key) for a certain amount of time.

Now I am left wondering why Windows doesn't have something like this!

Monday, May 21, 2007 9:36:07 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 
Wednesday, May 16, 2007

I have been looking for a quick and easy way to implement logging into our application while writing tests. The problem is that logging is a cross cutting concern and I feel dirty adding logging code into every class.

I originally started looking at a number of Aspect Oriented Frameworks with grand plans to use them for other concerns, then I ran into this comment from Hammett on the Castle Project forums:

 "Honestly, the interception capabilities that Windsor provide is enough for me, that's why I havent searched for a full-fledged AOP tool yet."

It turns out that the interception capabilities of Windsor solve my logging problems as well.

Here is a simple example that demonstrates the Interceptor capabilities of Windsor.

I have a ICalculator interface with one method named Calc that takes the parameters x and y of type int.

public interface  ICalculator
{
int Calc(int x, int y);
}

I have a concrete class that implements that interface. Notice that my concrete class does one thing well (adding two numbers) it does not add two numbers and log well.

public class Calculator : ICalculator
{
public int Calc(int x, int y)
{
return x + y;
}
}
Our Windsor configuration looks like this:
<component id="calculator"
           service="MyAssembly.ICalculator, MyAssembly"
           type="MyAssembly.Calculator, MyAssembly" />

Now we can create a logging interceptor to log calculations:

public class LogInterceptor : IMethodInterceptor
{
public object Intercept(IMethodInvocation invocation, params object[] args)
{
Console.WriteLine("Invocaton Method: " + invocation.Method.Name);

foreach (object o in args)
{
Console.WriteLine("Args: " + o);
}

object retValue = invocation.Proceed(args);

return retValue;
}
}

This class will log the method name that was called and the arguments that were passed to it to the console and then proceed with the method that it intercepted (Calc in our case). Now using Windsor we can add logging to any class that needs it, all we need to do is add the InterceptorAttribute to the Calculator class that needs logging and to modify our Windsor configuration file:

<component id="log.interceptor"
             type="MyAssembly.LogInterceptor, MyAssembly" />
        
        <component id="calculator"
             service="MyAssembly.ICalculator, MyAssembly"
             type="MyAssembly.Calculator, MyAssembly">

            <interceptors>
                <interceptor>${log.interceptor}</interceptor>
            </interceptors>

        </component>

Anytime we call Calculator its values will get logged to the console without modifying the intent of the calc method. Very cool!

Wednesday, May 16, 2007 5:52:11 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Thursday, May 10, 2007
Mark off September 1st, 2007 on your development calendar with the help of Edmug, i've managed to secure a bigger spot for Edmonton Code Camp 2007 at the Fantasyland Hotel. Stay tuned to the Edmonton Code Camp website and the EDMUG meetings for information on how to be a presenter at the code camp, how to be a contributor to the code camp or to register to attend the code camp. This year we are hoping to add an additional track for a grand total of 3!

Wednesday, May 09, 2007 11:37:54 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Thursday, May 03, 2007

I'm finally recovering from the 2007 Calgary Code Camp. It seemed like every presenter I talked to, including myself had very little sleep all weekend. A big thanks go out to James Kovacs and the organizing committee of the code camp, it was tons of fun and I am already looking forward to next year.

My presentation on Windsor Container went well. I am unsure if I am going to talk over screencasts during my presentations anymore as it is to slow and I am more confident in my typing and presenting abilities.

For now I am going to release a screencast on setting up a simple component that was intended for the code camp attendees. You can download it here you can download the code for my presentation here. I am open to any feedback or questions that anyone has on Windsor Container, please contact me and I will do my best to answer.

A couple of attendees at my presentation asked if Windsor Container supported constructor based dependency injection and the answer is absolutely! I will be coming out with another screencast soon that will explain inversion of control more in depth and show how you can refactor towards using Windsor Container.

Thursday, May 03, 2007 3:20:40 AM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 

Theme design by Jelle Druyts

Pick a theme: