Hacker News new | ask | show | jobs
by wyattpeak 2036 days ago
You know what I like for progress bars? The mess that is your average build script.

Tell me how many tasks there are to complete, how many you've done, and some rough details of what you're doing (e.g. is it a network request). Don't be shy about commentary ("This may take a while", "If this fails multiple times do X").

These generally contain all of the information that the developer has access to, and rarely am I left having no idea if something's failed, or what to do if I know it's failed.

Now I'm not suggesting that this is good as-is for non-technical users, but it feels wrong-headed keep iterating on a solution everyone hates (progress bars), rather than trying to adapt a solution that (if other people feel the same as me) is quite well-liked in its domain.

You see a sort of adaptation in some progress bars with the "Show details" button, but that generally sanitised variant, with one line per task and no commentary (and often, for some reason, no task count) feels like it misses all the good parts of what it's emulating.

3 comments

Strongly agreed.

One tricky thing, though. The few times I saw someone trying to implement the task count, it would sometimes be the case the count couldn't be determined beforehand! So I'd see progress reports like: 1/123 done.... 42/124 done... 45/2616 done... 68/98213 done...

I think scandisk (or whatever the disk scanning utility that runs before Windows boots is called these days) was prone to such ever-growing task counts. I don't know what the right answer here is, except maybe try to split your process into a "planning" part and "execution" part if possible...

Honestly, the example with the incrementing total, while not useful for estimating remaining time, conveys a lot of information. I'd be happy with that for processes that have an unknown number of steps.
> One tricky thing, though. The few times I saw someone trying to implement the task count, it would sometimes be the case the count couldn't be determined beforehand! So I'd see progress reports like: 1/123 done.... 42/124 done... 45/2616 done... 68/98213 done...

SharePoint search does something similar! It doesn't search everything, so it just says "about X items found" based on an estimate. Everytime you click on the next search page, that number gets a little more accurate

This reminds me - GMail does something similar in their search/filtering interface too!
> split your process into a "planning" part and "execution" part if possible

Doing the scanning and the processing at the same time may be faster. It should be clear though when the total has been established and when it isn't yet.

Nix has had a progress indicator for a few years now[0]. It doesn't provide any time estimates but it does show which part of the build it is on (unpack/patch/configure/build/install), how many dependencies it has built or fetched from a binary cache and how many remain. The full build log is accessible with the nix-log command as well, so it's nice from the both a user and dev viewpoint.

For long builds I have stopped watching build logs live altogether and append `; tput bel` to the command to get audible feedback at the end.

For graphical applications, especially on mobile, I wish progress bars got out of the way more. Users ought to be able to continue using an app while a task occurs in a separate thread, and whose progress bar doesn't take up the entire visual field. Many apps, especially on iOS, seem to still be guilty of this.

[0] The creator shows it off here, to applause: https://youtu.be/XVIKScU7Uf4?t=420

CMake has a progress indicator.
ninja has one too.