Pop-Up Programming

Blain Patterson, Virginia Military Institute, Applied Mathematics

Sarah Patterson, Virginia Military Institute, Applied Mathematics

Sherif Abdelhamid, Virginia Military Institute, Computer Science

Author Profile
Initial Publication Date: September 12, 2022

Summary

This activity aims to engage students in a low-stakes activity to build confidence and review basic topics such as indexing an array, vector, or matrix. The class is arranged so that the students are seated in a rectangular array as shown below in figure 1. This will be referred to as A. Determine the array's orientation by defining the rows of students as rows in the array and the columns of students as a column in the array. Slides are shown that contain a reference to a single element or a portion of a matrix. If a student's position in the matrix is referenced, they will stand up. Everyone else will remain seated.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

The main learning objectives in this activity include (1) indexing matrices and vectors and (2) extracting data from a matrix. MATLAB commands are used, but the actual use of MATLAB is not necessary for this activity. This is a smaller activity in a larger set of tasks and activities focused on tactile learning for introductory programming courses.

Context for Use

This classroom activity should be done in an introductory programming course and is best suited for smaller classes (less than 30 students). This can be done early in the semester, as it requires very few prerequisite programming skills. Students need to be familiar with basic MATLAB commands that extract data from a matrix. Although this activity was designed to be done at the beginning of the semester, the instructor may include more advanced examples if they wish to implement this later in the semester.

Description and Teaching Materials

Directions
1. Arrange the class so that they are seated in a rectangular array called A.
2. Everyone represents an element in the array.
3. Determine the orientation of the array (location of the first element).
4. The following slides will contain MATLAB commands that reference a portion of a matrix. If your position in the matrix is referenced, stand up. Otherwise, remain seated.
5. If the command references a position in the matrix that does not exist. Make an error buzzer noise.

Commands
A(2,1)
A(4,3)
A(:,1)
A(2,1:2:end)
A(1:2:end, 1:2:end)
A(3)
A(7)
A(:,:)
A(end)
A(:)
A(1:4:13)


Pop-Up Programming (Acrobat (PDF) 92kB Aug30 22) 

Teaching Notes and Tips

This is a straightforward activity that should not require too much additional planning. As with many tasks and activities, it is important to set clear expectations before you begin. For example, make sure that you encourage collaboration and willingness to participate so that students do not feel uncomfortable standing up. These expectations should be set on the first day of class, but it helps to reiterate them before an activity such as this. This is a rather brief activity, so be sure to plan something additional for this day of class. It is recommended that you begin class with this activity and then transition into some indexing problems using MATLAB. Once students feel comfortable with this activity, you could ask students to change seats, then randomly select a few students and determine the indexing that matches the selected students.


Assessment

Since this is a short in-class activity, no summative assessment is necessary. However, it is easy to do a formative assessment of student understanding of indexing and extracting data based on their participation in this activity. It is also recommended that you survey students to capture their perceptions of such activities. Note that this can be done directly following this task or after a series of tactile activities.

References and Resources

[1] Barnes, J., & Libertini, J. M. (2018).Tactile Learning Activities in Mathematics: A Recipe Book for the Undergraduate Classroom (Vol. 54). American Mathematical Soc.