When should we create abstractions instead of duplication?

made and submitted by philosophicalhacker
Because abstractions aren’t free, sometimes we’re better off duplicating code instead of creating them. Here I consider different views on this trade-off and argue for a new, brier score based approach.