1


1. Avoid copy/pasting the same code in many spots.

2. Avoid creating abstractions before there are multiple use cases.

Both these seemingly contradictory guidelines are useful.

Bottom line:
1. Copy paste first
2. Once it works, consider centralizing duplicated code

View original on X