Not every change that preserves system behavior is a refactoring. But every genuine refactoring, by definition, preserves client-facing behavior completely.
Tag: software-development
If You Don’t Want to Be Replaced by a Robot, Don’t Act Like a Robot
Here’s a rant I’ve been sitting on, and it’s time to let it out. In the modern software development landscape, there’s an unsettling trend: we pretend that the perfect project flow is a conveyor belt, and the only thing slowing us down is “imperfect” specification. Every sprint, there are grumbles about user stories that aren’t… Continue reading If You Don’t Want to Be Replaced by a Robot, Don’t Act Like a Robot
Changing Object Types to Reflect State Transitions
In object-oriented design, objects encapsulate state and expose behavior that operates on that state. Consequently, if an object must exhibit different behaviors at various stages of its lifecycle, it can be beneficial to represent these transitions by changing its type. For example, consider a system that manages books. A newly created but unsaved book might… Continue reading Changing Object Types to Reflect State Transitions