Hacker News new | ask | show | jobs
by __loam 898 days ago
My heuristic is that if logic is repeated at least 3 times, it's good to pull out into its own function, and even then you still need to consider liskov substitution principle.