CP4L: The Textbook

We couldn’t find a perfect book for this course*, so we decided to write one! The result is called, quite creatively, Computer Programming for Lawyers. Perhaps the very best thing about the book is the striking ASCII Art Jonathan Frankle created, freehand, for the cover:

Book cover, by JF

Part I of the book introduces the fundamentals of Python in legal practice, while Part II (mostly yet to be written) covers slightly more advanced Python topics.

The chapters of Part I are:

  1. Introduction
  2. What is Programming?
  3. Installing and Using Python
  4. Expressions and Evaluation
  5. Programming Basics
  6. Conditionals
  7. While Loops
  8. Lists
  9. Strings
  10. Iteration
  11. Dictionaries and Datastructures
  12. Functions and Modules
  13. Text Files
  14. JSON Files
  15. File Management

Topics we will cover in Part II include regular expressions, html, web scraping, APIs, and other file formats (word, pdf, excel). We’re debating including gentle introductions to Javascript and machine learning, too.

Here is Chapter 2 of the book, “What is Programming?” which introduces (in the lightest way imaginable) algorithmic thinking to lawyers. One of our colleagues uses this chapter to help her students understand “algorithms” better.

We’re talking to a publisher about bringing the book to market, so it might be in a bookstore near you before too long. We’re trying to negotiate some sort of creative commons or open source license, at least for the heart of the book, and we’ll update this page as we learn more.

If you’re an educator thinking about adopting this class, email us, and we’ll be happy to share a copy of the manuscript with you. We’re not quite ready, however, to share it more broadly than that.


* The first year we taught this course, we used a fantastic book by Al Sweigart called Automate the Boring Stuff with Python. The full content of the book is available for free at that link.