<p><strong>Don't go too far!</strong> 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.</p>

<p>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 <em>was</em> 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.</p>

<p>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 <em>that</em> 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. </p>

<p>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. </p>

CC BY-SA 3.0
2017-07-06T20:26:01.570Z
2017-07-06T20:26:01.570Z
auden
<p>Adding to the already given list, I had good results using <a href="http://trypingo.com/" rel="noreferrer">PINGO</a>.
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.</p>

<p>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.</p>

<p>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.</p>

<p>Remarks:</p>

<ul>
<li>I'm not affiliated in any way to that project.</li>
<li>I'm using the tool in an introductory course in university.</li>
<li>There are probably many other similar tools, but so far I just used Pingo.</li>
</ul>

CC BY-SA 3.0
2017-07-06T14:26:33.983Z
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
CC BY-SA 3.0
2017-07-06T16:11:41.337Z
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
CC BY-SA 3.0
2017-07-06T14:22:46.763Z
2017-07-06T14:22:46.763Z
Sirko
<p>I'll just throw in my two cents from a student perspective - the lectures I follow most closely are the ones which are interactive. </p>

<p>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.  </p>

<p>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 <strong>interact with the subject on their own.</strong>  (not on an obligatory basis - obligatory tasks often killed curiosity to go further/look outside the box, at least in my case)</p>

<p>A few examples:</p>

<ul>
<li><p>voluntary coding challenge (less than X characters / elegant solutions / etc)</p></li>
<li><p>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.)</p></li>
<li><p>Challenging discussions on how / why to do something in what way</p></li>
</ul>

<p>The main problem I guess is, that all of this can be very <strong>time-consuming</strong>.
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. </p>

CC BY-SA 3.0
2017-07-07T09:57:31.420Z
This is an important answer.  See [here](https://cseducators.stackexchange.com/a/1366/27) for some research to back you up :)  Welcome to [cseducators.se]. We appreciate a thoughtful student perspective.  I hope we hear more from you!
Ben I.
CC BY-SA 3.0
2017-07-08T05:40:17.907Z
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
CC BY-SA 3.0
2017-07-07T08:59:59.643Z
2017-07-07T08:59:59.643Z
Cribber
<p>Here are some things I do:</p>

<ul>
<li>Less wordy PowerPoint slides (7x7 rule)</li>
<li>Writing on the board instead of slides</li>
<li>YouTube videos</li>
<li>Interactive lessons - <em>students follow along by editing programs</em></li>
<li>Jeopardy! - <em>to review for tests</em></li>
<li>Greet every student by name</li>
<li>Programming games and contests - <em>works well, but can't do it all the time</em></li>
<li>Humor - <em>with limited success</em></li>
</ul>

<p>These techniques help, but I feel like I can do more.</p>

CC BY-SA 3.0
2017-07-06T14:53:20.013Z
Or better: give up on powerpoint altogether. Or pass out the slides on paper before the lecture so your students don't have to copy them and can write directly on them. Otherwise good advice. Make the students active participants, not passive "consumers"
Buffy
CC BY-SA 3.0
2017-07-06T14:12:53.093Z
2017-07-06T14:12:53.093Z
Edwin Torres
<p>First, <em>no one thing</em> that you can do will solve your issue. You need to have variety. If you <em>just</em> speak you reach a small percentage and lose others. If you just write on the board, same deal. If you <em>just</em> 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. </p>

<p>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 <em>Learning Modalities</em> (the term of art). </p>

<p>Second, and more important, is that learning requires a physical change in the brain itself. There is <a href="http://rads.stackoverflow.com/amzn/click/1579220541" rel="noreferrer">research</a> 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.  </p>

<p>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. </p>

<p>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. </p>

<p>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 <a href="http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2017-06.html#e2017-06-29T16_03_06.htm" rel="noreferrer">blog</a>.</p>

<hr>

<p>Let me also note, self plagiarizing from my answer <a href="https://cseducators.stackexchange.com/questions/1419/what-is-a-good-analogy-to-introduce-databases-and-sql">here</a>, that :</p>

<p>Beware. "The One True Lecture" is an oxymoron. </p>

<p>Trying to achieve it is a sure way to lose everyone. </p>

CC BY-SA 3.0
2017-07-06T17:40:25.450Z
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
CC BY-SA 3.0
2017-07-07T14:08:39.127Z
@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
CC BY-SA 3.0
2017-07-06T16:22:56.127Z
2017-07-06T16:29:35.363Z
2017-07-06T16:29:35.363Z
Buffy
<p>My students love event-driven programming and GUIs.  These become objects of fascination and obsession.  And they are a great vehicle for teaching inheritance.</p>

CC BY-SA 3.0
2017-07-06T23:00:44.853Z
2017-07-06T23:00:44.853Z
ncmathsadist
<p><em>Kill 'em with clarity.</em>  </p>

<p>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.</p>

<p>I started with <a href="http://blog.ted.com/10-tips-for-better-slide-decks/" rel="noreferrer">TED's powerpoint recommendations</a>.  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 <em>7x7</em> 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 <em>altogether</em>, and 0 words is even better.  (I don't always attain this, but that's the goal.)</p>

<p>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 <strong><em>extremely clear</em></strong>.  So, I might construct a graph in small segments based on the order in which I wish to discuss the parts.</p>

<p>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.</p>

<p>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.</p>

<p>The whole enterprise is <em>very highly choreographed</em>, 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.</p>

<p>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.</p>

<p>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.)</p>

