Friday, May 21, 2004
Thinkpad T42p

I love my thinkpad.  I loved my thinkpad before this.  And I will love my thinkpad after this.  My wife even approves of my affair with my thinkpad.  Links like this make me wish my T30 was an e600 and it was time to upgrade.  Link to gizmodo preview.

Top drool factor
Finally a 15" on a T series
Make that a 1600x1250 15" screen
ATI Mobility Fire GL2

I gotta stop reading this, otherwise I might sell my car and try to drive a new T42p home.



/warnaserror and ccnet

Our ccnet was displaying a number of /warnaserror messages in our build notifications, even though the solution had no build errors or warnings.  We started digging through the files, and realized that this was because our project was set to "enable build warnings" in the build section of the configuration manager, which was supplying /buildaserror to the commandline.  This would get picked up by the ccnet xsl since it was looking for 'warning' or 'error'. 

To fix this, we changed the compile.xsl to look for ' warning' and ' error'.  The initial space stopped catching the /warnaserror arguments, but still catches real warnings and errors. 

Related question, who's using the <solution task vs. the <csc / <vbc tasks in nant? 

 



c# edit and continue, the debate roars on

I had two posts about this last month.  I saw a newsgroup posting claiming it would have e&c, and then some more material saying no way.  Now the buzz is up again, and who know what could come of it.  Check the details at Bill Evjen's Blog.

Although I do more vb.net professionally then c#, I am still a c# guy at heart.  I think E&C in c# is a huge feature, that I would love to see.  I've read the arguments (and heard thanks dnr) about c# debugging sessions being "different" then vb.net, and I just don't buy it.  This argument might fly for the c++ camp, but most of the c# developers I know came from vb, so they were used to having it. 

My vote, get it in there if possible.  There are a ton of great new features slated for c# 2.0, but this one is pretty important too, at least in this developers mind.



 Thursday, May 20, 2004
Nunit 2.2 beta.. mmmm new stuff

Was out and about, and saw a post over on Barry Gervin's blog about a new nunit.  I've been doing more and more with nunit, staring at (hopefully) green lines all day long.  Can't wait to dive into some of this.  Categories seem very nice, as well as the explicit feature. 

I also have some ideas on an nunit addon for easing database development testing.  Some of the things that come to mind are
DBAssert.IsEqual(tablename,whereconditions(),fieldvaluetomatch)
Attributes for sprocs or inline sql to run on the way in, and out of a method
DB.Run(ArbitrarySql)

Amongst some others that I will gather and post.  In my head, I see DB testing as a huge hole in nunit, that could be rather simply solved.  Making it easy to check db values, and abstract some basic DB operations in your unit tests would really help alot.  Of course I don't expect any of these ideas to be the holy grail of DB unit testing, but would at least help in the projects I have been on.  Just even a simple way to check that any given CRUD operation succeeded or failed would help for the majority of DB unit testing.  Anyone had any thoughts on db testing?

Get the latest nunit here.



First post from VisualBlogger 2004
Trying out visualblogger.  I'll post a few and then my thoughts on the app  :) 


 Friday, May 14, 2004
dot in a Database Project

I spent about 45 minutes on this one, and could have just slapped myself silly at the end.  I was trying to re-create a database on my thinkpad from a vs.net database project.  When the dialog popped up asking where to run, I would tell it . (dot), and the database name.  It would get through the first few commands, and bail on the bcp. 

I never even thought to try something but dot.  I always use dot.  I like dot.  Dot is my friend.  But, bcp doesnt seem to like to address a local DB as dot.  Just a word of advice for anyone who may be using dot to specify local host, and can't figure out why the db project loads on their neighbors box, and not theirs. 

And for those of you that don't use a db project to manage their db and sprocs, get on it.  Very very cool feature of the IDE, especially when you factor scc in.

 



 Thursday, May 13, 2004
New take on TDD?

Was reading this morning, and ran across this post on Datagrid Girl's blog.  What a fantastic idea.  My mind immediately started rolling, and in a perfect world I see this app that writes testfixtures for a product development or QA group, and ties them all back to use cases/functional requirements.  Talk about true synergy between teams.  This will be floating around in my head all day now I think.

/me thinks about a possible Enterprise Architect plugin for just this.. hmmm

 

 



 Wednesday, May 12, 2004
