According to Hattie, time on task has an effect size of .49 but to do this effectively, teachers need to spend time planning and predicting how a lesson will unfold, which correlates to an effect size of .76 (Visible Learning, 2018). Though not explicitly mentioned, idle hands may lead to idle minds. Executing effective strategies keeping students on task and engaged will lead to greater learning outcomes.
Goodwin and Hubbell recommend aiming for "bell-to-bell" learning to ensure every minute has a plan and a purpose (2013, p. 133-134). To do this, they suggest planning out lessons into different chunks of time (2013, p. 133-134). By doing so, teachers can better aim for how time is spent in class and how to adjust activity pacing while gauging student understanding.
The first few minutes of class are critical to setting the pace. Depending on the school environment, bookkeeping and administrative tasks cannot be forgone, but are valuable minutes none-the-less (Goodwin & Hubbell, 2013, p. 129-130). Saloviita found that the average time lost to the start of class averaged to about 6 minutes, noting an 11% loss in a 45 minute period (2016).
Something I admittedly struggle with doing, but recognize the significant benefit of, is implementing bell ringers right from the beginning of the class (Finley, 2013). These short exercises ensure students have something to be engaged in right from the outset. This has the added bonus of giving educators time to take care of administrative tasks like taking roll, getting the days lesson ready to go, etc. In computer science, there are several things we can do for bell ringer exercises.
The first is to give students little brain-teaser exercises to do. This could range from writing some short code to accomplish a task, tracing through some code, or practicing some test questions. The last one on that last is a favorite of mine as it provides practice throughout the year for the AP test most of the students are preparing for at the end of the course. To the first item, there is one particularly useful resource I like to recommend to Java and Python CS educators called CodingBat which essentially a bunch of short exercises on various concepts. It has the added extra benefit of allowing teachers to see student progress, how many attempts, and other useful metrics.
It should not be a surprise nor a secret that students find lectures to be boring and ineffective. One study found that undergraduate students in traditional lectures are 1.5 times more likely to fail than students using active learning methods (Freeman et al., 2014). Imagine now what that may be like for the average high school student. My first year of teaching looked like the traditional lecture and my students looked like the image on the side here (and rightfully so).
The good news is that there is no reason this needs to be the case in CS education. Coding is a very active and project-based by nature. What I learned is that if I lectured for more than 10 minutes, I'm probably trying to provide too much information. A goal and pseudo-promise I make to my students is that I keep my lectures to 10 minutes or less and this has made for a much more engaging classroom experience.