I had trouble thinking of concepts that have an is-a or has-a relationship with easy to model state and behavior, so here are a few examples you can use to practice with what to practice in parentheses:
- Animal kingdom (Animal, vertebrate/invertebrate, warm-blooded, cold-blooded, mammal, platypus, bird, reptile (inheritance, mix-ins)
- Property manager and their properties (collaborator objects)
- Instruments > StringInstruments (inheritance)
- Library > Books (static properties)
- Bank — Accounts, Customers, add funds, open account (collaborator objects)
- Bonus! Command line Frogger game (basic version) — (torture)
- Check out my article on object creation patterns if you’re murky on any creation pattern and practice writing out a few of these examples in each applicable pattern.
- Open the Chrome dev tools and look at the object and function properties with the console.
When you look at the study guide, look at it in a few different ways and review, revise, and rewrite it
I rewrote my study guide three times, ultimately writing it until the topics felt like common knowledge and I could produce and describe code examples without referencing the course or my study guide. My puppy Moshi knows all about object creation patterns at this point from our talks on the way to the dog park. 🐶 The point is: use the explain it out loud technique to reinforce your understanding of the material.
- For each topic, write out a description of the concept and some code that demonstrates the topic. Write a description of the code using precision of language.
- If the concept is in a list with other concepts, it’s for a reason. Re-read those sections in the course and make sure you have an understanding of how they compare and what the tradeoffs are — it’ll be mentioned in a sentence here and there that you might have missed the first time.
Practice Precision of Language
There are a few places where you can identify how to be precise when describing OOP code:
- The LS course (reread the course materials specifically for precision of language while you write that second version of your study guide 😉)
- The practice problems
- Responses to old questions in the forum
- Feedback from peers in study groups or Slack channels
For some of the built-in methods in particular, the Quizlet “matching game” can be very helpful for locking the inputs, outputs, and general definition in to memory via repetition. You can use these flash cards, or make your own.
Join a Study Group
You can join the channel the-spot in Slack to join other students in learning the material, or find a study group led by a TA via the Launch School forums.
Make a diagram and describe it in a post
What helped me differentiate concepts the most was creating a diagram of one of my code samples I frequented (Instrument constructor function). Specifically, be able to depict a working model of a constructor function and its properties, as well as instance objects and their __proto__ property, which should help you reason through and read OOP code. You can check out my diagrams here.
Use the course forum + Slack
If you’re not sure that you understand a concept, write out what your understanding is of the concept, try to code it out to confirm your understanding, and ask in the forum for TA help or in Slack for community help so you can get some clarity.
Code some more!
- Redo the practice problems in the exercise set if they were challenging the first time and be sure to read the solution explanation in full more than once.
- Go back to anything you coded and write out a description using precision of language.
- Go back to Lesson 5 and implement all of the bonus features for Tic Tac Toe or refactor your code. Read the forums to see what other students submitted and how TAs recommended for them to refactor your code. Read all of your code and refactor it. DRY. DRY. DRY.
- You can also filter Object Oriented Programming challenges on CodeWars, but I tried that and didn’t find the problems to be that useful compared to just coding out things in full.
- Reread the course to find all of the gotcha sections and make sure you have an understanding of what is happening, especially around execution context/