logoalt Hacker News

eiriklv • today at 1:06 PM • 2 replies • view on HN

"Duplication is far cheaper than the wrong abstraction" - Sandi Metz[0]

[0] https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction


Replies

leetrout • today at 1:25 PM

"A little copying is better than a little dependency." -- Rob Pike

[0] https://go-proverbs.github.io/

[1] https://youtu.be/PAAkCSZUG1c?si=0gXCrQfAyxjCWOnT&t=572

➕ show 1 reply
whizzter • today at 1:33 PM

Won't disagree with that, that's why the rule of 2-3-4 is good, don't bother for 2 instances, consider if it really needs an abstraction at 3 times, at 4 it's probably time before things grow out of hand.

Because when you have 20+ repetitions you start needing buy-in for fixes because the testing needed might be beyond something simple.