Nant, nunit, and config files

I've been stabilizing our build process at work, and have found some oddities in using nant and nunit.  The issue's roots seem to come from handling of config files.

Here is what's happening.  We maintain a “program” solution, and a “test” solution.  The program solution has its own config file, and we needed a way to have the test solutions also carry a config file.  We tried a number of different ways, but ended up using a test.config, which the testfixtures copy to assemblyname.test.dll.config for automated testing.

The nunit2 task in nant supports providing a assembly, and a config file.  So I went from using a fileset including **.test.dll, to using a number of <test> tasks, each individually specifying the assembly and the config file.  This seemed to get close to working, but would still intermittently throw odd errors that I couldn't track down.  The part that gets me, is calling nunit-gui or nunit-console on the same assemblies would not throw an error.  Looking into the nant code, we saw that nant creates a new appdomain, and that’s why when using the nant task you must specify the config file, but it doesn’t seem to work, or at least not reliably.

After hours of mucking around with config files, and tasks in nant, I finally broke down and added an <exec> task calling nunit-console for each assembly we wanted to test.  It is not as dynamic as I was shooting for, but now it seems to work very reliably, so I am willing to sacrifice flexibility to reliability in this instance.

My question, though, is who else has seen behavior like this?  We have the nunit2 task working for assemblies without config files, but with them it just doesn’t seem to fly.  Anyone else notice this?

 



 Sunday, May 09, 2004
IceIP Beta2 Released with source

Just put out a new version of IceIp, now with c# source.  Get the details over here.



 Friday, May 07, 2004
Appropriate "cargo cult" coding?

After reading Jason's post about Cargo Cult programmers, it made me think about times when this may be appropriate. 

A friend of mine who owns a software company has approached me to do some work for him.  He has a project that needs a few new textboxs, a few elements moved on reports, etc.  I told him I would look at the code see what we can do. 

