Why do children under 8 need to know how to code? They don't even have simple things like cause and effect established in their brain until they're about 11. I.e. "if it's raining outside I should wear a rain coat or I'll get wet". Nor do they have much logical reasoning capability. That's also why they don't get sarcasm.
Edit: paper on pre-adolescent and adolescent brain development, especially as it relates to cause and effect and abstract reasoning: http://www.sciencedirect.com/science/article/pii/S1878929314...