idempotent
Pronunciation: [ˌaɪ.dɛm.pəˈtoʊnt]
Context: "mathematics"
(adjective) It describes a special property of some operations where doing the operation more than once doesn't change the result after the first time. For example, if you have a button that turns on a light, pressing it once turns the light on, and pressing it again doesn't change that; the light stays on.
Example
When we press the 'on' button for the fan, it is idempotent because pressing it again keeps the fan on and doesn't change anything.
Example
If you click the 'submit' button on the form multiple times, it isn't idempotent since it might send the information each time.
Example
Can you give an example of an operation that is idempotent?
Context: "computer science"
(adjective) This is used to describe some functions or operations in programming that have the same effect no matter how many times you apply them. Like a command that tells your computer to save a file. If you tell it to save again, nothing changes because the file is already saved.
Example
The save command in the software is idempotent because saving your changes multiple times doesn’t change the saved data.
Example
If you create a duplicate file each time you run the save command, then it's not idempotent.
Example
Is the delete function in the application idempotent if it keeps removing the same file?