Archive for April, 2006

TDD w/ JP

Apr 29

Normally I don’t post about life stuff but this is code related. Last
night I went to the first edmonton .NET user group meeting and had a
great time. Jean-Paul Boodhoo was the presenter and did a great talk
about test driven development amongst other things.

I have read
about TDD and all sorts of patterns books but found them hard to know
when to apply them in the real world. JP’s presentation was a begging
to middle (we ran out of time unfortunately) coding sesssion using TDD
to build an application. The cool thing was that we built the
application from the presentation tier down pretending that other teams
were doing the data / domain / service layer work.

Here were some of the cool things covered:
Rhino Mock – A cool framework to build mock objects
Resharper – A great time saver when doing TDD
Interface
driven development – I have to admit that this presentation made this
concept so crystal clear I might make a full post about it.
Model View Presenter – This changed my life. Check JP’s blog for his videos on this.

I
see know what TDD is and how powerfull it is for keeping your code
clean and simple (if you have not heard it before TDD is not a testing
model, it is a design model).

My only complaint about the
presentation is that it was not long enough. The presentation was 2
hours but I would have loved to see the project be finished. But beer,
food, and hockey were calling! :)

Links:
JP’s blog – http://www.jpboodhoo.com/blog/
Edmonton .NET user group – http://www.edmug.net/

Filed Under: General

Doing tasks before and after a build

Apr 3

NOTE: I have not finished this post but my blogging engine does not support drafts apparently. Take it as it is:

Often I have the need to do a task before or after my build.
i.e.
1. uninstall then reinstall a com+ component
2. run unit tests
3. start another program

The main one I use is the com component and here are the steps for creating this:
1. Add a new “Makefile Project” to the solution (Found under C++ projects).
2. Right click the project in solution explorer and select properties. Change the configuration type to utility.
3. On the visual studio toolbar click project and then select “Project Dependencies”
4. Select the projects that the item depends upon.
5. (Optional) In the project add batch files to run your tasks to the source files folder
6. Right click the project and goto properties
7.
Under build events set the command line (or optional batch files
created in option 5) task to run for the pre and post build events.

The crappy thing with this is that the prebuild will run after you are done.

Filed Under: Uncategorized