News for hackers. Stuff that matters.
Re:UI Web Design 5 Rules of Thumb by caradine on Friday December 23, 2022 @10:33AM (#34106875)
I inherited a React codebase that was littered with setTimeout() for no apparent reason.
Re:UI Web Design 5 Rules of Thumb by bmelton on Friday December 23, 2022 @11:40AM (#34107744)
Bad race condition protection or trying to impose a sense of gravitas through loading times?
Re:UI Web Design 5 Rules of Thumb by robocat on Friday December 23, 2022 @03:42PM (#34110385)
I think setTimeout() is a bad code smell because it very often introduces race conditions. Fortunately async has reduced the need for it.
Re:UI Web Design 5 Rules of Thumb by jamil7 on Friday December 23, 2022 @11:44AM (#34107809)
Recently worked on an iOS app with the exact same thing, delays inserted on every write which was basically instant as it was writing to SQLite. Client refused to remove it too, you need to pick your battles as a freelancer to get anything done, so I left them there.
Re:UI Web Design 5 Rules of Thumb by kevincox on Friday December 23, 2022 @12:46PM (#34108594)
If you are lucky it is to give the illusion of the app working hard. If you are unlucky they are "fixing" race conditions.