You've been asked to add a new feature to or refactor some existing code.
Assuming you have automated tests already (if not, why not?), before you change the code, you should ask whether they're good enough.
They need to be passing, but do you feel confident the existing functionality will still work after you make your changes?
Do you have all the existing use cases covered?
If so, carry on.
If not, spend some time improving your tests first to get that confidence before making any changes.
- Oliver
Was this interesting?
About me
I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.