# How do you make your CS lectures more interesting?

My biggest challenge each semester is keeping students engaged in class. It's obvious that most of them would rather be somewhere else. I don't know if it's the students, my lecture, or both. I wish I had the resources to present a lecture this way. I believe that generating interest is just as important as the content itself, because this builds a passion for CS that will fuel future learning. How do you make your CS lectures more interesting?

## locked by Ben I.♦Oct 14 '17 at 19:32

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.

• One word: interaction – Ellen Spertus Jul 6 '17 at 15:23
• I totally agree. It's great when there's more interaction. Learning all their names helps. But I find some students are just not comfortable participating. – Edwin Torres D.Eng. Jul 6 '17 at 15:37
• Great talk on the topic: youtube.com/watch?v=5jmN_tBS0t4 – asquared Jul 7 '17 at 9:12

Kill 'em with clarity.

I have a working memory that borders on handicapped, which has forced me into a solution that I have not seen others do. This is going to sound like total anti-orthodoxy, but I actually focus very heavily on my Powerpoints to keep things moving and breezy, and it really can work! Fair warning, though: doing this well takes a tremendous number of hours to pull off. It is not unusual for me to throw 2-4 hours into making a single slide.

I started with TED's powerpoint recommendations. Many of the top talks there utilize PowerPoints, but take a look at those slides and you'll see something funny: there is virtually no text at all. The 7x7 rule (no more than 7 lines of text, no more than 7 words per line) doesn't make for interesting slides. I aim for no more than 5 words altogether, and 0 words is even better. (I don't always attain this, but that's the goal.)

My slides consist almost exclusively of graphics and figures for discussion. The graphics are often heavily animated. Very little of the animation is aimed at being cute or funny. The huge majority is designed to make sure that the concepts are extremely clear. So, I might construct a graph in small segments based on the order in which I wish to discuss the parts.

For instance, when I talk about how two dimensional arrays are stored in memory, I begin with a graphical representation of how I suspect my students typically imagine it, and then have pieces fly out or fade in, slowly replacing the fictitious model with the correct systems one at a time, giving me a chance to talk about each new element.

The other thing I build into the slides is the activities I want the kids to do. "Try this exercise!" "Look at this prompt and work with a partner." "First one to write the correct answer on the board wins!" This was at first a nod to my terrible memory, but it has actually helped the pacing in my classroom as well.

The whole enterprise is very highly choreographed, and after every lecture I give, I make notes on any place where kids seemed to fall off. If it slowed down or became unclear at any point, I rework that section, often very thoroughly.

There are still limits, and it is still lecture. After about 30 minutes, kids will still start to very seriously drift if they don't have other things to do. However, the feedback I have received about clarity has been very consistent.

One addition I intend to make this year is pre-made notes for every lecture with blanks for them to fill in as we go, and integrated exercises that they can work on at various times throughout the lesson. (Again, this is all highly choreographed.)

What I like about the system is that, as I hone it over the years, it really does get more and more effective. It also provides me with a nice set of resources that I can share if students need to review material.

• I would very much like to see your 2d array stuff flying in and out, to get a sense of what you think a student's misconceptions are. One of my courses is C for Java programmers, so there are some habits to break, but I'm curious what you've seen students get wrong from the start. – Chris M. Jul 6 '17 at 17:16
• They start off by thinking of it as a 2D grid instead of a single stack reference pointing to a single array of references to other arrays. – Ben I. Jul 6 '17 at 17:18
• This is an area that I can definitely improve. Your response reminds me of how Steve Jobs meticulously prepared for his presentations. Every word was perfectly place perfectly. He practiced his presentations over and over until he was satisfied. I need to put more effort into the content and delivery of my presentations. – Edwin Torres D.Eng. Jul 6 '17 at 17:36
• @BenI. It's funny to see the miscommunication between you and Chris given the class he mentioned. What you describe is how arrays work in Java, but that is not how they work in general, though there are some other languages which approach it similarly to Java. You need to be careful when teaching, or your students will think that is The way. You will find in other languages that a 2D array is really just a 1D array big enough to hold N by M elements all in 1 continuous block. In fact, that is what I thought you were going to bring up in response to common misconceptions. – Aaron Jul 6 '17 at 21:03
• Ragged arrays have language support in C# but I had not seriously thought about them before I learned that. Some of these great ideas really seem more like fringe concepts to me. I tend to skirt around them when teaching and stick to the middle of the road. Of course, over time, the fringe comes to seem mainstream to younger people... "Improvement makes straight roads, but the crooked roads, without improvements, are roads of genius." - Blake – user737 Jul 6 '17 at 22:03

