Your Daily Cup of WTF - IsTrue()

Yesterday, we learned that sarcasm is officially dead. Oy. So today, let me disclaim by saying that I am not actually advocating this as a good practice. Just trying to toss in a little humor. And also, let me applogize already for having a weak example today, been too busy to dig for some real gems. And with out further ado, your Daily Cup of WTF:


Now I for one can't seem to fathom why the folks at Microsoft that engineered the framework did not think to include this as a core function. Honestly, how else are you supposed to know if an expression is true or false. See how ambiguous and confusing this is:

If myDocument.IsActive Then DoStuff()

I'm completely lost. WTF does that line of code do? Now lets see how it looks when we employ best practices and the the IsTrue function:

If IsTrue( objInstanceOfDocument.blnDocumentPropertyIsActive ) Then fn_DoStuff()

Crystal. Clarity.


Some more ado ... Fellow blogger brady gaster suggested I start a separate blog where we all submit ideas. I did the first step, and registered TheDailyWTF.com. Any ideas on a good way to configure .TEXT for it?

Published Friday, May 21, 2004 1:46 PM by Alex Papadimoulis
Filed under:

Comments

Friday, May 21, 2004 1:55 PM by Jerry Pisk

# re: Your Daily Cup of WTF - IsTrue()

Well apparently whoever coded that function didn't think it through and forgot to include IsNotTrue, because how exactly are we supposed to tell when an expression is not true?
Friday, May 21, 2004 2:07 PM by Phil Scott

# re: Your Daily Cup of WTF - IsTrue()

I did think about create the IsSomething function just because I was sick if writing Not IsNothing. But then I had a beer and everything was cool.
Friday, May 21, 2004 2:08 PM by brady gaster

# re: Your Daily Cup of WTF - IsTrue()

oh DUDE you SO FREAKING RULE!

i'll help. got a host for the puppy yet?
Friday, May 21, 2004 4:14 PM by Chris McKenzie

# re: Your Daily Cup of WTF - IsTrue()

Your "Daily dose of WTF?" has been the highlight of my last couple of weeks!

Hey, I wrote an IsSomething function in VB6--of course, I was training a beginner at the time, and "IF Not SomeObject Is Nothing then" doesn't really make a lot of sense :)

Chris
Monday, May 24, 2004 9:14 AM by TrackBack

# Your Daily Cup of WTF - IsTrue()

Leave a Comment

(required) 
(required) 
(optional)
(required)