Guidance on how to break down problems and structure solutions.
Category: Design
Episode #201: Immutable Object
In this episode we learn how mutability can lead to bugs in Value Objects... and how we can eliminate these types of bugs once and for all.
Episode #200: Quantity
In today's episode we take a look at a storied problem in software: defects caused by accidentally mixing-up the units of measurement used in calculations. And we kick off a …
Episode #198: Decorator Transparency
In today's episode we look at a potential complication of using the Decorator pattern, and discuss how to resolve it by enforcing Command/Query Separation.
Episode #197: Decorator
Today we explore the Decorator pattern, with the help of the SimpleDelegator standard library.
Episode #191: Virtual Proxy
When loading domain objects from an external service, it can be expensive to load up associated objects with them. Today's episode takes a look at a pattern for transparently lazy-loading …
Episode #189: Assisted Refactoring
In today's episode, we'll examine how the availability of tools to aid refactoring can change how we write code.
Episode #185: Two Refactorings
Today's dish is a refactoring approached from two different perspectives. Enjoy!
Episode #183: Extracting Ghost Load
We've used the "ghost object" pattern to lazily load attributes of a model object. And we've made a macro to easily declare "ghost-loadable" attribute accessors. Today we complete the generalization …
Episode #180: Ghost Load
In today's episode we learn at how to implement lazy loading using the "ghost object" pattern.