Ubiquitous Language – A Triple-Play for Words
Teams often don’t pay enough attention to language. A team can improve its language by using what Eric Evans calls Ubiquitous Language: “A language structured around the domain model and used by all...
View ArticleThe “Call Your Shots” TDD Workflow
Kent Beck’s TCR workflow experiment has generated some good discussion. Rachel Carmena has documented several TDD workflows. I’d like to add an approach that I’ve used for a while: “Call Your Shots”....
View ArticleMulti-Level Stories
Stories Have Multiple Granularities User stories may seem like they are about specifications but they’re really a lightweight way to explore possibilities. Many teams get too focused on the “card”...
View ArticleScalable Story Examples
How do you think about stories? We’ve talked about different levels of stories. Scalable stories let us gradually increase the intensity and utility of system behaviors. As before, I’ll use...
View ArticleTDD, TCR, and Frequent Commits
We’ll look at Test-Driven Development (TDD) and Test-Commit-Revert (TCR) in terms of how they work with frequent commits to source control. Test-Driven Development (TDD) Test-Driven Development is...
View ArticleConnecting Stories
How do stories fit in with other stories, or small stories with bigger ones? How can we move from skinny stories to richer ones? This is part of Scalability of stories. One way to think about story...
View ArticleHome-Grown Refactorings – Be Careful!
When you clean up code, you often need refactorings that aren’t in any tool, and aren’t in Martin Fowler’s Refactoring catalog. You’re on your own. When this happens, think like a language lawyer and...
View ArticleRefactoring and Generalization in TDD
This article (originally published in Better Software) explores generalization in TDD. The basic notion is that refactoring sets out to not change the behavior of code for any of its inputs, but TDD...
View ArticleEvolutionary Design: Techniques and Example
Evolutionary design is a strategy to enable incremental delivery of capabilities. Consider two delivery strategies. In one, we plan everything we need, develop, then deliver when everything is ready....
View ArticleExtract Protocol Refactoring (Swift) – Elevate Common Behavior
Extract Protocol lets us generalize our types. Context: You have a class (or other entity), and want to let another class stand in for it in some cases. You could make the other class a subclass. But...
View ArticleDivide Class into Class + Extension (Swift Refactoring)
Context: You have a class that implements one or more protocols. The class has become long, and it’s confusing to understand what parts are there for the protocols, and what parts are for the class’...
View ArticleRefactoring in Swift
This post summarizes the material on xp123.com related to refactoring in Swift. Swift Refactorings Divide Class into Class + ExtensionExtract Protocol Other Refactoring-Related Material Refactoring –...
View ArticleSufficient Completeness and TDD
“Sufficient Completeness” is a characteristic of specifications, from the theory of abstract data types. It can help guide our testing. One way of looking at objects is to consider the history of what...
View ArticleTDD & GUI in Swift
TDD with a user interface (UI) is a challenge: you have to decide which parts to test. Recently, Ted Young has been using the Yacht dice game (the root of the commercial game Yahtzee) as a testbed for...
View ArticleProgramming: Using What’s Hidden
In building a cache for the SortTables data viewer, I ran across three hidden things. An LRU Cache I want to view data sets that are larger than memory, so I developed a cache that gets rid of the...
View ArticleSpeculative Generality
For most problems, we have a choice: implement current needs only, or generalize the solution to more easily handle variations we expect to need in the future. The evolutionary design community refers...
View ArticleRefactor: Change Signature on a Protocol [Interface]
When a “raw” type appears in a protocol, it encourages it to spread all over. Recently, I needed to encapsulate a type: I had used “array of integer” ([Int]) in a number of places, and I wanted to...
View ArticleExamples of User Stories 2020
I’ve been involved with several projects over the last few months, and each has user stories associated with it. People often ask for examples of user stories, so I thought I’d share these. The Form...
View ArticleRefactor: Duplicate and Customize
Example of Duplicate and Customize, for an “if” statement “If” statements often attract complexity. They gather compound conditions that are hard to understand. More “if” statements get nested inside....
View ArticleIs Trigger vs Response a Good Story Split?
Many user stories fit the model of trigger and response: the user does something, the system responds. For example, if you type a letter, the word processor inserts it; if you press the “Buy” button,...
View Article