-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ruby OOP Lesson Plan #77
Comments
Lots of really good ideas here, specifically around design with objects and their relationships between each other: https://discord.com/channels/505093832157691914/540903304046182425/913208304484896808 |
Two issues with the current lesson are:
Breaking up OOP with more lessons and projects will help with improving 1. To solve the second issue, I think it would be a good idea (especially early on) to introduce some projects that are focused on objects and OO design without as much focus on general programming problems (such as TTT / connect 4 win methods, or Mastermind code breaking algos). Breaking up the projects a bit more conceptually like this could help to remove a bit of the cognitive overhead when starting OOP - one of the most common points of feedback for TTT is that people have no idea where to start, or what objects to create. Project Idea - A playing card game programThe broad idea for this project is that it's completed across several different lessons. Learners would do a lesson, be introduced to some concepts and then do a section of the project. In the next lesson, they would be introduced to a new concept, then revisit the same project but have to extend or modify it with some new requirements. The project would gradually grow in complexity and break up the process conceptually a lot more. Example Layout
Ideally learners should be able to add new games to their project without having to refactor their previous classes - demonstrating how we can build up complex systems in OOP and substitute objects to get different results. There's a lot more you could do with this concept and a lot of different ways to approach it, but I think it's a good topic to explore a variety of concepts in OOP. Allowing people to practice different concepts in a more incremental fashion will help ease people more gently into something that is often a difficult topic for beginners. |
OOP Section Lessons IdeasLet me know if there is anything that needs further explanation! Main issues
Solutions summary
General Lesson LayoutSOLID Lessons
Composition vs inheritance
|
Just a quick thought for consideration. I think near the end of the Ruby OOP course, it might be worthwhile to introduce the idea of raising some basic errors, and a basic try/rescue structure. I still haven't used a rescue but I have started to raise errors now in my Chess program. It might be good to fit in around/after the Composition/Inheritance discussion, as then if something comes back not what you expect you have a tool to handle it. I see that the example provided by @linkonsat touches on handling an error for prices not existing, so perhaps it would fit right in that lesson as a quick aside. |
I don't have a specific project idea, but I do have a couple thoughts regarding expansion of the OOP lesson:
|
This is not necessarily strictly related to OOP, but I think it would be a benefit for this portion of the course to go over standard practice on how to structure projects in terms of your directory structure and maybe how to utilize bundler to build a project foundation. I am still not sure the best way to "make" a Ruby project, aside from making a repository and adding folders, then initializing rpsec. |
Awesome work here! I like the card / deck of @ChargrilledChook a really approachable idea, as people are generally well familiar with the concept of cards, decks, and hands. I highly agree that with @JoshDevHub that we need to teach how objects talk to each other, that seems to be a big stumble stone for many, who then reach for global or class variables to access state. I think the lessons should focus on practical stuff like that even before going in too heavy into SOLID principles, that have weird names and that are kind of abstract. Looking forward to some great content here! |
Are there any plans to embark on this revamp after the current, on-going projects are completed? I was thinking about this thread because of Hacktoberfest. One note I wanted to add was that the discussion so far has been great, but quite centred on the "how" of OOP. Given the way the topic is currently introduced, the course dives right in to the Codeacademy OOP lessons, then drops learners into the Launchschool book "for more details" - these resources are great, but I think they're quite technical. The idea about introducing an interface would be a great place to talk about the why of OOP. I think that, alongside introducing an interface and the idea of objects talking to each other, providing learners with a why might help them to stick with the content even though it is pretty dense. I think this "why" section could be added to the current curriculum, and also be useful and expanded on to add the discussion on interfaces in the future. Happy to work on a draft section if that sounds like something worthwhile. |
Thanks for taking the time to write that up @crespire 💪
Yes, definitely! It's top of the list for me after clearing our current batch of projects. Completely agree on answering the why question up front. I think all lessons and even sections should start with the "why" in mind. Teaching learners why this thing exists and the problems it solves before diving into the specific details lays a much better foundation and makes content more engaging. I don't think it should focus solely on interfaces though. In this case, I think we'd want a high level "Why OOP" lesson at the start of the new section and then in each lesson, a bit about the why for the topic of that lesson in the introduction. I'm not sure if it's worthwhile doing this until we're ready to start this project. I'd hate for anyone to do work on this right now that may need to be cut when it comes to working on this proper. |
Ruby OOP Lesson Plan
Summary
Currently, we have one huge lesson in the Ruby course for teaching OOP. We could teach OOP better if it was spread among multiple smaller, but more in-depth topic lessons that include exercises.
We first need to decide on a lesson plan, this issue can serve as a place to collect ideas for the lessons until we have a concrete lesson plan ready.
Motivation
Suggested implementation
First of all we need to come up with a lesson plan.
Additional
The text was updated successfully, but these errors were encountered: