What is the meaning of idempotency?

_config.yml

I’ll explain the basic concept:

What is idempotency?

‘The definition of insanity is doing the same thing over and over and expecting different results.’ - Albert Einstein

To adopt his aphorism, that is the basic gist of idempotency: to do the same thing over and over and to get the same results. If you get a different results then the method is not idempotent.

Example of idempotency

    "Please sir, can I have a pay rise?"    
    "No!"

Same result every time.

Example of a method that is not idempotent

Attempt 1

    "Please sir, can I have a pay rise?"    
    "No!"

Attempt 2

    "Please sir, can I have a pay rise?"    
    "hmmmm..........maybe..." // Wow, a different answer!?! (like that's every going to happen).

….And it’s as simple as that!

Hope this helps someone.

Written on January 5, 2017