Course Syllabus

Computer Programming for Lawyers
LAW 276.34 SEM 001 (4 credits)
CCN 32641

TuTh 3:35P-5:25P

ZOOM LINK

Chris Hoofnagle

 

cpl_bear.png  

Office Hours: Tuesdays from 10-12 AM. Use the standard Zoom link. Please note special office hours in syllabus.

Clients increasingly want their lawyers to understand their products and services on a technical level. Regulators need to understand how their rules will be implemented in code. Lawyers increasingly need tools to automate the process of collecting, organizing, and making sense of impossibly large troves of information.

Computer Programming for Lawyers introduces law students to the Python programming language with an emphasis on text analysis. For instance, we will use the same tools data scientists employ to "scrape" (collect) data, organize it, clean it, and use it to explore legally-relevant questions. This course will lay the foundation for understanding the basics of how companies leverage software engineering and “big data.” These skills have applications from legal discovery, to deposition preparation, to research into administrative or judicial action.

Computer Programming for Lawyers also acquaints the student with the logic of computer reasoning, and offers opportunities to comptrast it with legal reasoning. How would the procedure and substance of legal decisions change if more of the law were legible to computers and executable by computers?

This course requires the student to complete in-class labs and problem sets as homework in order to demonstrate skill acquisition. It is four credits because of its intensity. Learning Python will be much like learning a new language; we thus expect a serious commitment from the student in this course. (The most intense periods of learning are early in the semester, and after those early topics are mastered, the course becomes less intense towards the end of the semester. There is no exam.) This course is designed for students with no prior exposure to computer programming; consult the instructors prior to enrolling if you have experience programming in languages such as Python, C++, Ruby, Java, R, etc.

Please note, Aniket Kesari, Berkeley JSD 2020, is assisting with this course, but will not have a student-facing role.

Attendance

Real-time attendance at the first class (whether delivered in person or via remote instruction) is mandatory for all currently enrolled and waitlisted students; any currently enrolled or waitlisted students who are not present on the first day of class (without prior permission of the instructor) will be dropped. The instructor will continue to take attendance throughout the add/drop period and anyone who moves off the waitlist into the class must continue to attend or have prior permission of the instructor in order not to be dropped.

Assessment

Instead of an exam, the grade in this course is based on weekly assignments and your participation. The weekly assignments demonstrate your hard work and learning of the material. For these reasons, you may not collaborate on these assignments unless specifically permitted. Weekly assignments will receive point grades. You can earn discussion points by constructively interacting with other students in the classroom itself and in the Piazza area of bCourses.

This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com.

Find our class signup link at: https://piazza.com/berkeley/spring2021/law27634sem001 

Collaboration policy

  1. For graded assignments, you may not view the code of anybody else who has taken or is taking the class. If an assignment has been explicitly designated to be completed in groups or pairs, you may view the code of your assigned groupmates or partner.
  2. You may not "solve" these assignments by searching for code examples online or elsewhere.
  3. For graded assignments, you may not show your code to anybody except Chris or Aniket. Faculty will maintain a strict "hands-in-pockets" policy - we cannot touch your computer or type anything for you.
  4. You may discuss general concerns or concepts with your classmates, but 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?" Please put your discussions in Piazza.
  5. You may discuss answers to class exercises, those from the book, or those found elsewhere that have not been assigned, and in doing so, you may share or view code with others. Do not use this as an end-around this policy.
  6. You must acknowledge specifically any assistance or collaboration in code that you submit. This includes any online or outside resources you consulted in preparing your solution.
  7. You may not post or otherwise give the problem sets to people outside the course.
  8. You may not post or otherwise give the textbook to people outside the course.

Important Resources

Python tutor

Regexr

Textbook is in Files.

Course Schedule

Course starts: January 19, 2021
Course ends: April 30, 2021

