Module Overview
POP77001 Computer Programming for Social Scientists
Syllabus Blackboard
Introduction Introduction (pdf)
This module provides foundational knowledge of computer programming concepts and software engineering practices. It introduces students to major programming languages and workflows for data analysis, with a focus on social science questions and statistical techniques. Students will become familiar with R and Python, two principal programming languages used in data science and research. This course covers basic and intermediate programming concepts, such as objects, types, functions, control flow, debugging in both procedural and object-oriented paradigms. Particular emphasis will be made on data handling and analytical tasks with a focus on problems in social sciences. Homeworks will include hands-on coding exercises. In addition, students will apply their programming knowledge on a research project at the end of the module.
Instructors
- Tom Paskhalis, Office Hours: Friday 11:00-13:00 in-person or online (booking required)
- Teaching Fellows:
Module Meetings
- 2-hour lectures
- Monday 09:00-11:00 in 3051 Arts Building
- 2-hour tutorials
- Group 1 - Thursday 16:00-18:00 in 1.24 D’Olier Street
- Group 2 - Thursday 11:00-13:00 in PX 202 7-9 Leinster Street South
- No lecture/tutorial in Week 7 (Reading Week)
| Week | Date | Language | Topic | Released | Due |
|---|---|---|---|---|---|
| 1 | 14 September | - | Introduction to Computation | ||
| 2 | 21 September | R | R Basics | ||
| 3 | 28 September | R | Control Flow in R | Assignment 1 | |
| 4 | 5 October | R | Functions in R | ||
| 5 | 12 October | R | Debugging and Testing in R | ||
| 6 | 19 October | R | Mid-term Exam | Assignment 1 | |
| 7 | 26 October | - | - | ||
| 8 | 2 November | Python | Fundamentals of Python Programming I | ||
| 9 | 9 November | Python | Fundamentals of Python Programming II | Assignment 2 | |
| 10 | 16 November | Python, R | Data Wrangling in R and Python | ||
| 11 | 23 November | Python, R | Classes and Object-oriented Programming | ||
| 12 | 30 November | Python, R | Complexity and Performance | Assignment 2 |
Prerequisites
This is an introductory class and no prior experience with programming is required.
Hardware and Software
- Laptop with Windows/Mac/Linux OS (no Chrome books)
- Required software:
- Additional software:
- Git - version control system
- JupyterLab Desktop - desktop application for Jupyter Notebooks
- RStudio - integrated development environment for R
- Spyder - integrated development environment for Python
- Visual Studio Code - feature-rich text editor
See syllabus for further details.
Materials
Books:
- John Guttag. 2021 Introduction to Computation and Programming Using Python: With Application to Computational Modeling and Understanding Data. 3rd ed. Cambridge, MA: The MIT Press
- Norman Matloff. 2011. The Art of R Programming: A Tour of Statistical Software Design. San Francisco, CA: No Starch Press.
- Wes McKinney. 2022. Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter. 3rd ed. Sebastopol, CA: O’Reilly Media.
- Roger D. Peng. 2016. R Programming for Data Science. Leanpub.
- Hadley Wickham, Mine Çetinkaya-Rundel and Garrett Grolemund. 2023. R for Data Science. 2nd ed. Sebastopol, CA: O’Reilly Media.
- Hadley Wickham. 2019. Advanced R. 2nd ed. Boca Raton, FL: Chapman and Hall/CRC.
Additional online resources:
- Git Book
- Learn R
- R Inferno
- An Introduction to R and Python For Data Analysis: A Side By Side Approach
- The Hitchhiker’s Guide to Python
- Python For You and Me
- Python Wikibook
- Official documentation:
See syllabus for further details.
Assessment
- Participation (10 %)
- Tutorial attendance
- 2 assignments (10%)
- Due by 09:00 on Monday of weeks 6 and 12 on Blackboard
- Mid-term exam (20%)
- 90 minutes in-person exam in week 6
- Research project (60%)
- Final Python/R project demonstrating familiarity with programming concepts and ability to communicate results
- Due by 23:59 on Friday, 18 December 2026
See syllabus for further details.
Assessment criteria
- ✔️ Code exists
- ⌚ Code runs and does what it has to do
- 📜 Code is legible (meaningful naming, comments)
- ⚙️ Code is modular (no redundancies, use of abstractions)
- 🏎️ Code is optimized (no needless loops, runs fast)
Plagiarism Policy
Plagiarism — defined by the College as the act of presenting the work of others as one’s own work, without acknowledgement — is unacceptable under any circumstances. All submitted coursework must be individual and original. While the regulations you will find in the Trinity Guide to Academic Integrity largely describe assignments consisting of written text, note that similar guidelines apply to code submitted for assessment. Plagiarising computer code is as serious as plagiarising text and will have serious implications both within this class and in the real world (see Google LLC v. Oracle America, Inc. for one of the examples). While you may discuss general approaches to solutions with your peers, under no circumstances you are allowed to share and view each others code. Watch this video explaining the difference between collaboration and collusion to see concrete examples. Note that in case of an identified plagiarism all students whose code appears to come from the same source without giving due credit will be penalized. You can use online resources (e.g. Stack Overflow) but you need to give credit (and link) in the comments.
Generative AI Policy
The use of generative AI in many ways remains a grey area both in academia and industry. Keep in mind that all information that you share with generative AI will be stored and re-used, so under no circumstances private and personal data should be submitted to any (non-local) generative AI services. For the purposes of this module a limited fair use of generative AI is permitted. This includes the use of such services to explain unclear concepts and code chunks, refactoring of written code (keeping in mind the caveat about data above) and its use in the final project. Using generative AI to generate solutions to assignments is strictly prohibited. If you are unsure about the use of generative AI in a specific context, please ask the instructor.