
Oct. 24, 2008
Students halfway through their first course in computer science at Michigan State University used their new programming skills to analyze word usage in the recent vice presidential debates.
The class CSE 231, Introduction to Programming, enrolls more than 200 students in fall and spring semesters. The majority of students who take the course are freshmen and sophomores.
After just eight weeks of learning the Python programming language, students were given an assignment: create “tag cloud” software to analyze the recent vice presidential debate between Alaska Gov. Sarah Palin and U.S. Sen. Joe Biden.
Tag clouds are graphical representations of how frequently a word appears. They are commonly found on blogs or social networking sites, but they also are useful for analyzing speeches. The class wrote programs that applied this tool to a transcript of the vice presidential debate. This allowed them to see the emphasis each candidate placed on certain words.
From the tag clouds they created, students could observe that the candidates both talked the most about “John McCain.” Both frequently used the word “tax”, but Palin emphasized “America” and “American”, neither of which shows up in Biden’s set. “War” and “economy” were seldom mentioned, and even the word “change” was barely noticeable.
“The assignment was great because it was something that allowed me to put my new programming skills to use, doing something that was actually relevant,” said Christopher Heuser, a freshman in MSU’s Lyman Briggs College. “I was motivated by genuinely wanting to know what the results were going to be.”
It was great that the result was visually appealing, rather than a simple printout of numbers. It made me feel accomplished.”
Richard Enbody and Bill Punch, associate professors of computer science and engineering, said it is an accomplishment for freshmen to develop political analysis software after little instruction in basic programming.
Punch, who is teaching the course, said that Python allows new programmers to build practical applications in a short amount of time. This helps to motivate students.
“Python enables them to do more data analysis,” Punch said. “The machinery that Python provides makes practical applications easier to implement.”
MSU is using this up-and-coming programming language in the introductory computer science course. Punch and Enbody are writing a textbook to support this new approach.