SlideShare a Scribd company logo
Computer programming for lawyers
Nehal Madhani
nehal@altlegal.com
@AltLegalHQ
AGENDA
Modern web architecture
How to learn to program
Key programming concepts
Streamlining your practice
Resources to learn programming
Nehal Madhani
Founder & CEO
Alt Legal
@nehalm
Nehal Madhani is the founder and CEO of Alt Legal,
whose software makes it easy for law firms to
create and manage IP filings. Before starting Alt
Legal, Nehal practiced as an attorney at Kirkland &
Ellis, LLP. He is a self-taught Python/Django
programmer.

Nehal has a J.D. from the University of Pennsylvania
Law School, a Certificate in Business and Public
Policy from the Wharton School of Business, and a
B.A. from Northwestern.
Modern web architecture
HOW DOES THE INTERNET WORK?
1.  Enter a website address (URL).
2.  The DNS service translates this into a
specific IP address.
3.  The web server at the IP address
corresponding to the domain name you
requested is then contacted over the
internet.
4.  The server comes back with data, and your
web browser translates the data to content
like text, images, animations, etc.
HOW DO MODERN WEBSITES AND MOBILE APPS WORK?
Request data
Receive data
UNDERSTANDING MODERN WEB ARCHITECTURE
•  Web servers are just computers. Your computer can be a web server too,
but it’s best practice to use a dedicated computer (usually one with
hardware specially selected for that purpose) in a datacenter managed by
professional administrators.
•  TCP/IP, DNS, and HTTP are all plain text that is sent as messages delivered
over existing networks such as cable lines, phone lines, or specially built
high capacity phone lines or fiber optic lines.
•  Databases are also just a program run on a computer (again, perhaps on a
dedicated machine with specialized hardware), but you can run one. You
probably will use your own small database as you learn to program.
UNDERSTANDING MODERN WEB ARCHITECTURE
•  You make a “request” when you click a link or type in an address into your
web browser. 
•  Your request is translated into the location of a specific file on a specific
computer. This file is broken into small chunks called packets and sent to
your device.
•  Your device assembles the chunks and passes them to your browser. The
file you have been sent (we'll say an HTML file) is a small program meant
for your browser. That program contains instructions on how to present
and style a web document.
SEEING FOR YOURSELF
UNDERSTANDING MODERN WEB ARCHITECTURE
•  Your browser is just receiving a file full of plain text instructions, which is
why you can view the source. 
•  Contrast this with programs that you install on your computer like Word.
This program is compiled directly into machine code, so if you open it, you
can't read it. It is just a series of numbers that correspond to specific
instructions for your CPU.
•  On the web, almost everything is transparent, and it should be this way
because you don’t know who is sending your computer instructions. 
•  This creates a secure, transparent environment (in theory) : the browser;
and a public database of who is who: DNS; and then we all let each other
run programs that each other wrote on our computers.
WHAT IS AN API?
•  An API is an Application Programming Interface.
•  An interface is a boundary between two things. In this case, the boundary
between a person and a service. A user interface on the web is a webpage.
Twitter has a user interface where you can read tweets, send tweets,
follow, DM, favorite, etc.
•  An API is a programmatic interface. Twitter also has an API that lets you
tweet, follow, DM, etc. APIs are how two programs integrate, or even how
a mobile app communicates back to the servers.
•  Amazon is famous for using APIs everywhere. The warehouse is an API to
let any authorized user (within the company or among partners) check
stock, reorder, place pull or ship requests, etc.
WHAT IS AN API?
1.  An API is an Application Programming Interface.
2.  An interface is boundary between two things. In this case, the boundary between a person
and a service. A user interface on the web is a webpage. Twitter has a user interface where
you can read tweets, send tweets, follow, DM, favorite, etc.
3.  An API is a programmatic interface. Twitter also has an API that lets you tweet, follow, DM,
etc. APIs are how two programs integrate, or even how a mobile app communicates back
to the servers.
4.  Amazon is famous for using APIs everywhere. The warehouse is an API to let any authorized
user (within the company or among partners) check stock, reorder, place pull or ship
requests, etc.
WHAT ARE APIs?
Source: An introduction to APIs, https://zapier.com/learn/apis/chapter-1-introduction-to-apis/
FRONTEND LANGUAGES
BACKEND LANGUAGES
FRAMEWORKS
DATABASES
EXAMPLE: ALT LEGAL ARCHITECTURE
•  Unique architecture
•  Backend: Python/Django, Javascript/Node.js
•  Frontend: Javascript, HTML, CSS (most websites rely on this)
•  Database: Mongo, Postgres
Learning to program
FIRST ATTEMPT: A “LAWYERLY” APPROACH
FIRST ATTEMPT: A “LAWYERLY” APPROACH
FIRST ATTEMPT: A “LAWYERLY” APPROACH
THE RIGHT WAY TO LEARN PROGRAMMING: “THE HARD WAY”
THE RIGHT WAY TO LEARN PROGRAMMING: GOOGLE
THE RIGHT WAY TO LEARN PROGRAMMING: BE PART OF THE COMMUNITY
•  Join local communities like Meetup
•  Contribute to open source projects on Github
•  Contribute to discussions on Stack Overflow, LinkedIn, and Twitter
Key programming concepts
REGULAR EXPRESSIONS
•  Regular expressions (regex) are a compact way to specify a pattern of
characters in text using specific rules. 
•  Using this language, you can set the rules for the set of potential strings
you want to match. This could include sentences, statutes, and email
addresses. 
•  For example, you can ask questions like “Does all statute cites follow a
particular pattern?”
•  It can even be used to do advanced searches in Microsoft Word.
REGEX SYNTAX
•  d: Matches any digit [0-9]
•  d{3,5}: Matches 3, 4, or 5 digits
•  d+: Matches any positive interger
•  D: Matches any non-digit character (anything other than a digit)
•  w: Matches any alphanumeric character (any digit, lowercase letter, or
uppercase letter)
•  w+: Matches ny word
•  W: Matches any non-alphanumeric character (anything other than a
digit, lowercase letter, uppercase letter)
•  s: Matches space
•  [Pp]ython: Matches “Python” or “python”
DATA TYPES
•  Strings: A collection of characters like “This is a trademark”.
•  Integers: A whole number like 1, 2, -2, and -1.
•  Floats: A number with a decimal point like 0.1 and 1.1. 
•  Booleans: Variables whose value is expressed as True or False.
•  Array: List of other data types like
Classes = [“Evidence”, “Property”, “Contracts”]
Values in arrays can be retrieved using Classes[0].
FUNCTIONS
Function is a group of code that has been given a name.

Example:
def update_case(x):

```Code that accesses government databases, queries a

```particular case, updates the case, and saves the information
return x
CONDITIONS (TESTS A COMPUTER CAN COMPLETE)
•  Greater than: Is one value greater than another value (>)
•  Lesser than: Is one value lesser than another value (<)
•  Greater than or equal: Is one value greater or equal to another value (>=)
•  Lesser than or equal: Is one value lesser or equal to another value (<=)
•  Equal: Is one value equal to another value (==)
•  Unequal: Is one value not equal to another value (!=)
CONDITIONS (PSEUDO CODE)
If a trademark application receives a new office action:
•  Find the current status date (the date the office action was issued)
•  Add a new entry in my calendar: “Respond to the office action.”
•  Use the date the office action was issued and add six months as the
deadline to respond.
TRANSLATING INTO CODE USING CONDITIONS
If TM_APPLICATION_CURRENT_STATUS == “office action”:
STATUS_DATE = TM_APPLICATION_CURRENT_STATUS_DATE
CALENDAR_ENTRY_TITLE = “Respond to office action”
CALENDAR_ENTRY_DEADLINE = STATUS_DATE + 6m
LOOPS
Loops are used to repeat a piece of code some set number of times or while
a particular condition is true.

Example:
cases = ['124201', '125201', '178304']
for case in cases:
print "Updating " + case
update_case(case)
LOOPS
Another way to create loops:




index = 0
cases = [124201, 125201, 178304]
while index < len(cases):
print “Updating case number ” + cases[index]
update_case(cases[index])
index = index + 1
Streamlining your practice
•  Administrative work: Work that requires minimal interpretation like
calendaring and billing
•  Repetitive work: Legal tasks that are repetitive in nature and ripe for
automation
•  Legal work: Substantive legal tasks that require interpretation and are
not entirely repetitive
DIVIDING AND CONQUERING
A DAY IN THE LIFE OF A LAWYER WHO CODES
Meet Sarah. Sarah is an IP lawyer. She has a broad practice where she
helps clients protect their IP rights. Sarah prosecutes patents, trademarks,
and copyrights registrations on behalf of her clients.
A DAY IN THE LIFE OF A LAWYER WHO CODES
At 9AM, Sarah reads an email from a client whose photos are being made
available for download illegally. The infringing party has copies all the
photos all over its website and hasn't even bothered to change the names
of the files.
A DAY IN THE LIFE OF A LAWYER WHO CODES

Sarah’s client sent her a file with all of the filenames that he says are being
infringed. Sarah uses the command line to parse the text file of file names
and remove the file paths and saves it as a CSV file. 
She then writes a small python program to spider the infringing website
and find the links and save them back to a new file.
A DAY IN THE LIFE OF A LAWYER WHO CODES
Next, Sarah looks up the ownership information of the infringing website
and finds out who is hosting the content. She just launches Terminal on her
Mac and just types in whois and the infringing party’s website.






Whois www.istealphotographs.com
Domain Name: ISTEALPHOTOGRAPHS.COM
Registrar: GODADDY.COM, LLC
Registry Registrant ID:
Registrant Name: Cosmo Kramer
Registrant Organization: Vandalay Industries
Registrant Street: 1500 First Street
Registrant City: New York
Registrant State/Province: New York
Registrant Postal Code: 10011
Registrant Country: United States
A DAY IN THE LIFE OF A LAWYER WHO CODES
Then, Sarah loads up her Word template for a cease and desist letter and a
DMCA takedown notice for the hosting company and emails them to the
respective parties with a particular subject.

Sarah uses Google Apps for her email and has created a rule that
automatically tag emails “DMCA Notices” if the email subject starts with
“Copyright Infringement.”
A DAY IN THE LIFE OF A LAWYER WHO CODES
Using Zapier, if a new email is tagged DMCA Notice, it automatically
creates (1) follow-up reminders in Clio (her practice management
software); (2) a new matter; and (3) a new billing entry.
ADDITIONAL RESOURCES
RESOURCES
•  Codecademy (use this to get familiar with syntax and HTML)
•  Learn python the hard way
•  Learn command line the hard way
•  Regex Tutorial
•  Harvard CS50 Course
•  Stack Overflow (programming forum)
•  Treehouse (paid service)
•  Codeschool (paid service)
•  Dash by General Assembly (HTML, CSS, Javascript Intro)

More Related Content

What's hot

Improving email reliability
Improving email reliabilityImproving email reliability
Improving email reliability
Antti Siiskonen
 
Adobe Users Group - ePub3 Revolution
Adobe Users Group -  ePub3 RevolutionAdobe Users Group -  ePub3 Revolution
Adobe Users Group - ePub3 Revolution
RePubIT Inc.
 
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
Amazon Web Services
 
API Basics
API BasicsAPI Basics
API Basics
Ritul Chaudhary
 
Designing a beautiful REST json api
Designing a beautiful REST json apiDesigning a beautiful REST json api
Designing a beautiful REST json api
0x07de
 
Internet
InternetInternet
Internet
RajThakuri
 
Schema Design
Schema DesignSchema Design
Schema Design
MongoDB
 

What's hot (7)

Improving email reliability
Improving email reliabilityImproving email reliability
Improving email reliability
 
Adobe Users Group - ePub3 Revolution
Adobe Users Group -  ePub3 RevolutionAdobe Users Group -  ePub3 Revolution
Adobe Users Group - ePub3 Revolution
 
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
An Overview of AI at AWS: Amazon Lex, Amazon Polly, Amazon Rekognition, Apach...
 
API Basics
API BasicsAPI Basics
API Basics
 
Designing a beautiful REST json api
Designing a beautiful REST json apiDesigning a beautiful REST json api
Designing a beautiful REST json api
 
Internet
InternetInternet
Internet
 
Schema Design
Schema DesignSchema Design
Schema Design
 

Similar to Computer Programming for Lawyers

Chapter 12 A Manager’s Guide to the Internetand Telecommuni
Chapter 12 A Manager’s Guide to the Internetand TelecommuniChapter 12 A Manager’s Guide to the Internetand Telecommuni
Chapter 12 A Manager’s Guide to the Internetand Telecommuni
EstelaJeffery653
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
LearnNowOnline
 
MTX Portland Office 365 Strategic Capabilities Sep2017
MTX Portland Office 365 Strategic Capabilities Sep2017MTX Portland Office 365 Strategic Capabilities Sep2017
MTX Portland Office 365 Strategic Capabilities Sep2017
Owen Allen
 
Taking A Look At Web Services
Taking A Look At Web ServicesTaking A Look At Web Services
Taking A Look At Web Services
Stacey Cruz
 
Internet Basics
Internet BasicsInternet Basics
Internet Basics
JacobMShenyagwa
 
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdfsystem-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
ParthNavale
 
System Design
System DesignSystem Design
System Design
SyeedAbrarZaoad1
 
Lakshmana rao Y Resume
Lakshmana rao Y ResumeLakshmana rao Y Resume
Lakshmana rao Y Resume
Lakshman Chan
 
Introduction to Active Directory
Introduction to Active DirectoryIntroduction to Active Directory
Introduction to Active Directory
Jalpesh Vadgama
 
Internet &web technology
 Internet &web technology Internet &web technology
Internet &web technology
Sharmila Devi
 
Clarisoft Software Development Process (Lunch & Learn Presentation)
Clarisoft Software Development Process (Lunch & Learn Presentation)Clarisoft Software Development Process (Lunch & Learn Presentation)
Clarisoft Software Development Process (Lunch & Learn Presentation)
Robert Haines
 
Architectural Principles for Software + Services
Architectural Principles for Software + ServicesArchitectural Principles for Software + Services
Architectural Principles for Software + Services
Simon Guest
 
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
Tom Hofte
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
Amit Ashwini
 
Business Intelligence Solution Using Search Engine
Business Intelligence Solution Using Search EngineBusiness Intelligence Solution Using Search Engine
Business Intelligence Solution Using Search Engine
ankur881120
 
Virtual & Remote Practice: Reach from the Beach & Manage from the Mountains
Virtual & Remote Practice: Reach from the Beach & Manage from the MountainsVirtual & Remote Practice: Reach from the Beach & Manage from the Mountains
Virtual & Remote Practice: Reach from the Beach & Manage from the Mountains
Garrett P. Laborde
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
Michael Petychakis
 
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptxIntroduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
OsuGodbless
 
OpenLink Virtuoso - Management & Decision Makers Overview
OpenLink Virtuoso - Management & Decision Makers OverviewOpenLink Virtuoso - Management & Decision Makers Overview
OpenLink Virtuoso - Management & Decision Makers Overview
Kingsley Uyi Idehen
 
Brief description on Web technology
Brief description on Web technology Brief description on Web technology
Brief description on Web technology
Rupanshi rawat
 

Similar to Computer Programming for Lawyers (20)

Chapter 12 A Manager’s Guide to the Internetand Telecommuni
Chapter 12 A Manager’s Guide to the Internetand TelecommuniChapter 12 A Manager’s Guide to the Internetand Telecommuni
Chapter 12 A Manager’s Guide to the Internetand Telecommuni
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
MTX Portland Office 365 Strategic Capabilities Sep2017
MTX Portland Office 365 Strategic Capabilities Sep2017MTX Portland Office 365 Strategic Capabilities Sep2017
MTX Portland Office 365 Strategic Capabilities Sep2017
 
Taking A Look At Web Services
Taking A Look At Web ServicesTaking A Look At Web Services
Taking A Look At Web Services
 
Internet Basics
Internet BasicsInternet Basics
Internet Basics
 
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdfsystem-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
system-design-interview-an-insiders-guide-2nbsped-9798664653403.pdf
 
System Design
System DesignSystem Design
System Design
 
Lakshmana rao Y Resume
Lakshmana rao Y ResumeLakshmana rao Y Resume
Lakshmana rao Y Resume
 
Introduction to Active Directory
Introduction to Active DirectoryIntroduction to Active Directory
Introduction to Active Directory
 
Internet &web technology
 Internet &web technology Internet &web technology
Internet &web technology
 
Clarisoft Software Development Process (Lunch & Learn Presentation)
Clarisoft Software Development Process (Lunch & Learn Presentation)Clarisoft Software Development Process (Lunch & Learn Presentation)
Clarisoft Software Development Process (Lunch & Learn Presentation)
 
Architectural Principles for Software + Services
Architectural Principles for Software + ServicesArchitectural Principles for Software + Services
Architectural Principles for Software + Services
 
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
 
Business Intelligence Solution Using Search Engine
Business Intelligence Solution Using Search EngineBusiness Intelligence Solution Using Search Engine
Business Intelligence Solution Using Search Engine
 
Virtual & Remote Practice: Reach from the Beach & Manage from the Mountains
Virtual & Remote Practice: Reach from the Beach & Manage from the MountainsVirtual & Remote Practice: Reach from the Beach & Manage from the Mountains
Virtual & Remote Practice: Reach from the Beach & Manage from the Mountains
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
 
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptxIntroduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
 
OpenLink Virtuoso - Management & Decision Makers Overview
OpenLink Virtuoso - Management & Decision Makers OverviewOpenLink Virtuoso - Management & Decision Makers Overview
OpenLink Virtuoso - Management & Decision Makers Overview
 
Brief description on Web technology
Brief description on Web technology Brief description on Web technology
Brief description on Web technology
 

Computer Programming for Lawyers

  • 1. Computer programming for lawyers Nehal Madhani nehal@altlegal.com @AltLegalHQ
  • 2. AGENDA Modern web architecture How to learn to program Key programming concepts Streamlining your practice Resources to learn programming
  • 3. Nehal Madhani Founder & CEO Alt Legal @nehalm Nehal Madhani is the founder and CEO of Alt Legal, whose software makes it easy for law firms to create and manage IP filings. Before starting Alt Legal, Nehal practiced as an attorney at Kirkland & Ellis, LLP. He is a self-taught Python/Django programmer. Nehal has a J.D. from the University of Pennsylvania Law School, a Certificate in Business and Public Policy from the Wharton School of Business, and a B.A. from Northwestern.
  • 5. HOW DOES THE INTERNET WORK? 1.  Enter a website address (URL). 2.  The DNS service translates this into a specific IP address. 3.  The web server at the IP address corresponding to the domain name you requested is then contacted over the internet. 4.  The server comes back with data, and your web browser translates the data to content like text, images, animations, etc.
  • 6. HOW DO MODERN WEBSITES AND MOBILE APPS WORK? Request data Receive data
  • 7. UNDERSTANDING MODERN WEB ARCHITECTURE •  Web servers are just computers. Your computer can be a web server too, but it’s best practice to use a dedicated computer (usually one with hardware specially selected for that purpose) in a datacenter managed by professional administrators. •  TCP/IP, DNS, and HTTP are all plain text that is sent as messages delivered over existing networks such as cable lines, phone lines, or specially built high capacity phone lines or fiber optic lines. •  Databases are also just a program run on a computer (again, perhaps on a dedicated machine with specialized hardware), but you can run one. You probably will use your own small database as you learn to program.
  • 8. UNDERSTANDING MODERN WEB ARCHITECTURE •  You make a “request” when you click a link or type in an address into your web browser. •  Your request is translated into the location of a specific file on a specific computer. This file is broken into small chunks called packets and sent to your device. •  Your device assembles the chunks and passes them to your browser. The file you have been sent (we'll say an HTML file) is a small program meant for your browser. That program contains instructions on how to present and style a web document.
  • 10. UNDERSTANDING MODERN WEB ARCHITECTURE •  Your browser is just receiving a file full of plain text instructions, which is why you can view the source. •  Contrast this with programs that you install on your computer like Word. This program is compiled directly into machine code, so if you open it, you can't read it. It is just a series of numbers that correspond to specific instructions for your CPU. •  On the web, almost everything is transparent, and it should be this way because you don’t know who is sending your computer instructions. •  This creates a secure, transparent environment (in theory) : the browser; and a public database of who is who: DNS; and then we all let each other run programs that each other wrote on our computers.
  • 11. WHAT IS AN API? •  An API is an Application Programming Interface. •  An interface is a boundary between two things. In this case, the boundary between a person and a service. A user interface on the web is a webpage. Twitter has a user interface where you can read tweets, send tweets, follow, DM, favorite, etc. •  An API is a programmatic interface. Twitter also has an API that lets you tweet, follow, DM, etc. APIs are how two programs integrate, or even how a mobile app communicates back to the servers. •  Amazon is famous for using APIs everywhere. The warehouse is an API to let any authorized user (within the company or among partners) check stock, reorder, place pull or ship requests, etc.
  • 12. WHAT IS AN API? 1.  An API is an Application Programming Interface. 2.  An interface is boundary between two things. In this case, the boundary between a person and a service. A user interface on the web is a webpage. Twitter has a user interface where you can read tweets, send tweets, follow, DM, favorite, etc. 3.  An API is a programmatic interface. Twitter also has an API that lets you tweet, follow, DM, etc. APIs are how two programs integrate, or even how a mobile app communicates back to the servers. 4.  Amazon is famous for using APIs everywhere. The warehouse is an API to let any authorized user (within the company or among partners) check stock, reorder, place pull or ship requests, etc.
  • 13. WHAT ARE APIs? Source: An introduction to APIs, https://zapier.com/learn/apis/chapter-1-introduction-to-apis/
  • 18. EXAMPLE: ALT LEGAL ARCHITECTURE •  Unique architecture •  Backend: Python/Django, Javascript/Node.js •  Frontend: Javascript, HTML, CSS (most websites rely on this) •  Database: Mongo, Postgres
  • 20. FIRST ATTEMPT: A “LAWYERLY” APPROACH
  • 21. FIRST ATTEMPT: A “LAWYERLY” APPROACH
  • 22. FIRST ATTEMPT: A “LAWYERLY” APPROACH
  • 23. THE RIGHT WAY TO LEARN PROGRAMMING: “THE HARD WAY”
  • 24. THE RIGHT WAY TO LEARN PROGRAMMING: GOOGLE
  • 25. THE RIGHT WAY TO LEARN PROGRAMMING: BE PART OF THE COMMUNITY •  Join local communities like Meetup •  Contribute to open source projects on Github •  Contribute to discussions on Stack Overflow, LinkedIn, and Twitter
  • 27. REGULAR EXPRESSIONS •  Regular expressions (regex) are a compact way to specify a pattern of characters in text using specific rules. •  Using this language, you can set the rules for the set of potential strings you want to match. This could include sentences, statutes, and email addresses. •  For example, you can ask questions like “Does all statute cites follow a particular pattern?” •  It can even be used to do advanced searches in Microsoft Word.
  • 28. REGEX SYNTAX •  d: Matches any digit [0-9] •  d{3,5}: Matches 3, 4, or 5 digits •  d+: Matches any positive interger •  D: Matches any non-digit character (anything other than a digit) •  w: Matches any alphanumeric character (any digit, lowercase letter, or uppercase letter) •  w+: Matches ny word •  W: Matches any non-alphanumeric character (anything other than a digit, lowercase letter, uppercase letter) •  s: Matches space •  [Pp]ython: Matches “Python” or “python”
  • 29. DATA TYPES •  Strings: A collection of characters like “This is a trademark”. •  Integers: A whole number like 1, 2, -2, and -1. •  Floats: A number with a decimal point like 0.1 and 1.1. •  Booleans: Variables whose value is expressed as True or False. •  Array: List of other data types like Classes = [“Evidence”, “Property”, “Contracts”] Values in arrays can be retrieved using Classes[0].
  • 30. FUNCTIONS Function is a group of code that has been given a name. Example: def update_case(x): ```Code that accesses government databases, queries a ```particular case, updates the case, and saves the information return x
  • 31. CONDITIONS (TESTS A COMPUTER CAN COMPLETE) •  Greater than: Is one value greater than another value (>) •  Lesser than: Is one value lesser than another value (<) •  Greater than or equal: Is one value greater or equal to another value (>=) •  Lesser than or equal: Is one value lesser or equal to another value (<=) •  Equal: Is one value equal to another value (==) •  Unequal: Is one value not equal to another value (!=)
  • 32. CONDITIONS (PSEUDO CODE) If a trademark application receives a new office action: •  Find the current status date (the date the office action was issued) •  Add a new entry in my calendar: “Respond to the office action.” •  Use the date the office action was issued and add six months as the deadline to respond.
  • 33. TRANSLATING INTO CODE USING CONDITIONS If TM_APPLICATION_CURRENT_STATUS == “office action”: STATUS_DATE = TM_APPLICATION_CURRENT_STATUS_DATE CALENDAR_ENTRY_TITLE = “Respond to office action” CALENDAR_ENTRY_DEADLINE = STATUS_DATE + 6m
  • 34. LOOPS Loops are used to repeat a piece of code some set number of times or while a particular condition is true. Example: cases = ['124201', '125201', '178304'] for case in cases: print "Updating " + case update_case(case)
  • 35. LOOPS Another way to create loops: index = 0 cases = [124201, 125201, 178304] while index < len(cases): print “Updating case number ” + cases[index] update_case(cases[index]) index = index + 1
  • 37. •  Administrative work: Work that requires minimal interpretation like calendaring and billing •  Repetitive work: Legal tasks that are repetitive in nature and ripe for automation •  Legal work: Substantive legal tasks that require interpretation and are not entirely repetitive DIVIDING AND CONQUERING
  • 38. A DAY IN THE LIFE OF A LAWYER WHO CODES Meet Sarah. Sarah is an IP lawyer. She has a broad practice where she helps clients protect their IP rights. Sarah prosecutes patents, trademarks, and copyrights registrations on behalf of her clients.
  • 39. A DAY IN THE LIFE OF A LAWYER WHO CODES At 9AM, Sarah reads an email from a client whose photos are being made available for download illegally. The infringing party has copies all the photos all over its website and hasn't even bothered to change the names of the files.
  • 40. A DAY IN THE LIFE OF A LAWYER WHO CODES Sarah’s client sent her a file with all of the filenames that he says are being infringed. Sarah uses the command line to parse the text file of file names and remove the file paths and saves it as a CSV file. She then writes a small python program to spider the infringing website and find the links and save them back to a new file.
  • 41. A DAY IN THE LIFE OF A LAWYER WHO CODES Next, Sarah looks up the ownership information of the infringing website and finds out who is hosting the content. She just launches Terminal on her Mac and just types in whois and the infringing party’s website. Whois www.istealphotographs.com Domain Name: ISTEALPHOTOGRAPHS.COM Registrar: GODADDY.COM, LLC Registry Registrant ID: Registrant Name: Cosmo Kramer Registrant Organization: Vandalay Industries Registrant Street: 1500 First Street Registrant City: New York Registrant State/Province: New York Registrant Postal Code: 10011 Registrant Country: United States
  • 42. A DAY IN THE LIFE OF A LAWYER WHO CODES Then, Sarah loads up her Word template for a cease and desist letter and a DMCA takedown notice for the hosting company and emails them to the respective parties with a particular subject. Sarah uses Google Apps for her email and has created a rule that automatically tag emails “DMCA Notices” if the email subject starts with “Copyright Infringement.”
  • 43. A DAY IN THE LIFE OF A LAWYER WHO CODES Using Zapier, if a new email is tagged DMCA Notice, it automatically creates (1) follow-up reminders in Clio (her practice management software); (2) a new matter; and (3) a new billing entry.
  • 45. RESOURCES •  Codecademy (use this to get familiar with syntax and HTML) •  Learn python the hard way •  Learn command line the hard way •  Regex Tutorial •  Harvard CS50 Course •  Stack Overflow (programming forum) •  Treehouse (paid service) •  Codeschool (paid service) •  Dash by General Assembly (HTML, CSS, Javascript Intro)