Avoid Indirection in Code

Avoid Indirection in Code

I often see code where authors abstract away details by placing them in some external function. This indirection isn’t as much of a problem during the writing process, the original author is focused on building up an abstraction model in their head, and so writing this abstraction into code makes sense and feels good. Mostly, I want authors to be aware that there is a human cost to indirection that is felt more acutely by everyone reading the code except the original author.

Source: matthewrocklin.com