News for hackers. Stuff that matters.
Re:Heard of Idempotency but unsure what it is? by phoe-krk on Monday June 10, 2024 @05:53PM (#40639611)
> In other words, the operation (three lines of code) yields the same result (sending an email) after repeated execution, and thus is idempotent isnt it?

The meaning here is: after the operation is performed at least one time, exactly ONE mail is sent. Note the part "at least one time": it can be one, two, or more.

Re:Heard of Idempotency but unsure what it is? by maname on Monday June 10, 2024 @06:08PM (#40639772)
thanks, that clicks.

"Simply put, we can perform an idempotent operation multiple times without changing the result.

Furthermore, the operation must not cause any side effects after the first successful execution."

Baeldung got it right.