After looking at the code, it was obviously a cargo coder job.  Win forms app, access backend, inline sql, with a ton of replace(string,”'”,”''”) lines, etc.  Looking at the code I can't help but cringe, but thinking of the apps purpose really put me in perspective. 

This is a very small app used to manage an intramurals sports league.  Now this is not a typical app out of his shop, but definitely closer to what he sees on a daily basis then what I see.  And I can't help but think, is there a place for cargo cult coders? 

The apps that they work on are typically one or two user apps for smaller vertical companies.  This is the kind of app that a coder like me might make into 4 tiers of highly abstracted objects, modular ui, the whole nine yards.  At the end I could step back and look at my masterpiece, and send a bill probably 2 to 3 times that of the cargo cult coder that would do the same app in half the time. 

So now should I preach to him design patterns, the beauties of tiered environments, and really try to push my passion on to him?  I think I could, but boy would he be bored.  But to the same point, if I worked on smaller apps like this on a daily basis, I would be bored.  This begs the question, is there a distinct line between the passionate, and the business side, and is there value in this line?  I think so.  Of course any developer he works with could catch the bug and start reading everything Fowler, and more power to them, but then I think they would outgrow their role, still leaving the need for a new cargo cult coder.  Thoughts?

 



Don't null objects

In a design session earlier this week, two of us were working on our transaction handler.  One of the things that came up was how to implement IDisposable, since we wanted to make sure we did some housecleaning when the unexpected happens. 

We all know that we're in a managed environment now, and sometimes it becomes unclear to the developer what, and when to clean.  One thing we visited is setting objects to null/nothing.  I was pretty surprised to read that this can extend the life of your objects, but after thinking about it, it makes total sense.

The GC collects based on when the object was last used, and the CLR sees setting an object to null/nothing as a use, therefore settings to null/nothing has the possibility of extending your objects life. 

It is important to understand the distinction between disposing an object, and setting it to nothing.  The IDisposable pattern notes that in Dispose() we should free unmanaged resources, which is still very important.

Moral of the story, in most situations its appropriate to just let your objects falls out of scope, unless you are utilizing managed resources, in which you should implement IDisposable.  Not new information for anyone, but a friendly reminder since it was on my mind.

 



New Iceip this weekend

For anyone thats interested, I plan on releasing a new version of Iceip this weekend.  This time with the code.  Iceip is an app I made to keep my zoneedit profile up to date since I was sick of updating my ip daily.  There were other options out there for apps, but none of them suited me quite right. 

Iceip runs as a windows app, and works exclusivley with zoneedit.  My goal was to make an app with a small footprint that would find my ip, compare it to the last time it checked, and update a number of domains if my ip changed.  I have been using it for a few weeks now, and it works pretty well.  It also logs everything, so I could even see when snet had a fiber cut a couple weeks ago.

The app is written in c#, and uses a dataset to store all the options and history.  Again, basic, but does the job.  The new release will have an updated ui, and a few bug fixes.  You can always get the latest version from my home site.



 Tuesday, May 04, 2004
Free stuff always rocks - Free xdn professional

I had just been looking at xtras.net, and had almost signed up.  So I was pretty happy when Jeff posted about a promotion they are running for .net bloggers, so I'm going to try to cash in on the deal.  Heres the details .

 

Mike Schinkel, president of Xtras.Net, made an offer on his personal blog of a free XDN Professional membership (http://www.xtras.net/xdn) during the month of May 2004 for anyone that blogs about .NET frequently. If you are a .NET blogger, see Mike's post for how to get your free XDN membership.



 Monday, May 03, 2004
DateTime woe's

I have always known that working with value types in .net can be a hassle, simply because sooner or later you want a null.  Not some value that represents a null, but a real null. 

At work we came across this yet again.  The issue is that any given entity can have a DateTime field, and how do you expose that in such a way that you can set it from any source, and get it in such a manner you can reliably check for null.

On past projects I have seen date fields exposed via string properties, and the accessors do the dirty work.  I am thinking we should be doing the same here, but now with more “inputs”.  Its frustrating that if you set a field from a DataReader.Item, a DataReader.Get(Type), or a DataTable, you may have diff values, even if the value is the same in the database. 

My plan is to make a DateTime replacement that will handle data coming from a variety of sources (via Object), and then always expose strings.  This seems like the cleanest way to implement it while still being able to encapsulate most of the work, but still seems far from ideal.

Has anyone seen any elegant solutions for handling this?  I thought I had seen “nullable datetime objects” around before, but when it came time to find one, I was SOL. 

 



Slow posting

I really wanted this to be more active then it has been lately, but it is for good reason.  I have been working on an article outlining the build process I have posted about.  It should hopefully be available later this month, and will outline how all of the products work together, as well as samples of how to tie everything together.   More details to come,,,



DotNet rocks.. addiction?!

It was about a year ago that I found .net rocks.  After listening to the current episode, I decided to go back and listen from the start.  Last Friday I was finally caught up.

So first of all I would like to thank Carl, Mark, and of course Rory for giving us such a fantastic show.  I wear my geek badge proud as I drive down the road with my windows open, and the theme from google weirdo’s blaring, and the guy in the truck next to me looking at me really funny.  Anyone that hasn't given the show a shot, make sure you do. Check it out here

Here in lies the issue though.  After listening 2 hours a day for months now, what am I to do?  My first inclination was to only go to work when there’s a new episode, but I figured that both my boss and my wife wouldn't be very happy with that. 

So now with this void in my life, I guess I will either have to learn to like music again, or just start from episode one again.  Maybe I'll see into getting some old episodes of car talk as a nice happy medium. 

 



 Monday, April 19, 2004
new logo
Thanks to Thomas Johansen for the new iceglue logo!


ccnet, nant, ndoc, nunit oh my

Build process prototype finally complete.  Thanks for McP's initial prototypes, I finally got the process working end to end today.  Although a bit of a chore to get everything going, once it's going there's nothing better then checking in some file and seeing ccnet kick off the whole process. 

ccnet watches vss (probably change this to a few daily builds)
ccnet kicks off nant build script
nant builds both sln, and test sln to versioned dir
nant kicks of nunit on test sln
nant kicks off fxcop on sln
nant kicks off ndoc/vbdoc and makes html/chm
nant cleans/copies to latest
ccnet collects nant, nunit, and fxcop results, emails buildmaster, and waits for us to check on web

Hardest part was getting fxcop and nunit results into ccnet.  After some searching, I found the easiest way was to kick out both logs to a XX-results.xml in the latest dir, then have ccnet merge the files into mail ccnet file.  The newest build of ccnet handled fxcop out of the the box.

Couple this with the document generation out of EA, and whats left for us to do?   Oh yeah, code.