First, no one thing that you can do will solve your issue. You need to have variety. If you just speak you reach a small percentage and lose others. If you just write on the board, same deal. If you just use powerpoint, same deal (maybe worse). If you just show youtube videos, etc etc. You need to use a variety of things. Good advice is not to "lecture" for more than about 10 minutes at a time without introducing some other, reinforcing, activity.

The reason for the above advice has to do with attention span but also with the fact that different people learn differently and few of your students will (can) learn like you do. If you are teaching you probably have a set of characteristics that, while not unique, aren't very widely shared. So don't try to teach people just like yourself. Look up Learning Modalities (the term of art).

Second, and more important, is that learning requires a physical change in the brain itself. There is research on this (both pedagogical and medical). In order for that rewiring to take place the student needs to be engaged with the material, not just watch it pass by in a lecture. One of the best ways to force this engagement is to use Active Learning techniques and Teamwork.

So, you can give a short lesson and then give the students an activity that reinforces it. Let them ask questions. Make them answer questions. Let them work together to come up with a good question. Write a program. .... Lots of tricks.

Also, don't expect that anything you say or teach just once will be actually learned. You need to reinforce everything you say by returning to it later; not necessarily with a second lecture and not immediately, but some sort of reinforcement. One of the tricks I use is to introduce (maybe in an exercise) a dead-simple version of a sophisticated topic early in the course. Students hear a few words of terminology and get a feel for what is going on without knowing everything. Then later, return to the topic in depth.

For example, many compiler courses start with a very simple first project that has all of the phases of compilation in a few hundred lines. Students see how the pieces fit together. Then move on to discuss things in detail, scanning, parsing, etc. Eugene Wallingford recently discussed this, explicitly, on his blog.

Let me also note, self plagiarizing from my answer here, that :

Beware. "The One True Lecture" is an oxymoron.

Trying to achieve it is a sure way to lose everyone.

• I am guilty of teaching in a way that I would understand. Sometimes I forget that these students of < 1 year of programming and I have > 20. I like your suggestion to have a short lesson + an individual or team activity. That'll take some effort, but I have time. – Edwin Torres D.Eng. Jul 6 '17 at 17:40
• @EdwinTorres Your point is well-made and too-frequently misunderstood. If you already understand a concept, you can probably find a way to explain it very clearly and cogently. If I don't already understand it, that clear, cogent explanation is, all too often, meaningless. Being able to explain it based on what context the STUDENT has ... that is priceless. Best "recovery" I've seen from this was to present the answer, then "break it down", exploring parts of the breakdown based on feedback from the student(s). Give them a "goal" (the initial explanation) then guide them to the goal. – Meower68 Jul 7 '17 at 14:08

Don't go too far! Technology isn't the solution to your problems. I say this because I honestly have seen teachers who see technology as this magical god that will swoop in and save them from their troubles. A lecture that's pure powerpoint and talking and example can be great, and a lecture that's got every little tech widget and infographic and diagram can be a drag.

The real solution is to think about what you want to say, and say it well. I had a math teacher. He had fifty minutes for class. Most of the time, he spent only fifteen to twenty minutes on the lesson, and then let kids get going on the homework, and spent that time bopping around helping those who needed it. Everyone loved that class, because he explained things succinctly and well. Note that that was an "advanced" class, but I really think that things are no different in normal classes. I'm not saying you should use only part of your class time - I'm saying you should be succinct.

