• dan@upvote.au
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      In my first month at my current employer, I added some temporary code with a TODO to fix it properly. That was 11 years ago in 2013, and the same TODO is still there today, and these days it’d be significantly harder to do it. 😂

  • Conyak@lemmy.tf
    cake
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    In my experience it doesn’t matter. You have to regularly refactor your code to keep up with new features. The more often you can make time to do it the easier it is.

    • SolarMech@slrpnk.net
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      This, to a point.

      Other things help :

      • Unit test to help catch regressions. If you are confident in your test catching a good portion of bugs from refactoring, at least you feel confident refactoring. Worst case, at least you ensured your code is testable. There is nothing worse than refactoring untestable code.
      • Self-documenting code and when it fails to self-document, comments or refer to a wiki page.