Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
benitocereno
Apr 14, 2005


Doctor Rope

Lysandus posted:

Nothing identifying around it. Just that.

I'm convinced there's a whole subset of programmers that do this kind of thing just to gently caress with you. Gotta say though, after reading this thread, I'm convinced something like this would be more par for the course:

code:
public bool isTrue(bool _true)
{   
   if(_true != false)
   {
      _true = false;
   }

   return _true;
}
PS. Gonna use that in something now :toot:

Adbot
ADBOT LOVES YOU

benitocereno
Apr 14, 2005


Doctor Rope
It took me ages to understand why !Boolean.toString(bool).length()==5; was relevant. :psyduck: I think that's a good thing?

As for Thel's code... :suicide:.

Going to be honest here, whenever I write a really bad piece of code I at least try to make the comments entertaining. Why throw such a boring error when you can insult the person responsible for breaking it?

benitocereno
Apr 14, 2005


Doctor Rope

poemdexter posted:

Am I missing something or will this always return false?

Why wouldn't you expect a function named isTrue passed a bool named _true to always return false? :downs:

(no you're not missing anything)

Sedro posted:

Except in the case where _true == FileNotFound

Sorry, to handle that I think you need an enterprise solution.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply