Practical vs theoretical

My lessons are almost always practical coding lessons which involve little theory just coding coding coding. This can sometimes diverge aims as if I succeed my students stop using me as they have gained confidence enough to try things themselves. Has anyone any suggestions how to keep things going

In Music which is mainly practical I always make reference to theory work as part of the lesson. But this will vary with each student. There are some adult students that I have that love that analytical element of music theory and I tend to spend more time on it. A younger student prefers more practical and if I spent too much time on theory you see them understand less. Its a fine balance!