<p>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.</p>

CC BY-SA 3.0
2017-07-06T17:16:09.947Z
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.
CC BY-SA 3.0
2017-07-06T17:18:10.247Z
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.
CC BY-SA 3.0
2017-07-06T17:19:44.450Z
Ok, I now understand why that model doesn't work in Java.  Sometimes my reptilian brain goes back to C without me wanting it to.
Chris M.
CC BY-SA 3.0
2017-07-06T17:22:40.400Z
I mean, the chessboard-style mental model *works* in a 2d array until you start doing things like `my2DArray[3] = new int[10]`, and then it starts breaking down really fast. At some point, you need to know how it really works.
Ben I.
CC BY-SA 3.0
2017-07-06T17:36:15.203Z
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
CC BY-SA 3.0
2017-07-06T21:03:17.433Z
@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
CC BY-SA 3.0
2017-07-06T21:12:13.647Z
@Aaron That is news to me. In C (at least with my compiler) it works as it does in Java.  How in the world would you implement a ragged array without an array of references?
Ben I.
CC BY-SA 3.0
2017-07-06T21:18:14.700Z
*I... spoke too soon.*  I was wrong. My version of C does not do as I thought... that seems positively awful to me. This tradeoff is just to avoid following an extra pointer???
Ben I.
CC BY-SA 3.0
2017-07-06T22:09:25.300Z
Honestly, learning about the Java implementation is fine. I'm stuck with Java on account of APCS A, and this provides a great chance to mix working with both stored references and calculated addresses, which are translatable fundamental skills in any environment.  In this instance, I can mention and explain the C way (and its trade-offs) in about 20 seconds if they understand the Java approach well.
Ben I.
CC BY-SA 3.0
2017-07-07T08:48:56.077Z
@BenI. Pointer dereferencing is actually pretty expensive. Traditionally in C (less so nowadays I think) arrays needed to be a constant size known at compile-time anyway, since the compiler wasn't clever enough to dynamically allocate more or less stack. Remember the heap is off-limits in terms of C **language** features; only in the standard library can you use it (and many embedded systems have a more minimal subset of C with no heap). So you would have to put an array of pointers on the stack (thereby taking up more memory), and all the actual arrays (fixed-length) on the stack too.
Muzer
CC BY-SA 3.0
2017-07-07T08:49:50.637Z
@BenI. So if you want ragged arrays you can create an array of pointers and allocate them manually with malloc/free. But if you want known-size 2D arrays, C's way is perfectly adequate and much more efficient efficient.
Muzer
CC BY-SA 3.0
2017-07-07T09:55:04.447Z
@Muzer I understood everything except the bit about off-limits. I would love it if you [came by in chat](https://chat.stackexchange.com/rooms/59174/the-classroom) to help me break that down. Also, I guess I rarely work on problems large/long enough to be getting cache misses, but I do see why the C approach is cheaper for a standard uniform 2D array. Sometimes you really are [better off](https://projecteuler.net/problem=67) with a ragged array, of course.
Ben I.
CC BY-SA 3.0
2017-07-07T12:59:35.297Z
@FedericoPoloni I surely did :) Thanks for the correction!
Ben I.
CC BY-SA 3.0
2017-07-07T16:33:23.823Z
@BenI. wrote "How in the world would you implement a ragged array" Two points here: 1) You can still have an array of pointers which point to arrays which is practically the same thing 2) In all my years I have seen non-square arrays needed so seldom that I don't think it would be an issue even if it were not possible; on the rare occasion you needed one you could use a square large enough to fit your longest raggedy sub-array and ignore the extra, unused locations - intuitively I think that would improve speed in most cases, but could hit memory use depending on how non-uniform the raggedness
Aaron
CC BY-SA 3.0
2017-07-06T16:09:39.110Z
2017-07-07T12:58:59.710Z
2017-07-07T12:58:59.710Z
Ben I.
<p>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 <a href="https://www.youtube.com/watch?v=9Io6EO491h8" rel="noreferrer">this way</a>. 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. <strong>How do you make your CS lectures more interesting?</strong> </p>

CC BY-SA 3.0
2017-07-06T15:23:54.817Z
One word: interaction
Ellen Spertus
CC BY-SA 3.0
2017-07-06T15:37:51.883Z
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
CC BY-SA 3.0
2017-07-07T09:12:21.693Z
Great talk on the topic: https://www.youtube.com/watch?v=5jmN_tBS0t4
asquared
<student-motivation>
How do you make your CS lectures more interesting?
# How do you make your CS lectures more interesting?

