Know-how as code: the (java) developer's guide to the code generation
Java developers, especially those who are engaged in custom development, are constantly struggling to write less boilerplate code, be it trivial setters, getters, constructors, etc. or CRUD repositories and controllers. Often the answer is code generation in different forms: source code generation support in IDE, bytecode generation using Lombok, annotation processors generating new code, various frameworks that allow you to get an (almost) ready-made application from the model description and much more, not excluding new and traditional JVM languages that allow you to write more concise code and implement DSL for solving applied problems.
With undeniable benefits in the simplest cases, there come limitations that do not allow to realize what is required in a particular project, and worst of all, when the generated code becomes a source of hardly detectable defects, and special crutches on top of generated code are needed to fix it.
In this talk, we will give a retrospective of the most commonly used approaches, overview their strengths, limitations and practical applicability, and most importantly, we'll try to take control of the code generation situation so that it becomes a really useful tool for an effective developer.