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.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    3 days ago

    It doesn’t mean you made the wrong decision. Changing the names has a potential cost - you break something (this is especially risky for environment variables which have insanely global scope, no static type checking, etc.).

    Not changing the names has a potential cost too - causing confusion in future, wasted time, or even bugs due to the increased chance of mistakes.

    I’m currently leaving a company where they almost never clean up their messes. Tons of old unused code is just left in the repo. Causes huge wastes of time.

    Don’t underestimate the potential cost of not keeping things orderly. There was a famous case (Knight Capital) caused by not cleaning up an old unused CLI flag and it cost them $440m and destroyed the company.