• @Feathercrown
    link
    English
    54 hours ago

    I spent like 3 hours yesterday deduplicating two functions that were hundreds of lines long and nearly identical. I should probably learn how to use that git command that can diff two files on disk. Luckily I actually enjoy cleaning up code sometimes.

    • @pivot_root
      link
      84 hours ago

      If you’re using a decent development system, you’ll have an executable called diff installed already :)

    • @egrets
      link
      34 hours ago

      VS Code’s diff tools are killer. Comparison is smarter than most, and you can edit either file as you go.

      • @[email protected]
        link
        fedilink
        English
        34 hours ago

        And if you want to avoid the Microsoft stank, there’s VS Codium that has been de-Microsoft’d, like Chrome vs. Chromium.

    • @[email protected]
      link
      fedilink
      23 hours ago

      If you use VSCode, open both files and then ctrl-shift-P “Compare active file with …”

      You’re welcome.

    • @TrickDacy
      link
      14 hours ago

      You can use a diff app directly such as meld which is free. Highly recommend.