I code in TypeScript and Office Scripts. I use Azure and the Power Platform for my work. Code that can generate code is an intelligent application. If you make it suitably complicated, i.e. with trillions of lines of code, it will become sentient. Try it.