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

Module Meetings

  • 2-hour lectures
  • 2-hour tutorials
  • No lecture/tutorial in Week 7 (Reading Week)
Week Date Language Topic Released Due
1 15 September - Introduction to Computation
2 22 September R R Basics Assignment 1
3 29 September R Control Flow in R
4 6 October R Functions in R Assignment 1
5 13 October R Debugging and Testing in R Assignment 2
6 20 October R Data Wrangling in R
7 27 October - - Assignment 2
8 3 November Python Fundamentals of Python Programming I Assignment 3
9 10 November Python Fundamentals of Python Programming II
10 17 November Python Data Wrangling in Python Assignment 4 Assignment 3
11 24 November Python Classes and Object-oriented Programming
12 1 December Python, R Complexity and Performance Assignment 4

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:
    • Jupyter - web-based interactive computational environment
    • Python (version 3+) - versatile programming language
    • R (version 4+) - statistical programming language
  • Additional software:

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:

See syllabus for further details.

Assessment

  • Participation (10 %)
    • Tutorial attendance
  • 4 assignments (30%)
    • Bi-weekly programming exercises
    • Due by 12:00 on Monday of weeks 4, 7, 10 and 12 on Blackboard
  • Research project (60%)
    • Final Python/R project demonstrating familiarity with programming concepts and ability to communicate results
    • Due by 23:59 on Friday, 19 December 2025

See syllabus for further details.

Assessment criteria

  1. ✔️ Code exists
  2. ⌚ Code runs and does what it has to do
  3. 📜 Code is legible (meaningful naming, comments)
  4. ⚙️ Code is modular (no redundancies, use of abstractions)
  5. 🏎️ Code is optimized (no needless loops, runs fast)

Marks at Trinity: https://www.tcd.ie/academicregistry/exams/student-guide/

Plagiarism

  • Plagiarising computer code is as serious as plagiarising text (see Google LLC v. Oracle America, Inc.).
  • All submitted programming assignments and final project should be done individually.
  • You may discuss general approaches to solutions with your peers.
  • But do not share or view each others code.
  • You can use online resources but give credit in the comments.

Watch this video explaining the difference between collaboration and collusion.

Check the Trinity’s guide on the levels and consequences of plagiarism.