Based on my highlights
Disclaimer This chapter is a mix between my thoughts and my notes. My notes are fully based on the text, so, if you want to check exactly what the author said please refer to the highlights.
To keep it simple, I'd say that when we apply composition in our modules we are attaching functionality orthogonally. This means that we have several unit that do only one thing that we can combine to create the outcome that we need. The combination is most of the time related to a functional approach where the output of one function is the input of a different one.
In the case of inheritance the extensibility is done through a hierarchy chain where an entity can declare who is going to be its parent so it can use things from it.
This two approaches, is little to say there are different.
In a module is useful to use inheritance when we have entities that needs to represent a hierarchical relationship between them. Because with object oriented programming we can map our modules to real life object we can take advantage of this approach for those scenarios.
Sometimes when the characteristics of our module tends to be describe for what it does instead of what it represents. Composition could fit better to have the freedom to attach peaces of behaviour together. In Composition the complexity is given at the time we stick things together. The little functions that represent certain behaviour, when combined can solve complex problems.
As always, choosing the right tool for the job could not be trivial. Base on your experience, representing the problem with certain paradigm could push you closer or further from the solution could fit your situation the best. When we don't have a clue, other than investigate we will have to try what we feel is correct.
Guys/Girls remember, moving forward (or some direction) is always better than not moving at all. We always get something from it.
Its been a month since the last time I wrote something here, Its very interesting how difficult it was to start over again. Loosing momentun was crucial...
I can not guarantee it won't happen again, but I can say I will always come back :D