Baby Logic



  • My wife just linked me to this: CleverCuties.com - Baby Logic.

    Side Note: It looks like whoever made it couldn't decide on the spacing.



  • No, I'd call it "clever"; in the same vein as people who use bit masks to store data in databases are "clever."

    Looks like the sort of code you wrote to pound it out very quickly but never went back and refactored.

    I like code jokes, but I'd never put that on my kid. None of this (== true) business. The point of a code joke is that it's supposed to be slightly obscure.

     



  • That's not enterprisey enough!

    while(1)
    {
        try
        {
            sleep();
        }
        catch(DiaperException de)
        {
            cry();
        }
        catch(HungryException he)
        {
            try { eat(); }
            catch { cry(); }
        }
        catch(PlayfulException pe)
        {
            try { play(); }
            catch { cry(); }
        }
        catch(Exception e)
        {
            cry();
        }
    }



  • @CDarklock said:

    That's not enterprisey enough!

    while(1)
    {
        try
        {
            sleep();
        }
        catch(DiaperException de)
        {
            cry();
        }
        catch(HungryException he)
        {
            try { eat(); }
            catch { cry(); }
        }
        catch(PlayfulException pe)
        {
            try { play(); }
            catch { cry(); }
        }
        catch(Exception e)
        {
            cry();
        }
    }

    Nicely done. You win.



  • It looks as though it was written for non-technical people (who probably wouldn't get: "if (babyIsCrying)" without the "== true") who wanted to get a gift for a technogeek...



  • @themagni said:

    Nicely done. You win.

    Definitely. Well played CDarkLock.

     I don't see any reason to tag your kid with your own nerdiness, but if you are a nerd, you must be disturbed by the structure:

    while (is_baby()) {

     // ...

    }

    So once you outgrow baby...you die. Sweet, send me a stack of those and I'll hand them out to the orphans at the local shelter!! Most of them are already dead inside, anyway.



  • I'm just impressed by the watermark over the "art".  Now I'll have to spend countless hours in Photoshop trying to erase it.



  • Good thing that they made it in plain undecorated text, so that even if you're not an elite photoshop guru, you can't just quickly recreate it with notepad and 2 or 3 minutes.

     

    Oh wait... 



  • @snoofle said:

    It looks as though it was written for non-technical people (who probably wouldn't get: "if (babyIsCrying)" without the "== true") who wanted to get a gift for a technogeek...

    yeah, because "if hungry equals true" sounds much more comprehensible to an english speaker than "if babyishungry"? 



  • but of course, all those non-technical people who need "== true" spelled out for them, they'll figure out the double-pipe || means OR.  Silly programmers trying to be cutesey. 



  • @themagni said:

    @CDarklock said:

    That's not enterprisey enough!

    while(1)
    {
        try
        {
            sleep();
        }
        catch(DiaperException de)
        {
            cry();
        }
        catch(HungryException he)
        {
            try { eat(); }
            catch { cry(); }
        }
        catch(PlayfulException pe)
        {
            try { play(); }
            catch { cry(); }
        }
        catch(Exception e)
        {
            cry();
        }
    }

    Nicely done. You win.

     No no. Exceptions are exceptional cases. DiaperException, HungryException, and PlayfulException are almost expected when calling baby.sleep(). Maybe you should consider an asynchronous event manager.



  • @annc said:

    No no. Exceptions are exceptional cases. DiaperException, HungryException, and PlayfulException are almost expected when calling baby.sleep().

    Perhaps I'm missing something here, but isn't "almost expected" the same thing as "not expected"?

    Or should we be catching expections?

     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.