Week 1: Introduction

POP77001 Computer Programming for Social Scientists

Tom Paskhalis

Overview

  • Module objectives
  • Prerequisites and software
  • Materials and books
  • Module meetings
  • Assessment and collaboration
  • Weekly schedule

Programming Languages for Data Analysis

Module Objectives

  • Introduce the fundamentals of computer programming;
  • Get familiar with R and Python programming languages;
  • Develop understanding of core software design principles;
  • Learn crucial data science techniques;
  • Practice these concepts using social science examples.

Module 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 Materials

Prerequisites and Software

  • Introductory module - no formal prerequisites
  • 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:

Module Meetings

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
  • Final project (60%)
    • Final R/Python project demonstrating familiarity with programming concepts and ability to communicate results
    • Due by 23:59 on Friday, 19 December 2025

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 redundacies, 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.

Generative AI

  • The use of generative AI is a grey area (normatively, pedagogically and legally).
  • Fair use of generative AI includes:
    • Code explanation;
    • Code refactoring;
    • Final research project.
  • Unfair use of generative AI includes:
    • Assignment completion;
    • Code plagiarism;
  • Remember, in real world there will be many times when you need to write code without access to generative AI.

Module Outline

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

Next

  • Introduction to Computation