Software Moves
Verbing patterns
No newsletter next week
I'm speaking at JAX.
Software Moves
I'm completely braindoggled from the conference prep and forgot how to write newsletters. After three or four attempts of writing about something, getting 300 words in, and hitting a wall, I'm giving up and phoning this one in. Have a brain dump.
The piece You might as well timestamp it argues that instead of storing booleans in databases, you store the timestamp of when it became true. A missing timestamp means that value is false. This is generally more useful than a boolean, because in addition to boolean behavior you also get auditing information. Here's two ways you can think about this:
- Nullable timestamps are a software refinement of booleans.
- You can take a data schema with booleans and replace the data with optional timestamps.
(1) is a consequence of you doing (2), and that "doing" is what I want to focus on. It is a "move" in the game of software engineering that you can make. I think of moves as a subset of all SE activities, defined by being a short activity with, if done successfully, creates predictable, bounded progress toward a goal. Here are some other moves:
- Run a program, like a test suite or compiler or something
- Pluralize Preemptively
- Write a test, add an assertion, or look for an invariant in the code
- Version your data interchange format (replace
data
with{version: 1, data: data}
). - Call in someone to pair with
- Create a one-of dedicated script to help profile or debug something in the code
(That's a pretty wide variety of things that count as moves! We can scope it down by creating hierarchical categories: "timestamp refinement", preemptive pluralization, and preemptive versioning are all "moves on the data model", and more narrowly "moves that enable flexibility with data format changes".)
I think of moves as the mirror analog of patterns: patterns are nouns and moves are verbs. For every pattern, there's a corresponding move of using that pattern.
So what does having a concept of "moves" gives us?
- Cataloging: lots of moves are easy to learn, but you need to know they're possible. Collecting moves in one place means people can see if there are useful moves to them.
- You can be better at some moves than others. The moves you can do as rote motions are ones you're best at and ones you're more likely to use.
- We can create intentional practice towards improving at specific moves. If you intentionally practice writing parsers, you will be better at solving problems where "write a parser" is a good move.
- We can create specific exercises to intentionally practice some moves.
I've wanted to experiment with idea (4) for a while but never seem to find the right time.
Ultimately I think moves just fascinate me because it's a new concept and abstraction for me to play with. Maybe there'll be a deeper insight I have once I'm less boondoggled.
If you're reading this on the web, you can subscribe here. Updates are once a week. My main website is here.
My new book, Logic for Programmers, is now in early access! Get it here.