Here's an article on how to use humor in the classroom, especially in those classes that students all have to take but don't necessarily see as relevant to their major.
As the authors note:
"Humor is a valuable teaching tool for establishing a classroom climate conducive to learning. This article identifies opportunities for incorporating humor in the college classroom, reviews the impact of humor on learning outcomes, and suggests guidelines for the appropriate use of humor...Appropriate and timely humor in the college classroom can foster mutual openness and respect and contribute to overall teaching effectiveness."
They go on to say:
"Humor is a catalyst for classroom "magic," when all the educational elements converge and teacher and student are both positive and excited about learning. Instructors can foster classroom "magic" through improved communication with students by possessing a playful attitude and a willingness to use appropriate humor."
Humor in the classroom helps to reduce the anxiety students feel and makes for a positive learning environment. Last night I gave a 90 minute exam. At the beginning of class which started at 6pm, I looked at the clock on the wall and said they had until 6:34pm to finish. I then started laughing, realizing that I meant to say 7:34pm. The students also laughed which helped them to relax a little before starting the exam.
In another class this week, there were a number of students who came in tardy which is actually very unusual in my classroom. It turned out that there was an event on campus that had filled up the parking lots. However, I was lecturing and every 2-3 minutes another student would come into class. The first one I ignored, the second one I stopped and looked at, the third one I made a comment. By the fourth person I paused and started laughing. Obviously something was going on out of the ordinary. I then accused the students of all standing outside the classroom text messaging each other and deliberately sending in one late student at a time. The class thought it was hilarious. It made the point that I was paying attention and yet didn't place any blame. I find humor a good way to control the classroom.