you are viewing a single comment's thread
view the rest of the comments
[–] 29 points 1 month ago (3 children)

I've seen people literally use it as find and replace 🤦‍♂️

  • source
  • parent
  • hideshow 6 child comments
  • [–] 1 point 1 month ago

    I've used it as a sort of find and replace in the past, but by feeding it the output from Ripgrep to skip the "find" part. The "replace" was just unwrapping unnecessarily confusing "try" blocks and allowing errors to propagate to the appropriate handlers. This would have required a syntax-aware replacement tool (and some exist but I didn't really feel like learning one for a one-off).

    As a simple "find this text and replace with this other text" it makes no sense.

  • source
  • parent
  • [–] 0 points 1 month ago* (1 child)

    I did that today. It went something like this:

    “See the naming conventions at the beginning of the script. Apply all the rules to all the non-conforming variable names and the new custom function we made earlier.“

    There were like 100 changes here and there, and I just didn’t feel like doing all that work manually.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 month ago (1 child)

    In my experience, the trick to this is to get a list of changes to make yourself, rather than trusting the machine to actually get it right. (Unless you're in a dev/test environment and don't care much if it fucks it up.)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago

    This code isn’t anywhere near production yet. I’m still going to make a hundred little changes, but an LLM can do all the boring stuff so that I can focus on the interesting bits. There’s also going to be plenty of testing and iterative tweaks, so any major mistakes will be exposed sooner rather than later. Honestly, about half of the errors will be caused by me.

  • source
  • parent