• iMalc (unregistered)

    Perhaps he also stored years as two digits...

    I'm beginning to see a pattern here.

  • (cs) in reply to [ICR]
    [ICR]:

    The point of the joke is that while it cooks for 1 second more, you are free to go do something else. You have put less effort into entering in the number for the nominal fee of having to wait a whole extra second for the food to cook. This parallels optimising code. You can put all that work in to optimise and only use 18-bit maths to save a few nanoseconds, but you'll have to keep coming back to fix problems.

    It's not about saving overall time, it's about the trade-off between what you have to do to get things rolling and how long you have to wait for it to roll.

    yes, that may have been the point of the joke, however the response here is what they probably got originally as well, assuming they were dealing with real techs. At least, almost all the people I know who have or are doing a CS degree would respond by nitpicking apart the whole question and then nitpicking away any objections to the original nitpicking. You want to ask a wiseass question like that, then expect the wiseass responses. In fact, fire anyone who doesn't come back with a wiseass response, they're either less competent or less confident than the ones that do.

  • Hit (unregistered)

    Geeze. RUNPROG. What a piece of crap.

    Here's another analogy that applies to RUNPROG, but at the company level.

    "Problem: When I put my hand on the hot stove burner, it hurts. Sensible Solution: Take hand off burner. Company Solution: Continue applying hand to burner. Eventually, you'll get used to the burning pain, and you'll save precious milliseconds from not removing the hand."

  • (cs) in reply to iMalc
    iMalc:
    Perhaps he also stored years as two digits...

    I'm beginning to see a pattern here.

    Two digits?!

    One digit is enough. [0-9A-Z] will give you 36 years worth of offset, so why waste storage bytes?

  • dolo54 (unregistered) in reply to Pap
    Pap:
    Duston:
    I heard or read somewhere about how programmers need to be careful when they about "faster." To show their point, they asked the question, "Which is faster, cooking something in the microwave for 1:10 or 1:11?" Of course any idiot would say "1:10", but the real answer is that in the human interaction portion of the activity (i.e. pushing the buttons), 1:11 is faster because it's faster (i.e., easier) to type in three 1's on the keypad than 1:10.

    I thought it was interesting...maybe you had to be there.

    Disagree:

    1. The question, as you wrote it, refers to cooking time specifically, not preparation time.

    2. I can put one finger on "1" key and one finger on "0" key. The instant my first finger has activated the circuit of the "1" key, I can then press the "0" key with the other finger. If I used the same first finger to press "1" AGAIN then it would take longer since time is wasted as your finger bounces up from pressing the key.

    3. I can just press "Minute Plus" quick-key on my microwave twice and it starts cooking already :)

    SRSLY O RLY??? I hope that you are being sarcastic, but I think you are actually bragging about your keypad skills. That so, so sad.

  • Tommy (unregistered)

    i used to work on a print - manager, every month it badly printed about 3 or 4 documents, and i had to manualy repair them in DB, i was a lot easier then searching a bug in a giant stored procedure.

  • Jim (unregistered) in reply to Duston

    Not necessarily - my microwave has a button for "add one minute", and a button for 10 seconds. I can get 1:10 with two buttons - 1:11 takes me three.

  • LarsP (unregistered)

    Saving a few nanoseconds ?? So, the ancient supercomputer ran with a clock frequency in the GHz range?? Why don't we start talking about seconds and minutes.

    Amazing that no one is defending the star programmer. Alex already wrote that RUNPROG, evil or not, was slowing programs down painfully. What if the programmer didn't think about optimizing at all? That would probably have made RUNPROG completely unuseable.

    I'm appalled at Alex's scornful attitude about optimizing, and at the comments. I realize now that this apparently widespread attitude is what makes a lot of modern software so painfully slow. Coders don't give shit about writing efficient code.

    I have crossed too many IT guys on my way who deep down felt that it was a good thing, that their PC had "something to do" and utilized its resources. Their train of thought was like "Just write the stuff in whatever way you can think of, wooow it uses 780 MB ram! suuuper nice!"

    Eeeeeew. All coders should be forced to try and program stuff on a C64. Spoiled kids we are today.

  • SkittlesAreYum (unregistered) in reply to LarsP
    LarsP:
    Saving a few nanoseconds ?? So, the ancient supercomputer ran with a clock frequency in the GHz range?? Why don't we start talking about seconds and minutes.

    Amazing that no one is defending the star programmer. Alex already wrote that RUNPROG, evil or not, was slowing programs down painfully. What if the programmer didn't think about optimizing at all? That would probably have made RUNPROG completely unuseable.

    I'm appalled at Alex's scornful attitude about optimizing, and at the comments. I realize now that this apparently widespread attitude is what makes a lot of modern software so painfully slow. Coders don't give shit about writing efficient code.

    I have crossed too many IT guys on my way who deep down felt that it was a good thing, that their PC had "something to do" and utilized its resources. Their train of thought was like "Just write the stuff in whatever way you can think of, wooow it uses 780 MB ram! suuuper nice!"

    There's writing efficient code, and then there's pointless optimizing to the point of dangerousness. Our star programmer failed to do the former, and did the latter.

    Frankly, as far as I'm concerned, efficient code != optimizations.

  • Boya (unregistered)

    Boring story

    I didn't learn anything.

  • (cs) in reply to [ICR]
    [ICR]:
    The point of the joke is that while it cooks for 1 second more, you are free to go do something else. You have put less effort into entering in the number for the nominal fee of having to wait a whole extra second for the food to cook.

    But the question wasn't "Which takes less effort?" it was "Which is faster?"

  • LarsP (unregistered) in reply to SkittlesAreYum
    SkittlesAreYum:
    Frankly, as far as I'm concerned, efficient code != optimizations.
    So, if I optimize a frequent mathematical operation with a lookup table, have I just jumped off the cliff?

    I know that on a PC it would probably not matter much, but on a microcontroller it could mean difference between getting the job done or not.

  • Watson (unregistered) in reply to LarsP
    LarsP:
    SkittlesAreYum:
    Frankly, as far as I'm concerned, efficient code != optimizations.
    So, if I optimize a frequent mathematical operation with a lookup table, have I just jumped off the cliff?
    Depends; does your lookup table overflow the processor's cache?
  • Jonno (unregistered) in reply to LarsP
    LarsP:
    ... All coders should be forced to try and program stuff on a C64. Spoiled kids we are today.
    Couldn't agree more. The wastage on modern day systems is quite frankly shocking. In today's society, it seems it's sadly mostly a case of style > substance (and most software doesn't even get that right).
  • Me (unregistered) in reply to Jonathan Morton

    My favorite is the microwaves that require you to start by pressing "Cook" or something similar. Classic example of failure to optimize the UI for the common case.

  • Mother Jebus (unregistered)

    2 things

    1. typing 1:11 is faster than 1:10, and you can pull it out of the microwave at 1 second left - so it's faster

    2. 0x1FFFF flips to 0x20000, which is -0, which then increments to 0x20001, which is -1, then -2, then -3.

  • shashi (unregistered)

    that was hilarious and amazing..

  • sanitarium (unregistered) in reply to Mother Jebus
    Mother Jebus:
    typing 1:11 is faster than 1:10, and you can pull it out of the microwave at 1 second left - so it's faster
    As others have pointed out, your assertion that typing 1:11 on a microwave keypad is not necessarily faster than typing 1:10, especially when taking into consideration that, at least on all the microwaves I've seen, the finger has to pass by the 0 key on its way to the start key anyway. And if you take into account that humans have multiple fingers and can easily get positioned to do so, using a finger on one hand to press the ones and a finger on the other hand to press the 0 is markedly faster than pressing the 1 three times.
  • (cs) in reply to Jon
    Jon:
    Some Random Microwave Jockey:
    This only works if it takes you longer than one full second to transition from the 1 key to the 0 key. If anyone actually does take that long, I'd have serious doubts about their hand-eye co-ordination, and for that matter, their ability to interact with the modern world.
    I was thinking the same thing. Even if you account for the occasional error, it ought to be less than a full second on average.

    This strikes me as an amusing anecdote that management can spew to the engineers when the engineers bring up a real performance issue. I.E.:

    Engineer: "We've got a real performance problem in the new version Barfoo 2007, it can take up to an hour to re-index the Bazfoo!"

    Management, chuckling: "Oh my, let me tell you a little story about a microwave...."

    (commenting on stale posts since 2K7)

  • Zemm (unregistered) in reply to Duston
    Duston:
    "Which is faster, cooking something in the microwave for 1:10 or 1:11?" Of course any idiot would say "1:10", but the real answer is that in the human interaction portion of the activity (i.e. pushing the buttons), 1:11 is faster because it's faster (i.e., easier) to type in three 1's on the keypad than 1:10.

    Not on my microwave. It has buttons: 10 min, 1 min, 10 sec, 1 sec, so 1:10 is three buttons (1 min, 10 sec, start) and 1:11 is four button presses plus the extra second!

    And my old microwave had an analogue dial so there wasn't any real difference between 1:10 and 1:11.

  • Zemm (unregistered) in reply to Mother Jebus
    Mother Jebus:
    2) 0x1FFFF flips to 0x20000, which is -0, which then increments to 0x20001, which is -1, then -2, then -3.

    Not ones' complement: [url]http://en.wikipedia.org/wiki/Signed_number_representations#Ones.27_complement[url]

  • Freyaday (unregistered)

    TRWTF is using a signed comparison for the access check. Surely this piss-poor optimizer would've known that an unsigned comparison would be faster.

  • Gumpy Gus (unregistered) in reply to Freyaday

    There were no unsigned 18-bit instructions. This was a Seymour Cray computer where extra bits for parity and overflow just were not done.

Leave a comment on “Saving a Few Nanoseconds ”

Log In or post as a guest

Replying to comment #:

« Return to Article