Hacker News new | ask | show | jobs
by awestroke 863 days ago
Forget about refactoring then
2 comments

FTA:

  Once PRs start to exceed 10k lines of code, they seem to become slightly “safer.”
  I suspect this is because the extreme end of PR sizes includes refactors, which
  maybe start including less functionality change and therefore have a slightly
  lower chance of breaking. Alternatively, engineers may become progressively more
  reluctant to revert PRs after 10k lines because of emotional anchoring and merge
  conflicts.
I would speculate that PRs of > 10k line changes are more likely to be deletions of entire modules or assets that were dead code already.
Big massive refactoring PR's have killed many projects. Sometimes you can't, but if you can split a big refactoring PR into multiple commits it usually works better. The first PR introduces a feature flag that lets you pick between old and new code.