|
|
|
|
|
by dutchCourage
1 day ago
|
|
"optimistic updates" aren't less optimistic if you indicate that the UI is being synced. It's not about telling the truth or not. It's about giving instant feedback and showing the UI state as it would be if the action went through, which is exactly what you do in your to-do list example. That allows the user to keep doing more actions before they've received confirmation from the server that their first action was accepted. For the "like" action, it's just more satisfying if it feels instant. |
|
Lies are sweet, aren't they? :) Again, I believe you should make the software fast, not make it pretend to be fast. You can absolutely make the like be confirmed sub 100ms and in that case you can skip the immediate intent because it's fast enough (see demo). Even if you have an 80ms ping, you can still do the job of putting the like in a durable queue server-side under 20ms.
Yet instead what people do is lie to the user and risk losing data and this bad practice just became normal practice over time. The like just goes straight into /dev/null, and at best there's a rollback which only makes the user wonder "what the ?! I just pressed it!".
IMHO, we keep treating symptoms without addressing the root causes.