• TM (unregistered)

    For WTF completeness sake shouldn't it be TRUE,FALSE,FILE_NOT_FOUND,TRUE_NOT_FOUND,FALSE_NOT_FOUND ?

  • Anonymously Yours (unregistered) in reply to Scott
    Scott:
    So how many choices are there for a 5-state?
    enum QUINT_STATUS { QS_PH_NGLUI, QS_MGLW_NAFH, QS_CTHULHU, QS_R_LYEH, QS_WGAH_NAGL, QS_FHTAGN, QS_FILE_NOT_FOUND };
  • googly (unregistered)

    This is a pretty standard thing to do. I'll add the implicit values here:

    enum TRI_STATE { TS_UNKNOWN = 0, TS_MORNING = 1, TS_EVENING = 2, TS_INTRADAY = 3, TS_NO = 4 };

    const char* TRI_STATE_STRINGS[TS_NO] = { "Unknown", "Morning", "Evening", "Intraday" //wtf is an intraday? };

    captcha: damnum - root of dayum

  • iToad (unregistered) in reply to Anonymously Yours
    Anonymously Yours:
    Scott:
    So how many choices are there for a 5-state?
    enum QUINT_STATUS { QS_PH_NGLUI, QS_MGLW_NAFH, QS_CTHULHU, QS_R_LYEH, QS_WGAH_NAGL, QS_FHTAGN, QS_FILE_NOT_FOUND };

    Be careful. Do not call up that which you cannot put back down.

  • johnmcc (unregistered)

    Clearly this code was written by Ben Folds.

  • Yuval (unregistered) in reply to Scott

    It's Fibonacci-driven.

  • grzlbrmft (unregistered) in reply to Zed
    Zed:
    There's a sixth one - kind of. I just read ISBN-10 1401323588. It wasn't too bad.
    Wow, did you really just name a book for us by it's ISBN rather than it's title? That's hardcore. I'm going to try that in conversation over by the water cooler and see what happens.

    What can I say? I just cannot remember names and titles. Numbers are fine.

  • TJones (unregistered) in reply to jdw

    Isn't that 'bleen'?

  • Anon (unregistered) in reply to Kiwi
    Kiwi:
    I think this is all about payments/transactions, therefore the name intraday.

    It could be possible that TRI_STATE is an enumerator for "TRansaction Identification(type)", or something else with an I. Making this a nonsense WTF...

    This ^. Seriously. Everybody is assuming TRI means three, but there is no reason to assume that without seeing it in context.

  • (cs) in reply to Anon
    Anon:
    Kiwi:
    I think this is all about payments/transactions, therefore the name intraday.

    It could be possible that TRI_STATE is an enumerator for "TRansaction Identification(type)", or something else with an I. Making this a nonsense WTF...

    This ^. Seriously. Everybody is assuming TRI means three, but there is no reason to assume that without seeing it in context.

    Yeah, because it's good practice to abbreviate enums to the point where they are visually unidentifiable. Isn't the whole point of an enum to provide context for a set of values?

  • Jay (unregistered)

    I thought the values of TRI_STATE where "New York", "New Jersey", and "Connecticut". Until I moved to Ohio, anyway, when I learned that the values are "Ohio", "Indiana", and "Kentucky".

    I wonder if every place where three states meet, the people refer to it as "the tri-state area".

  • paratus (unregistered) in reply to akatherder
    akatherder:
    whatever:
    So a 2-state has 3 states, and a 3-state has 5. I suppose the real question here is whether the true number of states in an n-state grows linearly or exponentially.

    Because if it's exponential, I pity anyone who encounters a 9-state object.

    That's the enum holding all the state names of the USA.

    Actually, the Thirteen_State enum holds the names of all 50 incorporated states of the USA, plus the District of Columbia, the Philippines, Puerto Rico, Guam, American Samoa, the United States Virgin Islands, Wake Island, and the Palmyra Atoll.

  • Jay (unregistered)

    I wonder if "INTRADAY" was supposed to be "INTERDAY". Maybe this is the least of the nonsensical things here, but how is morning versus evening versus "within a day" a mutually-exclusive set?

    It's like some of those slanted poll questions you here. Like I heard one not long ago where they asked, "Do you think Congress should pass the president's XYZ bill, or do you think this is not an important issue?" Like, there was no choice at all for, "I don't think it's particularly important but sure, this is a good bill." Or more likely, "I think this is a vitally important issue but the president's proposal is in the totally wrong direction and will make things worse". Or even "I think the file is not found."

  • Anonymously Yours (unregistered) in reply to iToad
    iToad:
    Anonymously Yours:
    Scott:
    So how many choices are there for a 5-state?
    enum QUINT_STATUS { QS_PH_NGLUI, QS_MGLW_NAFH, QS_CTHULHU, QS_R_LYEH, QS_WGAH_NAGL, QS_FHTAGN, QS_FILE_NOT_FOUND };

    Be careful. Do not call up that which you cannot put back down.

    That is not dead which can eternal lie. And with strange aeons even death may die.

    CAPTCHA: nisl, which seems strangely appropriate.

  • luptatum (unregistered) in reply to lesle
    lesle:
    For those of us old enough to remember, and before the widespread advent of computers, noon was 12 m. and midnight was 12 p.m. There was no 12 a.m. But computers are binary/two-state. So now noon is 12 p.m. and midnight is 12 a.m. Arrgh!

    This change also ignores the question of how can there be an a.m. and a p.m. without an m. to give them meaning?

    It is very simple, you can't have Daylight Slaving Time if the clocks recognize m, since m. is a physical event.

  • amet (unregistered) in reply to joeyadams
    joeyadams:
    ♫ Every TS_INTRADAY, ain't we got fun? ♫
    FTFY
  • G P (unregistered)

    What's so weird about a Trading Session Indicator type?

  • (cs) in reply to dkf
    dkf:
    lesle:
    For those of us old enough to remember, and before the widespread advent of computers, noon was 12 m. and midnight was 12 p.m. There was no 12 a.m. But computers are binary/two-state. So now noon is 12 p.m. and midnight is 12 a.m.
    To be fair, the current system is pretty simple: midday is 12pm because then it has the same suffix as the remainder of the hour (including 12:00:01, which has got to be after midday, yes?) Mind you, I'm just moving over to using the 24-hour clock wherever I can.
    Sorry, but it is simply not logical for noon to be either 12:00 AM or 12:00 PM. According to greenwhichmeantime.com, AM and PM mean "being before noon" and "being after noon" respectively. It is not possible for a time to be either before or after itself.
  • FuBar (unregistered)

    I think it's been influenced by Monty Python and the Holy Grail.

    1, 2, 5!

  • Axl (unregistered)
    enum TRI_STATE {
            TS_UNKNOWN,
            TS_MORNING,
            TS_EVENING,
            TS_INTRADAY,
            TS_NO
        };
    

    It's not a bad practice to have UNKNOWN/NONE as first value in an enum and MAX/MAXIMUM/MAXVALUE as last value in an enum. Although in my language of choice (C#) you can have nullable enums so UNKNOWN/NONE becomes less necessary. Conclusion: not a WTF.

  • mike (unregistered) in reply to toth
    toth:
    Meme status in 3...2...1...

    ... intraday... no.

  • Herby (unregistered) in reply to ContraCorners
    ContraCorners:
    dkf:
    lesle:
    For those of us old enough to remember, and before the widespread advent of computers, noon was 12 m. and midnight was 12 p.m. There was no 12 a.m. But computers are binary/two-state. So now noon is 12 p.m. and midnight is 12 a.m.
    To be fair, the current system is pretty simple: midday is 12pm because then it has the same suffix as the remainder of the hour (including 12:00:01, which has got to be after midday, yes?) Mind you, I'm just moving over to using the 24-hour clock wherever I can.
    Sorry, but it is simply not logical for noon to be either 12:00 AM or 12:00 PM. According to greenwhichmeantime.com, AM and PM mean "being before noon" and "being after noon" respectively. It is not possible for a time to be either before or after itself.
    It is true that "Noon" is neither before or after the "meridian", the assumption is that "Noon" only exista for an instant, and the time before that instant is in the 11th hour (thus 11:59:59 is AM). That being said, after the INSTANT of noon the time is PM (like 12:00:01 and most of the second before), this is the reason we call 12:00:00 PM since after the instant of noon, which is infinitely small, the time is POST meridian (PM). So, except for an instant the time is 12:00:00 PM.

    If you want to be extra clear, as many government and legal documents desire to be, use 12:01 and be done with it. If you want more on time, http://www.nist.gov has lots of information on time, as they are the keepers of the standard.

  • A pee tent? (again?) (unregistered) in reply to TM
    TM:
    For WTF completeness sake shouldn't it be TRUE,FALSE,FILE_NOT_FOUND,TRUE_NOT_FOUND,FALSE_NOT_FOUND ?
    Computer says TS_NO.
  • Counter (unregistered) in reply to Erasmus Darwin
    Erasmus Darwin:
    And if we assume that the "NO" in TS_NO is actually an abbreviation of "number" rather than the English negative, then it makes a bit more sense. Similar to *_UNKNOWN being a stock first item in each enum, *_NO could be a stock last item so that its value can be used to automatically calculate the number of values in the enum. It does have some disadvantages (TS_UNKNOWN is included in the count and TS_NO creates an invalid state that the enums shouldn't be set to), but it does theoretically serve a useful purpose. Of course in an ideal world, the programming language would provide a mechanism for figuring out how many values are in an enum and TS_NO would be unnecessary.

    I'm thinking that needing to automatically calculate the number of values in a tri-state is still a little WTF-ish.

  • Anon (unregistered) in reply to Jaime
    Jaime:
    Anon:
    Kiwi:
    I think this is all about payments/transactions, therefore the name intraday.

    It could be possible that TRI_STATE is an enumerator for "TRansaction Identification(type)", or something else with an I. Making this a nonsense WTF...

    This ^. Seriously. Everybody is assuming TRI means three, but there is no reason to assume that without seeing it in context.

    Yeah, because it's good practice to abbreviate enums to the point where they are visually unidentifiable. Isn't the whole point of an enum to provide context for a set of values?

    Unidentifiable to you != unidentifiable to somebody familiar with the system. It might be completely obvious in the context of the actual application.

  • Buddy (unregistered) in reply to Counter
    Counter:
    I'm thinking that needing to automatically calculate the number of values in a _tri-state_ is still a little WTF-ish.

    Maybe, but for statistical analysis, makes sense to pass the data and range to a routine that can analyze the discrete values for the given data.

    TS_UNKNOWN, // = not set, or legacy data TS_STATE_1, TS_STATE_2, TS_STATE_3, TS_COUNT // pass this value, along with results pointer to summarize

    In some contexts, the above is entirely defensible design.

  • Peter (unregistered) in reply to a care-bear
    a care-bear:
    NOBODY CARES

    ...like a bear

    ...in the woods.

  • Peter (unregistered) in reply to KittyKat
    KittyKat:
    it was good, a descent book by a descent author, but didn't quite fit the Trilogy in my mind
    "Descent"? Oh, you're just down on Eoin Colfer's "And another thing".
  • Peter (unregistered) in reply to lesle
    lesle:
    For those of us old enough to remember, and before the widespread advent of computers, noon was 12 m. and midnight was 12 p.m. There was no 12 a.m. But computers are binary/two-state. So now noon is 12 p.m. and midnight is 12 a.m. Arrgh!
    Where's the difficulty? Use the 24-hour clock. Or if that's too hard, "12 noon" and "12 midnight".
  • ThomasP (unregistered) in reply to akatherder
    akatherder:
    whatever:
    So a 2-state has 3 states, and a 3-state has 5. I suppose the real question here is whether the true number of states in an n-state grows linearly or exponentially.

    Because if it's exponential, I pity anyone who encounters a 9-state object.

    That's the enum holding all the state names of the USA.

    No, the enum holding all of the US states started as 13-state.

  • Pedantic School House Rocker (unregistered) in reply to Jay

    Ah, but Congress can't pass any President's bill, despite what popular media often says. The President can't introduce any bills.

    So the poll is even more useless! (and I'm sure you're aware of the distinction, but often the folks taking such polls seriously aren't.)

    Captcha: haero: Late at night I toss and turn and dream of what I need / I need a haero / I'm holding out for a hero 'til the end of the night / He's gotta be strong

  • BentFranklin (unregistered) in reply to Herby
    Herby:
    It is true that "Noon" is neither before or after the "meridian", the assumption is that "Noon" only exista for an instant, and the time before that instant is in the 11th hour (thus 11:59:59 is AM). That being said, after the INSTANT of noon the time is PM (like 12:00:01 and most of the second before), this is the reason we call 12:00:00 PM since after the instant of noon, which is infinitely small, the time is POST meridian (PM). So, except for an instant the time is 12:00:00 PM.

    If you want to be extra clear, as many government and legal documents desire to be, use 12:01 and be done with it. If you want more on time, http://www.nist.gov has lots of information on time, as they are the keepers of the standard.

    For the same reason, when playing 20 questions, choose "The Mississippi River" so that when you are asked "Is it East of the Mississippi?" or "Is it West of the Mississippi?" you can answer "No" to either and really mess with their heads, especially since the asker usually only asks one of those. Bwa ha ha.

  • The Wanderer (unregistered) in reply to Herby
    Herby:
    It is true that "Noon" is neither before or after the "meridian", the assumption is that "Noon" only exista for an instant, and the time before that instant is in the 11th hour (thus 11:59:59 is AM). That being said, after the INSTANT of noon the time is PM (like 12:00:01 and most of the second before), this is the reason we call 12:00:00 PM since after the instant of noon, which is infinitely small, the time is POST meridian (PM). So, except for an instant the time is 12:00:00 PM.
    <pedant>Technically, that's 'meridiem'.</pedant>

    So, you're saying that it's an intentional minor inaccuracy (treating one single moment as P.M. when it's actually just M.) for the sake of allowing practical, convenient notation without being inaccurate about the remainder of the hour? I can buy that...

    Herby:
    If you want to be extra clear, as many government and legal documents desire to be, use 12:01 and be done with it. If you want more on time, http://www.nist.gov has lots of information on time, as they are the keepers of the standard.
    Or just use 24-hour time. I've been doing it for years, since I think it just makes more sense than 12-hour time, and the only difficulty has been keeping from being diverted by the 12-hour convention so many other people insist on using.

    (...that turn of phrase is a joke, by the way. I know it should be obvious, but if I don't say so explicitly, it's almost certain that someone is going to attack me as being even more arrogant than I actually am...)

  • F (unregistered) in reply to Erasmus Darwin
    Erasmus Darwin:
    jdw:
    (And what's this prime that exists between 7 and 11?)

    9'. It looks like 9, but it hails from an alternate dimension in which 3 was never born. Also, it has a goatee and is evil.

    You fool! You now have to kill not just the previous commenter, but everyone who's read this whole thread. You'd better get going or you'll never finish.

  • The Wanderer (unregistered) in reply to BentFranklin
    BentFranklin:
    For the same reason, when playing 20 questions, choose "The Mississippi River" so that when you are asked "Is it East of the Mississippi?" or "Is it West of the Mississippi?" you can answer "No" to either and really mess with their heads, especially since the asker usually only asks one of those. Bwa ha ha.
    Or you could answer "Yes" for anything *not* the Mississippi River and be equally accurate, especially if you're thinking of something which is on roughly the opposite side of the world. That's probably more likely to get the questioner upset with you when the gimmick is exposed, though.
  • Aussie Contractor (unregistered)

    "Tri-State" isn't even a real word.

    The correct term is "Troolean" where enum myTroolean { CAT_ALIVE, CAT_DEAD, CAT_UNKNOWN; }

  • ClaudeSuck.de (unregistered)

    I really like the TS_NO

  • ClaudeSuck.de (unregistered) in reply to TM
    TM:
    For WTF completeness sake shouldn't it be TRUE,FALSE,FILE_NOT_FOUND,TRUE_NOT_FOUND,FALSE_NOT_FOUND ?

    Because you forgot the FILE_NOT_FOUND_NOT_FOUND

  • SoftNum (unregistered)

    I see how this comes about really easily:

    You're a developer. I've been asked to track appointments, or service requests or something. You generally only give out if it'll be in the morning or afternoon; and some customers don't care when it is. You create a default/unknown value to hold it in it's initial state, so you can check to see if it's not selected for any reason.

    Then your application hits test, and the Director of Marketing asks what happens if the customer doesn't want to pick one. You, knowing you covered this, explain that it's easy to just pick the 'Whenever' option, and have done with it. But now that you've called the Director of Marketing out in your demo meeting on this, she will insist that you need a NOT SELECTED option. You rage, run back to your enum, slam some crazy value in there, associate a drop-down with it, and viola, a useless unused option.

  • ClaudeSuck.de (unregistered) in reply to paratus
    paratus:
    akatherder:
    whatever:
    So a 2-state has 3 states, and a 3-state has 5. I suppose the real question here is whether the true number of states in an n-state grows linearly or exponentially.

    Because if it's exponential, I pity anyone who encounters a 9-state object.

    That's the enum holding all the state names of the USA.

    Actually, the Thirteen_State enum holds the names of all 50 incorporated states of the USA, plus the District of Columbia, the Philippines, Puerto Rico, Guam, American Samoa, the United States Virgin Islands, Wake Island, and the Palmyra Atoll.

    Just as the name indicates. There is nothing better than self-documenting code.

    CAPTCHA: dolor; that's just what I feel right now...

  • ClaudeSuck.de (unregistered) in reply to Herby
    Herby:
    ContraCorners:
    dkf:
    lesle:
    For those of us old enough to remember, and before the widespread advent of computers, noon was 12 m. and midnight was 12 p.m. There was no 12 a.m. But computers are binary/two-state. So now noon is 12 p.m. and midnight is 12 a.m.
    To be fair, the current system is pretty simple: midday is 12pm because then it has the same suffix as the remainder of the hour (including 12:00:01, which has got to be after midday, yes?) Mind you, I'm just moving over to using the 24-hour clock wherever I can.
    Sorry, but it is simply not logical for noon to be either 12:00 AM or 12:00 PM. According to greenwhichmeantime.com, AM and PM mean "being before noon" and "being after noon" respectively. It is not possible for a time to be either before or after itself.
    It is true that "Noon" is neither before or after the "meridian", the assumption is that "Noon" only exista for an instant, and the time before that instant is in the 11th hour (thus 11:59:59 is AM). That being said, after the INSTANT of noon the time is PM (like 12:00:01 and most of the second before), this is the reason we call 12:00:00 PM since after the instant of noon, which is infinitely small, the time is POST meridian (PM). So, except for an instant the time is 12:00:00 PM.

    If you want to be extra clear, as many government and legal documents desire to be, use 12:01 and be done with it. If you want more on time, http://www.nist.gov has lots of information on time, as they are the keepers of the standard.

    Well, in German it's relatively easy: you refer to 12 o'clock midday and 12 o'clock midnight.

    CAPTCHA: secundum, now, do seconds count or not?

  • Mike (unregistered) in reply to Evo
    Evo:
    TarMil:
    2 -> 3; 3 -> 5. With no doubt possible, it's Fibonacci. So a 5-state (or penta-state) would have 13 states. Also, the US has 32951280099 states.

    Nope, wrong. It's the n'th prime number. 1 -> 2 2 -> 3 3 -> 5 4 -> 7 5 -> 11 etc.

    y = 2x -1 seems simpler

  • King Erroneous (unregistered)

    This in the Tri-State Area Dr. Doofenshmirtz wants to destroy.

  • oheso (unregistered) in reply to Ouch!
    Ouch!:
    TS_WTF_IS_AN_INTRADAY?

    A very nice thing for those of us lucky enough to get one.

    ;-)

  • Prometheus (unregistered) in reply to googly
    googly:
    const char* TRI_STATE_STRINGS[TS_NO] = { "Unknown", "Morning", "Evening", "Intraday" //wtf is an intraday? };

    It obviously means "during the day", so we got "in the morning", "in the evening" and "during the day".

    Could also simply be "noon".

  • iMalc (unregistered) in reply to IDKFA
    IDKFA:
    Where's TS_IDSPISPOPD?
    Haven't you heard? It was made obsolete and defined as equal to TS_IDDQD for backwards compatibility
  • Steve The Cynic (unregistered) in reply to TJones
    TJones:
    Isn't that 'bleen'?
    No, it's "fleen", but only if it has been ogglefloggled.
  • (cs) in reply to Mike
    Mike:
    Evo:
    TarMil:
    2 -> 3; 3 -> 5. With no doubt possible, it's Fibonacci. So a 5-state (or penta-state) would have 13 states. Also, the US has 32951280099 states.

    Nope, wrong. It's the n'th prime number. 1 -> 2 2 -> 3 3 -> 5 4 -> 7 5 -> 11 etc.

    y = 2x -1 seems simpler

    Ah, yes, I forgot that on thedailywtf.com the simplest method is always most common.

  • Flynn Taggart (unregistered) in reply to iMalc
    iMalc:
    IDKFA:
    Where's TS_IDSPISPOPD?
    Haven't you heard? It was made obsolete and defined as equal to TS_IDDQD for backwards compatibility

    Woah, woah. IDDQD is degrelessness mode, aka god mode, taken from "Delta-Q-Delta". IDSPISPOPD was no clipping mode aka the ability to walk through walls, taken from "smashing pumpkins in to small piles of putrid debris". Of course, for Doom 2: Hell On Earth, the developers noticed that it was a really annoying cheat so they changed it to IDCLIP.

  • (cs) in reply to King Erroneous
    King Erroneous:
    This in the Tri-State Area Dr. Doofenshmirtz wants to destroy.

    Curse you, Perry the... oh, hello, who are you?

Leave a comment on “A Real Tri-State”

Log In or post as a guest

Replying to comment #:

« Return to Article