February 2003 - Posts

Terrorism Humor

ATTENTION

We've just been notified by Security that there have been seven suspected terrorists working out of your office. Six of the seven have been apprehended. Bin Sleepin, Bin Loafin, Bin Goofin, Bin Surfin, Bin Lunchin and Bin Drinkin have been taken into custody.

Security advised us that they could find no one fitting the description of the seventh cell member, Bin Workin, at your office. Security is confident that anyone who looks like he's Bin Workin will be very easy to spot.

You are not a suspect at this time!

Fred Rogers 1928-2003

http://www.misterrogers.org/

I can't imagine that many bloggers haven't had Mr. Rogers in their lives either as a child or the parent of a child. I've had the opportunity to have him in my life on both ends. The world will miss Fred Rogers.

It's a sad day in the neighborhood.

Posted by Wayne Allen | with no comments

Cool VS.NET Feature

From Scott Hanselman's Weblog

Again, my buddy Sairama to the rescue. Just when I think I've pretty much got VS.NET down solid (only being use it since Pre-Beta days, right?) I'm thrown a curve ball called incremental search. I guess I just assumed that a feature that was so cool in so many other editors would never make it into VS.NET. Silly me.
So, lest I be the most ignorant, fire up Visual Studio.NET, get some code in there, hit Ctrl-I and start typing. After you've found something, use F3 to Find Next. In the words of Chris Sells - It's pure sex.

Cool feature indeed!

Posted by Wayne Allen | with no comments

Ingo's Distributed .NET Newsletter

From Ingo - his free "Distributed .NET Newsletter". After reading his book and his weblog for a while I appreciate his straightforward approach. Sign up, I did.
Posted by Wayne Allen | with no comments

How to be a Programmer

Mike Gunderloy turned me on to this paper by Robert L. Read.
Posted by Wayne Allen | with no comments

Pair Programming

Today was a great day! After spending most of yesterday and this morning chasing down a deployment bug that turned out to be a mis-registered COM object (worked in DEV, but not in QA) I spent the rest of the day pair programming with a new employee. We decided as part of his orientation that we should develop an extension to the ConfigurationSettings.AppSettings to be aware of the environment the code was running in. This has been a desired feature for some time now as we spent too much time twidling config files after deployment. After consulting with a couple of other developers on the design we plowed ahead, test-first.

I prefer to develop with an intentional programming style, sometimes to the detriment of test development. My excuse being that how do I know what I should test if I don't know how my client code wants to use the functionality I'm trying to develop. My partner parried with the idea that tests can be refactored as the design progresses, to which I had no argument. My only instance was that we developed tests that mimiced the client code as much as possible and only wrote more detailed tests after the real design started to emerge.

The only real challenge was when we wanted to write tests against specific environment settings. We had designed the component to look up the machine name in a list to see which environment the value should come from. But for testing purposes we would have no idea what the machine name would be since any developer could run the tests. We talked about creating a mock object to simulate the machine name lookup, but the overhead of creating an interface and two instances or a class and a subclass seemed like overkill. We settled on a protected method that lets us set a default machine name if the machine name was not in the list. We made it protected since we didn't want to see this method called from any production code as the desired behavior was to throw exceptions if the config file wan't set up correctly.

We had the component working with all the test running in ~3 hours. We took a break for lunch and to catch up on other happenings before integrating our new functionalitly into an existing application. My co-worker also spent some time looking for a way to import an xml fragment into a config file with no luck. I know I've seen this in online examples somewhere, but was unable to put my finger on it.

During the afternoon we integrated the new config component into the application and made only one small change to the component. We changed the testing default machine to the default environment and made the method public so tests in the applications could specify which environment to use for testing. We did make the method name explicit to its testing purpose 'SetDefaultEnvironmentForTesting'.

Posted by Wayne Allen | with no comments

More nAnt

I was playing with nAnt today to try and auto-generation version/build numbers so I wouldn't have to keep track of them. Luckily (via Google) I came across John Lam's nifty version task. Just an aside for those wanting to use John's task or write your own - the naming convention for task assemblies is "*Tasks.dll", note the plural. If you don't name your task correctly (and place it in the bin folder) nAnt won't recognize it.

The next step is to combine John's approach with that in the nAnt.build file to update the AssemblyInfo.cs file with the version number.

Additionally I need to label the source tree with the version, which should be simple since I am already interacting with VSS.

Posted by Wayne Allen | with no comments

Shuttle

Like many I am saddened by the loss of the crew of Columbia. It is one of those defining tragedies in the collective memory. I still remember the exact place I heard about President Reagan being shot, the Challenger explosion, 9/11 and now the Columbia.
Posted by Wayne Allen
More Posts Next page »