This is a introductory course to computers and programming for linguists.
Textbook No textbook is required. All reading material will be made available online. Software Students will be expected to install virtualized Ubuntu (Linux) on their computers for programming use. |
Instructor: Sandiway Fong sandiway@email.arizona.edu
Office: Douglass 311 (send email, appointments will be
online)
Location | online Panopto + Zoom + Facebook Messenger |
Time | Tuesdays/Thursday 12:30-1:45 pm |
Date | Lecture Notes | Number of Slides |
Panopto | Topic | |
---|---|---|---|---|---|
Powerpoint | |||||
8/25 | lecture1.pdf | lecture1.pptx | 31 | No panopto, not pre-recorded | Administrivia and Introduction.
Computers and storage. |
8/27 | lecture2.pdf | lecture2.pptx | 18 | Viewer | Computer instruction set. Turing machines. Data types: numbers. Binary representation of numbers. Hexadecimal notation. 2's complement representation. Binary coded decimal (BCD). Floating point representation. Ungraded homework exercise. |
Date | Lecture Notes | Number of Slides |
Panopto | Topic | |
---|---|---|---|---|---|
Powerpoint | |||||
9/1 | lecture3.pdf | lecture3.pptx | 17 | Viewer | Ungraded homework exercise review.
Excel spreadsheet: 32bitfloat.xlsx Explaining why 32bit float is not enough to represent the speed of light. Homework 1. Approximating PI. Representation of characters. ASCII. Parity. Unicode. UTF-8. |
9/3 | lecture4.pdf | lecture4.pptx | 36 | Viewer | Homework 1 Review. Unicode. How to tell if the text file is in UTF-8. Filesystems. Signaling text file EOF and EOL. Homework 2: install VirtualBox on your computer. |
9/8 | lecture5.pdf | lecture5.pptx | 17 | Viewer | MacOS Catalina VirtualBox install problem. WSL from Microsoft for Windows 10. Terminal. Text editor nano. which. perl. python3. dpkg. Introduction to Shell commands. cat. expr. test. read. |
9/10 | lecture6.pdf | lecture6.pptx | 21 | Viewer | Shell arithmetic. The bc command. Test in the shell. Positional
parameters for shell scripts. Making shell scripts directly
executable (chmod). Homework 3.
Updated: 2:22pm typos corrected |
9/15 | lecture7.pdf | lecture7.pptx | 17 | Viewer | Homework 3 Review. Asking for input from the terminal.
Case study: writing a Bash shell script to
calculate BMI. Prefix and suffix deletion. Ungraded Homework 4.
Slides updated: 1:40pm added screenshot of our Terminal session today. |
9/17 | lecture8.pdf | lecture8.pptx | 15 | Viewer | Ungraded Homework 4 Review. Homework 5. Bash shell: loops,
positional parameters, globbing and string maninpulation.
Update: Terminal session for today here |
9/22 | lecture9.pdf | lecture9.pptx | Viewer | [Class canceled.] | |
9/24 | lecture10.pdf | lecture10.pptx | 24 | Viewer | Bash Shell: globbing contd., string manipulation. Example: file renaming using a loop. Example: find with sed. Good resource: cheat sheet. |
9/29 | lecture11.pdf | lecture11.pptx | 23 | Viewer |
Practice with shell script examples.
args1.sh / args2.sh / rm.sh / doublespace.sh / doublespace2.sh / nonblank.sh / confirm.sh |
Date | Lecture Notes | Number of Slides |
Panopto | Topic | |
---|---|---|---|---|---|
Powerpoint | |||||
10/1 | lecture12.pdf | lecture12.pptx | 20 | Viewer | awk: a pattern-matching language. Homework 6. Files: surnames.txt / surnames.csv |
10/6 | lecture13.pdf | 24 | Viewer | Homework 6 review. awk and regular expressions (regex). File: uanumbers.txt | |
10/8 | lecture14.pdf | lecture14.pptx | 10 | Viewer | awk and associative arrays. gsub and gensub. |
10/13 | lecture15.pdf | lecture15.pptx | 26 | Viewer | html5 introduction. Client-server model. Division of labor
example. Document boilerplate. URL. Images. base64
encoding. Lists. Inline vs. block-level. Preformatted
text. Tables. General chunks: div and span. Sample webpage. Ungraded
homework exercise.
sample.html |
10/15 | lecture16.pdf | lecture16.pptx | 16 | Viewer | Ungraded homework exercise. Develop mode. Errors in webpages. CSS. Javascript.
Slides updated 2pm Modified sample page used in class: sample2.html |
10/20 | lecture17.pdf | lecture17.pptx | 27 | Viewer | How to access Javascript directly on the browser: 1) from the search field, 2) from the console. Javascript. DOM (Document Object Model). |
10/22 | lecture18.pdf | lecture18.pptx | 18 | Viewer | DOM (Document Object Model): 1) writing code in the console, 2)
writing code in <script>, and 3) triggering code with
<button>
sample3.html Homework 7. |
10/27 | lecture19.pdf | lecture19.pptx | 8 | Viewer | Homework 7 Help Day.
Sample code:
boxes.html 15test.html |
10/29 | lecture20.pdf | lecture20.pptx | 11 | Viewer |
HTML forms. Example: the BMI calculator re-done using Javascript
only, cf. Bash script earlier in the course.
bmi-js.html gaugeSVG.js bmi-gauge.html |
Date | Lecture Notes | Number of Slides |
Panopto | Topic | |
---|---|---|---|---|---|
Powerpoint | |||||
11/3 | lecture21.pdf | lecture21.pptx | 15 | Viewer |
Homework 7 Review.
15test2.html 15test3.html Term Projects. The Parking Lot Game. Javascript regex. re-test.html Slides corrected: 2pm |
11/5 | lecture22.pdf | lecture22.pptx | 41 | Viewer |
Javascript regex. rep-test.html The Apache webserver. Homework 8. Slides updated: 2pm |
11/10 | lecture23.pdf | lecture23.pptx | 29 | Viewer | CGI: Common Gateway Interface. Not enabled "out of the
box". Setting it up on MacOS and Ubuntu.
Running cgi-bin scripts. Homework 9.
Slides corrected: 2pm |
11/12 | lecture24.pdf | lecture24.pptx | 16 | Viewer |
Addendum to last lecture on df and CanvasJS.
Get method. Files: Client side html: form-get.html Server side .cgi: get.cgi |
11/17 | lecture25.pdf | lecture25.pptx | 19 | Viewer |
Post method.
Client side html: form-post.html Server side .cgi: read.cgi Adding names to a list on a server: Client side html: addnames.html Server side .cgi: get2.cgi A more complex example: adding and deleting names from a server: Client side html: addnames3.html Server side .cgi: get3.cgi Important note! Slides updated 2pm: see A Note on Permissions (slide 9). |
11/19 | lecture26.pdf | lecture26.pptx | 23 | Viewer | Install Python3. Some examples. Term programming project. |
11/24 | lecture27.pdf | lecture27.pptx | 32 | Viewer | Python numbers and strings. Formatted output. sys.argv.
futval.py Homework 11: install nltk and nltk_data. |
11/26 | Thanksgiving Recess: no class. |
Date | Lecture Notes | Number of Slides |
Panopto | Topic | |
---|---|---|---|---|---|
Powerpoint | |||||
12/1 | lecture28.pdf | lecture28.pptx | 28 | Graphics toolkit: Tcl/Tk. Zelle's graphics.py. Wish: the Tcl interpreter. nltk: where is it installed? Example of use. nltk book: chapter 1. Concordance. Common contexts. Dispersion plots. | |
12/3 | lecture29.pdf | lecture29.pptx | 24 | Importing text from Project Gutenberg. Module urllib. Microsoft's
BOM. Editing the text file. Tokens and types. Lexical
Diversity. FreqDist: words and word length. <pre>
marking. BeautifulSoup. Reading local files. text.findall with
regex. Python word comparison operations. Set intersection and
corpora.
Slides updated: 2pm |
|
12/8 | lecture30.pdf | lecture30.pptx | 32 | More on nltk and words. Modals and the Brown corpus. Inaugural address corpus. Universal Declaration of Human Rights. Condition Frequency distribution. Bigrams. Generating random text with bigrams. Wordlist corpus. Stopwords. Male/female first names ending in? |