Ask HN: What is this "boilerplate" of which you speak?
4•qwesfaqsfg•1h ago
A few times a week I see reference to using LLMs to automate creation of boilerplate code. What is it that people are doing that requires this? Our languages have a variety of tools for promoting code reuse at various levels, from functions and data structures up through entire module systems; some even have code generation facilities built in. Parsing and transforming structured representations has been well understood for a long time, so reliable translation from a terse specification to a verbose output is within the grasp of anyone who cares to do it. Our editors and IDEs have jump to definition, autocomplete, and quick lookup for documentation. We know how to write programs that transform or synthesize multiple files in coordinated ways. For many (most?) frameworks, we can often find and adapt existing example projects, or, failing that, hollow out an existing code base and work from there. Given the variety of tools at our disposal for emitting repetitive or stereotypical code in predictable ways, what value does an LLM really bring?
Comments
JohnFen•1h ago
Honestly, I've long been wondering the same thing. I haven't written much boilerplate code in decades, and am curious as to why others seem to write so much of it.
JohnFen•1h ago