Too many people are writing too many articles trying to direct others’ thinking on their own testing strategies. I am guilty of this and would like to contribute to reversing this trend. Instead: test until fear is transformed into boredom (Phlip Plumlee) if you don’t like something about the test, then try interpreting that as a sign of a design problem—usually an unhealthy dependency in the production code (The “driven” in test-driven development) faster-running tests tend to prov...| The Code Whisperer
I used to waste significant energy trying to edit shell commands at the shell command prompt. Yes, I could use vi mode on readline, but that never quite gave me the same, rich experience. I found it helpful for minor edits, but when someone introduced me to the edit-and-execute command, my entire relationship with command-line tools changed. Once I had the full power of my trusted text editor to compose and edit commands, I stopped valuing GUI clients as highly and I started valuing the scrip...| The Code Whisperer
Refactoring, the activity, involves the following things. improving the design of existing code … in a sequence of small transformations … that preserve the important behavior of the system … which you can complete relatively quickly … and which gives you inexpensive options to change direction. Effective refactoring combines the value of Real Options thinking with the care and attention of engineering. It reduces volatility in the marginal cost of adding features. It reduces the over...| The Code Whisperer
Doing (test && commit) || revert amounts to doing TDD very carefully, as an étude. If you already routinely take tiny steps, then you already almost do TCR, but something significant might change if you do it exactly. This remains to discover. Join me. References Kent Beck, “test && commit || revert”. Kent describes the technique and makes it clear: he doesn’t know exactly how it affects the programmers just yet. James Shore, “Études for Excellence”. James and I both see the XP pr...| The Code Whisperer
In 2022 I learned about sd, a modern replacement for many of the simplest ways to use sed. Check it out! I decided to learn a little sed, because I can find it everywhere and it seems like the kind of tool that would make a bunch of everyday things easier and faster. I started with “Sed - An Introduction and Tutorial by Bruce Barnett” and immediately realized the enormity of the consequences of my choice. Anyhow, sed is a marvelous utility. Unfortunately, most people never learn its real ...| The Code Whisperer
I just learned about zmv and I love it. If you already know about zmv or you already love rename, then don’t waste your time reading this. Sometimes I want to rename a bunch of files in a way that mv can’t handle. Most recently, I had a bunch of files with the same name in numbered directories (Page0/shot.jpg, Page1/shot.jpg, …), and I wanted numbered files instead (shot-0.jpg, shot-1.jpg, …). Plain globbing won’t do it. (If it will and I don’t know how, then please tell me) If yo...| The Code Whisperer
A guard clause might be an embryonic parser, so what happens if you nudge it in that direction?| blog.thecodewhisperer.com