Los Techies : Blogs about software and anything tech!

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:

[Test]
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.

Kick It on DotNetKicks.com
Posted Aug 30 2008, 10:35 AM by bogardj
Filed under:

Comments

Mark Hoffman wrote re: One of those days
on 08-30-2008 12:33 PM

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 wrote re: One of those days
on 09-02-2008 2:12 PM

lol...hate when that happens

Paul Batum wrote re: One of those days
on 09-03-2008 8:07 AM

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.

Paul Batum wrote re: One of those days
on 11-02-2008 9:29 AM

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!

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:
Copyright Los Techies 2008, 2009. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems