In this assignment, students have the opportunity to connect their Java programs in their favorite IDE to Twitter to determine some interesting information about the feeds of their choice. Students have to apply what they've learned about string manipulation, sorting, ArrayLists, and finding the maximum value in a collection of items in order to achieve the goal of determining a Twitter user's most common and non-common word they've tweeted in their last 2,000 tweets.
There are many recommendations for this assignment, which can be viewed in the attachments ("Instructor Recommendations").
Most importantly, if your school has restrictions on creating social media accounts, there are suggestions within on how to deal with that issue.
The Twitter assignment teaches students how to connect their Java programs to a real-time data stream using a freely available API. Aside from practicing the concepts mentioned above, the most significant outcome of this assignment is that beginning CS students have written a program to interact with other real-world programs, like Twitter. Once they see how little code is needed to connect a program they create to a program like Twitter, they will be empowered to explore other data sources without thinking they are out of reach, thus making this assignment meaningful and relevant.
In Part III of this assignment students choose their own topic to investigate and so this assignment employs the engagement practice, Incorporate Student Choice.
To help students see Interdisciplinary Connections, consider asking a social science faculty member or graduate student to talk about how their field uses Twitter data. Alternatively--or in addition--challenge students to conduct library searches on the way researchers are making use of Twitter data. This may help students hone the kinds of questions they are asking of their data.
Materials and Links
Computer Science Details