# Python course All this will move into a sister project to actually teach this approach. See [Add Teaching repository](https://github.com/cruisen/cli-calc/issues/17). ## About Python * Zen of Python [PEP020](https://www.python.org/dev/peps/pep-0020/) * The [this module](https://stackoverflow.com/questions/37301273/attributes-of-python-module-this) * Try ```import this``` * Learn and master Python with [exercism.org](https://exercism.org/tracks/python) ### Python Introduction * [Python 3 Patterns, Recipes and Idioms [web-book](https://python-3-patterns-idioms-test.readthedocs.io/en/latest/) * [Transforming Code into Beautiful, Idiomatic Python by Raymond Hettinger (Talk)](https://www.youtube.com/watch?v=OSGv2VnC0go) ### Context Managers * [Building A Custom Context Manager In Python: A Closer Look by ArjanCodes (Tutorial)](https://www.youtube.com/watch?v=14z_Tf3p2Mw) ### Error Handling * [Exceptional Exceptions - How to properly raise, handle and create them by Mario Corchero (Talk)](https://www.youtube.com/watch?v=V2fGAv2R5j8) ## OOO > “I’m sorry that I long ago coined the term “objects” for this topic because it gets many people to focus on the lesser idea. The big idea is messaging.” ~ Alan Kay From: * [The forgotten History of OOP](https://medium.com/javascript-scene/the-forgotten-history-of-oop-88d71b9b2d9f) * [Does It Mean You Are Doing Object-Oriented Programming If You Write Classes?](https://igorfil.com/posts/oop-meaning/) ### Introduction * [Pythonic Objects: idiomatic OOP in Python by Luciano Ramalho (talk)](https://www.youtube.com/watch?v=mUu_4k6a5-I) 3h talk, and Luciano voice is not very easy to understand, but its worth it. * [Slides (github)](https://github.com/ramalho/pyob) ### Principles * [The Composition Over Inheritance Principle (web)](https://python-patterns.guide/gang-of-four/composition-over-inheritance/) * [Abstract Base Classes (web)](https://docs.python.org/3/library/abc.html) ### Code Smells * [Get a Whiff of This by Sandi Metz (Talk)](https://www.youtube.com/watch?v=PJjHfa5yxlU) * [Smells to Refactorings (pdf)](https://people.scs.carleton.ca/~jeanpier/Fall2021/Topic%204-%20About%20Smells%20and%20Refactoring/1a-%20Smells%20to%20Refactorings.pdf) Quick Reference Guide * [99 Bottles of OOP by Sandi Metz (Book)](https://sandimetz.com/99bottles) ### Refactoring * [All the Little Things by Sandi Metz (Talk)](https://www.youtube.com/watch?v=8bZh5LMaSmE) * [Succession by Katrina Owen (Talk)](https://www.youtube.com/watch?v=59YClXmkCVM) * [Succession by Katrina Owen (git)](https://github.com/kytrinyx/succession) * [Polly Want a Message by Sandi Metz (Talk)](https://www.youtube.com/watch?v=YtROlyWWhV0) ### CUPID * [CUPID—for joyful coding by Dan North](https://dannorth.net/2022/02/10/cupid-for-joyful-coding/) #### SOLID A litte outdated, and superseeded by CUPID, but... * [SOLID Object-Oriented Design by Sandi Metz (Talk)](https://www.youtube.com/watch?v=v-2yFMzxqwU) * [SOLID (Wikipedia)](https://en.wikipedia.org/wiki/SOLID) * [SOLID Design Principles simplified with UML](https://medium.com/@RikamPalkar/solid-design-principles-simplified-with-uml-8432a3406248) * [How to write actually object-oriented python by Per Fagrell (Talk)](https://www.youtube.com/watch?v=VUvEDg30FyY) ### Design Patterns * [Python Design Patterns (Web)](https://python-patterns.guide/) * [Design Patterns in Python by Peter Ullrich (Talk)](https://www.youtube.com/watch?v=bsyjSW46TDg) * [Design Patterns in Python for the Untrained Eye by Ariel Ortiz (Talk)](https://www.youtube.com/watch?v=o1FZ_Bd4DSM) * [(Web)](https://arielortiz.info/s201911/pycon2019/docs/design_patterns.html) * [(Slides)](https://docs.google.com/presentation/d/e/2PACX-1vQquDxG5_99RvxxKY8i8-DmpVM_3Ca76mU58Nf4sab25-bTY3kKjmMy3JihDtG0jVopZ-Or-BnIjNdX/pub?start=false&loop=false&delayms=3000&slide=id.g567ca5727c_0_67) * [Why you don't need design patterns in Python? by Sebastian Buczyński(Talk)](https://www.youtube.com/watch?v=G5OeYHCJuv0) * [Python Design Patterns: For Sleek And Fashionable Code](https://www.toptal.com/python/python-design-patterns) * [Design Patterns for Python](https://refactoring.guru/design-patterns/python) * [Design Patterns](https://en.wikipedia.org/wiki/Design_Patterns) ### OO, Class & Message * [OO](https://en.wikipedia.org/wiki/Object-oriented_programming) * [UML Class Diagram Tutorial](https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/) * [Messaging](https://www.quora.com/Why-is-object-oriented-programming-more-about-messaging-than-objects) ## Dealing with change [requests] >"For each desired change, make the change easy (warning: this may be hard), then make the easy change" from [Kent Beck on Twitter](https://twitter.com/KentBeck/status/250733358307500032?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E250733358307500032%7Ctwgr%5E%7Ctwcon%5Es1_&ref_url=https%3A%2F%2Fmokacoding.com%2Fblog%2Fhow-to-choose-what-to-refactor%2F) ## Manifests Following these rules, which basically reduce our possibilities, we enable ourselves to write maintainable software. They build upon each other. * [Design Patterns](https://en.wikipedia.org/wiki/Design_Patterns) * [Manifesto for Agile Software Development](https://agilemanifesto.org/) * [Manifesto for Software Craftsmanship](https://manifesto.softwarecraftsmanship.org/) * [Software Craftsmanship (Wikipedia)](https://en.wikipedia.org/wiki/Software_craftsmanship) ## Time to burn? ### Learn from *my* Heroes * [Dan North (Talks)](https://dannorth.net/talks/) * [Kevlin Henney (Talks)](https://vimeo.com/channels/761265) * [Brandon Rhodes (Talks)](https://rhodesmill.org/brandon/talks/) * [skyfield, a astronomy package by Brandon Rhodes](https://github.com/skyfielders/python-skyfield) * [Raymond Hettinger (Talks)](https://www.youtube.com/results?search_query=%22Raymond+Hettinger%22) * [Arjan Egges (Talks)](https://www.youtube.com/c/ArjanCodes) ### OOO * [Modern Python patterns and idioms by Alex Martelli (Talk)](https://www.youtube.com/watch?v=LeuChRCByZc) * [An Introduction to Object-Oriented Programming by Timothy A Budd (Book)](https://web.engr.oregonstate.edu/~budd/Books/oopintro3e/info/ReadMe.html) ### Solvers * [Modern solvers: Problems well-defined are problems solved by Raymond Hettinger(Talk)](https://www.youtube.com/watch?v=_GP9OpZPUYc) * [Presentation / Slides](https://rhettinger.github.io/index.html) ### General * [Six Impossible Things by Kevlin Henney (Talk)](https://www.youtube.com/watch?v=YoaZzIZFErI) * [How to succeed in language design without really trying by Brian Kernighan (Talk)](https://www.youtube.com/watch?v=Sg4U4r_AgJU) ### Lambda Calculus * [Lambda Calculus from the Ground Up by David Beazley (Talk)](https://www.youtube.com/watch?v=pkCLMl0e_0k) ### Meta Programmin * [Python 3 Metaprogramming by David Beazley (3h !!!)](https://youtu.be/sPiWg5jSoZI)