Computer coding is simply an example of applied mathematics and logical reasoning.  If you teach kids the basic principles of math and logic, they will become adept at coding.  I have taught courses to business professionals in developing queries to analyze data (SQL Server). I always start with a demonstration of Venn diagrams.  Don't know what a Venn diagram is? It is those intersecting circles where you try to identify what is included circle A but not in circle B, etc.  It represents the fundamental building block of logical reasoning,  statistics and computer applications.  It is taught in almost all university courses where logic and critical thinking is required.  The trouble is that it is never on the final exam.