There is an art to programming. However I am more of a visual person I tend to compare it to painting. Where I use Mathematics, Logic, and understanding of the Systems engineering to replace brushes, paint, and understanding of the textures of the material.
When you teach someone to code, (especially from a non-coder) it is like showing them how to hold a pencil, and write some letters, and words. It will take experience and working with real coders to learn the finer arts to programming.
It isn't about knowing how to do the actions... But how to put yourself in the mindset to create.