Skip to content

Making large scale changes

Joseph Hoare edited this page Mar 10, 2021 · 2 revisions

With great power comes great responsibility

Astra automates changing code, and therefore can be used to make changes on a massive scale. Here are some top tips for preparing bulk refactors:

  • Take extra steps to verify the correctness of the refactor.
    • When developing your refactor, use the unit test framework. Please see our guide in Start with tests.
    • When your refactor passes unit testing, run it locally over a subset of the code, and open it in your IDE. This will help flush out compilation errors and other gaps before investing the time to run it more broadly.
  • Before committing:
    • Have a plan for what to do if things go wrong. Can you easily revert your changes?
    • Think about code review, remembering the rule of bulk reviews: 10 lines of code = 10 issues. 500 lines of code = “looks fine.”
    • Form a team you can call on if things go wrong.
    • Split the problem into the smallest possible chunks, and commit them separately.
    • Communicate your changes to the rest of your team or organisation. Changing code is comparatively simple - but don't overlook the value of good communication and change management.