Week 4 of my #Python Foundations course is live. 🎉
This week there are no new features and that's on purpose. 🚀
By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI.
It works, but that one file is starting to hurt. 💡
This week you'll refactor it:
Week 4 of my #Python Foundations course is live. 🎉 This week there are no new features and that's on purpose. 🚀 By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI. It works, but that one file is starting to hurt. 💡 This week you'll refactor it:
0 vue
Publié le 12/10/2026 15:00
0:21
Week 4 of my #Python Foundations course is live. 🎉
This week there are no new features and that's on purpose. 🚀
By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI.
It works, but that one file is starting to hurt. 💡
This week you'll refactor it:
→ Group the storage functions into a `JournalDatabase` class, because every function was being passed the same db_path
→ Move shared test setup into pytest fixtures in conftest.py
The behavior doesn't change and the test suite will help you refactoring it: 22 tests pass before + after.