-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporate fw appendices 2022 #77
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging appendix is great, but need a bit more (intuitive) CS context in the OOP appendices. The biggest hurdle in the way of using Python's OOP capabilities, starting with classes, is practicality: why do you need it?
So I suggest: (1) Explaining functional P vs OOP intuitively; (2) Explicitly showing in an example how using classes made the implementation better (better encapsulation? more robust? faster/slower?); When not to use classes (this is a nice video: https://www.youtube.com/watch?v=o9pEzgHorH0)
@davidorme, see my comment above in response to @fwimp 's proposed addtion OOP appendices. Any thoughts welcome! |
Yeah - it's a tricky one. I agree with @mhasoba that the OOP guides are a bit abstract at the moment. I think they're good, but the 'why' is quite hard to pick out. You could possibly use data classes as way in? That makes intuitive sense as an encapsulated set of data, and then you can extend it methods acting on that data? Having something implemented using OOP and functional would be nice for a side-by-side comparison, but is a lot of work. Some immediate comments on the content (I would do these as review comments, but the files have only been renamed):
class Stool(Seat):
type = 'stool'
|
Agreed, this set of tutorials has existed for about 2 years in PR hell, so probably could do with a bit of a rework anyway. Honestly a lot of the issue I've had is that Functional vs OO is not something where one is inherently better than another. I'll work into some more context and explanations in OOP1. Data classes is a nice idea, I might argue that it's a bit complex as an intro into classes though, would you reckon it's good as an extra example showing why we might use it in biology? The In the end any function that acts on a class can be reimplemented as a method, and even for Attributes are absolutely a good idea, and something I should have included! I agree that I'll try to give it a look this evening or over the next week. No-one will come to this one for a while anyway. |
@mhasoba is it worthwhile spinning off the logging primer from this and integrating it straight out? It's pretty much completed and is a decent addition to the course. The OOP primers we can revisit anon. |
Incorporate the appendices from last year that sat in PR hell. These have been re-implemented to get the branch up to date with master (rather than fixing the branch from last year. See https://xkcd.com/1597 for details)