Generate You Some Code for Great Good
summary
Argues that practical code generation is easy and powerful, showing source generators (JavaPoet, Roster) and bytecode generators (Gizmo, ASM, Byte Buddy) used to produce a runnable HelloWorld during the build, to emit docs, and to mass-fix bugs across a model of 1,500 classes; recounts fixing a many‑to‑many save cycle via one template change and demonstrates using the ASM bytecode viewer to copy compiler output back into ASM instructions. Also mentions Lombok, OpenAPI, gRPC, MapStruct and Jackson Afterburner.
AI-written summary · about
chapters (15)
- 0:00Introduction to code generation
- 1:11Code generation's bad reputation
- 2:36Early code gen in finance
- 6:30Benefits across languages
- 8:39Dangers of code generation
- 11:05Tools you already know
- 12:51Demo setup
- 15:20Java source with Java Poet
- 16:28Java source with JBoss Forge
- 23:31Byte code with Gizmo
- 33:42Byte code with ASM
- 42:18Byte code with Bite Buddy
- 45:47Q&A on Lombok
- 47:35Q&A on inputs
- 50:26Closing remarks
related talks
53mCode Generation: ....
42mBecoming the Metaprogrammer Real World Code Generation
30mWrite Less (Code), Generate More
36mGenerating code in Go
37mThings I learned after a decade of writing code generators
48mCode Generation in 2024: How AI Will Take Your Job…to the Next Level!
33mSource Generators in Action
51mCode generation tips you didn't ask for
