Bad Abstractions Could Be Ruining Your Code
Why the ‘Don’t Repeat Yourself’ principle might be doing more harm than good
Published in
6 min readMar 24, 2024
Let’s imagine we’re working in a very large codebase. Can you spot an issue in the following code?
const icons = {
delete: getIconPath("delete"),
edit: getIconPath("edit"),
save: getIconPath("save"),
};