• Nath@aussie.zone
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    Idempotent. It’s a best-practice methodology for writing code. Run this code, it determines whether the thing needs to be done and does it. Run it over and over, and it will do no harm. It can be automated to run every 5 minutes to only do the thing when it is needed.

    A real world picture to explain the concept:

    Push either of the buttons over and over and over. You’ll either turn the machine on/off, or do nothing.

    I’d been doing this for years before I knew the word for it.