Permission or forgiveness?
[EuroPython 2012 ] Alex Martelli - 2 JULY 2012 in "Track Spaghetti"
Grace Murray Hopper’s famous motto, “It’s easier to ask forgiveness than permission”, has many useful applications – in Python, in concurrency, in networking, as well of course as in real life. However, it’s not universally valid. This talk explores both useful and damaging applications of this principle. I start by introducing the motto “It’s easier to ask forgiveness than permission” and the woman who used it, Rear Admiral Grace Murray Hopper, also known as the “mother of Cobol” and the author of the first ever programming-language compiler. I then move on to the Python context, where the motto supports the proper usage of exception-catching rather than preliminary checks; and the “rule that proves the exception” introduced by abstract base classes. Expanding the subject, I show how “optimistic concurrency” applies that motto (while locking would “ask permission”, in essence, STM “asks forgiveness"), and how collision-detection focused networking protocols have similarly triumphed over more highly structured, “ask permission” ones like token-ring. Moving to the fuzzier context of real life, I then show how this daring approach does not work quite as well as in the technical realm – except when applied correctly, in the right circumstances… and I try to evince a general law describing what the right circumstances for its application are, comparing and contrasting with the similar issue of “do it right the first time” versus “launch and iterate” (and the latter’s cognate “fail, but fail fast” principle).