Skip to content

Comment on Debugging Humidity: Lessons from deploying software in the physical world

Comments

Isn't

Now, imagine your request is actuator.rotate(90).

a good example of something that is not idempotent? As it is based on its current position. Actually idempotent would be: `actuator.rotateTo(Degrees(90))` with a predefined frame of reference, or a frame of reference that you can include in the request.

Like the difference between a servomotor vs stepper motor.

Your suggestion of actuator.rotateTo(Degrees(90)) is precisely the right way to engineer a robust, idempotent command for the physical world.

I used the simpler, non-idempotent rotate(90) example intentionally to illustrate the default trap. How a pure software mindset can dangerously oversimplify a physical action.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.