I am a PhD student from central Europe and I am teaching an introductory class on programming at my university.

I know that in the US, humour or a joke is often used at the beginning of a presentation. My first 2-3 sentences are right to the point, but I would like to include also a small joke or humour at the beginning.

But what would be a good joke in this situation? A friend of mine suggested to start with "welcome to bird watching 101", just some ridiculous wrong title, or starting with a fun fact about myself.

Any suggestions on how to start with humour?

Background info: Last semester my class received a nice award as among the top 5 classes of my rather big university. To some part it was due to the tips I got at stackexchange.com :-) But I would like to constantly improve my teaching.

  • 23
    Any suggestions on how to start with humour? — Be actually funny (great help, eh?), avoid all possibly sensitive topic. Alternative advice: if you have to think about it, don’t do it… you can’t plan wit!
    – F'x
    Nov 20, 2012 at 16:10
  • 22
    I think professional comedians would disagree with "you can't plan wit"
    – Suresh
    Nov 20, 2012 at 17:31
  • 4
    Any joke that not especially tailored to your course, character and background will surely be old and overused by now. You really have to go with something subject-specific, or teacher-specific. Try to build your own character in front of the blackboard - in the end teaching is speaking in front of an audience, so it is not too different from acting. Nov 20, 2012 at 19:46
  • 24
    Don't tell this one: Q: Why do programmers think trees have roots at the top and leaves at the bottom? A: They've never been outside.
    – JeffE
    Nov 21, 2012 at 1:49
  • 11
    A funny one right on this topic, heard from Michael Saunders: "Your slides should always contain a theorem and a joke. And they'd better be distinct." Nov 22, 2012 at 11:10

7 Answers 7


I use humor extensively in class. I do not try to get off topic though. I think it is important that the students see the teacher as 'serious.' I do believe that a teacher can use humor but still be serious.

I don't think I ever start a class with a joke. I'm much more likely to start quite directly, giving an overview and stating the importance of the course.

Remember to target your choices to your audience. For example, if your audience is 18-21 then relating something to dating is usually fun for them. For example, if you're discussing for-loops, then you might want to talk about what happens when trying to get someone to go on a date with you.

For counter = 1 to 100 (or if you are a girl, perhaps just 1 to 3)
    if prospect(counter).AcceptsDate then
        exit for

Keeping on topic is important but there is no reason why you can't keep it fun.

  • 13
    By the way, I'd be careful about dating humor, since not everyone will agree on what's funny and dating can be a sensitive subject. However, it can be a great way to get a young audience's attention. Nov 22, 2012 at 17:07
  • 3
    Personally, I avoid humor for the sake of humor; therefore, I think starting with a joke many times feels forced. However, humor many times serves a pedagogical function. For example, it is easy for students to remember a funny example, introducing the odd joke in your lecture keeps people awake. Basically, think of making the class interesting rather than focusing on humor per se.
    – user14382
    Apr 26, 2014 at 1:51
  • @AnonymousMathematician: I agree. Dating jokes will easily be perceived as politically incorrect in some departments. They usually do just well in engineering classes though.
    – VH-NZZ
    Apr 27, 2014 at 10:35

This question seems long answered but here are two things I've done:

1) I've given out an impossible syllabus, requiring students to be fluent in at least two languages, adding deliberately indecipherable requirements, etc., etc. When invariably someone protests "This is not at all what we were expecting!" I say "Well then what were you expecting?" When they answer I say, "Oh! Well then I guess I'll just teach that instead!" and then tear up the syllabus with a flourish.

