Course schedule 2019

Updated January 7, 2019 ]

This is the week-by-week outline for spring 2019. Weekly topics are subject to change. The latest updates will always appear in Canvas, but you may use this page to look ahead before the Canvas modules are open to you. All assigned work is listed there, with deadlines.

This schedule is subject to change throughout the semester.

DEADLINES for all quizzes and assignments are in Canvas.

Week 1 – Jan. 7–11

Introduction to the course. Tools, technologies and outcomes. Prep for in-class work that we’ll do next week.

Week 2 – Jan. 14–18

Introduction to SQL and databases.
Introduction to XAMPP, an Apache Web server that runs on your computer (Mac/Windows).
In-class exercise: A shoutbox using MySQL, JavaScript and PHP (XAMPP required).

  • Quiz 1
  • Complete the shoutbox in-class exercise at home (before next week’s class)

Week 3 – Jan. 21–25

In class:

SQL and databases, part 2. Security concerns and SQL.
How to create and use prepared statements in PHP.
jQuery Ajax + HTML forms + PHP.
Review of the shoutbox you have completed. Start Assignment 1.
Preview of Assignment 2.

  • Quiz 2
  • Assignment 1: Complete the shoutbox: Make it live on your own website

Week 4 – Jan. 28–Feb. 1

  • Watch and complete exercises: Modifying databases with SQL (7 parts)
    NOTE: This is the fourth section of the Khan Academy course. We are skipping the third section (Relational queries in SQL). Feel free to complete the third section on your own, but I will be discussing the fourth section in class and not the third section.
  • Prepare for Assignment 2: Choose your data, sketch form, list fieldnames

Optional SQL resource:

  • PHP with MySQL Essential Training (Lynda.com) — login here. Like many Lynda.com courses, this is very long (14+ hours) and thorough. You can skip around among these videos to supplement or reinforce what we’ve covered in class. Section 14, “Using PHP to Access MySQL,” is especially good. You can also download the complete exercise files for the course. The only drawback: The instructor is using old XHTML tags that end with />do not copy his outdated HTML tags! (His DOCTYPE is also outdated.) On the plus side, he is using PHP’s newer mysqli_ functions and procedural style (not object-oriented style) — so his PHP matches what we have used in class.

In class:

Using phpMyAdmin to export, import, delete tables, and to test SQL queries.
Using UPDATE and DELETE to modify rows in your database.
Database passwords. Database transactions.
Your MySQL database project explained. Work on Assignment 2.

Week 5 – Feb. 4–8

  • Read: Command line tips
  • Read chapters 1 and 2 in Automate the Boring Stuff with Python (Sweigart) — you will recognize concepts from JavaScript, but you’ll see that the Python syntax is different. The book is free online as web pages, but not as a PDF; there’s a link at the site to buy from Amazon.
  • To work on the exercises in the book, chapters 1 and 2, you need to download, install and run Python 3. DO NOT try to use “IDLE,” which Sweigart mentions. Instead, follow these basic instructions. Use the Python interactive shell (interactive interpreter) while you are reading the book. You will not really grasp anything if you do not type the commands yourself.
  • When you come to the part in chapter 1 with the heading “Your First Program,” read this.
  • Resource: Python Beginners (a GitHub repo)
  • There is no Monday quiz this week. I expect you to have read both chapters and to have typed the examples from chapters 1 and 2 into the Python shell (not “IDLE”; see previous bullet) BEFORE CLASS on Tuesday.

In class:

Introduction to the command line.
Introduction to Python.
Install Jupyter Notebooks.
Install Python3, virtualenv, Jupyter (in class)
Start Assignment 3 in class.
Assign dates for student presentations

  • Assignment 3: Python review 1, based on Sweigart chapters (see Canvas for deadline and link to the assignment)
  • No quiz this week
  • Make sure you have the required book by Mitchell — assigned reading in one week

