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. 



 Sunday, April 18, 2004
Zone Edit Updater released

Recently, I got sick of having my ip change, and my dns not be updated.  I use zoneedit for all my dns needs, and have looked into a few options for dynamic updates.  Nothing was quite what I wanted.  I wanted a little app that would update my list of domains with the current ip, only if it changes, and if it can't update, email me the ip.  So after a few nights with the thinkpad, and I have a beta.  I have been using it here now for the last day and it seems to be working well.  There are a few issues, and the email portion is not implemented yet, but it works.

If you have never looked at zoneedit for DNS I would suggest it.  Full free DNS (first 5 domains), with well priced add-ons like mail backup.  With this app, using it with a dynamic ip should be a snap  :)

Anyone whos interested, or even if your not humor me and at least check out the link  :)

www.iceglue.com



 Wednesday, April 14, 2004
Team UML update

After working with Together for VS.Net and Enterprise Architect, our initial thoughts were that Together, or at least the description of the next version from Borland, was the product for us.  The modeling was very simple, and LiveSource was a very nice feature.  LiveSource keeps the source, and the diagram in sync at all times, kinda cool.  This was despite bugs in how the current version of Together works with VSS.  There may be work arounds, but it seemed to want to check the whole project out for every change.

So we start to contact Borland while we begin testing Enterprise Architect.  Having always been a fan of Borland, I was floored by my experience with them.  It was so difficult to talk to someone about the product.  Horribly difficult.  After leaving a number of voicemails and emails to various people I was referred to, we never got any of our serious questions answered.  But two people offered to sell it to me.  To their credit, I was contacted by a support engineer a week afterwards. 

After testing Enterprise Architect, though, it was easy to walk away from Together.  Within two hour we had the corporate trial installed, a model deployed to SQL Server, and a couple developers working in the designer.  The designer, although not as convenient then being directly in the IDE, easily makes up for it with its power and flexibility. 

EA allows users to lock the various objects within the model, and does it pretty well.  You can lock and unlock items through a context menu in the model explorer, much like vss integration in vs.net.  I'd like to see more visual notifications of which items are locked.  Sometimes you start to type in a new member, and realize the object is locked. 

In all, though, EA seems like a fantastic tool.  The learning curve is pretty minimal, and has an extremely robust feature set.  As far as team enabled editors, I didn't see anything that comes close to the feature set anywhere near the price point of EA. 

 



 Monday, April 05, 2004
GO UCONN!!!!!!!
GO UCONN!!!!


c# edit and continue part 2

Did more searching on c# edit and continue, and it's not hard to find proof of the opposite.  It's a shame.

http://blogs.msdn.com/andypennell/archive/2004/02/03/66949.aspx



 Sunday, April 04, 2004
c# edit and continue & vb.net c# futures

Stumbled on this thread over the weekend.  Interesting read about the futures of VB.Net and C#, and why they may be on different paths.

First off, it's the first I have heard about c# and edit and continue.  I may have been the only one, but I was definitely happy to read that.  On the other hand, though, some of the things stated about the different paths make me worry slightly about VB.Net's future.  I hope Microsoft does not try to dumb it down for productivity, move away from the notion that VB.Net is a first class citizen.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=OY0SJiZCEHA.2256%40TK2MSFTNGP12.phx.gbl&rnum=8&prev=/groups%3Fq%3Dvb.net%2Bc%2523%2Bc%252B%252B%2B.net%2Bproductivity%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOY0SJiZCEHA.2256%2540TK2MSFTNGP12.phx.gbl%26rnum%3D8