• jubilationtcornpone@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    23
    ·
    1 year ago

    That’s nerve wracking. But you know what’s worse? Finding code that shouldn’t work, not being able to figure out why it works, and having to leave it in production because of you “fix” it, the whole damned thing will come fluttering down like a house of cards in a slight breeze.

    • xantoxis@lemmy.world
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      There is actually an approach for this. Leave the cursed code in, but implement it again in the same file, from scratch, without looking at the cursed code. You’ll either unthinkingly fix the combination of conditions that led to bad code being correct, or you’ll realize why that was what you needed the whole time.