Clean Code Development With Python (2023-03-28 - 2023-03-29)

Work Environment

Day 1

Introduction

Clean Code?

From Is Software A Craft? Software Is A Craft! ⟶ Clean Code:

Demo Hacking

The demo hacking session was extended through the entire session, with topics woven in as time seemed right. Read on for those.

Python Development: Select Topics

Knowing more about Python enables one to write … well … more code in fewer lines. While that is not usually an attitude of programmers that everybody loves, in Python there’s a word for it: Pythonic. An early PEP, “PEP 20 – The Zen of Python” describes what that could be. Lets have a closer look at what today’s version of the language offers in that respect.

Built-In Types: Facts

for Loops, And The Iterator Protocol

Day 2: Clean Code? (Software Development: A Craft)

Closures, And Function Parameters

functools.partial was used yesterday to augment os.listdir() with the dirname: provide my own version, using a closure

Generators (Again), yield Fixtures, And yield Context Managers

Object Oriented Programming

(Maybe begin with operator overloading?)

From Object Oriented Programming:

Untold

Decorators (The Ominous @)

Exceptions

Modules And Packages

Pandas

From Pandas:

Design Patterns

Discussion: so what? OO is there to solve problems in a readable and reproducible way.