Weekly Check-In #2: MetaClasses and OOP 🤖
What did I do this week?
This week was spent creating the various classes and subclasses for the Course Engine. I finished writing all the different functions and utility functions that perform the following tasks:
- Recursively Load Data from Yaml files
- Verify the Chapters for missing fields before serving it
- Serve the chapters on the CLI
I used python's metaclass concept to make "Snippet" a meta class for the different types of snippets that will be implemented in the following weeks. The purpose of this is to ensure implementation of certain functions in the inherited child classes.
What is coming next?
Over the course of the next week, I will be trying to improve the documentation of my codebase and introduce unit tests to ensure a robust system. Once that is done, I will be implementing specific types of Snippets using the base class as the parent. The first in the list is the TextSnippet followed by MCQSnippet and CodeSnippet.
Did I get stuck anywhere?
This week was spent with the basics of Object Oriented Programming (OOP) hence I didn't get stuck anywhere, however the concept of a metaclass was new to me, so I had to read some documentation and tinker around with it before implementing it in my project.