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]  | 
Friday, April 27, 2007
Tonight the Edmonton .NET User Group celebrated its one year anniversary with a presentation by Chistians Izquierdo at the Maverick Brewery. Looking back at a year ago I never would have dreamed that I would have changed this much professionally as a developer due to the efforts of this community and due to guidance of the quality speakers we have been fortunate enough to have.

There are probably 2 turning points in my professional career that made me strive to be better at my profession. The first, was a manager telling me "you don't know what you're doing" (I admit I didn't know what I was doing at the time).  After that managers words, I wanted to prove him wrong so I found the .NET Wizards and met other developers that could help me get better.

The second turning point was a car ride to the first meeting of the newly formed Edmonton .NET User Group where Jean-Paul Boodhoo stated to me "we are the next generation of software developers." Those words said to me that I could either choose to be more pragmatic about how I approached my career or I could be left in the dust, it was my choice.

If I can pass on anything that I learned from a year of the Edmonton .NET User Group, it is to strive to be the next generation of software developer. Don't let yourself be left in the dust and always look for ways to improve your skills. Never forget that if you look to the person on your left you may see someone who is better than you at software development, but if you look to your right there is someone striving to be you. Strive to be better than the person on your left and mentor the person on our right!

Cheers to another year of being the next generation of software developers and thanks to the community who has helped make the Edmonton .NET User Group a success.

Friday, April 27, 2007 5:16:52 AM (GMT Standard Time, UTC+00:00)  #    Comments [3]  | 
Saturday, April 21, 2007
Saturday, April 21, 2007 5:50:56 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Monday, April 16, 2007
Last year the Edmonton Developer Communty went down to Calgary Code Camp and won all the prizes. This year we are paying our dues and presenting. I will be presenting an Introduction to Windsor Container from the Castle Project.

Here is my abstract:

What if I told you that you never had to make an object instantiation again? Using an Inversion of Control container like Windsor Container from the Castle Project ( http://www.castleproject.org) will enable you to code to abstractions without worrying about wiring up your object dependencies. In this session I will take an example application built without using Windsor Container and refactor it toward a cleaner design utilizing Windsor Container and Inversion of Control. During the course of refactoring toward using Windsor Container, you will be introduced to some of the benefits that using an Inversion of Control container can bring to your project.


Last year the code camp was a lot of fun, if you are from Edmonton consider taking a trip down on Red Arrow, the trip is cheap and they have wireless.

Monday, April 16, 2007 5:47:11 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Sunday, April 15, 2007
After an unfortunate incident involving freshly brewed coffee and a curious puppy my laptop was fried. It came back for a week but only to say goodbye. At first I thought that my laptop dieing was a bad thing but then I realized that I could buy a new laptop!

Today I decided to join a elite group of people and buy a new MacBook Pro!

Here is a photoshopped representation of what I will look like in a couple months:

Dude

Sunday, April 15, 2007 12:08:07 AM (GMT Standard Time, UTC+00:00)  #    Comments [4]  | 
Thursday, April 05, 2007

   85 [TestMethod]

   86 public void ShouldEnumerateIntegers()

   87 {

   88     IEnumerable<int> multipleOfTwo = GetIntegerList();

   89 

   90     Assert.IsNotNull(multipleOfTwo);

   91 }

   92 

   93 public IEnumerable<int> GetIntegerList()

   94 {

   95     for(int i=0; i <= 10; i++)

   96     {

   97         if (i % 2 == 0)

   98             yield return i;

   99     }

  100 }

Thursday, April 05, 2007 5:16:16 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 
Thursday, March 22, 2007

If you are stuck using MSTest as your unit testing framework you may run into problems if any of your tests depend on external files.

MSTest creates a TestResults directory:

image001

A directory made up of your login name, computer name and a timestamp:

image002

and a In and an Out directory:

image003

 MSTest then copies all referenced assemblies to the Out directory and runs the tests in that directory. The problem is that MSTest does not recognize any XML configuration files (besides App.config) as dependencies and they are not copied to the Out directory so your test fails.

To remedy this you need to specify your external dependency as a deployment item in an attribute at the beginning of your test and specify the path to the deployment item:

[TestMethod]
[DeploymentItem("WindsorTestConfiguration.xml")]
public void ShouldUseDependencies()
{
    IWindsorContainer container = new WindsorContainer(new XmlInterpreter(@"WindsorTestConfiguration.xml"));
    Assert.IsNotNull(container);
}
Thursday, March 22, 2007 5:42:51 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

At work I was given the opportunity to build a new piece of complex functionality for the application that I have been working on for the last 6 months. After taking the excellent Nothin But .NET training course instructed by Jean-Paul Boodhoo I decided to try building the new functionality using the domain driven design techniques I learnt at the course.

To me, the domain driven design section of the course was a real eye opener, it taught me to concentrate on the problem I was trying to solve and not worry about infrastructure code. 

To start off the process I met with the domain expert and tried my best to come up with a ubiquitous language that made sense to both of us. It was hard not to talk about interfaces and classes with the domain expert. I even noticed that the domain expert at times would try to translate things into technological terms for me.

Next I created a new solution completely separate from the solution that already existed. My reason for doing this was that before I even started trying to create the new functionality for our system, there was data waiting for me in the database whose sole purpose was to assist me in solving the problem at hand. That data to me, would only distract me from solving the problem and have me worrying about how I was going to get it out of the database.

I wrote my tests first and refined the design of the domain a little at a time only when a new problem presented itself. The next thing I new the problem I was trying to solve had solved itself slowly using tests and small concentrated refactorings. The hardest part was not getting ahead of myself and trying to stay disciplined throughout the process.

I am pretty proud of the solution I eventually came up with although I know that there is room for improvement in the steps I took to solve the problem and the code that I eventually came up with. If you have done domain driven design at work and have any tips for me I would love to hear them. This experience was highly rewarding and I'm not sure if I can go back to the way I coded before.

Thursday, March 22, 2007 2:48:02 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Tuesday, March 06, 2007

After learning about the MbUnit plugin for ReSharper from JP at the Nothin But .NET bootcamp, I was really happy to see that James Kovacs has come up with a VsTsUnit plugin for Resharper. If you are forced by your client to use the MSTest for your testing this is something you should install to make your life easier.

Tuesday, March 06, 2007 7:41:07 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 

Theme design by Jelle Druyts

Pick a theme: