October 2004 - Posts

I like unit testing, but I don't care for NUnit.  Well, I've nothing against NUnit per se, I just don't like adding dependencies to my build process and redistributions, unless absolutely necessary.

While it's usually no big deal to incorporate NUnit into a massive application development project, it's far too much hassle to incorporate it into every single little class and component I write and publish.  Unfortunately, it's those little library classes and code samples which seem to benefit the most from unit testing...

So, I've taken it upon myself to cook up a simpler alternative...

My latest (last?) Mobile Ink Jots column is up on MSDN:  learn how to write solid, secure, thread-safe, exception-hardened, resource-friendly, locale-aware Tablet PC code.

http://msdn.microsoft.com/library/en-us/dnmobink/html/WritSldTabAp.asp

The advice is sound (I hope!), and it's not just for Tablet PC developers...

Command line search-and-replace tool based on .NET's excellent regex engine -- can serve as a drop-in replacement for the lesser regex engine in Visual Studio .NET!  Full source code included.

http://www.windojitsu.com/tech/rsar.html

New in version 1.2: 

  • better support for Unicode (and improved respect for document encodings, in general)
  • drastically improved output formatting and match-highlighting
  • refactored code base

A clever technique for the robust comparison of floating-point values -- reinterpreting the bits as sign-magnitude integers -- using purely verifiable, managed code.

http://www.windojitsu.com/code/floatcomparer.html

Inspiration comes from Bruce Dawson (by way of Kim Gräsman) and Jeroen Frijters.

Some unit tests are included, but swim at your own risk, ok?

http://www.windojitsu.com/blog/copyctorvsicloneable.html

Updated: Ken Kozman pointed out an embarrassing bug in my copy-ctor implementations.  The assignment operations were backward!  This was almost certainly due to me fumbling a copy/paste operation, while messing around in the HTML trying to get the formatting right.  That'll teach me to be more careful...  I've fixed this in the post, and changed the name of the 'clone' parameter to something a little more intuitive.

More Posts