In working on Chessbook recently, I often found myself referring to (position, move) pairs. Specifically positions that are stored as EPDs, and moves that are stored in San notation.

let difficulty_by_epd_san = //...;
let existing_epd_sans = //...;
let unique_moves_by_epd_san = //...;
fn epd_san_plus_to_condition((epd, san_plus): &(String, String)) -> _ //...;

I got so used to thinking of these things together as pairs, and wished I had a name for it. I couldn’t think of an existing name that worked well and wasn’t a mouthful like MoveFromPosition. So I made up a name. Anything that’s an EPD and a San, is now a Kep. Because that’s the first thing that popped in my head. It’s a short, made-up name to nicely refer to a position string and a move notation.

let difficulty_by_kep = //...;
let existing_keps = //...;
let unique_moves_by_kep = //...;
fn kep_to_condition((epd, san_plus): &Kep) -> _ //...;

Just sharing this because I never thought to do this before, and I’ve really liked it. It’s not about saving a few characters – it feels easier to think about these things when I have a name for it. An (epd, san_plus) pair took up two slots in working memory, a Kep takes up one. Obviously don’t go crazy with it, but it’s a tool I’m happy to have added to the toolbox.