@mona I agree when it comes to your own programs. I'd never call out anyone for coding like this.
But this is unacceptable for a teacher.
Introducing someone to a new subject must be done carefully and rigorously.
If teaching is based on recipes with no background and that can't be backed by arguments it's just wrong in my opinion.