s7: Python Factory pattern with GPT 4 and unit tests with Copilot
Channel: Brylie
Date: 2023-05-31

Using a Python Factory design pattern with the help of GPT 4 and adding unit tests with the help of mypy and Copilot.

00:00 Introduction
00:22 Session goal
01:44 GPT 4 design patterns
03:00 Wagtail block parsing
03:30 Page skeleton
03:50 Code refactoring
05:30 Getting help from type hints
05:50 Copilot helping lower cognitive load
07:12 Giving Copilot more context and prompting
09:55 Reviewing and fixing Copilot-generated code
12:50 Importance of comments (incl. prompting LLMs)
13:25 Copilot writes 80% to 90% leaving just a few improvements
13:30 Living the dream! Tools helping us be more productive
14:20 Copilot writing the main code with proper prompting
15:53 Testability of small functions
16:19 Learning about exceptions from GPT 4
17:09 Mypy catching a Copilot mistake
17:50 Running the tests!
18:05 Conclusion