Computing Fundamentals for Human(s|ists)
University of Victoria, BC
This course is intended for humanities-based researchers with no programming background whatsoever who would like to understand how programs work behind the scenes by writing some simple but useful programs of their own. Over the week the emphasis will be on understanding how computer programmers think so that participants will be able to at least participate in high-level conceptual discussions in the future with more confidence. These general concepts will be reinforced and illustrated with hands-on development of simple programs that can be used to help with text-based research and analysis right away.
The programming language used for most of the course will be Python because of its gentle syntax and powerful extensions. Using the command-line interface and regular expressions will also be emphasized. We will also spend some time taking glimpses at what is happening in the other DHSI courses to understand how reading and writing programming code goes well beyond what we touch on in this class.
Day 1: Shell (4.5hr)
We will spend the day working with the terminal, learning the basics of the file system, data flow programming, and text manipulation. The goal is to get comfortable with the conversational, call and response style of programming.
- 1.1 Welcome
|When to use Shell?||When to use Python|
|- automate daily tasks||- data science|
|- manage files & folders||- app development|
|- remote server admin||- NLTK|
|- data munging||- data visualization|
|- quick & dirty text manipulation||- glue code|
|- everything else|
1.2 Intro to Shell
1.3 Coding with John: Hunting the Whale
Simple Scripting and Regular Expressions
1.4 Code Review: Prosecheck
1.5 Concluding Remarks, Preparing for Tomorrow
Day 2: Python I (6hr)
- 2.1 Intro to Python (iPython)
Light lecture in the morning that builds on experiences the day before, focusing on the mindset of a programmer and important high-level programming concepts. Following this will be a small set of activities using python solely in the terminal to give a sense of how these concepts are implemented generally. The second part of the morning will include a live coding demo using python in the terminal and a text editor in a separate window to show how to build an simple tool that will report the corresponding symbol of the Chinese Zodiac for a given input year that participants will be able to follow along with. See the zodiac folder for these steps. This provides two essential things:
- observation of an actual coding process
- a generic template demonstrating the core features of many programs that can be drawn on for the rest of the course and into the future.
Day 3: Python II (6hr)
2.2 Coding with John: Zodiac. We will be using the shell and a text editor for this session. If you are using windows then it will make sense to use the command prompt rather than MobaXterm because it will give you easier access to the Anaconda installs of Python. You can use many of your Bash Shell commands in the Windows Command Prompt but you'll find a crash course HERE.
2.3 Code Review: RikersBot
3.1 Lab: Essay Grader Handout
3.2 Thinking Like a Programmer: From Comments to Code
3.3 Project brainstorm and initial planning
We will complete any remaining steps from the Zodiac tool demo and then move to an activity where the participants are given working code examples and asked to add comments to these. This exercise will help participants understand the structure of programs better while underscoring the importance of commenting code in the first place.
Today we will also move from a command line + text editor environment for programming to the Jupyter Notebook environment that is provided within the Anaconda install.
In the afternoon participants will begin planning their project for Day four and five.
Day 4: Individual Projects (6hr)
The bulk of today will be spent by participants in teams developing the projects that they began planning the day before. Participants will also be introduced to an Integrated Development Environment (IDE), so there will be three options for how to develop a program:
- Command line + text editor
- Jupyter notebooks
- PyCharm (a Python specific IDE)
There is no wrong answer here. Try to choose tools that are FOSS, universal, and extensible.
- 1hr write a short 1-2 paragraph description of your project. Concentrate on the goals of the what you are trying to accomplish, not the technical details. Spend some time discussing what tools and datasets you would need for the project. For example a simple project description may be:
Using Python NLTK, our group would like to build an "essay grader" which would take as its input a sample essay and output a score, based on several parameters like sentence length variation and richness of vocabulary.
1hr translate or "formalize" your goals into a series of step by step instructions in pseudocode.
project work for the rest of the day
Day 5: Race to Finish (3h)
9:30 - 11:30am
Reevaluate the scope of your project. Cut out inessential functionality. We are trying to get to a "minimally viable" prototype stage. Take notes via code comments throughout.
11:3 - noon
Concluding remarks. Showcase and Plenary meeting after.
Project Code Share
Projects will go here.
- What a well-informed person ought to know about computers and communications by Brian Kirnighan
- Data Science at the Command Line by Jeroen Jannsens
- DH Notes
- Digital Humanities Research Portal, Compute Canada
- Foundations of Statistical Natural Language Processing by Chris Manning and Hinrich Schütze
- Natural Language Processing with Python by Steven Bird, Ewan Klein, and Edward Loper
- CODE The Hidden Language of Computer Hardware and Software by Charles Petzold
- Project Jupyter
- Python Software Foundation
- The Programming Historian
- [Think Python: How to Think Like a Computer Scientist](by Allen B. Downey) by Allen B. Downey