Maybe you hear it often, or maybe you've said it yourself:
I would write an automated test for it if it wasn't impossible to test. Is it impossible though? Let's get creative.
Continue reading →
What does it mean to have "strong encapsulation" and to "hide information"? Are getters and setters enough? An exploration of designing classes that reveal as little as possible.
Continue reading →
Buckle up for a trip down the rabbit hole! What are
intersection types and
union types, can we use them in Java, and why would we want to?
Continue reading →
We learn a lot about inheritance, and our languages often have constructs that lead us to using it as the solution to many modeling problems. But then we're also told we should prefer delegation to inheritance. What gives?
Continue reading →
Some OO languages like Java have historically only provided one way to create new types: the
class
keyword. But there's a difference between defining value types and object types, and that difference bleeds over in to API design.
Continue reading →