January 2008 Entries

OracleParameter AssociativeArray bug in ODP.Net 11

Today I was writing some code that was wrapping up stored procedures for an Oracle database.  In one situation we were needing to retrieve a result set based on a list of values that we had in memory.  Oracle provides a really sweet bit of functionality that allows you to pass an array to an OracleParameter object and have that value passed through to your stored procedure as one parameter value.  I have no idea how this looks or works on the stored procedure side of things, but it's pretty slick in .Net.  All you need to do...

Nothin But C# v3.5 Edmonton

It's official.  I will be offering the Nothin But C# v3.5 course in Edmonton during the week of March 31st to April 4th.  If you're familiar with JP's Nothin But series of courses, you'll know what this is going to be like.  If not, here's a brief synopsis of how the course will work. You arrive in the morning prepared to learn about C# and .Net 3.5.  I will take you on a coding ride that will end, depending on your willingness and availability, somewhere between 8 and 16 hours later.  Rinse and repeat for each of the five...

Victoria Code Camp Wrapup

I was out in Victoria last weekend working on my ability to sell myself as well as presenting on C# 3.0 and .NET 3.5 Beyond Link and Parachuting into a Brownfield.  Nolan and the people at the Victoria .NET Developer Association have scored a really great location at UVic for this event.  The building is new and clean, the rooms are large and comfortable and the A/V equipment is fantastic. I'm not going to post any code for my C# 3.0 talk.  Instead I'm going to point you to a couple of posts from last summer.  These three posts...

Victoria Code Camp '08

If you've got the time this weekend, and you're in the area, drop by the Victoria Code Camp.  There are some brilliant speakers at it this year and Tom, Dave and I are presenting in an attempt to ensure some level of mediocrity.  I'll be up in the afternoon doing presentations on .NET 3.5 and C# 3.0 Beyond Linq and Parachuting into a Brownfield.  Nolan has setup a Code Camp blog that some of the different presenters have been posting to.  It' a pretty cool idea to have something like this to get people interested in the speakers...

Setting environment dependant properties in nAnt

This is a little something that I discovered recently while writing some nAnt scripts.  I love to have One Script to Compile Them All so that I can ensure that the build server and all the developers are compiling and executing the tests in the exact same manner.  One of the things that you will find is that you'll have some variable values getting set one way for the local build and another way for the build on the build server.  A really good example of this is what I was showing in my recent post on versioning assemblies using...

Controlling the unit test environment

My last post talked about abstracting the implementation of an IoC container so that you could implement more than one container if you had the need to.  One of the coolest uses of this kind of abstraction that I've seen in quite some time is what JP Boodhoo did in his Nothin' But .Net Store codebase.  I'm going to summarize it here, but you need to look at the code to see how sweet it really is. In the code base JP has abstracted his IoC container in a very similar way to what I showed in my previous...

Always wrap up your third parties

Today I was working through some code refactoring when I came across my implementation of the Castle Windsor container exposed off of the Global.asax file.  I had put it there because I needed to get it initialized during Application_Start and I wanted to put it somewhere that was easy to get at from the rest of the code.  When I exposed it off of Application_Start, I did it as a property of type IWindsorContainer. In the end I needed to be able use a different implementation of a container.  Since I'm not in control of the IWindsorContainer interface, I...

Training -- Nothin' But .NET 3.5

As you've probably already read on JP's blog, I'm going to be doing some training through him starting this year.  The first course that I've been designing is a take on his Nothin' But series and style of courses.  Semi-coordinated with the official launch of Visual Studio 2008 and .NET 3.5, I've put together a course called Nothin' But .NET 3.5. The course will center around the new language and IDE features that were released with Visual Studio 2008 and .NET 3.5, plus some time with the ASP.NET MVC framework as well.  As if that wasn't enough to keep...

ReSharper 3.1 gotcha with .NET 3.5

My current project is working in .NET 3.5 and, of course, I've pimped my IDE with some ReSharper goodness.  I've noticed one thing that is making me itch for the day that ReSharper v4 comes out.  If you are using an extension method in your code you need to have a "using" statement for it's namespace or else the code won't compile.  When ReSharper analyzes the "using" statements it doesn't pick up that this namespace is being used since it has no idea what extension methods are.  As a result the "using" statement is greyed out and if you use...

Was it a failure?

The last contract that I finished up was very trying on many fronts.  One of the things that they sold me on during the hiring process was the fact that they were following Agile practices.  On arrival it was pretty apparent to me that their definition of Agile was quite different from mine.  One of the tasks that I took on during the year I was there was to try to bring more agility to the process. During the year I fought to try to get the test team into the iterative process so that we could say that...

Versioning Applications Using nAnt and CruiseControl.NET

During my presentation at DevTeach in Vancouver, I showed a technique for setting up versioning of your applications using nAnt and CruiseControl.NET.  Since then I've had a couple of people ask me if I could post something on this as they missed getting notes on it when they were in Vancouver.  Here we go. Versioning of .NET applications is done through the values that are in the AssemblyInfo.cs file.  When you create a new project in Visual Studio that file is created for you.  In it there is a bunch of assembly metadata information.  AssemblyVersion, AssemblyCompany, AssemblyTitle and a...