I believe children should learn to think critically, logically and learn about logical fallacies. Writing software can be a means to an end but learning to type code as a rote exercise without learning to design, architect and write an application is a pointless exercise.