r/code • u/Tychonoir • May 21 '24
Help Please Automatic generation of repetitive code (Not AI)
I feel like I'm missing something simple.
There has got to be a quick and easy way to generate repetitive code that only has a few changes - such as inserting values from a list. (Very similar to how a mail merge worked back in the day.)
When I try and search for this functionality, I get results for AI code generation. That's cool and all, and they actually work for this, but seems like massive overkill for a simple problem.
If I search for mail merge functionality, I'm getting scripts and specific results for using email, which isn't what I want either.
Essentially, I want a template block of code that has placeholders that will be replaced with values from a list(s) I provide.
I'm guessing there's a specific term for this that I'm just unaware of. It feels like the sort of thing you'd be able to find a simple online tool for.
View all comments
Show parent comment
2
u/Tychonoir May 22 '24
I'm not denying the value of there tools. I just have a particular use case that needs exactly that simple repetition and no more, and there's no opportunity to condense the code.