Currently learning about — and helping people with — SAP and ABAP.
Yongen-Jaya, this is Yongen-Jaya.
What is a “Composition Root” and what does it do?
It looks familiar, yet is still quite alien.
Both Feathers (2005) and van Deursen & Seemann (2019) recommend that test code should not be mixed with production code and that production code should avoid testing-specific features (such as overriding values). van Deursen and Seemann give away their suggested solution in the title of the book – Dependency Injection –, while Feathers argues that techniques like Introduce Static Setter (2005, 372) are sometimes necessary to in order to make code that depends on singletons testable.
There are a great number of fun and interesting quotes about programming (and in retrospect there’s also something surprising about them), but one quip by Alan Kay has stuck in my mind:
I invented the term object oriented, and I can tell you that C++ wasn’t what I had in mind.
It’s a snide quip, and those are always fun, but what does it actually mean? If C++ isn’t object-oriented programming, what is?