It's said that if you give a man a fish, you feed him for a day, and if you teach a man to fish, you feed him for a lifetime (excepting that one SMBC comic). I would adapt it to say that if you spoonfeed facts, you teach them for an A, if you let them discover facts, you teach them for life. So the more examples, interactive work, and intuitive explanation you've got the better. There was a day in geometry where we were talking about arcs. The teacher put the formula for arc length up on the board. I looked at it and started zoning out, like, where did that come from? And when I went home that day, I ended up looking up what the definition of a radian was, and I figured out how to derive it. I will never, ever forget the formula for arc length, or how to derive that $2\pi \text{ rad} = 360^\circ$. Ever.

Practice your delivery, and nail your presentation. Like @BenI. says, don't give them a wall of text - give them animations and diagrams, that aren't gimmicky, but say what they need to say. Exercises, follow alongs, challenges, all good. Over reliance on tech to hold attention - bad.

Adding to the already given list, I had good results using PINGO. It's a little tool that let's you do small quizzes within the lecture. Students will use their mobile phones to give their answers (no registration required for them). I usually do one or to quizzes after each small topic - resulting in 5 to 10 quizzes per 90min lecture.

The result can be shown immediately using a projector. If the share of wrong questions is too high (I usually used a threshold of about 25%) I can try to explain the topic differently and clarify on misconceptions.

Students appreciated the interactivity and direct feedback. As the quizzes are done anonymously, so nobody can be blamed for wrong answers. This usually led to about 3/4 of the students participating (100+ students in the audience) and oftentimes to an active discussion about the results afterwards.

Remarks:

• I'm not affiliated in any way to that project.
• I'm using the tool in an introductory course in university.
• There are probably many other similar tools, but so far I just used Pingo.
• Thanks. I will look into that. I've seen hardware devices that use this technique. The fact that you can bring your own mobile device (or classroom computer) makes it more usable. This would be helpful for my earlier lectures that discuss concepts and terms. – Edwin Torres D.Eng. Jul 6 '17 at 14:26
• My personal experience has been less than positive with this. Some of us don't have phones capable of participating (and some even turn their phones off in lectures!); it never runs smoothly enough (perhaps PINGO is less terrible); and has rarely been used to test anything worthwhile (i.e. represents an annoying stall for students who can keep pace). Use of such systems suggests to me a lecturer who substitutes real interaction and running enthusiasm for intermittent opportunities to become distracted. Just my experience, but I think it is easy to run badly (I'm sure Sirko does a good job!) – VisualMelon Jul 6 '17 at 16:11

I'll just throw in my two cents from a student perspective - the lectures I follow most closely are the ones which are interactive.

No matter how good a person can present a subject, if I can somehow interact with the subejct (starting from having to think for 2 minutes about possible solutions all the way to a "coding contest" over the course of 2 weeks) the motivation and the learning process are taken to a entirely different level.

I had fantastic lectures during which the professor "only" talked / showed powerpoint slides, but I had even better ones where the prof might not have had the same rethoric ability, but was able to integrate students and lead them to interact with the subject on their own. (not on an obligatory basis - obligatory tasks often killed curiosity to go further/look outside the box, at least in my case)

A few examples:

• voluntary coding challenge (less than X characters / elegant solutions / etc)

• Playful learning (a prof used a 2D jump-and-run game, that you had to add to by developing it yourself - e.g. change the variable "maxJumpHeight" to be able to jump over an obstacle in the 2D game-world.)

• Challenging discussions on how / why to do something in what way

The main problem I guess is, that all of this can be very time-consuming. So I guess at some level you need to balance it, introduction with a (e.g.) playful learning approach, to catch motivation for coding, enhance interest in the subject, then "powerpoint" lectures to explain how it all works.

• This is an important answer. See here for some research to back you up :) Welcome to Computer Science Educators. We appreciate a thoughtful student perspective. I hope we hear more from you! – Ben I. Jul 7 '17 at 9:57
• Very true, and I will add that this is how I have interested high school and even middle school students in advanced CS concepts. Look into games and puzzles you can play to start exploring key concepts. Combinatorics and graph theory are particularly ripe for a puzzle approach; some recommended googles include: Spot It, Set card game, Lazors, One Touch Draw.... – Wildcard Jul 8 '17 at 5:40

Here are some things I do:

• Less wordy PowerPoint slides (7x7 rule)
• Writing on the board instead of slides