this post was submitted on 01 Aug 2025
67 points (97.2% liked)

Programming

21948 readers
755 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] skip0110@lemmy.zip 12 points 2 days ago (1 children)

Why are we using tools that can't parse the comment and code via syntax for refactoring?

The first problem is they're letting AI touch their code.

The second problem is they're relying on a human to pick up changes in moved code while using git's built-in diff tools. There's a whole bunch of studies that show how git's diff algorithms are terrible, and how swapping to newer diff algos improves things considerably.

TL;DR on the studies:

  • Only supporting add/remove/move operations is really bad.
  • Adding syntax awareness to understand if differences in indentation should be brought to a reviewer's attention, improves code and makes code reviews more accurate. (But this is hard because it's language dependent)
  • Adding extra operations (indent/deindent/move/rename-symbol/comment/un-comment/etc...) makes code review easier, faster and more accurate. (But again, most of this requires syntax awareness.

There's also a bunch of alternative diff algos you can use, but the best ones are paid, and the free ones have fewer features. See: