One of those days

I had one of those days the other day.  Not quite a case of the Mondays, but one where I thought maybe I should just go home and start over.  If you’re trying to get this test to pass:

public void Good_times()
    Regex.IsMatch(@"^d*$", "123456").ShouldBeTrue();

Then maybe it’s time to call it a day.  You really don’t want to know how many regex tutorial and expression evaluator sites I went to on this one.  Only to find out my method arguments were backwards.

About Jimmy Bogard

I'm a technical architect with Headspring in Austin, TX. I focus on DDD, distributed systems, and any other acronym-centric design/architecture/methodology. I created AutoMapper and am a co-author of the ASP.NET MVC in Action books.
This entry was posted in Rant. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Hehe..been there; done that.

    Not long ago, I had to update our web-based application late one night and I thoughtfully set our “we’re down for maintenance” page as our start page in IIS, even though the update would only take a few minutes. I was going to do this the proper way, even for a minor update!

    I was pretty proud of myself and my adherence to good practices until late the next morning when I realized I had never removed the maintenance page as the default page and our support staff had been buried with phone calls with people asking why they couldn’t log in. Ooooops.

  • jlockwood

    lol…hate when that happens

  • This is a good example of why I wish C# supported named parameters rather than ordered parameters.

    Regex.IsMatch(pattern: @”^\d*$”, input: “123456″ )

    Is so much clearer.

  • I would just like to add that it is really sweet that the exact code I wrote above a few months ago now compiles correctly in the VS2010 CTP. Win!