Week 6 – Feb. 11–15

  • Read: Sweigart, chapter 3
  • Read: Web Scraping: A Journalist’s Guide (Nael Shiab, August 2015) — very short: What is scraping? Why do it?
  • Read: On the Ethics of Web Scraping and Data Journalism (Nael Shiab, August 2015) — Is scraping legal? Is it unethical?
  • Read: Mitchell, Preface (pp. vii–xi) and chapters 1 and 2 — do not DO the things described in the book; we will do them (or at least start them) in class
  • Refer to Mitchell’s updated code in this repo
  • Read: Intro to PIP and virtualenv (we used both of these last week; this is the best explanation I’ve read of why we use virtualenv for Python projects)
  • Resource in python-beginners: week02

Introduction to Web scraping with Python and Beautiful Soup.
In class, we will set up a NEW virtualenv and install the Beautiful Soup library for scraping.
Mitchell discusses virtual environments on pp. 7–8.

  • Quiz 4 (covers both Shiab articles and Mitchell)
  • Assignment 4: Exercises from Mitchell (see Canvas for deadline)
  • Assignment 5: Python review 2, based on Sweigart (see Canvas for deadline)

Week 7 – Feb. 18–22

Web scraping, part 2. And — more Python!
Python lists (like arrays) and reading, writing files. This will be important for scraping. Later we’ll also learn how to read/write CSV files, which is much easier with Python than you might imagine.
Student presentations

  • Quiz 5
  • Assignment 6: Exercises based on Mitchell (see Canvas for deadline)
  • Assignment 7: Python review 3, based on Sweigart (see Canvas for deadline)

Week 8 – Feb. 25–March 1

  • Read: How to Break News While You Sleep (about email and bots)
  • Read in Mitchell:
    • Chapter 5 intro, page 71
    • Storing Data to CSV, pages 74–76
    • Email, pages 90–91
    • Ajax and Dynamic HTML, pages 151–152
    • Executing JavaScript in Python with Selenium, pages 152–156
    • Adjust Your Headers, pages 179–180
    • Timing Is Everything, pages 182–183
    • The Human Checklist, pages 186–187
  • Read Sweigart, chapter 8, up to page 112 (stop at “Using Data Structures to Model Real-World Things”)
  • Resources in python-beginnersmore-from-mitchell and modular-code
  • Resource: BeautifulSoup documentation (PDF)

Web scraping, part 3.
Python dictionaries. (They resemble JSON files.)
About your web scraping project.
Shown in class: CSV scraping exampleMLS soccer players example; breast cancer forum page (use of HTTP headers); Selenium scraper code for Tomatoes; WhatIsMyBrowser.com (to get header info); XKCD comic
Student presentations

  • Quiz 6
  • Assignment 8 (see Canvas for deadline)
  • Web scraping proposal (see Canvas for deadline)

Week 9 – March 4–8

Spring Break – no classes

Week 10 – March 11–15

Readings will be online.

Wrap-up for Web scraping: Questions about your scraping project, due this Friday
Web frameworks: Why use a framework?
Installing Flask (hands on): flask README in python-beginners
Student presentations

  • Quiz 7
  • Assignment 9: Web scraping project

Week 11 – March 18–22

Web apps with Python: Flask
Flask templates: Introduction
Python dictionaries
Student presentations

  • Quiz 8
  • No assignment

Week 12 – March 25–29

Flask and Bootstrap (more about templates)
Flask for Web forms with Flask-WTF and Bootstrap
Student presentations

  • Quiz 9
  • Assignment 10: Small Flask app

Week 13 – April 1–5

Flask applications continued: Databases and Flask-SQLAlchemy
WSGI is “a simple and universal interface between web servers and web applications or frameworks.”: the Python Web Server Gateway Interface.
Student presentations

  • Quiz 10
  • Assignment: Final project proposal

Week 14 – April 8–12

Student’s individual Web project — workshop hours during class period

Week 15 – April 15–19

Student’s individual Web project — workshop hours during class period

Week 16 – April 22–24

Student’s individual Web project — workshop hours during class period

Project Due Date

All projects are due on Monday, April 29, at 11:59 p.m. That is the Monday of finals week. You will post your project on your own website.

.

Advertisements