Before the first class:

  • Install Anaconda: https://www.anaconda.com/products/individual 
    • Use the latest version of Python 3.8
    • If you are a Windows user, choose to *also* install **Anaconda Prompt** -- this will be your terminal from which you will activate virtual environments and access your labs.
    • On windows, Anaconda will prompt you to "Add Anaconda3 to my PATH environment variable. Please selection this option. 
  • Watch the Introduction to Jupyter Video (in Files>Videos) and spend some time playing with Jupyter Notebook
  • Read Chapters 1, 3, and 4 (skip sections 4.3.1, 4.3.2, and 4.4) in Ohm & Frankle. The textbook is in Files >.
    • Starting with Chapter 3, please create a Jupyter notebook for the chapter.
    • Please type in every line of code that is given as an example in Ohm & Frankle (with certain exceptions). For instance, in section 3.1, the textbook asks you to enter 2 + 2 and evaluate the expression in IDLE. We'd like you to test those expressions, but instead of entering them into IDLE, evaluate them in Jupyter Notebook.
      • Exceptions: The Ohm textbook is based on using a text editor and Terminal, whereas we will be using Jupyter. Code examples with a "$" symbol denote a command line argument; those won't always work in Jupyter and so please skip them :) 
    • The exercise of typing in the code examples may seem tedious, but you will find that learning Python is like learning a foreign language. You can read examples and "get it," but you will be unable to "speak it" without actual practice.
  • Complete Problem Set 0 and submit it via bCourses.

 

 

CPL TuTh 3:35-5:25
Jan 19, April 30
Class Date Topics/Assignments
OH 18-Jan Special office hours at 10 and 2. Use standard zoom link.
OH 19-Jan Regular office hours are Tuesdays from 10-12!
1 19-Jan Week 1: Introduction to Python
Before first class material e.g. Read Chapters 1, 3, and 4 (skip sections 4.2, 4.3.1, 4.3.2, and 4.4) in Ohm & Frankle
2 21-Jan Please attempt PS1 before lab.
     
3 26-Jan Week 2: Conditionals and While-Loops
PS1 due before class. Submit via bcourses
Read Chapters 5 and 6 in Ohm & Frankle
4 28-Jan Please attempt PS2 before lab
     
5 2-Feb Week 3: Lists and Iteration I
PS2 due before class.
Please Read Chapters 7, 8, & 9 in Ohm & Frankle
6 4-Feb Please attempt PS3 before lab
     
7 9-Feb Week 4: Lists and Iteration II
PS3 due before class
Review chapter 8, read chapter 10.1-10.3 plus the cheatsheet
8 11-Feb Please attempt PS4 before lab
     
9 16-Feb Week 5: Datastructures
PS4 due before class
Please read Chapter 4.4 (text files), review Chapter 8.4 (lists and text files)
Please read Chapter 10.4-10.6
10 18-Feb Please attempt PS5 before lab
     
11 23-Feb Week 6: Functions I
We're going to have less material this week as part of a catch up and synthesis effort
PS5 due before class
Please read Chapter 11.1-11.2.
12 25-Feb Please attempt PS6 before lab
     
13 2-Mar Week 7: Functions II
PS6 due before class
Please review Chapter 11.1-11.2 and read 11.3-end of chapter
14 4-Mar This week we will work our problem set in class.
     
15 9-Mar Week 8: Files and Directories
No problem set due--we will complete this in class over week 7
Please read Chapter 12
16 11-Mar Please attempt PS8 before lab
     
17 16-Mar Week 9: Regex
No PS8--we did the exercise in class
Please read Chapter 13
18 18-Mar For Problem Set 9, we'd like you to practice your Regex skills using RegexOne. Spend some time on the tutorial (15 lessons) and the problems (9). Don't worry about donating--I've already done so on your behalf :) You need only look over this for lab. But please complete all the lessons and problems by Week 10's lecture.
     
SPRING BREAK 23-Mar
SPRING BREAK 25-Mar
     
19 30-Mar Week 10: Regex II, PDF, and Excel
PS9: please complete all the RegexOne lessons and problems. No need to submit proof.
Please read Chapters 14 and 15
20 1-Apr Please attempt PS10 before lab
     
21 6-Apr Week 11: Web Scraping I
PS10 due before class
Please read Chapter 16
22 8-Apr Please attempt PS12 before lab (to keep up with numbering, we're not using PS #11)
     
23 13-Apr Week 12: Web Scraping II and JavaScript 101
PS12 due before class
Please review Chapter 16; other reading TBD
24 15-Apr Please attempt PS 13 before lab
     
25 20-Apr Week 13: APIs
PS13 due before class
Please read Chapter 17
26 22-Apr Please attempt PS 14
     
27 27-Apr Week 14: Pandas
PS14 due before class
Reading TBD
28 29-Apr Just show up for lab! No problem set for Pandas

Course Summary:

Date Details Due