code generator in lectures