2) I started teaching at graduate level when I was 28 (can't really get away with it any more) and I would sit in the back of the class on the first day. Students would come in and do their usual first day things. I'd wait until I was maybe five or ten minutes late and let some comments drop along the line of "Where IS this teacher?!" rolling my eyes. Finally I would jump and say "Screw this, I'll teach the class myself!" before launching into the lecture.

In both cases the goal was to let the students know that I'm on their side, one of them, approachable, and not to take things too seriously. Got pretty good results every time.

  • 2
    I like the use of self-deprecating humor to this end as well. It works well in the flow of things when I have made a mistake in a lecture, or in particular I've used it when I have a hard time pronouncing particular words.
    – Andy W
    Apr 28, 2014 at 11:37
  • Andy, exactly. And in what I teach (computer programming) making REPEATED mistakes is part of the process so if I can't laugh when I'm doing it what chance do my student have?
    – Raydot
    Apr 30, 2014 at 22:53

Memes are funny, and popular, and students these days tend to identify with them. You can easily create course-related memes and stick them in your lecture slides, or on a handout or the syllabus, etc.

Here is a good place to go make a meme and then download it. Like this: enter image description here


Think about what's the purpose of starting with humor: a useful rule in teaching is that you need to pick up students where they are now. You have to engage them by attaching to something that is already on their mind or that they already know about, and then you can gently lead them towards what you want to teach. Also, if you manage to create emotions in students during a lecture, they are more likely to remember also the academic content.

So humor in a class can serve two ways: To link the content of your lecture to students' everyday lives, and to engage them emotionally. To achieve this, you should pick jokes that in fact link everyday things to the content of your lecture. For example, in a class on research methods I once taught, I started each lecture with a strip of PhD comics that fitted to the topic of the lecture. Also earthling's answer has a nice example how to relate students' everyday live to a programming topic.

Also, if you can't come up with a suitable joke, don't worry: there are a lot of other ways to achieve the same purpose. For example, you could link to a recent story in the news, local events on campus, or in fact anything that most students are aware of and that you can somehow link to the content of your class. For example, already some years ago, Mercedes had problems with cars falling over in zigzag driving tests. That would make a nice start for a lecture about vehicle dynamics: "Today we are going to learn how to avoid this..."

Concerning the emotions, humor creates fun, which is a good emotion to help remember things. Think of other emotions, and how you could create them in a class.

  • 1
    And there are many strips of xkcd.com you can directly link to some algorithms or IT issues, e.g. Hamiltonian path, Traveling Salesman Problem, Array Indices and so on... Nov 21, 2012 at 22:28
  • 2
    I did what @Piotr did quite often in my intro physics sections, namely start the class by showing an XKCD comic (relevant to the day's topic, when I could find one) while students were walking in. Most of them didn't get it :-(
    – David Z
    Nov 27, 2012 at 1:57

Two tricks

A couple of years ago I attended the PhD defense of a fellow student. That was in the overly stern math department of a fairly stern university. Therefore, any venture into making jokes had to be carefully pondered.

Although his defense talk was projected as attendees were entering the room, the PDF viewer’s window wasn’t maximized so that one could openly see other elements from his desktop.

I thought to myself: “Weird, why would he go through the trouble of plugging his computer and beaming his screen but not having his talk fill the screen?”

As I and many others had arrived early to get a good spot, I started exploring his screen that he had skillfully filled with many small Easter eggs, key among which was the PDF file name that you could read in the window title bar. It read something like:


When time came for him to get started, he just maximized the window and gave his talk. I hardly remember any other talk I attended but this one struck me.

Another one, which I did myself when giving a seminar talk, was the introduction a blue slide in the middle of my talk. I just knew that my talk would be boring as hell to those uninitiated attendees (> 99 %) and I hated it when, as a speaker, you see the audience’s attention drifting away. So I carefully reproduced the blue image shown when the projector has no input signal. When I hit the slide, I could see everyone happy at the idea that the talk would be shortened. Yet the next slide said (still on a blue background):

This is the projector speaking:

Your talk is easily the most boring one I’ve ever projected, please wrap it up soon.

Of course everyone laughed and bore with me until the end.

  • Though the second one does sound like a good gag, I would think twice about doing anything openly self-deprecating in a talk. Some speakers get into the habit of constantly undercutting themselves and their work...and to a distressing extent the audience semiconsciously buys into it. But: if the "mistake" or the self-deprecation has a clear payoff in an otherwise spotless talk, this can be very effective and entertaining: essentially you're making the idea that you could have done something wrong the premise of the joke, with the clear moral being that they were wrong to buy into it. Mar 7, 2015 at 17:51

I'm not particularly funny, so I don't try to push jokes that I know are not going to come across as witty or well done, and instead will just make an awkward situation.

Instead, I just tell stories that try to relate a disengaged audience with the topic I have at hand.

For example, if you are going to talk about -for- loops, you might try and start talking about the necessity of having a guy doing the same work over and over, but with the capability of counting up or down.

If you are introducing pointers (man I hate pointers), you might try giving a real life example of how a pointer would work in a city for example.

I've learned that if you try and be funny the results can be bad, but these short stories will allow your students to have a better idea of why the topic is relevant.


(to an extent, this echoing one of the advice by silvado)

What I always liked on those better ones of my teacher and what I found myself doing as well (though not preparing for it really) was to cast examples connecting the discussed matter to real world and then twist it in a humorous way. This definitely doesn't mean opening with a joke. I do not find it necessary to capturing the audience with a joke already at the beginning. I need their focus and attention later on, when the discourse becomes rather dense. I am sure in any field it is possible to come up with examples for discussed matter which relate by a metaphor, or in a hyperbole to everyday situations in family, among friends, or in recent news.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .