I meant that you should setup a simple environment, setting up a partition and chroot into it. Learn the kid to use man(1) and ed(1) and after that let him/her play around. I heard someone doing this with his 5 year old kid on the OpenBSD mailing-list, that kid will probably be able to write quite useful scripts in a few years.
Why should you teach a child ed(1), instead of any other text editors?
In my opinion , it is one of the most sadistic common text editors in existence, and has been for several decades.