Great talk, this "switch" situation is very frequent indeed and this pattern elegantly solves the given case or similar ones. I'd just say that ABCs and abstract methods may be a better solution then raising NotImplementedError in base class's method to be sure the derived class has been implemented correctly
Great presentations skills. Good content and resources. I would definitely recommend someone who is new to programming and wants to hone his/her skills to improve their ability to code.
Maybe not the topic of this talk but speaking of OOP, polymorphism and readability in general, the question that comes to mind is how would be the best way to organize all those classes inside the code. For example, all classes inheriting from EventsList are stored in a same file (module) one after the other? EventsList should be defined close to where it's being used or it doesn't matter at all?
I personally would start with one file containing the abstract class and all its children and move to a folder with one file for each once the single file becomes too big, like over ~300 lines
Agree with Johannes. Single file until things become hard to manage. You can see how I set up the EventList class and its children on GitHub github.com/busy-beaver-dev/busy-beaver/blob/d16641f34586eb0b178622cc09750be4ad8bee6f/busy_beaver/apps/github_integration/summary/event_list.py
I really enjoyed this talk! Great reminder on how OOP in python can sometimes make your code simpler and easier to follow. (readability counts!)
Great talk! inspired me to refactor my conditional code using polymorphism
Great talk, this "switch" situation is very frequent indeed and this pattern elegantly solves the given case or similar ones. I'd just say that ABCs and abstract methods may be a better solution then raising NotImplementedError in base class's method to be sure the derived class has been implemented correctly
Congratz, great talk. I'm in the step to read these books that you mentioned tô improve my code.
Great presentations skills. Good content and resources.
I would definitely recommend someone who is new to programming and wants to hone his/her skills to improve their ability to code.
Great talks! Gives a lot of clever ideas.
Take a shot whenever he drinks water. 🍺😄
Great talk btw.
Maybe not the topic of this talk but speaking of OOP, polymorphism and readability in general, the question that comes to mind is how would be the best way to organize all those classes inside the code. For example, all classes inheriting from EventsList are stored in a same file (module) one after the other? EventsList should be defined close to where it's being used or it doesn't matter at all?
I personally would start with one file containing the abstract class and all its children and move to a folder with one file for each once the single file becomes too big, like over ~300 lines
Agree with Johannes. Single file until things become hard to manage.
You can see how I set up the EventList class and its children on GitHub
github.com/busy-beaver-dev/busy-beaver/blob/d16641f34586eb0b178622cc09750be4ad8bee6f/busy_beaver/apps/github_integration/summary/event_list.py