Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
miclill
· 7y ago · 0 comments
By "rule of three" you mean if code exists three or more times you deduplicate? Because wikipedia says this about rule of three: [
https://en.wikipedia.org/wiki/Rule_of_three_(writing)
]
Comments
[–]
TravelAndFood
7y ago
Yes, like if you see the same few lines of code in two different places, you leave it, but in three different places, you make a separate function.