Sensei? Is that you Sensei

--Originally published at 101 For Tec

Captura

Resultado de imagen para what meme

Yep, I know it seems like chinese but it´s more easy than it appears to. The Zen of Python are recommendations by a Pythoneer.

These are the Zen of Python:

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 should 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!

You see, they aren´t as difficult as their preview. This sentences were made with the purpose to help to the future Python programmers to make better, more beautiful, faster, and more understandable code. In my personal opinion the ones that I think are more important for the beginners are these:

  • Simple is better than complex.

As one genius person that I´ve never know once said, “keep it simple stupid”. This something crucial in the code of every programmer.

  • Readability counts.

You need to keep in mind that you´re not the only one that is going to read your code un real life so it needs to be understandable for everybody. Also, when in 10 years you open your code, you need to understand it ad be able to know what your intentions were

science
giphy (3)
that time.

  • If the implementation is hard to explain, it's a bad idea.

Once my father tell me that if you are able to explain the things, that meant that you understand very well the topic. Is the same thing with code, if there is something that you can explain with no problems, then it means you have a good understanding of your implementations.

Credits:

Source: https://hg.python.org/peps/file/tip/pep-0020.txt

science


giphy (3)