Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "loading indicators are hard"
-
I wrote a simple Python script to split a Wikipedia page into manageable chunks. But it took a while to load, so I decided to add a loading indicator. Just a few dots appearing and disappearing. How hard could it be?
"Okay, so I just need a few dots as a loading thing."
"Right, so I suppose I'll need a separate thread for this... Better look up Python's threading again"
"So the thread is working, but it keeps printing it out on separate lines"
"Right, that should fix it ... nope."
"I should probably fix the horrible mess here"
"Hmm... maybe if I replace the weird print() calls with all those extra parameters with sys.stdout.write()..."
"Right, that kind of works, but now there's just a permanent row of dots"
"Okay, that's fixed... Ish."
Well, it works now, but there's a weird mess of two \r's and a somewhat odd loop. Oh, and there's more code for the loading indicator than for the actual functionality. This is CLI by the way.7 -
New AltRant release!
Release Notes:
- Transitioned to URLCache-based caching solution for attached images for much faster loading times
- Fixed many layout issues
- Finally added "more info" button in profile screen after 2 years of the feature being absent from the app
- Fixed many different crashes
- Added rant refreshing
- Added double tap to upvote on rants and comments
- Added creation date/time indicators on rants and comments
- Added comment count indicator in post cells in feeds
All users are required to test every aspect of the app.
I worked really hard on all of this to improve every single aspect of this app - from responsiveness to crashes and layout glitches, while also adding many features that were absent for a crazy amount of time! Please enjoy!
The last build will expire in a week from now.4