• (cs) in reply to nasch
    nasch:
    chubertdev:

    Wasn't that myth busted?

    They found that you can't explode a house by popping popcorn in it, but it is definitely possible to pop popcorn with a laser.

    A whole bag, or a single kernel?

  • Gunslinger (unregistered) in reply to hurley
    hurley:
    tim:
    but why specifically sleep for 8 x 812 seconds? you'd normally expect it to be a multiple of minutes or something

    Because 8x812 seconds is 108 minutes and 16 seconds. 16 is one of the numbers. 108 is the sum of the numbers.

    4 8 15 16 23 42

    THE NUMBERS ARE BAD!

    Hey, those are my lottery numbers...

  • S (unregistered) in reply to cowardly man
    cowardly man:
    I heard a story about someone doing this where I work YEARS ago. They basically wanted a viable excuse to go get a snack.

    "Why aren't you doing testing?" "The tests are running, they take about 15 minutes."

    That sounds plausible enough to me... and I'm guessing they run often do full test run around mid-morning and mid-afternoon...

  • Kasper (unregistered) in reply to cowardly man
    cowardly man:
    "The tests are running, they take about 15 minutes."
    Last week I actually experienced unit tests taking that long on a project, I am working on. Usually it was something like 3-4 minutes, and I was wondering why it suddenly had become that slow.

    My computer did not appear to be very busy while the test was running. In fact it was suspiciously non-busy for a machine running unit tests. CPUs were idle, disk was idle too.

    In the end the reason turned out to be, that previously while debugging a race condition, I had put a sleep statement in the code, and forgotten to remove it again when I was done debugging.

  • Norman Diamond (unregistered) in reply to testQuartz
    testQuartz:
    chubertdev:
    :rimshot:
    Huh? What? Loud noise? I was sleeping! Why did you wake me from my sleep?
    Maybe because the moderators deleted my posting of a joke about Java's slowness?

    "Knock knock" "Who's there?" [an hour later] . . . . . Java

    Even if the moderators were confused by another Norman Diamond posting something in the middle of that sequence, I wonder what they found objectionable about this joke. I guess I'd better start posting advertisements for stolen credit cards instead.

    Anyway, I don't know why the orphaned :rimshot: remained. You can go back to sleep now.

  • Sebastian Ramadan (unregistered) in reply to Scourge of programmers.

    Java, the language, or Java, the implementation?

    It makes no sense to speak of a language as though it has speed, for each language may have multiple implementations and, in this particular case, there are a huge range of implementations that differ quite drastically in speed. Let us analyse that range.

    In 1995, Sun Microsystems released the Java 1.0 VM. It was originally a source-code interpreter, and it probably ran on a Pentium Pro, at best.

    At somewhere around 1997-1998, the Java 1.1 VM was released. It compiled source code to byte-code, and used a byte-code interpreter instead. The resulting speed benefits were of course, quite significant, not to mention that the VM was probably running on Pentium IIs.

    Is the Java 1.1 VM, running on a Pentium II, faster than the Java 1.0 VM, running on a Pentium Pro? Sure is. Does that make it "fast"? Perhaps not as fast as C++, right? Is the Java 1.1 VM, running on a Pentium II, faster than code produced by C++, running on a Pentium Pro?

    These days, there are multiple implementations for C++, too. They range from source-code interpreters (with speeds comparable to the first JVM) and byte-code compilers (some of which may target JVM bytecode) to fully-fledged AOT compilers (those that we all know and love). It makes no sense to call C++ "fast", because there are slow implementations and fast implementations.

    Conclusion: Don't make judgements about the speed of a language. Make judgements about the speed of an implementation.

    An implementation is a program that performs an actual task. If you're not profiling it, you can't give meaningful measurements about its speed. Usually this would be a response to your boss asking you to optimise a program for production.

    This includes the computer in its scope. If the production system differs in hardware specification to the testing system, then you have a potential problem. You can't be certain that you're optimising for one hardware configuration by optimising for another.

    The compiler you use is also included in the scope. If one compiler produces better results than another, then your profiling should identify this, and it might be a good idea to use the compiler that produces more optimal code.

    When you profile your code, you'll recognise that it shows you the modules/functions that are most used and occupy the most time, etc. These are statistics you can use to help decide where optimisation is most feasible.

    Different compilers may cause different statistics, as may different OSes and different hardware configurations. Hence, if you're going to talk about the speed of an implementation, it'd be a good idea to specify the entire implementation, which includes details of the hardware, OS, compiler and program (eg. by source code)... and that's precisely what reputable benchmark websites (eg. alioth) do.

    Otherwise, I have the very right to define Java as "Java 1.0, running on a Pentium Pro" and C++ as "C++ gcc 4.8.0 running on the latest Xeon with 16 cores and 16GB of RAM, automatic loop parallelism enabled"... Of course Java will be slow, in this example... but what if you swap them around, and run the C++ on the Pentium Pro and the Java on the modern-day Xeon?

    It's worth noting, since someone made a big deal about repainting and resizing, that when Windows decides that your program isn't responding, it suspends repaints and draws a blank canvas instead. This has been the case since Windows XP, IIRC. Prior to that, instead of drawing a blank canvas they would draw whatever was visible prior to the repainting. That commonly included the desktop, another program, the start menu, overlapping frames of a dialog or the mouse being dragged around the screen, etc. Java's not the only victim.

    Image verification: suscipere. People who associate speed to programming languages, or don't specify implementation details when associating speed to implementations, are being quite suscipere. Thanks, Latin :)

  • (cs) in reply to Norman Diamond
    Norman Diamond:
    testQuartz:
    chubertdev:
    :rimshot:
    Huh? What? Loud noise? I was sleeping! Why did you wake me from my sleep?
    Maybe because the moderators deleted my posting of a joke about Java's slowness?

    "Knock knock" "Who's there?" [an hour later] . . . . . Java

    Even if the moderators were confused by another Norman Diamond posting something in the middle of that sequence, I wonder what they found objectionable about this joke. I guess I'd better start posting advertisements for stolen credit cards instead.

    Anyway, I don't know why the orphaned :rimshot: remained. You can go back to sleep now.

    I believe that testQuartz's reply was there before your comments were deleted.

  • Norman Diamond (unregistered) in reply to chubertdev
    chubertdev:
    Norman Diamond:
    Even if the moderators were confused by another Norman Diamond posting something in the middle of that sequence, I wonder what they found objectionable about this joke. I guess I'd better start posting advertisements for stolen credit cards instead.

    Anyway, I don't know why the orphaned :rimshot: remained. You can go back to sleep now.

    I believe that testQuartz's reply was there before your comments were deleted.
    Yes it was. I still wonder what the moderators fouond objectionable, and why they didn't delete testQuartz's comment that they left orphaned.

    I don't know who the other Norman Diamond is who posted in the middle of the deleted sequence, but that doesn't matter. When I lived in Toronto I was one of two Norman Diamonds in the phone book. When I worked in Guelph there was a Norman Diamond in the Guelph section of the phone book, but I was in the Kitchener-Waterloo section of the same phone book. One time I shared a table with someone named Larry Diamond so people assumed I was his brother, but his brother Norman was someone I've never met.

    I'm not the only one with a shared name. There are two people named Kathryn Keneally. One is an assistant attorney general in the US Justice Department's Tax Division and was quoted in a CNBC article warning about the danger of stolen identity refund fraud. The other is an assistant attorney general in the US Justice Department's Tax Division who opposes victims in court when victims of stolen identity refund fraud sue to try to get their refunds. I wonder if the two of them could meet and have a fruitful discussion, or if they'd annihilate each other like matter and antimatter.

  • (cs)

    You could just register and remove all doubt.

Leave a comment on “Test Driven Delay”

Log In or post as a guest

Replying to comment #:

« Return to Article