I’m shocked that you would see any similarity at all with raising children and the programming of AI. Although you say that AI will write its own code when it encounters a situation it can’t deal with, get back to me when the AI decides to pray to God for resolution of its problem.
And I'm shocked that you're shocked. Where did I put my shocked face?