Python Advanced (2022-03-15 - 2022-03-17, 2022-03-31)¶
2022-03-15¶
2022-03-16¶
Good morning!
Live-hack
eval()
Continue with exercises: CSV ⟶ modularization
Test Driven Development¶
(Mostly from Is Software A Craft? Software Is A Craft! ⟶ Clean Code)
I had stated my strong opinion about (excess) debugger usage. (In short words, debuggers are from hell when you use one to comprehend code that is otherwise incomprehensible - the same holds true for excess IDE usage).
Discussion, naturally (thank you Alex). Decided to switch to test driven development, provocantly. Based upon pytest Introduction, By Example, hacked the following topics while introducing TDD:
Exercise: Refactoring - Extract CSV Reading Into Function (csv.dictreader)
Exercise: Refactoring - Extract Both CSV Formats Into Module
(“Project” here)
2022-03-17¶
Revisit yesterday’s mess …
Show
userdb
“project” on GithubPlan for exercises: test driven
Manager writes test (and commits/pushes to Github)
Team mates download ZIP file (also done via the “Code” button on project’s main page)
Team mates hack
Continue with mess …
2022-03-31¶
Links¶
Raymond Hettinger - Super considered super! - PyCon 2015. Raymond Hettinger, revolving around
super()
and MRO.Transforming Code into Beautiful, Idiomatic Python. Raymond Hettinger, reiterating his favorite phrase: “There must be a better way”. (Hettinger is a “Python Core Developer”.)
(He uses Python 2 though.)
Raymond Hettinger, Keynote on Concurrency, PyBay 2017: Raymond Hettinger covering most if not all aspects and possiblities of concurrency. Very informative, very concise, covering
Multithreading
Multiprocessing
Async; I didn’t even mention that. asyncio. Me big fan.
Python Tutorial: pip - An in-depth look at the package management system, by Corey Schafer
Python Tutorial: VENV (Windows) - How to Use Virtual Environments with the Built-In venv Module: Corey Schafer again. Virtual environments are kind of an isolated development sandbox, solving a similar problem as containers do, but much more lightweight and Python only.
Python Tutorial: Decorators - Dynamically Alter The Functionality Of Your Functions, by Corey Schafer