When writing a learning resource suitable for complete beginners, then, how do you address the challenge of presenting a technique or practice that solves a problem the student has not yet encountered? This is why most introductory C++ texts read so horribly; using inheritance to solve the "problem" of making different mammals "speak" is meaningless because most beginners aren't interested in that issue (and probably never would be, if it weren't for classes/textbooks). Similarly, refactoring x- and y-axis velocities into a single vector type is meaningless to beginners because they haven't experienced the downsides of not doing so yet.
How do you present a good practice like refactoring without getting ahead of your audience?