“I had been confused about sub-classes and prototypal inheritance for a long time and I had a hard time finding information about it on the internet,” Edwards explains. “After we covered the topic at Hack Reactor I felt very comfortable with the concepts and I thought it would both help me to retain the knowledge and help others to learn if I explained them in my own words in a blog post.”
Hack Reactor places a lot of value on teaching as a learning tool. Mastering a topic to the point that one can explain it ensures a more full understanding of it.
“All those grey areas that you have in your understanding,” says Lead Instructor Fred Zirdung, “you have to get all those cobwebs out and make sure the lines are crisp.”
For this reason, Hack Reactor uses pair-programming at many points in the program, so that students get a chance to explain topics and learn from each other.
In Edwards’ post, he prefaces a fairly in-depth discussion with a simple framework:
How do I make a object delegate to another object?
How do I make a subclass that delegates to another class?"
“Hack Reactor has taught me how to use objects to add progressively specific functionality to my code while inheriting the previously implemented functionality in a controlled way. This is an extremely powerful technique, but it can become confusing or inefficient if you don't know the proper way to do it.”