“Make it matter” for students by experimenting with new and interesting topics for assignments and projects, and by using varied examples in your lectures and other materials. Students are more likely to persist in the face of a challenge when what they are learning is relevant to their life experiences and goals. Use examples that have broad appeal, place assignments in contexts that interest students, and explain how a particular idea is used in different contexts.

Some suggestions

Don’t assume what’s meaningful; find out! Don’t rely on your notion of what’s interesting and meaningful, and certainly don’t rely on stereotypes. Find out from your students--and from the students you want to recruit--what is meaningful to them! Surveys and clicker polls are a great tools for this.

Keep keeping it real. Don’t relegate the discussion of larger context to the beginning of a course. Keep bringing students back to the real world application of what they are learning. This can be as simple as showing how a concept is used in a familiar application or program (e.g., how hash maps are used in natural language processing to predict what a user will type into a search engine).

Highlight the people. To help students see the people behind the concepts, refer to the contributions of an individual or group. A great story is Grace Hopper and her team at Harvard University finding a literal bug in one of their machines.

Examples from the collection

Resources

Talking to Your Silicon Friend

In this lab, students work through an introductory problem to have a simple conversation with a computer program they have written. The computer prints a greeting message, and then asks the user five questions, and responds in an appropriate manner. This activity is good to get students familiarized with simple i/o.

Rational Number Object

In this assignment, students demonstrate their understanding of classes and implementing mathematical ideas with object-oriented programming concepts by writing a class that represents a rational number. Students maintain information about the rational number, noting that the number is represented in its reduced form at all times (for which students need to write a recursive subroutine to find the GCD of two integers). Students implement several methods to perform arithmetic operations on rational numbers.

Sieve of Eratosthenes

In this assignment, students use an ancient method for finding prime numbers known as the Sieve of Eratosthenes to determine all the prime numbers in a range of numbers. Students being with a list of integers, and maintain an array of booleans to maintain whether a number is prime. This activity is a good introduction to more complex mathematical logic used in programming.

Competitive Pig Game

In this activity, students build the game "Pig", and implement a computer player for the game. There are two rounds, where the human plays first in round 1 and the computer plays first in round 2, in order to eliminate any advantage.

Heapsort

In this activity, students exercise their understanding of heap sort by implementing it in Java in the context of sorting an array of cards and an array of integers. Students use a built in Comparable interface to assist with the heap sort. Students are also advised to use recursion in the Heapify subroutine found in heap sort. This is a very focused activity testing students' understanding of a sorting algorithm.

Quicksort

In this activity, students exercise their understanding of quicksort by implementing it in Java in the context of sorting a deck of cards. Students use a built in Comparable interface to assist with the quicksort. Students are also given the option to give performance comparisons with heapsort and merge sort. This is a very focused activity testing students' understanding of a sorting algorithm.

Mergesort

In this activity, students exercise their understanding of merge sort by implementing it in Java in the context of sorting an array of cards. Students use a built in Comparable interface to assist with the merge sort. This is a very focused activity testing students' understanding of a sorting algorithm.

Cardset Object

In this activity, students exercise their understanding of classes and objects in order to build a class that stores a set of cards. The set of cards is backed by an array, and students implement methods to add and discard cards, check the high and low ranks of the hand, and check if the hand contains a pair, a flush, or a straight. This activity is good for students that are being introduced to classes.

A Fistful of Pointers

In this assignment students implement a singly-linked list implementation of a provided List ADT in C++. Students are provided with a class definition of the desired List ADT and are asked to implement all methods; they are also provided with a program to test it and the expected output of that program. This resource is appropriate for students to understand the role of ADT specifications, their implementation, and testing programs.

First Job

In this assignment students create a C++ program that fills a matrix with a specified pattern. Students are provided with a class definition of the desired matrix and are asked to implement all methods and to write a program to test it. This resource is appropriate for students in the early stages of a data structures class in order to exercise their understanding of classes, methods, memory management, and nested loops.

Subscribe to Use Meaningful and Relevant Content