How the fuck are progress bars coded? The more I think about it the more amazing of a topic it seems.
while theres_something_to_do do_something() update_bar() So depending on how it's done reaching 99% may take a second while the final 1% takes five minutes. On the other hand if it's for a download and you know the file size it's easier to make it accurate. But... am I missing something? How's this "amazing"?
>>235 I'm new to programming and just hadn't thought about it before. It's less amazing to think of it as breaking up tasks and not too amazing at all to think about following fairly consistent streams like for a download. I suppose progress bars generally don't care if somethingtodo[i+1] takes a little longer than somethingtodo[i], and more sophisticated ones probably have checks to see if each instance is taking way longer than expected. At first I was imagining them initially predicting the total time the process would take, but that seems unlikely/maybe impossible.
loadingBarLength = (workDone / totalWork) * 100 You see 12 year olds doing it for their little Flash animations.
>>237 12 year olds are amazing
>>247 12chan is that way -->
>>249 Thanks.