A general recipe for preparing lectures, seminars, and practical training:

It is useful to prepare a lesson plan, a table listing the topics for a lesson, the methods you are going to use and the time you plan for this.
When you are new to teaching, your time estimates will be plain wrong. Be ready to recognize the moment at which to trash your lesson plan and improvise.
What is the optimal method for experimental research? Obviously, the answer depends on the subject and on the research hypothesis pursued by your research group. In teaching and training it is the same: Many factors determine how the optimal teaching unit should be structured, such as:
Therefore there is no single best approach, but literally hundreds. The overall setting determines which teaching methods will work best in practice. But how can you systematically construct a teaching unit then?
How to build a training session using some of the methods above? For sure, you cannot just throw a few training methods together randomly. Is there an ideal arrangement for a particular subject. Unfortunately there is not.
You cannot simply copy the plan from one training to another. Here is why:
This is why every lesson is a unique performance. Of course, a well-crafted lesson plan helps, and many things are reproducible. But be ready to improvise.
Each training is a new invention! This is what makes training so rewarding.
Repeating key concepts in increasing intervals is crucial for learning success (the scientific term for this is “spaced repetition”). Thus, repeating is an essential teaching activity that should not be skipped. However, repeating may be difficult to prepare, because you and your participants may be tired at the end of a day/lesson, and repeating easily falls victim to any changes to your plan. Even if everything goes well, your participants may be very eager to code to the very last minute, and interrupting them would be a pity. General strategies to deal with repeating are: