You are at the archive for the WTF category


WTF: Date Malarky

November 16th

I don’t think I’m going to need to say much about the following code, as anyone with even an inkling of the features of the .NET framework would know that it’s a joke. See the nugget(s) of genius below:
[source:csharp]public static void ToStartofCurrDay(ref DateTime aDate)
{
aDate = aDate.Subtract(aDate.TimeOfDay);
}
public static void ToEndofPrevDay(ref DateTime aDate)
{
aDate = aDate.Subtract(aDate.TimeOfDay);
TimeSpan ts = [...]

WTF: The Exceptional Connection

November 14th

This would have to be close to the dumbest way of verifying the state of a connection Well, that might not be true, but it’s definitely one of the dumbest ways.
This is a funky snippet of code that was extracted from a system I’m doing some work on at the moment:
[source:csharp]public static bool IsValid(OracleConnection [...]

WTF?!

November 7th

I’m a regular reader of The Daily WTF and most of the time I get a good laugh and think to myself “Boy, I’m glad I’m not working on that system.”
Then I get to work and find myself looking at very similar instances of WTFness in the applications I am working on. I think that [...]

Next Entries »

Size

Colors