7

How do you measure the impact of refactoring your codebase to use a new pattern?

Profile picture
Anonymous User at Taro Community2 years ago

One of the mobile platform projects I led was to improve X pattern in the app and then document best practices around it so engineers understood this new pattern and continued to propagate it.

My proposed impact is that this promotes consistency in the app's codebase which should lead to faster code reviews and enable engineers to deliver features faster. How do I quantify this?

193
1

Discussion

(1 comment)
  • 4
    Profile picture
    Robinhood, Meta, Course Hero, PayPal
    2 years ago
    • Meta-point: Code changes that are purely "aesthetic" in the name of moving to a newer, more modern pattern are dangerous as they often times aren't a strict improvement, take a lot of time, and make the code harder to read for newcomers, especially fresh junior engineers.
    • Ideally, you want to connect a refactor to effects with clear user impact like less crashes, ANRs, etc.
    • To measure the impact of refactors, you mainly have to do it subjectively. Ask engineers immediately after the refactor how they feel looking at it/working with it and then ask the same thing 3 to 6 months later when they have more experience actually working with the new code.
    • You can generate "metrics" by running a survey for the above.
    • Measuring things like code review time to close is tricky as there's so much nuance. Iteration time could get slower, but maybe your team just got a more complex project for the upcoming half. It's extremely difficult to measure clear impact from raw engineering metrics overall.