New Year's Development Changes

1/8/2004 12:01:52 AM

New Year's Development Changes

With the new year, I started looking at how I did development.

Over the past year, I have adopted unit-testing via NUnit. I sat through a presentation on agile or extreme programming where unit testing, a key component of agile development, was discussed. Unit testing significantly improves the reliability of code. Unit testing involves writing test classes ("test fixtures") that test each class and public function within your code. NUnit makes it extremely easy to run a set of tests. I can't recommend this enough. It really makes one a better developer, more so than any other tool that I have used. I use to hate testing, but testing has become an enjoyable experience now.

Testing is no longer a throwaway effort, but now an investment, which pays off on a regular basis, every time I rerun my set of automated tests. Whenever I encounter and fix a bug, I introduce a test case for that bug to make sure it never reappears. I also have much greater freedom to change any code that I have written, because I will already have built a set of test cases that detect any new regressions from my changes. Previously, I relied on including one assert for every few statements and calling every so often functions for performing consistency checks.

This year, I decided to look at new tools. I mostly looked at tools that I have heard about and planned to adopt, but never actually proceeded to use. I found NDoc, which actually converts XML comments to MSDN-style documentation. The result is far superior to the documentation generator supplied by VS.NET by default.

Other common .NET tools include NAnt. There is much that I like about the modern, clean syntax of NAnt, but I believe it suffers for a major flaw, which has kept me from moving away from using NMake. NAnt doesn't appear to support the use of file timestamps to minimally rebuild a project. Maybe, I just don't get it. I have a number of perl scripts that generate temporary files at various stages, each of which can consume several minutes. I could combine the use of NAnt and NMake, but I plan to wait for MSBuild, which, according to preliminary documentation, will correct deficiencies in NAnt, render both NAnt and NMake obsolete, and become VS's native project format.

I had a number of tools that I collected over years, but really did not know much about. I spent a day producing an XML file detailing the name, description and other information of each tool, and wrote an XSLT transform to render the XML into HTML in my browser. I included commands provided by VS.NET and Windows. I was surprised to see a host of tools that I have, at various times, been looking for, unaware that I already had them. I didn't realize that I had diff3, for example.

I found a number of tools include Scott's Ultimate Power Tools List and Sharp Toolbox.

Some other tools that I have already used, but am mentioning because of their utility, are Anakrino and Reflector for disassembly. A number of tools from Microsoft are good. The CLR profiler is very nice, but requires some reading to become familiar with it. FXCOP shows potential as a tool for maintaining conformance to coding standards and to detect common library problems; but it requires some configuration before it becomes practical. I recently looked at ILMerge at MSR.

If you use VS.NET, don't forget about the Community Edition Obfuscator and Profiler. Both of them are fairly easy to use, and you should just play with them once just to become aware of their existence and operation. I tried them out for the first time in New Year's day.

I also looked at new commandline shells. I still use CMD, though I am thinking of upgrading to something better, either a UNIX-shell, like bash or tcsh, or a commercial DOS product, like 4NT or TakeCommand. As an experiment, I installed CYGWin, a free package, which provides a pseudo-UNIX environment complete with a UNIX commandline shell, commands and APIs. Note that this package may consume half a gig of hard disk space.

Comments

 

Navigation

Categories

About

Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media