(Asked by: username_0 on 2017-07-06)

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](https://www.youtube.com/watch?v=9Io6EO491h8). 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?**

**Tags:** student-motivation

> **Comments:**
> **username_1**: One word: interaction  
> **username_0**: 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.  
> **username_2**: Great talk on the topic: https://www.youtube.com/watch?v=5jmN_tBS0t4  

---

## 7 answers

### Answer by username_7 on 2017-07-06. Score: 20 | Accepted answer

*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](http://blog.ted.com/10-tips-for-better-slide-decks/). 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.

> **Comments:**
> **username_12**: 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.  
> **username_7**: 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.  
> **username_12**: Ok, I now understand why that model doesn't work in Java.  Sometimes my reptilian brain goes back to C without me wanting it to.  
> **username_7**: I mean, the chessboard-style mental model *works* in a 2d array until you start doing things like `my2DArray[3] = new int[10]`, and then it starts breaking down really fast. At some point, you need to know how it really works.  
> **username_0**: 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.  
> **username_13**: @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.  
> **username_7**: @username_13 That is news to me. In C (at least with my compiler) it works as it does in Java.  How in the world would you implement a ragged array without an array of references?  
> **username_7**: *I... spoke too soon.*  I was wrong. My version of C does not do as I thought... that seems positively awful to me. This tradeoff is just to avoid following an extra pointer???  
> **username_7**: Honestly, learning about the Java implementation is fine. I'm stuck with Java on account of APCS A, and this provides a great chance to mix working with both stored references and calculated addresses, which are translatable fundamental skills in any environment.  In this instance, I can mention and explain the C way (and its trade-offs) in about 20 seconds if they understand the Java approach well.  
> **username_14**: @BenI. Pointer dereferencing is actually pretty expensive. Traditionally in C (less so nowadays I think) arrays needed to be a constant size known at compile-time anyway, since the compiler wasn't clever enough to dynamically allocate more or less stack. Remember the heap is off-limits in terms of C **language** features; only in the standard library can you use it (and many embedded systems have a more minimal subset of C with no heap). So you would have to put an array of pointers on the stack (thereby taking up more memory), and all the actual arrays (fixed-length) on the stack too.  
> **username_14**: @BenI. So if you want ragged arrays you can create an array of pointers and allocate them manually with malloc/free. But if you want known-size 2D arrays, C's way is perfectly adequate and much more efficient efficient.  
> **username_7**: @username_14 I understood everything except the bit about off-limits. I would love it if you [came by in chat](https://chat.stackexchange.com/rooms/59174/the-classroom) to help me break that down. Also, I guess I rarely work on problems large/long enough to be getting cache misses, but I do see why the C approach is cheaper for a standard uniform 2D array. Sometimes you really are [better off](https://projecteuler.net/problem=67) with a ragged array, of course.  
> **username_7**: @FedericoPoloni I surely did :) Thanks for the correction!  
> **username_13**: @BenI. wrote "How in the world would you implement a ragged array" Two points here: 1) You can still have an array of pointers which point to arrays which is practically the same thing 2) In all my years I have seen non-square arrays needed so seldom that I don't think it would be an issue even if it were not possible; on the rare occasion you needed one you could use a square large enough to fit your longest raggedy sub-array and ignore the extra, unused locations - intuitively I think that would improve speed in most cases, but could hit memory use depending on how non-uniform the raggedness  

---

### Answer by username_9 on 2017-07-06. Score: 8

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](http://rads.stackoverflow.com/amzn/click/1579220541) 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](http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2017-06.html#e2017-06-29T16_03_06.htm).

---

Let me also note, self plagiarizing from my answer [here](https://cseducators.stackexchange.com/questions/1419/what-is-a-good-analogy-to-introduce-databases-and-sql), that :

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

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

> **Comments:**
> **username_0**: 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.  
> **username_10**: @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.  

---

### Answer by username_3 on 2017-07-06. Score: 7

**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.


---

### Answer by username_4 on 2017-07-06. Score: 6

Adding to the already given list, I had good results using [PINGO](http://trypingo.com/).
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.

> **Comments:**
> **username_0**: 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.  
> **username_5**: 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 username_4 does a good job!)  

---

### Answer by username_6 on 2017-07-07. Score: 6

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.

> **Comments:**
> **username_7**: This is an important answer.  See [here](https://cseducators.stackexchange.com/a/1366/27) for some research to back you up :)  Welcome to [cseducators.se]. We appreciate a thoughtful student perspective.  I hope we hear more from you!  
> **username_8**: 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....  

---

### Answer by username_0 on 2017-07-06. Score: 5

Here are some things I do:

* Less wordy PowerPoint slides (7x7 rule)
* Writing on the board instead of slides
* YouTube videos
* Interactive lessons - *students follow along by editing programs*
* Jeopardy! - *to review for tests*
* Greet every student by name
* Programming games and contests - *works well, but can't do it all the time*
* Humor - *with limited success*

These techniques help, but I feel like I can do more.

> **Comments:**
> **username_9**: Or better: give up on powerpoint altogether. Or pass out the slides on paper before the lecture so your students don't have to copy them and can write directly on them. Otherwise good advice. Make the students active participants, not passive "consumers"  

---

### Answer by username_11 on 2017-07-06. Score: 2

My students love event-driven programming and GUIs. These become objects of fascination and obsession. And they are a great vehicle for teaching inheritance.


---

