Member-only story
How I Would Change Medium’s Clap Button
Story Time
So my friend just published an article a while back, and I wanted to clap 50 times to show support. So I began clicking on the clap button like a maniac. But after clicking on the clap button 20 times, I was like screw this and stopped clapping.
Problems From A Clapper’s Perspective
As a clapper, the only way I can clap 50 times is to click on the clap button 50 times. Ugh. Self-explanatory.
Problems From A Medium Backend Server’s Perspective
Let’s say I am now a Medium backend server.
When a user claps for a story, a request is sent to me to process that this user has clapped once for this story. So I increment the number of claps by 1 in the database.
If a user claps 10 times, 10 requests are probably sent to me. I now need to increment the number of claps by 1 in the database TEN TIMES.
If a user claps 50 times, 50 requests are probably sent to me. I now need to increment the number of claps by 1 in the database FIFTY TIMES.
This is the same as me ordering 50 takoballs for delivery, and the delivery company sending me 50 boxes containing ONE takoball each.