• Geert (unregistered)

    I was going to post a comment, but then I kicked by dog and I wasn't allowed to post a comment anymore.

  • Versimilidude (unregistered)

    And do they check on the session when it goes back to the server or was this the only timeout code?

  • Rafe Kettler (unregistered)

    TRWTF is this:

    if (0!=0)
    Captcha facilisi, the Italian word for how easy it is to tell that whoever wrote this had no idea what they were doing.
  • Fer (unregistered)

    0!=0 ??????

    Not much use of the code coverage tools, I gather.

  • Fer (unregistered)

    Someone illuminate me: in what units is that timeout ? I mean the one that is set when 0!=0, or when the dog is kicked.

  • Noman (unregistered)

    The original coder was referring to the watchdog, which is a common name for timers of a certain sort. It's not really wtf-worthy.

  • Henning Makholm (unregistered) in reply to Fer
    Fer:
    Someone illuminate me: in what units is that timeout ?
    Centiseconds, of course.
  • Paul (unregistered)

    I doubt anyone's ever heard of a watchcat.

  • (cs) in reply to Fer
    Fer:
    ...in what units is that timeout ?
    Never mind the timeout; what're the units for WasDogKicked.value? Meters?
  • (cs)

    We're controlling session timeout on the client now? Why wasn't I told?

  • Duckie (unregistered) in reply to hoodaticus

    You're missing something else. In that same meeting we decided this should only work for people that actually own dogs. (There's a 200kb compressed hot-linkable javascript available that will do YQL lookups on any social network ever written to see if you own a dog)

  • (cs) in reply to Duckie
    Duckie:
    You're missing something else. In that same meeting we decided this should only work for people that actually own dogs. (There's a 200kb compressed hot-linkable javascript available that will do YQL lookups on any social network ever written to see if you own a dog)
    Furthermore, the timeout is only set for those who are either abusive to their dogs, or are not running in the correct universe.
  • Rodger Combs (unregistered)

    TRWTF slow the lack of semicolons, along with 0!=0, along with the implied eval.

    CAPTCHA: nulla, the number of semicolons in this code

  • (cs) in reply to Noman
    Noman:
    The original coder was referring to the watchdog, which is a common name for timers of a certain sort. It's not really wtf-worthy.
    It seems your sense of humor is in desperate need of tuning.
  • Mike (unregistered)

    WasDogKicked is obviously referring to a watchdog timer, which is commonly found on embedded systems.

  • lex (unregistered) in reply to Mike

    Is 0!=0 also commonly found on embedded systems?

  • lex (unregistered) in reply to Mike
    Mike:
    WasDogKicked is obviously referring to a watchdog timer, which is commonly found on embedded systems.
    Is 0!=0 also commonly found on embedded systems?
  • cykosis (unregistered)

    if (0!=0) is obviously just a typo, the original coder meant to type if (0!=O), as every coder should always test that the numeral 0 is not equal to the letter that looks most like it, to make sure this is the correct universe, so obviously this is not wtf-worthy and yes, my sense of humor is desperately in need of a tweaking, thank you very much.

  • Fer (unregistered) in reply to boog
    boog:
    Never mind the timeout; what're the units for WasDogKicked.value? Meters?
    You made my day.
    cykosis:
    if (0!=0) is obviously just a typo, the original coder meant to type if (0!=O), as every coder should always test that the numeral 0 is not equal to the letter that looks most like it, to make sure this is the correct universe, so obviously this is not wtf-worthy and yes, my sense of humor is desperately in need of a tweaking, thank you very much.
    Oh, sure. All of my code has checks to make sure 0 is not O, and if 1 is not l. And when it is, standard procedure is to set the timeout to some reasonable magic number.

    Can't resist to post the captcha: appellatio, which rhymes with...

  • (cs) in reply to Geert

    I have a similar function but mine is called WasBitchSlapped

    and I don't have the if 0!=0

  • Mike D. (unregistered)

    I write embedded code, and I have it kick watchdogs all the time. You have to, it's the way they work.

    You see, a watchdog is a circuit that resembles a dog that runs around. The thing is, every now and then, if left unkicked, the dog will think its master (usually the main program) is friendly and attempt to hump its leg. This disturbs its master greatly, so much so that the master will drop everything, shoo off the dog, and start over whatever it was doing from the top.

    So, if the master wants to keep going on being a productive little program, it has to kick the dog on a more or less regular basis, to keep the meme "I am your master and not that kind of friend" front and center in the watchdog's logic. And thus God's in his heaven, all's well with the world.

    For the record, attempts to implement this system with cats have all ended in failure. The cat simply sits there. At best, it expresses displeasure that the main program doesn't serve it. Remember: dogs have masters and cats have staff.

  • Fry-kun (unregistered)

    Old meme is old

    captcha: illum

  • Bob (unregistered)

    Oh my god, I think I know that guy. Did he use to work for Turner? There was a guy there once whose every function or variable was something like "isDogDead","killDog()", or "beatDeadDog = true". It was kind of bizarre, and then one day he disappeared mysteriously.

  • Gorm Braarvig (unregistered)
    1. Kerpalism lives
    2. the indefinite for-loop we all loved in badly written state-machines has finally had a child with divide by zero (0!=0)
    3. naming standards are dead (I knew that already, just saying)

    ...still, my favourite must be the usage of newline and tab, the only rule being that there are no\n\t\nrules\tunbroken\0

  • (cs)

    The comments section for this site would do well with two variables:

    (WasHorseBeaten & IsHorseDead)
  • hayds (unregistered) in reply to hoodaticus
    hoodaticus:
    We're controlling session timeout on the client now? Why wasn't I told?

    Just because there's client side code too doesn't mean server doesn't also check for it. For example one of the financial services I use has a javascript message box warning one minute before your session timeouts. This is obviously good since you notice the timeout before it happens.

  • Herby (unregistered) in reply to boog
    boog:
    Never mind the timeout; what're the units for WasDogKicked.value? Meters?
    Jeez... This is blatantly obvious! The values are: True, False, and File Not Found.

    I mean, get real!!

  • Ben (unregistered)
    Quentin:
    rast:
    I hate to kick the dog, but...

    https://homebanking.pacu.com/homebanking.asp

    Oh my god... if you click on the "Accounts" link, you get a login page... with a captcha that always has the same word (try refreshing). WTF!

    Different word if you clear cookies, so not a WTF. But, still, a terrible, terrible captcha. Their image library couldn't distort the text? Four letters?

    transverbero: one of about a dozen captchas this stupid site uses.

  • Ebbe (unregistered) in reply to lex
    lex:
    Is 0!=0 also commonly found on embedded systems?
    In the thirty years, I have spent in the embedded world, I have seen a lot of crappy code. Most of it was written by electronics engineers, who hadn't got much of a clue on how to write software properly (as in "how hard can it be?"). So even though I haven't seen that exact construct myself, I wouldn't be overly surprised if it was found here and there.
  • masterblaster gemini (unregistered) in reply to Ebbe
    Ebbe:
    lex:
    Is 0!=0 also commonly found on embedded systems?
    In the thirty years, I have spent in the embedded world, I have seen a lot of crappy code. Most of it was written by electronics engineers, who hadn't got much of a clue on how to write software properly (as in "how hard can it be?"). So even though I haven't seen that exact construct myself, I wouldn't be overly surprised if it was found here and there.

    As we all know engineers are crappy. They use crappy IDEs. Crappy IDEs can't uncomment. Even if they could, it would be awkward and crappy to use. Most likely it would be found after four clicks among some other crappy "refactoring" tools. Even if there was an IDE that wasn't crappy the crappy engineers wouldn't read the crappy manual. IDEs are the TRWTF.

  • yetihehe (unregistered) in reply to lex
    lex:
    Is 0!=0 also commonly found on embedded systems?
    Kind of.
    xor eax,eax
  • Mike (unregistered)

    Urk. Who writes IA-32 assembly in 2010, seriously.

    CAPTCHA: verto (beep boop i am a robot)

  • the beholder (unregistered) in reply to boog
    boog:
    Fer:
    ...in what units is that timeout ?
    Never mind the timeout; what're the units for WasDogKicked.value? Meters?
    Newtons, I'd say. But you can calculate the distance with it and Dog.Weight
  • Jasper (unregistered)

    Argh.

    Not only the "funny" variable name is a WTF, this code contains a lot of other WTFs too. Looks like it was written by someone who does not have a lot of experience with JavaScript.

    Ok, semi-colons are optional in JS, but use them and omit them so inconsistently? You'd better always use semi-colons because some browsers go crazy when you don't (that's a whole other kind of WTF...).

    And then the stupid if (0!=0) code...

    So, what was his conclusion? I hope "None of this code can be reused".

  • Goush (unregistered)

    it's a Schrödinger's dog

  • Frenchie (unregistered)
    rast:
    I hate to kick the dog, but...

    https://homebanking.pacu.com/homebanking.asp

    I love their weirdo syntax for HTML comments. Not to mention the site renders like crap on Chromium (and probably anything except MSIE). Before asking for a mobile version, they should probably give a thought about rewriting their entire website (also, the 90's have called, they want their Web design back)!

  • Frenchie (unregistered)

    This one is nice, too:

    [image]
    ... snip...
    		//var img1 = document.images('Hello');
    		//img1.src = '/commonfiles/reconnect.asp';
    		var img1 = document.getElementsByName('Hello');
    		img1[0].src = '/commonfiles/reconnect.asp';
    

    Tip o'my hat to the elite coders at pacu.com, they sure deserve it.

  • frits (unregistered)

    Who hasn't kicked something like this? [image]

  • (cs) in reply to frits
    frits:
    Who hasn't kicked something like this? [image]
    Aww, look at him, all bloated like a tick on a...
  • An Old Hacker (unregistered) in reply to Mike
    Mike:
    Urk. Who writes IA-32 assembly in 2010, seriously.

    Anyone who does bottom-level microprocessor validation. Seriously.

  • Arne (unregistered) in reply to Ebbe
    Ebbe:
    lex:
    Is 0!=0 also commonly found on embedded systems?
    In the thirty years, I have spent in the embedded world, I have seen a lot of crappy code. Most of it was written by electronics engineers, who hadn't got much of a clue on how to write software properly (as in "how hard can it be?"). So even though I haven't seen that exact construct myself, I wouldn't be overly surprised if it was found here and there.

    I once worked with an EE guy who told this joke:

    Any working program can be converted to a non-working program by removing or changing one instruction. By induction, we know you can reduce any working program to a broken program containing only a single statement. Therefore, you can create a working program by starting with the statement "x=0" and then debugging it.

    TRWTF was that his code looked like he really did it that way...

  • anonymous_coder() (unregistered) in reply to An Old Hacker
    An Old Hacker:
    Mike:
    Urk. Who writes IA-32 assembly in 2010, seriously.

    Anyone who does bottom-level microprocessor validation. Seriously.

    And security analysts on both sides of the Force. Seriously, almost all shellcode is written in assembler.

  • joe blow (unregistered)

    Still better than my bank

  • (cs) in reply to Arne
    Arne:
    I once worked with an EE guy who told this joke:

    Any working program can be converted to a non-working program by removing or changing one instruction. By induction, we know you can reduce any working program to a broken program containing only a single statement. Therefore, you can create a working program by starting with the statement "x=0" and then debugging it.

    TRWTF was that his code looked like he really did it that way...

    You can tell he was an EE rather than a mathmo because the inductive step doesn't work. You need to strengthen it to "Any program, working or not, which contains more than one instruction, can be converted into a program, working or not, by removing an instruction". Prove that and you can apply induction.
  • trwtf (unregistered) in reply to Arne
    Arne:
    I once worked with an EE guy who told this joke:

    Any working program can be converted to a non-working program by removing or changing one instruction. By induction, we know you can reduce any working program to a broken program containing only a single statement. Therefore, you can create a working program by starting with the statement "x=0" and then debugging it.

    Sounds like a pretty good summary of "iterative development" to me.

  • (cs) in reply to Arne
    Arne:
    "...you can create a working program by starting with the statement "x=0" and then debugging it."
    Did you inform the EE guy that while such an approach to software development makes implementation easier, it also makes debugging into a far more cumbersome task than it would otherwise be?
  • dog lover (unregistered) in reply to frits
    frits:
    Who hasn't kicked something like this? [image]
    this is not funny and is sad on so many levels i can't believe you would even joke about this obviously kicking dogs is bad but i can't believe anyone would let this dog get this obese i think the owners should be force fed until they can feel the same misery
  • Yakov (unregistered)

    In Soviet Russia, dog kick you!

  • joe blow (unregistered) in reply to dog lover
    dog lover:
    frits:
    Who hasn't kicked something like this? [image]
    this is not funny and is sad on so many levels i can't believe you would even joke about this obviously kicking dogs is bad but i can't believe anyone would let this dog get this obese i think the owners should be force fed until they can feel the same misery
    Don't worry, the next scene is the workout montage, where we see the dog progress from trotting to chasing down frisbees all the upbeat melody of "Walking on Sunshine."
  • (cs) in reply to dog lover
    dog lover:
    frits (unregistered):
    Who hasn't kicked something like this?
    ...i can't believe you would even joke about this...
    What? You can't believe that a complete stranger on an internet forum would joke about kicking an overly-obese dog? You certainly have much higher expectations of these guys than I do (no offense, fake frits).
    dog lover:
    ...i think the owners should be force fed until they can feel the same misery
    What makes you think the owners don't already share a similar physique? There's no guarantee that the not-so-fat-looking ankle in the background belongs to the owner. And it's all too common for people who have no self-restraint to behave the same way when feeding their pets.

Leave a comment on “WasDogKicked?”

Log In or post as a guest

Replying to comment #:

« Return to Article