• 0 Posts
  • 23 Comments
Joined 2 years ago
cake
Cake day: June 1st, 2023

help-circle












  • It’s mostly stopping the world to re-write everything from scratch that is a mistake.

    Good practice is to refactor the codebase until it’s modular (if it’s not already sufficiently modular), and then proceed to replace modules gradually until you reach your desired state of re-writtenness.

    This has the benefits of actually getting you up to speed with maintenance over time without having to halt new feature development, giving you the best of both worlds.






  • So you’re probably not going to be able to swing getting a project greenlit to test everything on your frontend, partly because your management seems a bit stingy, and partly because it’s probably not the best approach to do this kind of thing anyway.

    To the claim of that you can’t test UI: only if you’re not creative enough. Behavior can 100% be tested, and is worthwhile to test, while UI looks can be verified with screenshot tests.

    How I would probably approach this would be:

    1. Get some very basic test execution infrastructure in place. Ideally it runs in CI, but if you have to do it in the dark, then just make sure you can run it locally
    2. Try to refactor parts of the code you touch to actually have its behavior testable - do this as a part of any ongoing work of navigating the codebase
    3. Whenever you add functionality, add a test to verify it. Write the test first if you can
    4. Whenever you encounter a bug, write a test asserting the behavior you want, then fix the bug such that the test gets green.

    Following these steps should successively put the codebase into a healthier state.

    Another perhaps even more valid option would be to look for a better job - working in headwind from management is not recommended, as it will deteriorate your mental health.

    Good luck!