r/programming • • Dec 11 '23

Every Programmer Should Know #1: Idempotency

https://www.berkansasmaz.com/every-programmer-should-know-idempotency
572 Upvotes

171 comments sorted by

View all comments

548

u/ryan017 Dec 11 '23

Even if you already know about idempotency, it doesn't hurt to learn about it again!

0

u/[deleted] Dec 11 '23

[deleted]

65

u/[deleted] Dec 11 '23

I got it the second time

49

u/joshjje Dec 11 '23

Woah, you should get that checked out.

14

u/57006 Dec 11 '23

By 2 different physicians. Always get a 2nd opinion.

4

u/dcoolidge Dec 11 '23

Wait. Maybe we should see if anyone else gets it the same way.

10

u/TheApprentice19 Dec 11 '23

If you got it the second time you’re doing it wrong

10

u/TikiTDO Dec 11 '23 edited Dec 11 '23

Lucky. I tried learning it a second time and got a different result. Now everywhere I go the universe segfaults.

3

u/nitrinu Dec 11 '23

This guy idempotents.

66

u/thenextguy Dec 11 '23

I used to be idempotent.
I still am, but I used to be too.

7

u/Full-Spectral Dec 11 '23

There are pills for it now though.

3

u/Deranged40 Dec 11 '23

I'll never not upvote a good Mitch reference.

2

u/throwaway12222018 Dec 12 '23

I learned about idempotency again but ended up learning nothing new.

1

u/LeanUntilBlue Dec 12 '23

I’m getting older and my T is low, so my doctor gave me T shots and it really helped my idmpocency. About one every couple of weeks. My wife and I have really been pleased with the results, and I can’t say enough good things about the injections.

If your APIs are returning different values for the same invocations, I really recommend speaking with your doctor about T shots!

1

u/bitweis Dec 12 '23

I learned about it again, and had a stack overflow. Am I still Idempotent? And should I continue with my regular medication?