When to refactor vs rewrite

· Dev.to