• Anonymous (unregistered)

    #define SECONDS_TO_MILLISECONDS (000) #define MILLISECONDS_TO_SECONDS (1 / 000)

  • (cs)
    • Head, meet desk. Desk, meet head.
    • Oh, hello desk. Mind if we touch a bit?
    • Hello head. No, not at all, I think it is most definitely warranted.
  • Tom (unregistered)

    I must admit, i didn't spot the issue at first...

  • Jim the Tool (unregistered)

    I timesed by zero once. Nothing happened.

    I then divided by zero. Black hole.

    Bugger.

    The real WTF is that people put up with a crappy coder who also doesn't have good interpersonal skills, and can't take criticism. If it were only the first, it might be OK (send them to testing). If it were only the last two, it might be OK (don't interact with them?).

    But altogether, I don't know why you'd not fire Mark.

  • Black Bart (unregistered)

    Write a test case that will cause this code to fail until it performs as intended.

  • Ike (unregistered)

    Add another zero, maybe?

  • foo AKA fooo (unregistered)
    Jonathan was tempted to point out that Mark's attempt to express the number of milliseconds in a second was off by an order of magnitude or two
    Or inifinitely many ...
        _BootloaderWCF.WaitForInstaller(_Id, timeOut + (60 . 000));
    Fixed?
  • Miriam (unregistered)

    Well, he needs to learn how to use types!

    _BootloaderWCF.WaitForInstaller(_Id, timeOut + ((int) "60" + "000"));

    TRWTF is leading underscores.

  • Anonymous (unregistered) in reply to Black Bart
    Black Bart:
    Write a test case that will cause this code to fail until it performs as intended.
    "Fine! Be that way! I'll write a test case, stop emailing me!"
    _BootloaderWCF.Start();
    try
    {
        Thread.Sleep(60 * 000);
        DummyInstaller.Done = true;
    }
    catch (ThreadInterruptedException)
    {
        Test.Fail();
    }
    Test.OK();
  • Miriam (unregistered)

    I am TRWTF! Stupid parentheses.

    _BootloaderWCF.WaitForInstaller(_Id, timeOut + (int) ("60" + "000"));
    

    FTFM

  • RFox (unregistered)

    TRWTF is that the product can't install in 60ms :-)

  • RFox (unregistered) in reply to RFox
    RFox:
    TRWTF is that the product can't install in 60ms :-)

    Uh....ooops * 000 :-(

  • anonymous (unregistered)

    It will be fun to see how many were/will be fooled by such code and even comment before realizing it. Two, so far.

  • cyborg (unregistered) in reply to anonymous

    How the hell is this guy not also seeing the problem? Speed of the machine is clearly irrelevant.

  • (cs) in reply to cyborg
    cyborg:
    Speed of the machine is clearly irrelevant.
    The speed of the guy's thinking is clearly relevant.
  • Anonymous (unregistered)

    I wonder how many actually missed that the variable timeOut also contributes to the timeout.

  • anonymous (unregistered) in reply to Anonymous
    Anonymous:
    I wonder how many actually missed that the variable `timeOut` also contributes to the timeout.
    "Also contributes"? Did you mean "the only thing that contributes to timeout"?
  • Anonymous (unregistered) in reply to anonymous
    anonymous:
    Anonymous:
    I wonder how many actually missed that the variable `timeOut` also contributes to the timeout.
    "Also contributes"? Did you mean "the only thing that contributes to timeout"?
    Maybe he means "other than zero".
  • cyborg (unregistered) in reply to Anonymous
    Anonymous:
    anonymous:
    Anonymous:
    I wonder how many actually missed that the variable `timeOut` also contributes to the timeout.
    "Also contributes"? Did you mean "the only thing that contributes to timeout"?
    Maybe he means "other than zero".

    You see how well binary works without any zeros. Those zeros are contributing a lot!

  • Jeff Grigg (unregistered)

    Oh! I see the problem: The constant is in octal.

    ;->

  • MonkeyCoder (unregistered)

    TRWTF is Jonathan's timidity (and the entire team's, really) in the face of a blowhard who uses bluster and intimidation instead of logic and skill.

  • anonymous (unregistered)

    TRWTF is a "start to finish" timeout instead of a saner approach of setting watchdog timers for individual blocks of code that check to see that forward progress has been made and they complete within some reasonable amount of time.

  • (cs)

    I am in favor of promoting Mark out of development team so he can no longer do any harm to code-base.

  • anonymous (unregistered) in reply to Nagesh
    Nagesh:
    I am in favor of promoting Mark out of development team so he can no longer do any harm to code-base.
    Are you a manager? Fellow coders are merciless, and would only accept a promotion to unemployed.
  • gnasher729 (unregistered) in reply to Nagesh
    Nagesh:
    I am in favor of promoting Mark out of development team so he can no longer do any harm to code-base.

    Well, I'd personally ask him very quietly what is wrong with the code. And if he starts shouting, I'd use every single opportunity to tell everyone very quietly that I'm still waiting for an apology for shouting at me when I pointed out the most stupid bug ever in his code.

  • Stereotyper (unregistered) in reply to Nagesh

    He's a straight shooter with upper management written all over him

  • anonymous (unregistered)
    Jonathan was tempted to point out that Mark's attempt to express the number of milliseconds in a second was off by an order of magnitude or two
    Or infinitely many, but who's counting?
  • anonymous (unregistered) in reply to anonymous
    anonymous:
    Jonathan was tempted to point out that Mark's attempt to express the number of milliseconds in a second was off by an order of magnitude or two
    Or infinitely many, but who's counting?
    I do find it a little bit ironic that the "order of magnitude or two" has the same error that Mark's fix had. Multiplying 0 by a larger number - whether it's 10 or 60 or 100 - doesn't make it any larger.
  • Mee2 (unregistered)

    He claims that it installs before timing out on his own system... did he really test the install? If you can prove that a dev doesn't test when he claimed he did... well... you know...

  • (cs) in reply to anonymous
    anonymous:
    I do find it a little bit ironic that the "order of magnitude or two" has the same error that Mark's fix had. Multiplying 0 by a larger number - whether it's 10 or 60 or 100 - doesn't make it any larger.
    Yes it does. 0000000000 is clearly larger then 00.
  • Developer Dude (unregistered)

    I'm trying to multiply, but nothin' happens!

  • John (unregistered) in reply to Jeff Grigg

    Yer He should have been using decimal zeros.

    Or for more accuracy

    0.0000000000000

  • trtrwtf (unregistered) in reply to Developer Dude
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    I think multiplication is broken.

  • Chubber (unregistered) in reply to trtrwtf
    trtrwtf:
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    I think multiplication is broken.

    assert(2 * 3, 2 + 2 + 2);

    Or, to check the original problem:

    assert(60 * 000, );

  • the beard of the prophet (unregistered) in reply to nerd4sale
    nerd4sale:
    anonymous:
    I do find it a little bit ironic that the "order of magnitude or two" has the same error that Mark's fix had. Multiplying 0 by a larger number - whether it's 10 or 60 or 100 - doesn't make it any larger.
    Yes it does. 0000000000 is clearly larger then 00.

    It's certainly longer, yes, but larger?

  • cowardly man (unregistered)

    What ever happened to providing user feedback via text that says what the installer is doing. if it is on the same step for an hour, something went wrong.

  • (cs) in reply to trtrwtf
    trtrwtf:
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    I think multiplication is broken.

    The only solution here is to override "*" and write your own multiply function that doesn't have that problem.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to nerd4sale
    nerd4sale:
    anonymous:
    I do find it a little bit ironic that the "order of magnitude or two" has the same error that Mark's fix had. Multiplying 0 by a larger number - whether it's 10 or 60 or 100 - doesn't make it any larger.
    Yes it does. 0000000000 is clearly larger then 00.
    Even Las Vegas knows they're different, they have both 0 and 00 on roulette wheels! Or maybe 00 is just the octal version.
  • anonymous (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    nerd4sale:
    anonymous:
    I do find it a little bit ironic that the "order of magnitude or two" has the same error that Mark's fix had. Multiplying 0 by a larger number - whether it's 10 or 60 or 100 - doesn't make it any larger.
    Yes it does. 0000000000 is clearly larger then 00.
    Even Las Vegas knows they're different, they have both 0 and 00 on roulette wheels! Or maybe 00 is just the octal version.
    File that under "reasons why mathematicians don't play roulette".
  • (cs) in reply to cowardly man
    cowardly man:
    What ever happened to providing user feedback via text that says what the installer is doing. if it is on the same step for an hour, something went wrong.

    Users were complaining about it, so the text was removed so they don't know if something went wrong or the installer is just doing a lot of things.

  • (cs) in reply to MonkeyCoder
    MonkeyCoder:
    TRWTF is Jonathan's timidity (and the entire team's, really) in the face of a blowhard who uses bluster and intimidation instead of logic and skill.

    Problem is: Mark's the President's daughter and can never be fired.

  • (cs) in reply to Developer Dude
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    You need to procure a thing called a "female" first (cue the typical "/. -ers live in their parents' basement" jokes)

  • anonymous (unregistered) in reply to cellocgw
    cellocgw:
    MonkeyCoder:
    TRWTF is Jonathan's timidity (and the entire team's, really) in the face of a blowhard who uses bluster and intimidation instead of logic and skill.

    Problem is: Mark's the President's daughter and can never be fired.

    She prefers to be called Sue now, you insensitive clod.

    captcha: transverbero

  • Highly Resolved (unregistered) in reply to Mee2
    Mee2:
    He claims that it installs before timing out on his own system... did he really test the install? If you can prove that a dev doesn't test when he claimed he did... well... you know...

    And that's another WTF for the article, if you are doing installers you don't use your own system for testing!

    You should have a secondary 'clean' system that you can revert back to the 'clean' state after running an installation test.

    This avoids leaking your dev setup into the installer (for example, having files on your dev system that are needed by the application that never made into the installer, so application installation is only successful on [i]your[i] machine.)

    As well as having to 'adjust' back-and-forth again your dev machine so that you can do an installation test and then 'adjust' your machine back to being a dev machine again.

  • foo AKA fooo (unregistered) in reply to gnasher729
    gnasher729:
    when I pointed out the most stupid bug _ever_ in his code.
    U sure?
  • (cs)

    Why do we developers always have issues with dating and timing?

  • (cs)

    Mark probably sees zero problem with his code.

    Sincerely,

    Gene Wirchenko

  • C-Derb (unregistered) in reply to cellocgw
    cellocgw:
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    You need to procure a thing called a "female" first (cue the typical "/. -ers live in their parents' basement" jokes)

    I was going to suggest Viagra or Cialis.

  • fizzbuzz (unregistered) in reply to Developer Dude
    Developer Dude:
    I'm trying to multiply, but nothin' happens!

    Cannot reproduce. Closing.

  • Tux "Tuxedo" Penguin (unregistered)

    TRWTF is compilers accepting numbers with leading zeroes. Anything like 01, 006, 000 should throw an error.

Leave a comment on “Sound and Fury, Implementing Nothing”

Log In or post as a guest

Replying to comment #436307:

« Return to Article