Duncan and I will be at #SoCraTes UK on June 18th and will use some of these practices to take control of LLM-generated code. LLMs default to generating code that is monolithic, procedural, and makes wide use of mutable state. #Refactoring is a good way to give the LLM patterns to follow. Separating actions from data & calculations, composing calculations, and proving consistency by type checking, are all good strategies to keep generated code comprehensible by humans.




