- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Aristotle would have shat.
Admin
IS_FRIST_YN = UNKN
Admin
My eyes! The goggles do nothing!
Admin
I'd love to see the truth table generated from that.
Admin
I'm sorry, but if a truth-table does not contain FILE_NOT_FOUND or its equivalent, then it cannot pass as a truth table.
Admin
"No" is indeed serviced. It's UNKN, which stands for "U nasty kids! No!"
Admin
Admin
If they used Oracle, they wouldn't need two values for null and empty string.
Admin
I found this in a program I inherited:
I assume (hope) it's a joke.
Admin
Of course, you could optimise that to a bit-field, which would also helpfully support multiple values in one.
Admin
YES NO 404
Admin
"NULL - the string" sounds like Comic hero.
Admin
Admin
here's my favourite - described as a "tri-state Boolean" - but with 5 possible values!
http://msdn.microsoft.com/en-us/library/office/aa432714(v=office.12).aspx
Admin
It was designed for use within the New York metropolitan area.
Admin
I hear it's called fuzzy logic.
Admin
Admin
Not a joke. That is the variable type which powers zombo.com - you can do anything with ZomBoolean in your programs!
Admin
Admin
Really could have just ended the WTF there.
Admin
Admin
Not to mention the fun of dealing with different methods of returning errors. Some functions return zero for no error and non-zero to name specific errors, whereas other functions return non-zero for no error and zero for an error, and then you call some system function to get the last error.
Admin
FILE_NOT_FOUND
Mmm, bacon.
Admin
If you bool it, they will come!
Admin
"NO" is implicitly defined in this instance; it would be overkill to define a constant for it.
Admin
Submitter here. Pretty much. It's meant to generate .doc files without requiring VBA for each document (we have over a thousand documents, not total I mean templates), so the app gets coded up with this weird VB-like syntax that an in-house application parses and replaces, for example it will parse the line:
Customer Name: {FIELD CUST_NAME}
with:
Customer Name: Bob Jones
when the document is parsed by the application. And it has loops and conditional statements too so I could do something like:
{IF CUST_ORDERS > 20}Status: Preferred {ELSE} Status: Normal {END}
where "CUST_ORDERS" is a field returned by the stored procedure associated with each document (each document has a query defined at the top that gets run and provides the resultset for that particular document, with parameters and the like passed in using #PARAM# e.g. {QUERY "STORED_PROC_NAME '#PARAM1#', '#PARAM2#'"}.
I would prefer VBA, terrible as it is, to something like this. The only possible thing I can see is that it lets you conditionally show/hide entire paragraphs of text, which I could never figure out how to do in VBA.
Admin
Admin
Mmmmm, bacon!
Admin
When dealing with Boolean fields with this macro language, the only value that matters when bacon is involved is..YES.
(Remy comes through again!)
Admin
Null's not a value!!!
Admin
So, it's a tri state... with 5 values... of which 3 are not supported, leaving only the 2 booleans as allowable values!
Sweet.
Admin
These are all the allowed values an import file should support to bless the monkeys bashing on a keyboard. Taken from a support manual from a program I frequently use...
A Char(5) yes/no indicator can contain the following values: YES TRUE 1 Y
NO FALSE 0 N
NULL (space) (null literal) -1
Any number between -1 and 1 is considered to be fuzzy logic and will be interpreted using rounding errors, which means that 0.5 will either be TRUE or FALSE depending if I set always_round to UP or DOWN.
Admin
These are all the allowed values an import file should support to bless the monkeys bashing on a keyboard. Taken from a support manual from a program I frequently use...
A Char(5) yes/no indicator can contain the following values: YES TRUE 1 Y
NO FALSE 0 N
NULL (space) (null literal) -1
Any number between -1 and 1 is considered to be fuzzy logic and will be interpreted using rounding errors, which means that 0.5 will either be TRUE or FALSE depending if I set always_round to UP or DOWN.
Admin
Boss: "Can you add the exempt feature until tomorrow, yes or no? ... and by the way, 'no' isn't a valid option!" Developer: "Will do exactly as told."
Admin
Admin
dont laugh, I also have an enum (representing service status) in one app which had the values
Ok, Bad, Slow, NotAvailable, Disabled, Fail, Invalid, [some more]
for some time. The reason was that someone insane decided it would be a good idea to have the status as a string originally. So the first iteration was combing through every usage (and then some where the property was copied to a variable and passed around and so on) and just copy/pasting every possible comparison or assignment into an enum value ;)
Now I am down to 4 values (ok, bad, slow and disabled) which cover all cases (and yes, there is a difference between bad and disabled... disabled ~ ignored test, bad ~ failed test)
Admin
Actually a villain ... ;-)
http://www.writeups.org/fiche.php?id=434
l.
Admin
“NO” is not a viable option, and the application will generate incorrect documents if “NO” is used.
-- The real WTF is that the authors seem to think that adding "NO" as a substitute for "FALSE" would be an improvement.
Admin
Admin
Interestingly enough, my daughter was drawing us as superheroes this weekend, and "Null" was my superhero name.
I'd told her that being immune to all powers and making powers not work around you would be pretty sweet. (I wasn't allowed to take regeneration AGAIN, dad!)
Admin
You must get really upset when people talk about the color black.
Admin
Sounds like a bad pick up line.
"I've got T and F, all I need is U."
Admin
This didn't work for me. Do I need a special bacon output device for my computer?
Admin
One can always use the FORTRAN idea of logicals: If the first letter is 'T' the value is true, otherwise it is false.
While there is no "file not found", this solves quite a few problems.
Generally, have a bunch of values that are good for one state (true/false), and all others are the other state (false/true). Unfortunately few people understand this concept.
Admin
Of which only 2 values are supported. Gads.
Admin
Clearly the WTF there is VB using -1 for True.
Admin
FTFY
Admin
Admin
They're shouting "Bool-urns."
Admin
If anyone thinks black isn't a colour, then they fail to understand what colour is... namely a label applied to some aspect of the human perception of light.
Secondarily there might be definitions of specific colours that are based on specific bands of wavelengths, but those definitions are calibrated by the human eye. Red might be defined as anything in the ~620–740nm range, but we call it red because it looks red.
Anyone who doesn't think black is a colour deserves to have everything they own painted black, until they learn that it very much is a colour, and a really bad one for wallpaper, windshields, tins-of-food-in-cupboards, etc...