What I’m gonna cover

When I get the time I intend to start off this blog by exploring the following ideas:

  • Developing a design by contract system for C#
  • History of Design by Contract
  • Code Generation Systems XSLT vs NVelocity

I’m producing a Design by contract system that’s in early alpha. It uses NVelocity, and declarative programming. It lets you write code like this:

[Dbc, Invariant("Prop1 >= 1")]     public class MyTestClass     {         public MyTestClass()         {         Prop1 = 10;         }         #region property Prop1         int prop1 = 0;         [Requires("value != 1561")]         public int Prop1         {             get             {                 return prop1;             }             set             {                 prop1 = value;             }         }         #endregion          [Requires("arg1 > 10")]         [Requires("arg2 < 100")]         [Ensures("$after(Prop1) == $before(Prop1) + 1")]         public void TestMethod(int arg1, int arg2, string arg3)         {             Prop1 = Prop1 + 1;             System.Diagnostics.Debug.WriteLine( "MyTestClass.TestMethod.Prop1 == " + prop1.ToString());         }     }

During the rest of the project I’ll show you how I expand this system to work with Aspect Oriented Programming, and Static and Dynamic Proxies. I’ll also explore the best ways of implementing the control logic under the hood.
Till then, I guess we’re stuck with Asserts or ifs at the beginning of methods.

Welcome to my blog

Well there is so much to write about, that I thought it was about time I jumped onto the wagon, and told the world what’s going on in my life, and in my head. As the saying goes, the more that things change, the more they stay the same. And that’s certainly been true for me during the last few years. Change is the only constrant in my life lately (except for Kerry – Oh, and Mosquitoes).

But more on that later. Anyway, welcome to my blog. Please syndicate it. I recommend http://www.sharpreader.net/ as the best I’ve found so far.

Later I’ll publish my OPML exports. You can see what news I’m interested in. Maybe you will be too, provided you have an unhealthy interest in .NET coding gizmos and the latest fads in UK politics.