Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
1. Beautiful is better than uglyâââbe consistent.
2. Complex is better than complicatedâââuse existing libraries.
3. Simple is better than complexâââkeep it simple and stupid (KISS).
4. Flat is better than nestedâââavoid nested ifs.
5. Explicit is better than implicitâââbe clear.
6. Sparse is better than denseâââseparate code into modules.
7. Readability countsâââindenting for easy readability.
8. Special cases arenât special enough to break the rulesâââeverything is an object.
9. Errors should never pass silentlyâââgood exception handler.
10. Although practicality beats purityâââif required, break the rules.
11. Unless explicitly silencedâââerror logging and traceability.
12. In ambiguity, refuse the temptation to guessâââPython syntax is simpler; however, many times we might take a longer time to decipher it.
13. Although that way may not be obvious at first unless youâre Dutchâââthere is not only one of way of achieving something.
14. There should be preferably only one obvious way to do itâââuse existing libraries.
15. If the implementation is hard to explain, itâs a bad ideaâââif you canât explain in simple terms then you donât understand it well enough.
16. Now is better than neverâââthere are quick/dirty ways to get the job done rather than trying too much to optimize.
17. Although never is often better than *right* nowâââalthough there is a quick/dirty way, donât head in the path that will not allow a graceful way back.
18. Namespaces are one honking great idea, so letâs do more of those!âââbe specific.
19. If the implementation is easy to explain, it may be a good ideaâââsimplicity.
Reference:
â https://www.amazon.com/Mastering-Machine-Learning-Python-Steps/dp/1484228650
19 Coding Rules that every coder must know was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.