Keeping a leisurely pace



  • This morning I was greeted with a bug report from QA informing me that one of our progress bars was starting at 54% before continuing to 100%. I dug into it and found that due to optimizations, the process was happening several times faster than it was in the previous version, causing it to look like the progress bar was starting at 54%. (This is a block file move, it moves 54% of the file during the first loop and then the rest the second loop)

    I went to QA with a smile and had the following conversation:

    Me: "It's working fine, the progress bar is just updating so quickly that you can't see it at zero."

    QA: "Okay, so fix it."

    Me: "Yeah, let me go in and slow down the program so it doesn't happen as fast."

    QA: "Sounds good."

    Me: "Haha...wait, you're serious?!"

    QA: "Yes, it has to start at zero."

    QA2: "A deoptimization loop, awesome." *walks out of the room laughing*

    So now we have in our code a QA requested slow down just so they can say that the progress bar definitely starts at 0%. On the bright side, I know the first place to optimize if they want to speed up the process.



  • *sigh*



  • Just sleep(50) and refresh view when it's at 0%? That not enough to make it look like it starts at 0%?



  • @derula said:

    Just sleep(50) and refresh view when it's at 0%? That not enough to make it look like it starts at 0%?

    Throw in a text status that says something like, "Initializing <name of operation>..." so that they think something fancy is happening, and the progress bar is not just hung.


  • 🚽 Regular

    I had a problem similar to this in my job. All I really did, though, was change it so the first part went to a particular percentage that made it seem to flow more linearly. So, while you truly are 54% complete, you've still got 90% of processing time left, so your progress bar would actually say 10%.



  • @dohpaz42 said:

    @derula said:
    Just sleep(50) and refresh view when it's at 0%? That not enough to make it look like it starts at 0%?

    Throw in a text status that says something like, "Initializing ..." so that they think something fancy is happening, and the progress bar is not just hung.

    A few years back, I created an installer for something* and I thought it's cool to have music while the user answers random questions about install location and start menu folders. Because I could, I made it fade out the music before the actual installation started. During that fade-out, it had the progress bar at 0% and said "initializing installation...". Fun times.

    * Yes, I remember what it was. No, it doesn't make sense to tell you.



  • I've always been of the opinion that progress bars were there to show the user that a long process is underway.  No one should expect them to actually acurrately indicate the amount of time passed or left.  You should just update them randomly and frequently.  The human brain is terrible a measuring time intervals > 1 second anyway.

    BTW- To be all pedantic and whatnot, the progress is never zero.  Some amount of time has passed by the time you draw the stupid thing.



  • @Cyrus said:

    So now we have in our code a QA requested slow down just so they can say that the progress bar definitely starts at 0%. On the bright side, I know the first place to optimize if they want to speed up the process.

    Congratulations, you found the most WTF solution possible.

    If the first 54% goes so fast that you can't see it, why not just start the progress bar at 50%? That didn't occur to you?



  • @frits said:

    BTW- To be all pedantic and whatnot, the progress is never zero.  Some amount of time has passed by the time you draw the stupid thing.

    But unless the job for which your progress bar is meant to be indicating the progress is "drawing the progress bar", then the time spent drawing the progress bar is time not spent doing the actual job, so regardless that some time has passed, the progress on the job is still zero; all you've done is mess around drawing the progress bar.  This is the case regardless whether you're expressing progress in percent complete or elapsed time spent working.

    (There's a web comic out there somewhere that I can't remember that has a series of graphs, e.g. a pie chart in which the sections are labelled things like "Percentage of this pie chart that is coloured-in" and "Percentage of this pie chart that is cross-hatched".  If I could find it, it might well have a progress bar labelled "Percentage complete of filling in this progress bar".)

     



  • @DaveK said:

    (There's a web comic out there somewhere that I can't remember that has a series of graphs, e.g. a pie chart in which the sections are labelled things like "Percentage of this pie chart that is coloured-in" and "Percentage of this pie chart that is cross-hatched".  If I could find it, it might well have a progress bar labelled "Percentage complete of filling in this progress bar".)

      Ah, it's #688 of the webcomic that shall not be named (or quoted or linked).

     

     



  • @DaveK said:

    @frits said:

    BTW- To be all pedantic and whatnot, the progress is never zero.  Some amount of time has passed by the time you draw the stupid thing.

    But unless the job for which your progress bar is meant to be indicating the progress is "drawing the progress bar", then the time spent drawing the progress bar is time not spent doing the actual job, so regardless that some time has passed, the progress on the job is still zero; all you've done is mess around drawing the progress bar.  This is the case regardless whether you're expressing progress in percent complete or elapsed time spent working.

    (There's a web comic out there somewhere that I can't remember that has a series of graphs, e.g. a pie chart in which the sections are labelled things like "Percentage of this pie chart that is coloured-in" and "Percentage of this pie chart that is cross-hatched".  If I could find it, it might well have a progress bar labelled "Percentage complete of filling in this progress bar".)

     

    Were you attracted to my post because it had the word "pedantic" in it?

     





  • So ... just show an Ajax or similar animated JPEG or similar while the 54% is happening, perhaps with the word 'Processing ...' shown over it? You shouldn't ever genuinely be slowing anything down, nor need to.



  • @DaveK said:

    Filed under: but i can say that it's an anagram of "DKCX"

    Funny thing is, when this shows up in the tag cloud, it'll be backwards, and your anagram will read the site name correctly. It's like a recursive sin.



  • @frits said:

    @DaveK said:

    @frits said:

    BTW- To be all pedantic and whatnot, the progress is never zero.  Some amount of time has passed by the time you draw the stupid thing.

    But unless the job for which your progress bar is meant to be indicating the progress is "drawing the progress bar", then the time spent drawing the progress bar is time not spent doing the actual job, so regardless that some time has passed, the progress on the job is still zero; all you've done is mess around drawing the progress bar.  This is the case regardless whether you're expressing progress in percent complete or elapsed time spent working.

    (There's a web comic out there somewhere that I can't remember that has a series of graphs, e.g. a pie chart in which the sections are labelled things like "Percentage of this pie chart that is coloured-in" and "Percentage of this pie chart that is cross-hatched".  If I could find it, it might well have a progress bar labelled "Percentage complete of filling in this progress bar".)

     

    Were you attracted to my post because it had the word "pedantic" in it?

     

    I felt an imperative need to reply to this post


  • 🚽 Regular

    @dohpaz42 said:

    Funny thing is, when this shows up in the tag cloud, it'll be backwards, and your anagram will read the site name correctly. It's like a recursive sin.
     

    Incorrect. Everyone in the world agrees that XCKD is the best comic strip ever. It's the quality of XKCD that's debatable.



  • @RHuckster said:

    @dohpaz42 said:

    Funny thing is, when this shows up in the tag cloud, it'll be backwards, and your anagram will read the site name correctly. It's like a recursive sin.
     

    Incorrect. Everyone in the world agrees that XCKD is the best comic strip ever. It's the quality of XKCD that's debatable.

    I love the site myself; yes, some of their comics are better than others. That goes without saying. I was just referring to the aversion I've seen (many times) to making the "obligatory xkcd reference" in these forums. FWIW, I was more being facetious than anything else. :)



  • @RHuckster said:

    I had a problem similar to this in my job. All I really did, though, was change it so the first part went to a particular percentage that made it seem to flow more linearly. So, while you truly are 54% complete, you've still got 90% of processing time left, so your progress bar would actually say 10%.

    I've done similar to you. I give weightings to different jobs which can be adjusted. In the case of this bug I'd just weight the first quick task 0 or something close to that.

    If you want to get super fancy you can even run the process in testing and output the time spent in each stage/state then use that to calculate your weightings to get a more linear progression. So far my weighting guesstimates have been good enough.

    One thing I'm fond of is a stage progress and overall progress. The stage is unweighted, just the % of the current task done, while the overall is weighted. This tends to make it very clear that the application isn't hanging.


  • Discourse touched me in a no-no place

    Everyone's overthinking this.



  • Reminds me of those progress bars that fill up and then empty from the other side. Grr.



    I've had a similar problem with GTK that I can never seem to fix. I have task that takes a few seconds, not long enough for a progress bar, but enough that I'd like to display some indicator of what's being done, such as a message in the status bar. So I set the text and go on doing the task. But the status bar doesn't redraw until well after I'm done, so that nice status message never appears. The manual suggests using gtk_main_iteration(), but it doesn't seem to make any difference.



  • @dohpaz42 said:

    @RHuckster said:

    @dohpaz42 said:

    Funny thing is, when this shows up in the tag cloud, it'll be backwards, and your anagram will read the site name correctly. It's like a recursive sin.
     

    Incorrect. Everyone in the world agrees that XCKD is the best comic strip ever. It's the quality of XKCD that's debatable.

    I love the site myself; yes, some of their comics are better than others. That goes without saying. I was just referring to the aversion I've seen (many times) to making the "obligatory xkcd reference" in these forums. FWIW, I was more being facetious than anything else. :)

    Too tired to tell if clever or not really getting it.



  • @frits said:

    @DaveK said:

    @frits said:

    BTW- To be all pedantic and whatnot, the progress is never zero.  Some amount of time has passed by the time you draw the stupid thing.

    But unless the job for which your progress bar is meant to be indicating the progress is "drawing the progress bar", then the time spent drawing the progress bar is time not spent doing the actual job, so regardless that some time has passed, the progress on the job is still zero; all you've done is mess around drawing the progress bar.  This is the case regardless whether you're expressing progress in percent complete or elapsed time spent working.

    (There's a web comic out there somewhere that I can't remember that has a series of graphs, e.g. a pie chart in which the sections are labelled things like "Percentage of this pie chart that is coloured-in" and "Percentage of this pie chart that is cross-hatched".  If I could find it, it might well have a progress bar labelled "Percentage complete of filling in this progress bar".)

    Were you attracted to my post because it had the word "pedantic" in it?

    Nope, I was attracted to it because it was just plain wrong while claiming to be smartarsey-pedantically correct.  I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

     



  • @dohpaz42 said:

    @DaveK said:
    Filed under: but i can say that it's an anagram of "DKCX"

    Funny thing is, when this shows up in the tag cloud, it'll be backwards, and your anagram will read the site name correctly.

    No it won't.




  •  A few years back I had to make something that looped over some records in the database. Well, dBaseIV-files actually...So what did I do? I counted the number of rows so I knew how to scale the progress bar and then looped over each item, doing whatever it was I had to do.

     I just couldn't get the progress bar to update, it would stand still for ages and then go from 0 to 100% in the blink of an eye. Fast forward quite some time debugging and adding 'redraw'-commands and Application.ProcessMessages()-commands etc etc, turns out the count took 30 seconds and the loop takes 0.1 second...As  te count was only used to scale the progressbar I just omitted that...



  • @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

    Muphry's has to do with spelling, non?



  • @lolwtf said:

    I've had a similar problem with GTK that I can never seem to fix. I have task that takes a few seconds, not long enough for a progress bar, but enough that I'd like to display some indicator of what's being done, such as a message in the status bar. So I set the text and go on doing the task. But the status bar doesn't redraw until well after I'm done, so that nice status message never appears. The manual suggests using gtk_main_iteration(), but it doesn't seem to make any difference.

    Hi, it's been a while since my last big job with gtk but I can give you a hand, pm me if you are interested.



  • The real WTF is progress bars. For anything non-trivial they just don't work.

    Or maybe that should be, "the real WTF is people who insist on progress bars".



  • @frits said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

    Muphry's has to do with spelling, non?

    Yeah, I was just kind of generalizing it to extend to pedantry in general.

     

     



  • Animate the progress bar instead of updating it instantaneously.

    You'll see a smooth fillup of the bar from 0 to 54%, and then shorter smooth fills afterwards.

    User experience +32%



  •  That's like the old programming rule: don't ever, EVER, let the progress bar reach 100%. Because if you've reached 100%, you're done, so why are you still showing the progress bar? Hard-code a limit of 99% just to avoid confusion. If it shows 99% for five minutes people are happy; if it shows 100% for ten seconds people are upset.



  • @havokk said:

    The real WTF is progress bars. For anything non-trivial they just don't work.
    They usually work, unless you're working with Windows installer - that'd be more useful without one (anybody remembers Office 2000 SR-1? the installer filled the progress bar more than 30 times before it was done).



  • @AndyCanfield said:

    If it shows 99% for five minutes people are happy; if it shows 100% for ten seconds people are upset.
     

    Nope. If it shows 99 for five minutes, people are just as upset. Or 98% for that matter.



  • @dhromed said:

    @AndyCanfield said:

    If it shows 99% for five minutes people are happy; if it shows 100% for ten seconds people are upset.
     

    Nope. If it shows 99 for five minutes, people are just as upset. Or 98% for that matter.

    That's why you bring the value back to 40% once in while...



  • @frits said:

    No one should expect them to actually acurrately indicate the amount of time passed or left.

     

    If anything proves the relativity theory, it's a progress bar.

     



  •  @blakeyrat said:

    @Cyrus said:
    So now we have in our code a QA requested slow down just so they can say that the progress bar definitely starts at 0%. On the bright side, I know the first place to optimize if they want to speed up the process.

    Congratulations, you found the most WTF solution possible.

    If the first 54% goes so fast that you can't see it, why not just start the progress bar at 50%? That didn't occur to you?

      Because the bug reported was "the progress bar does not start at zero" starting at 50% would still not meet our QA's requirement that he see "0%" for at least an instant.

     

     Oh, to to clarify since I forgot to in the original post, this is on an embedded device (even though we have a file system), so normal wizardry doesn't apply unfortunately.



  • @Cyrus said:

     @blakeyrat said:

    @Cyrus said:
    So now we have in our code a QA requested slow down just so they can say that the progress bar definitely starts at 0%. On the bright side, I know the first place to optimize if they want to speed up the process.
    Congratulations, you found the most WTF solution possible.

    If the first 54% goes so fast that you can't see it, why not just start the progress bar at 50%? That didn't occur to you?

      Because the bug reported was "the progress bar does not start at zero" starting at 50% would still not meet our QA's requirement that he see "0%" for at least an instant.

     

     Oh, to to clarify since I forgot to in the original post, this is on an embedded device (even though we have a file system), so normal wizardry doesn't apply unfortunately.

    Surely there's a documentation that's traceable to an actual customer requirement?  If not, you may want to diplomatically exercise pushback.



  • @Cyrus said:

    Because the bug reported was "the progress bar does not start at zero"
    starting at 50% would still not meet our QA's requirement that he see
    "0%" for at least an instant.

    By "start at 50" I meant something like: progress = ( progress - 50 ) * 2;

    So when the progress bar hits 50%, it's actually hitting 0%, and when it hits 100 it's still hitting 100. That way it's still starting at zero, and progresses smoothly to 100 like normal, and you only had to change a tiny bit of code without removing any optimization.



  • @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law.


    Yup, another self-fulfilling prophecy. (And don't pretend that you mis-spelt that deliberately: we're not buying it.)



  • @Cad Delworth said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law.


    Yup, another self-fulfilling prophecy. (And don't pretend that you mis-spelt that deliberately: we're not buying it.)

    [url=http://en.wikipedia.org/wiki/Muphry%27s_law]http://en.wikipedia.org/wiki/Muphry's_law[/url]

    There you go.



  • @Cad Delworth said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law.

    Yup, another self-fulfilling prophecy. (And don't pretend that you mis-spelt that deliberately: we're not buying it.)

      I'm certainly not pretending to have mis-spelt it deliberately.  Or accidentally.  Because I spelt it completely correctly, and your incorrect correction of my spelling absolutely IS an example of Muphry's Law.


     



  • @DaveK said:

    @frits said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

    Muphry's has to do with spelling, non?

    Yeah, I was just kind of generalizing it to extend to pedantry in general.

    Yeah, but the other half of Muphry's is about being critical.  I was actually sympathizing with the OP.



  • @frits said:

    @DaveK said:

    @frits said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

    Muphry's has to do with spelling, non?

    Yeah, I was just kind of generalizing it to extend to pedantry in general.

    Yeah, but the other half of Muphry's is about being critical.  I was actually sympathizing with the OP.

    Fair enough; you were criticizing progress bar design (in a pedantic and incorrect way) but not criticizing the OP, so I guess it doesn't really qualify for Muphry's.  We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery.  I suggest we name it Blakeyrat's Law!

     



  • @DaveK said:

    We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery.  I suggest we name it Blakeyrat's Law!

     

     

    Seriously?

     



  • @DaveK said:

    @frits said:

    @DaveK said:

    @frits said:

    @DaveK said:

    I enjoy the frisson of schadenfreude that comes from pointing out when someone has run face first into Muphry's law. 

    Muphry's has to do with spelling, non?

    Yeah, I was just kind of generalizing it to extend to pedantry in general.

    Yeah, but the other half of Muphry's is about being critical.  I was actually sympathizing with the OP.

    Fair enough; you were criticizing progress bar design (in a pedantic and incorrect way) but not criticizing the OP, so I guess it doesn't really qualify for Muphry's.  We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery dickweedosity.  I suggest we name it Blakeyrat's Law!

     

    FTFY.



  • @Ilya Ehrenburg said:

    @DaveK said:

    We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery.  I suggest we name it Blakeyrat's Law!

     

     

    Seriously?

     

    I saw what you did there, and it made me lol :)

     



  • @DaveK said:

    @Ilya Ehrenburg said:
    @DaveK said:
    We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery. I suggest we name it Blakeyrat's Law!
    Seriously?
    I saw what you did there, and it made me lol :)

    There already is a Blakeyrat's Law.



  • @blakeyrat said:

    @DaveK said:
    @Ilya Ehrenburg said:
    @DaveK said:
    We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery. I suggest we name it Blakeyrat's Law!
    Seriously?
    I saw what you did there, and it made me lol :)

    There already is a Blakeyrat's Law.

    Then maybe we should start numbering them.



  • @derula said:

    @blakeyrat said:
    @DaveK said:
    @Ilya Ehrenburg said:
    @DaveK said:
    We need a new law that simply states that any given example of pedantic dickweedery is likely to contain errors, in proportion to its degree of pedantry and dickweedery. I suggest we name it Blakeyrat's Law!
    Seriously?
    I saw what you did there, and it made me lol :)
    There already is a Blakeyrat's Law.
    Then maybe we should start numbering them.

     

    Not only that but it has been validated by the internet

    http://tvtropes.org/pmwiki/pmwiki.php/Main/TheGrandListOfForumAndCommunityLaws?action=source

    The link to that old discussion has two side effects on me

    1. Missing morbius
    2. Want to talk about add blocking

     



  • @serguey123 said:

    Not only that but it has been validated by the internet

    http://tvtropes.org/pmwiki/pmwiki.php/Main/TheGrandListOfForumAndCommunityLaws?action=source

    Haha, did you just add that? I love wikis.



  • @serguey123 said:

  • Missing morbius
  • Congratulations, you've just demonstrated "Poster Ghost Rule"

     


Log in to reply