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.
- Tom Paskhalis, Office Hours: Thursday 11:00-13:00 in-person or online (booking required)
- Martyn Egan
- 11 two-hour lectures
- Monday 14:00 in PX 201 7-9 Leinster Street South
- 11 two-hour tutorials
- Thursday 09:00 in PX 201 7-9 Leinster Street South
- No lecture/tutorial in Week 7
Week | Date | Language | Topic | Due |
---|---|---|---|---|
1 | 12 September | - | Introduction to Computation | |
2 | 19 September | R | R Basics | |
3 | 26 September | R | Control Flow in R | |
4 | 3 October | R | Functions in R | Assignment 1 |
5 | 10 October | R | Debugging and Testing in R | |
6 | 17 October | R | Data Wrangling in R | |
7 | 24 October | - | - | Assignment 2 |
8 | 31 October | Python | Fundamentals of Python Programming I | |
9 | 7 November | Python | Fundamentals of Python Programming II | |
10 | 14 November | Python | Data Wrangling in Python | Assignment 3 |
11 | 21 November | Python | Classes and Object-oriented Programming | |
12 | 28 November | Python, R | Complexity and Performance | Assignment 4 |
This is an introductory class and no prior experience with programming is required.
- Laptop with Windows/Mac/Linux OS (no Chrome books)
- Required software:
- Additional software:
- Git - version control system
- GitHub - git-based online platform for code hosting
- RStudio - integrated development environment for R
- Spyder - integrated development environment for Python
- Visual Studio Code - feature-rich text editor
See syllabus for further details.
- Course website: tinyurl.com/POP77001
- GitHub repository: github.com/ASDS-TCD/POP77001_Computer_Programming_2022
Books:
-
Guttag, John. 2021 Introduction to Computation and Programming Using Python: With Application to Computational Modeling and Understanding Data. 3rd ed. Cambridge, MA: The MIT Press
-
Matloff, Norman. 2011. The Art of R Programming: A Tour of Statistical Software Design. San Francisco, CA: No Starch Press.
-
McKinney, Wes. 2022. Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter. 3rd ed. Sebastopol, CA: O'Reilly Media.
-
Peng, Roger D. 2016. R Programming for Data Science. Leanpub.
-
Wickham, Hadley, and Garrett Grolemund. 2017. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. Sebastopol, CA: O'Reilly Media.
-
Wickham, Hadley. 2019. Advanced R. 2nd ed. Boca Raton, FL: Chapman and Hall/CRC.
Online:
-
Python 3 Documentation (intermediate and advanced)
-
Participation (10 %)
- Tutorial attendance
-
4 assignments (40%)
- Bi-weekly programming exercises
- Due by 12:00 on Monday of weeks 4, 7, 10 and 12 on Blackboard
-
Research project (50%)
- Final Python/R project demonstrating familiarity with programming concepts and ability to communicate results
- Due by 12:00 on Monday, 19 December 2022
- ✔️ Code exists
- ⌚ Code runs and does what it has to do
- 📜 Code is legible (meaningful naming, comments)
- ⚙️ Code is modular (no redundacies, use of abstractions)
- 🏎️ Code is optimized (no needless loops, runs fast)
Marks at Trinity: https://www.tcd.ie/academicregistry/exams/student-guide/
- 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