Computer Programming for Lawyers: An Introduction Spring 2016 Paul Ohm Jonathan Frankle Syllabus Version 0.57 Course Description This class provides an introduction to computer programming for law students. The programming language taught may vary from year-to-year, but it will likely be a language designed to be both easy to learn and powerful, such as Python or JavaScript. There are no prerequisites, and even students without training in computer science or engineering should be able successfully to complete the class. The course is based on the premise that computer programming has become a vital skill for non-technical professionals generally and for future lawyers and policymakers specifically. Lawyers, irrespective of specialty or type of practice, organize, evaluate, and manipulate large sets of text-based data (e.g. cases, statutes, regulations, contracts, etc.) Increasingly, lawyers are asked to deal with quantitative data and complex databases. Very simple programming techniques can expedite and simplify these tasks, yet these programming techniques tend to be poorly understood in legal practice and nearly absent in legal education. In this class, students will gain proficiency in various programming-related skills. A secondary goal for the class is to introduce students to computer programming and computer scientific concepts they might encounter in the substantive practice of law. Students might discuss, for example, how programming concepts illuminate and influence current debates in privacy, intellectual property, consumer protection, antidiscrimination, antitrust, and criminal procedure. This is a hands-on class. Each student will spend most class sessions using his or her own computers, reading, writing, and debugging code. Every student must bring to every class a computer, on which free software will be provided to be installed. Students will be required to complete problem sets between class meetings. To obtain a passing grade, students must complete problem sets and larger coding assignments, participate in class sessions, and demonstrate they have learned the assigned skills. 1 Version 0.57
At the completion of this class, students should be able to write simple to moderately complex computer programs that can automate text-handling and datahandling tasks that would be difficult or impossible to perform without programming skill. Students will also gain a solid foundation of programming knowledge and skills they can build upon to progress toward mastering more advanced programming techniques and other programming languages. Class Times and Office Hours The class will meet every Tuesday from 1:20 3:20 P.M. in McDonough 425. Professor Ohm will be available for office hours in his office (McDonough 480) on Mondays and Wednesdays from 10:00 11:00 A.M. or at any other time by appointment. He can also be reached via e-mail at ohm@law.georgetown.edu. Professor Frankle will be available in his office (McDonough 444) at times to be chosen on the first day of class or any other time by appointment. He can be reached via email at jonathan.frankle@law.georgetown.edu. Course Expectations Grading. This class will be graded on a pass-fail basis. To earn a passing grade, students must successfully complete graded assignments in a timely manner. Some non-graded assignments will be distributed as well. Attendance. Regular attendance is crucial. We may decrease the grade of any student with unexplained absences at my discretion up to giving them a failing grade. Participation. Although this class will not be taught in the traditional Socratic style, students will be expected to do the reading and participate in class. Failure to do so could be a factor in deciding to give a student a non-passing grade. No Experienced Programmers Allowed! This class is intended for beginners only. If you have taken any classes in college or graduate school that featured computer programming, or if you have mastered any computer programming language, you are not permitted to take this class. If you are unsure whether you fall within the excluded categories, get in touch with me as soon as you can. Course Materials Required Text. The required book for the course is Al Sweigart, Automate the Boring Stuff with Python, No Starch Press 2015, ISBN-13: 978-1593275990. The 2 Version 0.57
author of the book has made the full text available for free online at https://automatetheboringstuff.com/. Other Resources. You might also find some of the following resources useful: 1. Another free book: Charles Severance, Python for Informatics: Exploring Information. This book is extremely straightforward and moves at a slower pace than the required book, so beginners might especially find it useful. Also, the author helpfully provides free video lectures for a class based on the book that you may want to look at to supplement your reading. 2. You will be referring often to the official documentation for Python 3. In particular, you will spend a lot of time with the Library Reference and the Language Reference. 3. When in doubt, ask Google. And what Google will tell you most often is that others have already asked and answered your question on Stack Exchange. Course Website. Information for this class will be posted in two places in duplicate: our course website and our course Canvas page. Our course website is at paulohm.com/classes/cpl16. You should know by now how to find our class Canvas page. In these two places, you will find class notes, important announcements, supplemental readings, changes to the reading, and links to other resources. I will make supplemental readings and changes to the reading available at least one week prior to the assigned date. To make it quick and easy for you to see what is new, the Latest Updates part of the class website and the Announcements part of the Canvas page will note any changes or updates to these sites. Students must consult either Canvas or the class website before every class. Assignment Submission. Unless otherwise noted, assignments must be submitted at the start of class on the day they are due (1:20pm). After this time, assignments will lose 20% of possible credit for each day or partial day late. Assignments should be submitted by attaching them to an email to jonathanfrankle+pythons16@gmail.com with the assignment name (see below) in the subject line. Submissions should be sent from your law.georgetown.edu email address. Collaboration Policy. Part of the process of learning to program a computer is getting stuck and working to get unstuck. Part of getting unstuck is talking to your classmates and other people, but part of it is rolling up your sleeves and working 3 Version 0.57
the problem alone. For this reason, although we encourage many forms of collaboration, we are implementing a fairly strict, bright-line collaboration policy for this class. Any violation of this policy will be considered a violation of the school's Student Disciplinary Code. Rule 1: For problem sets and graded assignments, you may not view the code of anybody else who is taking (or in future years, has taken) the class. The only exceptions are for assignments that have been explicitly designated to be completed in groups or pairs, in which case you may view the code of your assigned groupmates or partner. Rule 2: For problem sets and graded assignments, you may not show your code to anybody except the course staff (instructors and TAs, if any). Rule 3: You may discuss general concerns or concepts with your classmates, but please keep this at a general level. For example, you are allowed to discuss questions such as, "what does this error message mean?" or "what is a tuple?". Rule 4: You may discuss answers to problems from the book or found elsewhere that have not been assigned, and in so doing, you may share or view code with others. Do not use this as an end-around this policy. Rule 5: You must acknowledge specifically any assistance or collaboration you use in the readme.txt file accompanying your code. Python Version 3. In this class, we will be using Python Version 3, the newest version of the language. Unfortunately, a lot of the documentation on the web involves Python 2. There are many subtle and important differences between the two languages, and the two that you will run into first and most often are: Print In Python 3, the "print" command requires parentheses around the thing you are trying to print. So if you see something like: print "Hello, World!" you should replace it with: print("hello, World!") Integer Division The integer division command works differently. If you want to know more about this, read this article. 4 Version 0.57
Assigned Topics and Reading This is the first time I have taught this class in this format, so consider this syllabus a work-in-progress. The schedule below is merely aspirational. Consult the Canvas page or course website for the latest assignments. #: Date Topic Reading 1: 1/19 Introduction and Python Basics Chapters 0 and 1. Chapter 2 pp. 31-37 (Up through Mixing Boolean and Comparison Operators ) Graded Assignments Distrib d Problem Set 1 Due (by Tues @ 1:20 PM) None 2: 1/26 Flow Control Chapter 2 Problem Set 2 Problem Set 1 3: 2/2 Functions Chapter 3 pp. 61-71 Chapter 4 pp. 79-86 Problem Set 3 Problem Set 2 4: 2/9 Lists and Dictionaries Chapters 4 and 5 Mini-Project 1: Text adventure game Problem Set 3 (Due 2/12) 2/16 Faculty Retreat (No Class) 5: 2/23 Strings Search (Regular Expressions) and Debugging I 6: 3/1 Search (Regular Expressions) and Debugging II Chapter 6 Chapters 7 and 10 Same (Chapters 7 and 10) plus Supplemental Reading (regexone website) 3/8 Spring Break (No Class) 7: 3/15 Files Selections from Chapters 8 and 9 and other handouts Peer-evaluation 1 of Mini- Project 1 Mini-Project 2: Regular Expressions Problem Set 4 & Presentation (due final class) Mini-Project 1 Peerevaluation 1 Mini-Project 2 8: 3/22 Web Scraping I Chapter 11 Problem Set 4 9: 3/29 Web Scraping II (including HTML) Chapter 11 and Supplemental Reading (html tutorial website) Mini-Project 3: Web Scraping 5 Version 0.57
10: 4/5 Working with PDF Chapter 13 and Word Documents 11: 4/12 Working with Data: Excel and CSV Chapters 12 and 14 Problem Set 5 Mini-Project 3 12: 4/19 APIs TBD Problem Set 5 13: 4/26 Where do you go from here? TBD Presentation 6 Version 0.57