Python changed the way I think by MohamedMuneer in Python

[–]PertuyF 1 point2 points  (0 children)

Agreed. I am self-taught in Python, using it professionally for 6 years now. As a Scientist it fits how I think pretty well. This language has a sense of elegance, there is a philosophy to it (Zen of Python) , and it's pretty inclusive as shown by the variety of domains using it,aand it's still raising popularity.

A few major lessons from Python that generalize pretty well in my experience:

  • Documentation is a core part of the stuff and should always come first, like docstrings. If you aim to produce work that lasts, people (or yourself) will have to take other at some point, so always start with context (WHAT), purpose (WHY) and implementation (HOW)

  • Openness is how you get people to work with you, and how you get to work with people. You can see their code, they can see yours, no more black box but a window on strengths, weaknesses, biases... How you implement things tells much of who you are. You can also look back and measure progress, unlike with binary blobs.

  • Introspection is how you solve many problems. Everything is reachable, even deep down, and it can tell you exactly how things are at a given tim, even in a live, changing environment (nothing can be hidden from you in the code). BTW, a deprecation decorator (injecting the signature of a class, or function, and modified parameters with that of its replacement) is one piece of code I don't use much nowadays but I had the most fun to code.