Spent an hour today renaming env vars across three services to make them “consistent.” Broke staging in the process because one service cached the old values. Should’ve just left the mess alone — it worked fine before I touched it.

  • kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    10
    ·
    12 hours ago

    Agreed.

    I’m also a fan of Kent Beck’s “make the change easy, then make the easy change”.

    i.e. Do one PR that changes the code’s design but not its behavior, in order to make the next feature easier to implement. Then do another PR that changes just the behavior but not the design.

    This way, you get earlier feedback on refactors and you keep behavior PRs small so you reduce the likelihood of the scenario where “we really need to ship this feature but it’s tied to this massive refactor that isn’t quite right”.

    (Note that this is just for the case where a feature genuinely requires a refactor. If it’s just “boy-scouting”, then order shouldn’t matter but you should still keep them separate.)