When working on an old system that’s a complete mess how do you handle adding new code in terms of effort?

I normally take pride in my work but if the system is such a mess I sometimes find it hard to get motivated to do it. I often find it makes me feel sleepy? Even new code that is tweaked is nowhere near as well written as if it were a new system.

Anyone else get that?

  • 0
    If new code doesn't have to depend on the existing code, then it is interesting.

    Otherwise, adding a few lines here and there is less interesting and more risky and dangerous
  • 0
    Sounds like transcribing hand-written code from a special code sheet onto punch cards. So 60s…

    Back then I guess they all wore formal dress (suit and tie) with a lab coat on top.
  • 1
    I'm currently doing that over multiple systems actually. Unit tests are one of the best tools. Break your program down into single role responsibility classes and functions and test those as well. Run those every time you make a change. It ultra sucks when the previous guys didn't write any unit tests though. It's a lot of work but it helps prevent breaking the system and your code will be tested in the future.
Add Comment