Friday, May 21, 2010

Quitting stack overflow

I tried being a member of the stackoverflow community.  At the end of the day, it appears to be no different from facebook... just another waste of time mindlessly drifting wherever the winds of mob mentality take it that day.  All investment, no return.

I'm done and you should seriously consider the following question, if you are a user: do you really get any value from it or is it just another addiction to a meaningless point system.

Tuesday, May 11, 2010

DataClass nearing completion

As many of you know, I'm working on the next generation of DataConstructor technology, DataClass.  I am personally very excited about this new product - it takes database building, design, and testing to the next level.  Here are some of the benefits that DataClass has (with red asterisks next to the benefits DataConstructor gave you):

  • It is a compiled language.
    • The only things not compiled are the SQL and DDL scripts themselves.
  • It enables designs with zero duplication.
    • No duplicated strings even between database scripts and .NET code.
  • It facilitates transition testing knowledge.*
    • DataClass still enables you to build a database from any historical version to any future version.*
  • It alleviates the need for most transition testing design.
    • For certain database platforms, basic design structures will be validated implicitly.
  • It does not require a license at runtime.
    • The compiler is the licensed component, not its output.
    • The developer is licensed rather than the application.
  • It allows you to define a complete class of database.
    • Transition logic.
    • Public, private, and protected design elements are all defined in one document.
    • Version info.
    • All are compiled into a single .NET class.
    • Public aspects are made public.

Tuesday, April 13, 2010

Mr. Graffin: My Uneaten Greens Are a Feast for Some, I Say

I just went two days without a substantive meal.  That's right: Fatty go hungry.  After two freaking days, I prepared for myself a meal I would never have previously considered eating and, guess what: It tasted great.

It takes me back to when I was a boy scout.  We went on this one hike that felt like forever.  At the end of the day, we made ourselves "hobo dinners."  Right up until now, that dining experience is still my fondest.  When I try to recreate it, I never succeed because I am not famished.

Here we are, the fattest, most abundantly fed nation in the known history of the world, and we can't get a decent meal.  The constant availability of relatively cheap, delicious food has driven our expectations to the point where we are difficult to satisfy and impossible to wow.

So, when I listen to the Bad Religion song "Quality or Quantity" - which I often do - and I hear Mr. Graffin lament the woes of the poor folk who live on "just seventy cents a day," I am forced to wonder "Do they really have it so bad?"

My point is this:
Have no sympathy for people who are living off of "less than the cost of a cup of coffee" a day; they are eating better than we do.

Monday, April 12, 2010

Book Titles

As some of you know, I am in the process of writing a book having to do with Agile database development. This book contains a lot of the ideas I cover in my course (shameless plug).

Since a lot of Agility ports straight across to database development, I'm largely not dealing with those issues. I'm trying to come up with a name that conveys "this book helps you overcome the technical impediments to Agile database design." Following are my ideas.  Any votes or suggestions would be welcome:


  • Agile Database Design: Just-Right, Just-in-Time
  • Agile Database Development: A Technical Perspective
  • Just-in-Time Database Design: And All It Entails
  • The Test-Driven Database: Building Solid, Flexible Data Stores
  • The JIT Database: How To
Basically, I'd love to hear any suggestions you have.

Sunday, April 04, 2010

Very Simple Sequencer for Moq...

Following is a very simple tool for testing Moq...


public class MoqSequence
{
  private int expectedSteps;
  private int actualSteps;

  private MoqSequence() { }

  internal static MoqSequence GetInstance()
  {
    return new MoqSequence();
  }

  private class SequenceException : Exception
  {
    private SequenceException(string message)
      : base(message)
    {
    }

    internal static SequenceException GetInstance(
      int expectedStep, int actualStep)
    {
      return GetInstance(
        "Step " + expectedStep + " executed when step "
        + actualStep + " should have been.");
    }

    internal static SequenceException GetInstance(
      string message)
    {
      return new SequenceException(message);
    }
  }

  public void InSequence<T>(ISetup<T> iSetup)
    where T : class
  {
    var expectedStep = expectedSteps++;

    iSetup.Callback(
      () =>
      {
        if (actualSteps != expectedStep)
        {
          throw SequenceException.GetInstance(
            expectedStep, actualSteps);
        }

        actualSteps++;
      });
  }

  public void Verify()
  {
    if (expectedSteps != actualSteps)
    {
      throw SequenceException.GetInstance(
        "Expected " + expectedSteps + 
        " steps but only got " + actualSteps +
        " steps");
    }
  }
}
Here is an example of how to use it:



[Test]
public void ExecutesStepsInCorrectOrder()
{
  var sequence = MoqSequence.GetInstance();

  sequence.InSequence(transactionMock.Setup(
    t => t.Lock()));
  sequence.InSequence(transactionMock.Setup(
    t => t.TransferAssetsIntoEscrow(escrowMock.Object)));
  sequence.InSequence(transactionMock.Setup(
    t => t.SchedulePayouts(escrowMock.Object)));
  sequence.InSequence(escrowMock.Setup(
    e => e.ReconcilePayoutsWithHoldings()));
  sequence.InSequence(escrowMock.Setup(
    e => e.ExecutePayouts()));
  sequence.InSequence(transactionMock.Setup(
    t => t.Complete()));

  transactionCoordinator
    .RunTransaction(transactionMock.Object);

  sequence.Verify();
}