Outline
Below is an example of how this course might be delivered. This course will always be customized to meet your teams needs. If possible we will prepare a project - based on the actual development environment in your company - for the participants to apply their learnings.
Labs/Exercises
There are exercises available for all topics covered.
Day 1: Core Python recap
We start off by refreshing core Python concepts to make sure everyone is on the same page. The amount time spent on core Python skills is adjusted according to the experience level of the participants.
- Course Introduction
- Group Introductions
- Variables
- Basic data types (int, str, float, bool)
- Input, Output, Type Conversions
- If statements
- While loops
- Functions
- Lists
- Dicts
- Tuples
- Sets
- For Loops
- Exceptions
- Git Basics
- Project start
Day 2: Best Practices
This day focuses on general best practices and tooling for code styling and type checking.
- Code styling (pep8)
- Documentation (pep257)
- Type hinting
- Overview of type hints
- Semantics of type hints
- When to add type hints
- Linting (flake8, pylint, etc.)
- Auto-formatting with black
- Continuous integration
- Code Reviews
- Applying learnings in a project
Day 3: Correctness
Covering techniques to make sure the functionality is correct in a formalized way.
- Debugging tips and tricks
- Using breakpoints
- Understanding stack traces
- Watching variables
- Unit testing
- Mocking
- Fixtures
- Exception handling
- Best practices, i.e. where and how to handle exceptions
- (Re-)raising exceptions and “raise from”
- Custom exceptions
- Applying learnings in a project
Day 4: Object Orientation and Architecture
- Object oriented programming
- Magic methods
- Inheritance
- Dataclasses
- The object spectrum: tuple-namedtuple-dict-dataclass-class
- Choosing OOP vs functional-style programming
- Organizing code in modules/classes/functions
- Interface design and encapsulation
- Abstract base classes and protocols
- Loose coupling, high cohesion
- Single responsibility principle
- Law of demeter
- Applying learnings in a project
Day 5: Intermediate Python
This day is meant for deepening the Python knowledge of the team.
- Args en kwargs and unpacking
- Function arguments in-depth
- Comprehensions
- Lambda, map, filter
- Generators and the iteration protocol
- Decorators
- Context managers
- Custom attribute access (getattr and friends)
- Applying learnings in a project
- Teams review each others code