3 ms·
I'm conflicted about this. I've worked with code generators built by coworkers with a great many years of experience. There are two key parts of the learning cu
by jollyllama 4y ago
I'm conflicted about this. I've worked with code generators built by coworkers with a great many years of experience. There are two key parts of the learning curve when approaching this situation. First, learning to use the code generator for simple tasks as intended. Second, extending or modifying it as needed to deal with bugs or unanticipated use cases.
It can take a couple of years to get to that point, and it's difficult because a bespoke code generator won't have the resources that an open source, widely adopted library will.
Also, you'll be responsible for building whatever connectors you need, as opposed to more popular libraries making plugins or expanding their capabilities.
That said, when done right, they can be extremely powerful and well suited to their particular use cases.
- mbrodersen 4y agoI introduced a code generator at work and it was quickly adapted and modified/upgraded by colleagues. It started out as a simple protocol generator (think Google buffers but 5 years before Google buffers became a thing) and was then expanded over the years by a number of people to handle a lot more (databases, model specifications etc.) generating C++, CMake, Typescript, Java, and C# code. There is no open source generator out there that can handle all the things this tool does. It has now become the first thing people install when starting new projects. I think the key to its success is that the code generator itself is really simple. So you can figure out how to improve it in no time. Also, the generated code is super pretty. It even includes comments explaining what the generated code does. This was a design choice by me to ensure that people trusted the generated code. Without it I don’t think the generator would have been successful. If people can’t understand the generated code then they don’t trust it and is less likely to use the generator.