Skip to content

Comment on Ask HN: Why don't progress bars ever work properly?

Comments

Multiple factors influence the task being run, for a download it will be the speed that may vary, something being processed may vary too along the processing, same thing happens with file copy, many small files tend to be slower than a large one, and copying a mix of the will cause that too.

But isn't there a way you can trick the visual of the progress bar to be smooth and consistent instead of jumping around or is this an impossible development task?

Yes, there are all kinds of ways to do that.

But typically you see stuff like:

for ( i = 1; i < 10; ++i ){ DoSomethingUseful( i ); DeterminateProgress( i, 10 ); }

So each iteration of the loop, the bar advances by one-tenth its maximum length, without regard to what DoSomethingUseful actually does.

Chalk it up to lazy coders and tight-fisted bean counters.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.