Hacker News new | ask | show | jobs
by theshrike79 778 days ago
This is highly repetitive code where the options are pretty much either me copy-pasting a piece of code and changing a bit here and there or having an AI do it.

The latter won't make stupid small mistakes, I will (and have)

And I'm checking like 10 lines at a time, related to code in the context I've got in my head.

I need to review 100x bigger PRs done by humans of varying skill regularly - related to other parts of the project I'm not intimately familiar.

1 comments

Okay, but isn't your own code generator a better option in this case? You know, a for loop with some parameters that spits out code?
How can a "for loop" generate me 10 API endpoints in C# that call business logic functions with the parameters received?
You tell me. You are the one who said that code was repetitive to generate. :)

So it turns out, not so repetitive after all then?

I remember devising my own mini DSL when I had to produce 250+ such endpoints and validators. Three days spent on that, then ran the command and I had working code 30 seconds later. Felt like a god.