• Ziplodocus (unregistered)

    Does this comment exist?

  • [email protected] (unregistered)

    CREATE TABLE [CustomerComment] (

    [CommentId] INT IDENTITY(1,1) NOT NULL,
    
    ... snip ...
    
    [IsComment] BIT NOT NULL
       CONSTRAINT [CK_Comments_IsValid]
       CHECK  ( [IsValid] = 0 )
    

    )

  • Mean Mr. Mustard (unregistered)

    CREATE TABLE [BarberShop] (

    ... snip ...

    [HairOnTheFloor] BIT NOT NULL

    )

  • fjf (unregistered)

    That's why the Paradox database went down -- it couldn't represent tautology.

  • (cs)
    Fortunately, John’s has solved this problem

    So... did John do this or is there something missing like maybe one of the words "predecessor", "coworker", "team lead" or "boss"?

  • Josephus (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    Fortunately, John’s has solved this problem

    So... did John do this or is there something missing like maybe one of the words "predecessor", "coworker", "team lead" or "boss"?

    Fortunately, John’s something has solved this problem by inventing a new SQL data type..

    FTFY, at a high level.

  • fnord (unregistered)

    The first rule of the tautology club is the first rule of the tautology club

  • Knux2 (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    Fortunately, John’s has solved this problem

    So... did John do this or is there something missing like maybe one of the words "predecessor", "coworker", "team lead" or "boss"?

    Yes.

  • Alargule (unregistered)

    What's a tautology?

  • (cs) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    Fortunately, John’s has solved this problem

    So... did John do this or is there something missing like maybe one of the words "predecessor", "coworker", "team lead" or "boss"?

    You've clearly never heard of the famous Saint John's.

  • @Deprecated (unregistered) in reply to Josephus
    Josephus:
    ObiWayneKenobi:
    Fortunately, John’s has solved this problem

    So... did John do this or is there something missing like maybe one of the words "predecessor", "coworker", "team lead" or "boss"?

    Fortunately, John’s something has solved this problem by inventing a new SQL data type..

    FTFY, at a high level.

    I was thinking that John's's legal name is "John's". Or maybe it's short for Johnas? Which leaves us to wonder why Johnas posted a WTF that he invented?

  • A nanny mouse (unregistered) in reply to [email protected]
    CREATE TABLE [CustomerComment] (
    [CommentId] INT IDENTITY(1,1) NOT NULL,
    
    ... snip ...
    
    [IsComment] BIT NOT NULL
       CONSTRAINT [CK_Comments_IsValid]
       CHECK  ( [IsValid] = 0 )
    

    )

    You forgot adding a unique constraint on CustomerComment.IsComment.

  • (cs)

    I'm guessing someone got mixed up on the concepts of constraint and default constraint.

    Fortunately, John’s has solved this problem...
    John's what?
  • Matt (unregistered) in reply to Alargule

    A miserable little pile of secrets.

  • anon (unregistered) in reply to Lastchance
    Lastchance:
    Fortunately, John’s has solved this problem...
    John's what?
    I guess someone accidentally John's.
  • (cs)
    What's a tautology?
    Say 'tautology' again. Say 'tautology' again, I dare you, I double dare you motherfscker, say 'tautology' one more Goddamn time!
  • (cs)

    One word tautology: "factoid".

  • Martin Milan (unregistered)

    Erm, actually, you could only implement DoesThisRowNotExist with the given constraint - and IsValidOrNotValid would be impossible, as it would always be false...

    Me? Pendantic???

    Martin

  • (cs)

    CREATE TABLE catch22 ( a INTEGER NOT NULL CONSTRAINT aRule CHECK (a = 1 AND b = 0), b INTEGER NOT NULL CONSTRAINT bRule CHECK (a = 0 AND b = 1))

  • (cs) in reply to Alargule

    Today's news: database is poorly designed; sky remains blue.

    Alargule:
    What's a tautology?
    No it isn't.
  • My Name (unregistered) in reply to fnord
    fnord:
    The first rule of the tautology club is the first rule of the tautology club

    I am the president of the tautology club, because I am the president of the tautology club.

  • Ziplodocus (unregistered) in reply to Alargule
    Alargule:
    What's a tautology?

    Tautology: the study of the tension of the string in a dangling object.

    captcha: odio - A massive event in which competitors ride Garfield's chum and try to stay on as long as possible, much to the delight of several spectators dressed in ritual 'John' attire.

  • OMG (unregistered) in reply to Ziplodocus

    [quote user="Ziplodocus"][quote user="Alargule"]ritual "John's" attire.[/quote]

    FTFY

  • runfaraway (unregistered) in reply to Alargule
    Alargule:
    What's a tautology?
    http://en.wikipedia.org/wiki/Tautology_%28logic%29

    "In logic, a tautology is a formula which is true in every possible interpretation."

  • (cs) in reply to Remy Porter
    Remy Porter:
    CREATE TABLE catch22 ( a INTEGER NOT NULL CONSTRAINT aRule CHECK (a = 1 AND b = 0), b INTEGER NOT NULL CONSTRAINT bRule CHECK (a = 0 AND b = 1))

    And thus the evil robots were blown up and the Earth was saved.

  • opp (unregistered)

    Adequate enough isn't tautology. It just implies that your aim is mediocrity (or the worst possible implementation that still works).

  • (cs) in reply to OMG
    OMG:
    Ziplodocus:
    Alargule:
    ritual "John's" attire.

    FTFY

    FTFY

  • PITA (unregistered)

    WHAT?! No embedded comment? FAIL!!

  • Kef Schecter (unregistered) in reply to Alargule
    Alargule:
    What's a tautology?

    A tautology.

  • (cs)

    That's so you can fulfill the order:

    string sql = "insert into CustomerOrder (OrderQty, OrderAmt, IsFulfilled) VALUES(" + intOrderQty + ", " + dblOrderAmt + ", " + (blnFulfilled ? 1 : 0)  + ")";
    
    Try
    {
       DBUtility.ExecNonQuery(sql);
    }
    catch (SqlException ex)
    {
       sql = sql = "insert into FulfilledCustomerOrder (OrderQty, OrderAmt, IsFulfilled) VALUES(" + intOrderQty + ", " + dblOrderAmt + ", " + (blnFulfilled ? 1 : 0)  + ")";
    
       DBUtility.ExecNonQuery(sql);
    
       // So Visual Studios won't complain about unused variable
       ex.HelpLink = "";
    }
    
    
  • (cs)

    This isn't a WTF, it's just a standard sanity check. They're just encoding the business rule that customers' orders should never be fulfilled. Now, thanks to that forward-thinking, should a bug in the code ever accidentally fulfil a customer's order, it'll raise an error condition.

    That's just robust coding.

  • Robert (unregistered)

    Wow, no one has linked the xkcd yet. Shocking! Granted, someone referenced it, but still...

  • Ziplodocus (unregistered) in reply to opp
    opp:
    Adequate enough isn't tautology. It just implies that your aim is mediocrity (or the worst possible implementation that still works).

    Is there a spectrum of adequacy? I would say adequate is an absolute. As good as necessary. I would, however argue that enough is the tautologic word in the case of Adequate Enough

  • gdjfkghl (unregistered) in reply to fnord

    The second rule is the same as first, except that it is second.

  • (cs)

    In most languages, an "if (true) {}" block creates a new scope. Hardly a tautology.

  • (cs) in reply to Alargule
    Alargule:
    What's a tautology?
    No, what is on second base.
  • Bob the builder (unregistered)

    Ah, to be paid by the line.

  • (cs) in reply to Faxmachinen
    Faxmachinen:
    In most languages, an "if (true) {}" block creates a new scope. Hardly a tautology.

    It is when creating the new code block sans the "if (true)" creates the same scope.

  • Mike (unregistered) in reply to Lorne Kates

    Of all the things for me to reply to:

    Lorne Kates:
    That's so you can fulfill the order:
    string sql = "insert into CustomerOrder (OrderQty, OrderAmt, IsFulfilled) VALUES(" + intOrderQty + ", " + dblOrderAmt + ", " + (blnFulfilled ? 1 : 0)  + ")";
    
    Try
    {
       DBUtility.ExecNonQuery(sql);
    }
    catch (SqlException)
    {
       sql = sql = "insert into FulfilledCustomerOrder (OrderQty, OrderAmt, IsFulfilled) VALUES(" + intOrderQty + ", " + dblOrderAmt + ", " + (blnFulfilled ? 1 : 0)  + ")";
    
       DBUtility.ExecNonQuery(sql);
    
       // So Visual Studios won't complain about unused variable
       //ex.HelpLink = "";
    }
    
    

    FTFY.

  • (cs) in reply to Remy Porter
    Remy Porter:
    CREATE TABLE catch22 ( a INTEGER NOT NULL CONSTRAINT aRule CHECK (a = 1 AND b = 0), b INTEGER NOT NULL CONSTRAINT bRule CHECK (a = 0 AND b = 1))
    So on the terms I'm too chickenshit to try this, what happens to SQL Server if you try to implement this?
  • illtiz (unregistered) in reply to Martin Milan
    Martin Milan:
    Erm, actually, I could only implement DoesThisRowNotExist with the given constraint - and IsValidOrNotValid would be impossible, as it would always be false...
    FTFY
  • (cs) in reply to Matt
    Matt:
    A miserable little pile of secrets.

    But enough talk! Have at you! Mwa-ha-ha! teleport

    The real translation of that is SO much better...

  • (cs) in reply to PITA
    PITA:
    WHAT?! No embedded comment? FAIL!!
    Since databases are known to not have filesystems, it's obvious no embedded comparison was necessary.

    if you feel the need to seriously compete with this for trollishness, then you're really whooshed aren't you?

  • (cs) in reply to toth
    toth:
    OMG:
    Ziplodocus:
    Alargule:
    ritual "John's" attire.
    FTFY
    FTFTFYFY
    FTFTFTFYFYFY
  • (cs) in reply to drachenstern
    drachenstern:
    Remy Porter:
    CREATE TABLE catch22 ( a INTEGER NOT NULL CONSTRAINT aRule CHECK (a = 1 AND b = 0), b INTEGER NOT NULL CONSTRAINT bRule CHECK (a = 0 AND b = 1))
    So on the terms I'm too chickenshit to try this, what happens to SQL Server if you try to implement this?

    I don't see anything wrong, or even paradoxical, about this code. You simply state that in every row inserted, a must equal one and b must equal zero. Also, a must equal zero and b must equal one. Hence, whatever you try to insert in the table, you will only get a constraint violation error.

    I do not see any (at least no obvious) way to implement the paradox Remy Porter probably had in mind in procedural code.

  • (cs) in reply to nonpartisan
    nonpartisan:
    It is when creating the new code block sans the "if (true)" creates the same scope.
    Good point. I didn't actually know C++ allows you to do that either.
  • (cs)

    How embarrassing... I was about to post in defense of the if(true) construct, but realized I was actually thinking of while(true). Oops!

  • Chucara (unregistered) in reply to Phlip
    Phlip:
    This isn't a WTF, it's just a standard sanity check. They're just encoding the business rule that customers' orders should never be fulfilled. Now, thanks to that forward-thinking, should a bug in the code ever accidentally fulfil a customer's order, it'll raise an error condition.

    That's just robust coding.

    I agree. Just create a HasError column like this and set to to 1 whenever there is a problem with the row. PRESTO! Error free programming!

  • Crash Magnet (unregistered)

    You wouldn't have won if we'd beaten you. You can observe a lot by just watching. It's like deja-vu, all over again. It ain't over till it's over. A nickel ain't worth a dime anymore. Congratulations. I knew the record would stand until it was broken.

    • Yogi Berra
  • anon (unregistered)

    That WTF was very unique.

Leave a comment on “The Tautology Type”

Log In or post as a guest

Replying to comment #308092:

« Return to Article