Think about an abstraction in a logical way, it will reveal itself when the time is right…
“Duplication is far cheaper than the wrong abstraction” ”prefer duplication over the wrong abstraction” — Sandi Metz, “The Wrong Abstraction”
Please, repeat yourself a bit more, don’t go crazy on DRY (don’t repeat yourself)
DRY for DRY often results in bad abstractions, which can be hard to make sense of, and can make it hard to change.
Rule of thumb
If you can’t easily explain to another human the logic behind your abstraction, it’s a bad abstraction.