Zen of Python
On November 7, 2019, Tim Peters, a software engineer, posted a list of 19 guiding principles to a mailing list for Python. The list was called the "Zen of Python" and offered suggestions for Python code that would help improve code going forward. He intentionally left open a 20th principle "for Guido to fill in" referencing Guido van Rossum, the original Python language author.
Not only are these principles great for coding, but they also apply generally to life. I would like to see these applied across all disciplines, including coding.
Figure 1: Tim Peters in 2004 (Tim, I need an updated photo!)
19 Guiding Principles for Python (and Life)
- Beautiful is better than ugly.
- Explicit is better than implicit.
- Simple is better than complex.
- Complex is better than complicated.
- Flat is better than nested.
- Sparse is better than dense.
- Readability counts.
- Special cases aren't special enough to break the rules.
- Although practicality beats purity.
- Errors shoudl never pass silently.
- Unless explicitly silenced.
- In the face of ambiguity, refuse the temptation to guess.
- There should be one– and preferably only one –obvious way to do it.
- Although that way may not be obvious at first unless you're Dutch.
- Now is better than never.
- Although never is often better than right now.
- If the implementation is hard to explain, it's a bad idea.
- If the implementation is easy to explain, it may be a good idea.
- Namespaces are one honking great idea – let's do more of those!
Although not all are applicable to everyday life, a few of us could certainly benefit from following these principles. And life would be better for it.