How does the code generation work?

See also: