Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.01 KB

robustness-principle.adoc

File metadata and controls

20 lines (12 loc) · 1.01 KB

The Robustness Principle

Be conservative in what you do, be liberal in what you accept from others.
— Wikipedia

otherwise phrased as (Postel’s law)

Be conservative in what you send, be liberal in what you accept.
— Wikipedia

This can be applied or interpreted in specific contexts as:

  • Web API context: be selective and minimal in what you expose via your APIs, and the formats and structures you use e.g. consistently use the same Media Type, naming, etc., but be forgiving for received inputs (within reason) by ignoring unknown properties and coding defensively to potentially handle reasonable variations, such as different casing of enums for example. Do not expose more than you need to, and accept/ignore more than you expect.

  • Communication feedback context: (a bit of a stretch of an interpretation, but) should be open-minded, considerate and not offended by feedback received, and targeted and articulate in feedback given.