The Zen of Python, by Tim PetersBeautiful 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 should never pass silently.Unless explicitly silenced.In the face of ambiguity, refuse the temptation to guess.Namespaces are one honking great idea -- let's do more of those!There should be one-- and preferably only one --obvious way to do it.Now is better than never.Although that way may not be obvious at first unless you're Dutch.If the implementation is hard to explain, it's a bad idea.Although never is often better than *right* now.If the implementation is easy to explain, it may be a good idea.
Tim Peters created a clever outline of key principles for writing Python code, emphasizing simplicity, clarity, and practicality. It helps to encourage programmers to prioritize readability and simplified solutions, avoiding overly complex approaches.
I began the process with 01E Environments Flowcharts
pdf. I familiarized myself with
different Python environments, including IDLE and ArcGIS Notebooks. I followed
the instructions to interact with the Python interpreter using IDLE, running
simple Python commands and scripts. Then, I opened ArcGIS Notebooks within
ArcGIS Pro, and relearned how to create and execute Python code within the GIS
environment. There was a learning curve with this section as I have not touched
Python within ArcGIS Pro.
Then I jumped to Algorithmic Thinking with Flowcharting
to create a flow chart for "degrees = radians * 180 / pi" using Untitled Diagram - draw.io (diagrams.net).
After completing that, I accessed The Zen of Python within ArcGIS Pro.
I ran into several challenges in understanding some of the
concepts, but was able to go back and reread instructions to help clarify my
questions.
No comments:
Post a Comment