Hands-On AI: Lawyers Should Learn to Code
Where I discuss why lawyers should learn how to code and why that's a good thing
Welcome back, my forward-thinking trailblazers! You’re the innovative minds exploring new frontiers in law, and coding could be your next big leap. 👨💻⚖️
And for those just tuning in, don’t worry – we’ve reserved a seat at the digital bench for you to start learning coding skills and transforming the way you practice law! 💻🚀
This substack, LawDroid Manifesto, is here to keep you in the loop about the intersection of AI and the law. Please share this article with your friends and colleagues and remember to tell me what you think in the comments below.
Okay, I’m calling on all my especially nerdy legaltechers for this one1. Now, believe me, when asked in years past whether lawyers should learn to code, I was one of those people who would say something like this:
“No, lawyers shouldn’t waste their time learning to code. Lawyers have a deep expertise in the legal domain and that is more than enough.”
I’m not sure that that’s true anymore. In fact, I know it’s not. I don’t believe it is enough anymore and the thing is, I think that’s true of all knowledge workers, not just lawyers. So, I’m going to get into what my take is today, why my thinking has changed, what I’m doing about it, and what I recommend you do about it.
If this sounds interesting to you, please read on…
My Journey Into Coding
My Mom worked for over 20 years as a secretary at Cal State LA, situated in the rolling hills of El Sereno, not far from our home. When I was in first grade, she would pick me up from school and I would stay with her at the office until it was time to go home. To keep myself entertained, I would make paper starships from copy paper, scotch tape and paper clips. I liked to make-believe that the ships were in space battles and the paperclips were missiles. When I think back on it now, I must've put a significant dent in the office supplies! One day, the director of the audiovisual department, Alvin Kanno, who was a friend of my Mom, was excited to show me a new toy he just bought for the university: an Apple II computer. Alvin hooked it up to a television, slid in a cartridge, and demonstrated a game called Breakout, where the screen glowed orange and the rhythmic ping of the ball echoed as it relentlessly smashed through colorful bricks. It was love at first sight.
When I turned 12, I convinced my parents to buy me my own computer: an Atari 1200XL. What was cool about it was that you could do school work on it, make music with it, and, more importantly, it had a great selection of video games. Many of my friends had Commodore 64s. And, we were all excited about what we could make our computers do for us by programming them. BASIC2 was the language back then and we would share our experiments with each other and learn from our mistakes. My favorite was a password program I had written to protect my computer from unauthorized access. But, the problem was you could just bypass the program by pressing the break key. I hadn’t yet learned about machine language integration.
Even in 1983, Artificial Intelligence was already making its way into popular culture as seen in the film WarGames, starring Matthew Broderick and Ally Sheedy. The movie follows a young hacker, played by Broderick, who inadvertently taps into an AI-controlled military computer system responsible for managing the country’s nuclear arsenal. The system, designed by Dr. Stephen Falken, was named "Joshua" after his deceased son, who tragically passed away at a young age.
What makes WarGames particularly compelling is the counter-intuitive lesson the AI learns: the only way to win a game of thermonuclear war is not to play. This realization gives the AI's catchphrase, "Shall we play a game?" an unsettling edge, reminding viewers of the devastating consequences of such power in the wrong hands.
Much like the hacker in WarGames, today's professionals—including lawyers—are navigating a world increasingly shaped by technology and AI. While thermonuclear war may not be at stake, understanding how these systems work is crucial. Lawyers, especially, should learn to code to better engage with the digital tools that are transforming their field. Just as Broderick's character gained the upper hand by understanding the system, lawyers can enhance their practice by learning the logic and mechanics behind the software they rely on daily.
Lawyers Should Learn to Code
My new take is: Lawyers should learn to code.
But, that’s not as straightforward as it sounds. Let me unpack that.
I am not saying that lawyers should learn to code because I’m excited about coding so you should be excited about it and learn it too.
I am not saying that lawyers should learn to code and literally mean you should pick up a computer programming language and that that, in itself, is sufficient.
I am not saying that lawyers should learn to code without the understanding that what it means to “code” is changing within the context of our new AI reality.
So, what am I saying? Let’s start with an analogy.
Imagine you’re taking a trip to Japan. What might you do? Buy your airplane ticket and book your hotel. Plan an itinerary of popular places to see. Learn a few helpful phrases just in case you need to use them, right? Ohayo (Good Morning) or Arigato (Thank You), maybe even Keshō-shitsu wa doko de suka (Where is the bathroom)?
Learning these phrases may be useful. They may come in handy. People you meet may find it nice that you’ve made an effort. But, learning these phrases will not necessarily enrich your experience of Japan. Learning about the history and culture beforehand or even while there would likely imbue the experience with greater significance and understanding.
Core cultural concepts, such as thinking of others, doing your best, not giving up, respecting your elders, and working in a group, reveal a Japanese mindset. This mindset further enhances one’s appreciation for the history, culture, language and people. Taken altogether, it gives the curious traveler an insider’s perspective of Japan. One becomes more of a participant than an observer.
This is what I mean when I say “lawyers should learn to code.”
Just as learning about the mindset, history and culture of Japan enriches your experience and understanding of the country, learning to code (through the lens of the mindset, history and culture of computer science) can help lawyers to gain a deeper understanding of the AI-first world we now live in and to wield AI tools to their best advantage and benefit.
Learning to code shouldn’t be an academic exercise, nor is learning to code any longer a “nice to have”; it is critically necessary to our professional survival.
Why Should You Care About Coding?
So, what changed my mind about coding, and why should you care?
Now, I know what you might be thinking. "Tom, I'm a lawyer, not a programmer! I don't have time to learn to code on top of everything else I have to do." Believe me, I had the same doubts and fears when I started my coding journey.
What changed my mind is a couple of things (for your consideration):
Velocity and Volume of GenAI Uptake
(1) the sheer velocity and volume of Generative AI (GenAI) applications in the legal vertical and their steady uptake by lawyers and law firms.
Among lawyers:
51% of legal professionals believe GenAI will have a positive impact on the profession.
65% feel that GenAI will allow them to prioritize higher-value work.3
Among Am Law 200 firms (the 200 highest-grossing law firms in the US):
53% have purchased GenAI tools
45% are using these tools for legal work
43% are developing their own proprietary GenAI solutions4
Rapid adoption of AI in the legal sector:
Direct Relevance of GenAI to Legal Work
(2) the direct relevance of AI and GenAI in particular, to the language and document-intensive work we do as lawyers.
Example: Document Review and Analysis: GenAI can rapidly read, comprehend, and accurately extract data from lengthy, non-standardized legal documents such as contracts, leases, and agreements. This capability allows lawyers to:
Quickly identify and extract key information from voluminous documents
Summarize lengthy texts
Classify documents based on their content
Compare multiple documents for inconsistencies or similarities
Time Savings, Accuracy, and Cost Savings: By leveraging GenAI for document processing, law firms can:
The stock in trade of both lawyers and large language models is language, so, unsurprisingly, there is a high degree to which LLMs can help lawyers.
Beyond the example of document review and analysis, GenAI can also assist with document generation, information retrieval, case management, knowledge management, and role playing, to name a few.
But it’s not just the statistics alone that should convince you to take an interest. It’s the broader implications of this technological transformation on our industry. The legal profession is at a crossroads.
The job skills we have today will not be the same as tomorrow.
The job titles we have today may not be the same as tomorrow.
The job experience we have today alone will not be what is needed tomorrow.
We can either resist the change and risk becoming obsolete, or we can embrace it and harness its power to innovate and thrive.
And that's when it hit me: if I wanted to stay relevant and competitive in this new era of legal practice, I needed to adapt. I needed to understand the mindset, language and logic of the technology. I needed to learn to code.
The Power of Computational Thinking
You know how we say that law school teaches us how to “think like a lawyer”? Law school may not teach us how to start our own law practice or how to actually practice law, but it does instill us with a critical, problem-solving mindset.
Well, computer science helps us to think like a computer. It’s called computational thinking, and, that can be useful in getting AI to do what we want. It is also useful in helping us to be better problem-solvers and better lawyers.
What is Computational Thinking?
Computational thinking is a problem-solving approach that involves breaking down complex problems into more manageable parts. It helps individuals analyze and approach tasks in a logical and structured way. The core components include:
Decomposition: Breaking down a large or complex problem into smaller, more manageable sub-problems.
Pattern Recognition: Identifying similarities or patterns in problems or data to make the problem easier to solve.
Abstraction: Focusing on the important details of the problem, while ignoring irrelevant information, to simplify the problem.
Algorithmic Thinking: Developing step-by-step procedures or algorithms to solve the problem systematically.
Parallels to “Thinking Like a Lawyer”
You can likely see some of the similarities to thinking like a lawyer. We may use different words to describe what we are doing, but there are certainly parallels:
Case Analysis: Spotting issues and breaking out the facts and law that relate to each issue so that their relative merits can be determined.
Analogical Reasoning: Comparing the facts, issues, or legal principles of a current case to those of a prior case (precedent) to argue for a similar outcome.
Issue Framing: Focusing on salient facts and legal issues without getting bogged down by irrelevant details.
Procedure: Creating a structured process designed to ensure consistency and fairness in legal analysis or litigation.
As you can see, there’s a lot of common ground here, don’t you think? So, it stands to reason that learning about coding and computational thinking can help us lawyers not only to think like a computer, create useful programs, and better communicate with AI, but also to improve our skills as lawyers. It’s kind of the same idea as cross-training, where athletes develop different muscle groups and skills by engaging in varied activities to enhance their overall performance. For lawyers, learning coding and computational thinking serves a similar purpose. By developing these additional skills, we strengthen our ability to analyze, problem-solve, and approach complex legal matters with a fresh perspective.
Where to Start Your Coding Journey?
Let’s say that you’re still reading this and I haven’t managed to scare the bejesus out of you and shoo you away. Are you here? Is it just us?
<whispering>
Well, I’m going to share a secret with you. You’re in a select group. Most people don’t make it this far. And, that means you’ll get much farther ahead because you already have.</whispering>
<conspiratorial_tone>
Now, lean in close, because I'm about to reveal the hidden treasure map to coding success. It's not a path for the faint of heart, but for the brave legal explorers like you, it's a journey filled with untold rewards and mind-blowing discoveries.</conspiratorial_tone>
<excited_tone>
So, where do you start? Well, my intrepid coding adventurer, the world is your oyster! There are countless resources out there, waiting to be explored. Online courses, YouTube videos, tutorials, books – it's like a buffet of coding knowledge, and you've got a VIP pass to the front of the line.</excited_tone>
<sage_advice>
But here's a little nugget of wisdom from your coding sensei: start small, and start with the basics. Dip your toes in the coding waters with a beginner-friendly language like Python. It's like the gateway drug of programming – once you get a taste, you'll be hooked!</sage_advice>
Okay! <enough/>
See, you’ve already learned some (pseudo)code!9
Getting Started with Python
When I dove back10 into the world of coding, I decided to begin with the Python programming language11. It’s a great place to start.
Python is known for its intuitive and readable syntax, which makes it an excellent choice for beginners. Its clean and straightforward code structure allows even non-programmers to understand and write code more easily compared to other languages. This intuitive nature of Python reduces the learning curve and enables novice coders to grasp the fundamentals quickly.
print("Hello World") # prints out --> Hello World
Python has a large and supportive community of developers worldwide. This vibrant community actively contributes to the language's development, creates helpful resources, and provides assistance through forums. Having access to such a vast pool of knowledge and support is invaluable when learning to code, even with the advent of coding copilots, because it means you can readily find solutions to problems and learn from experienced practitioners.
Another significant advantage of Python is its extensive use in artificial intelligence (AI) and machine learning (ML) applications. Python has become the go-to language for developing cutting-edge AI and ML tools. As AI continues to transform the legal industry, familiarity with Python positions you to leverage these technologies effectively by understanding how they work from the inside out.
In addition to its AI capabilities, Python is a versatile language that can handle a wide range of legal coding projects. From automating repetitive tasks and generating documents to building chatbots and developing case management systems, Python's extensive libraries and frameworks make it adaptable to various legal use cases.
To learn Python, I am taking online courses, reading books, following tutorials, and working on small projects in my spare time. I have even hired a PhD-candidate in computer engineering to tutor me as I progress through my learning journey. While I have already completed some courses and tutorials, I am still actively engaged in the process of mastering Python and expanding my coding skills.
I like to start in multiple places at once: osmotic, immersive learning. I find that what I learn from one resource translates to another, and that the gaps left by one resource are filled in by another. Now, I have to admit that my approach may not be typical and it doesn’t have to be your approach. Just getting started is the key.
Recommended Resources
Here are few online courses I would recommend to you:
AI Python for Beginners
Andrew Ng is the founder of DeepLearning.ai, Professor of Computer Science at Stanford, founder of Coursera, and one of the co-founders and the head of the Google Brain project, which is Google's deep learning research initiative.
Needless to say: Andrew is the man! And, he created a course to teach beginners python using AI. It’s pretty sweet and once you complete it, you get a nifty certificate!
Programming for Everybody (Getting Started with Python)
Charles Severance is the Professor of Computer Science at the University of Michigan who created this accessible course. He has helped millions of people learn Python from scratch, making it accessible to beginners in programming.
Dr. Chuck is an affable guy who has a way of making programming less intimidating and easy to understand, no easy feat.
CS50: Intro to Computer Science
David Malan is the Professor of Computer Science at Harvard who teaches this amazing course. He introduces you to common themes and concepts in computer science, such as algorithms, data structures, efficiency, and abstraction plus the history of how we got here.
By building each class on the foundation of the previous session, you get a feel for computational thinking. David’s enthusiasm is infectious.
There are a few books I would recommend as well:
Python Crash Course
Eric Matthes
This book provides a hands-on approach with exercises and projects to help you learn Python fundamentals and build real-world applications, such as games and web apps. It’s easy to follow and designed to get you writing code quickly.
Python for Everybody
Charles Severance
This book is perfect for beginners with no prior programming experience. It provides a gentle introduction to Python, focusing on data manipulation and analysis, making it ideal for learners who want to use Python for practical purposes like working with files, web scraping, and databases. (Dr. Chuck teaches the open-access course of the same name I pointed out earlier.)
Automate the Boring Stuff with Python
Al Sweigart
It’s especially well-suited for beginners who want to quickly apply Python to practical tasks like automating everyday tasks, web scraping, and file management. The book focuses on real-world applications rather than heavy math or theoretical concepts.
AI Python Tutor
I just launched my own python teaching tool, AI Python Tutor. It uses the power of Generative AI and task-based learning to provide you with one-on-one tutoring. It’s in beta and limited to data types (for now), but I’m eager to get your feedback.
You can try it out for free here: https://python.tutorflow.ai/
Closing Thoughts
Alright, my fellow legal innovators, we've covered a lot of ground here. From my own coding journey to the reasons why lawyers should care about coding, and from the power of computational thinking to some practical resources to get you started.
I know it can seem daunting at first. But here's the thing: learning to code isn't about becoming a full-fledged programmer overnight.
It's about acquiring a new skill set, a new way of thinking. It's about understanding the language and logic behind the AI tools transforming our profession, so that you can harness their power effectively and ethically. It's about staying relevant, competitive, and adaptable in a world where the intersection of law and technology is becoming increasingly front and center.
But more than that, learning to code is about embracing a growth mindset. It's about being curious, open-minded, and willing to step outside your comfort zone. It's about recognizing that the skills that served us well in the past may not be enough to carry us into the future.
As lawyers, we're trained to be risk-averse, to rely on precedent, to stick to the tried and true. But in today’s world, the greatest risk may be not taking any risk at all.
So, my challenge to you is this: take that first step. Dip your toes into the coding waters. Start small, but start somewhere. Whether it's taking an online course, attending a workshop, or just tinkering with some code in your spare time, every journey begins with a single step.
And remember, you're not alone in this. There's a growing community of legal professionals who are embracing the power of coding and computational thinking. Seek them out, learn from them, collaborate with them. Together, we can shape the future of law in ways we never thought possible.
So, let's roll up our sleeves, boot up our computers, and code our way to a brighter, more innovative future. The journey won't be easy, but it will be worth it.
What will you code?
C:\\Users\\You>
By the way, if you’d like to learn more about how how AI works and how it will impact the legal profession, you should apply to LawDroid University!
My NEW 5-part webinar series, Generative AI for Lawyers: Empowering Solos and Small Law Firms, is now available at LawDroid University.
LawDroid University is available for free for everyone to use.
Free to use - It's 100% free educational content for everyone, just sign up below.
Insightful - Get educated about the intersection of artificial intelligence and the law as taught by experts.
Value Packed - Filled with videos, summaries, key takeaways, quotable quotes, transcripts and more! Find sessions on AI and the State of the Art, Ethics, Access to Justice, Practice of Law, Education, and the Business of Law.
AI Q&A - Ask a chatbot questions about the content and get fully informed answers immediately.
👉 To immerse yourself in this enriching educational voyage, learn more, or sign up, please visit https://lawdroid.com/subscriptions/lawdroid-university/.
“We are the music makers, and we are the dreamers of dreams.”
The original version of the BASIC programming language was designed and written at Dartmouth College under the direction of Professors John G. Kemeny and Thomas E. Kurtz. In September 1963 they began to create a programming language written from the user's point of view. Much of the actual programming on the project was done by Dartmouth undergraduate students. The birthday of BASIC was May 1, 1964.
Here’s my first programming book: Peckham, Herbert D, Hands-On Basic for The Atari 400/800/1200XL, McGraw-Hill (1983), https://archive.org/details/hands-on-basic/mode/2up
Legal teams are embracing generative AI: Everlaw survey, Canadian Lawyer, https://www.canadianlawyermag.com/resources/legal-technology/legal-teams-are-embracing-generative-ai-everlaw-survey/378941
New Survey Data from LexisNexis Points to Seismic Shifts in Law Firm Business Models and Corporate Legal Expectations Due to Generative AI, Lexis Nexis, https://www.lexisnexis.com/community/pressroom/b/news/posts/new-survey-data-from-lexisnexis-points-to-seismic-shifts-in-law-firm-business-models-and-corporate-legal-expectations-due-to-generative-ai
Generative AI in Legal Market Size, Share, and Trends 2024 to 2034, Precedence Research, https://www.precedenceresearch.com/generative-ai-in-legal-market
24 Top AI Statistics And Trends In 2024, Forbes, https://www.forbes.com/advisor/business/ai-statistics/
Artificial Intelligence & Analytics in Document Review, The AI Journal, https://aijourn.com/artificial-intelligence-analytics-in-document-review/; How AI for M&A due diligence is changing every aspect of the deal process, Thomson Reuters, https://legal.thomsonreuters.com/en/insights/articles/how-ai-and-document-intelligence-are-changing-the-legal-tech-game
20 Top Lawyers Beaten by Legal AI, LawGeex, https://blog.lawgeex.com/20-top-lawyers-were-beaten-by-legal-ai-here-are-their-surprising-responses
Pseudocode is a simplified, informal way of describing a computer program or algorithm using plain, human-readable language. It’s a tool used by programmers to plan out how an algorithm will work before translating it into an actual programming language.
I am self-taught in BASIC, HTML, CSS, PHP, MySQL, and now Python.
Python is not named after the snake but after the British comedy group Monty Python, as its creator Guido van Rossum wanted a fun and less conventional name for the programming language. Van Rossum developed Python in the late 1980s as a hobby project while working at Centrum Wiskunde & Informatica in the Netherlands, aiming for a language that emphasized code readability and simplicity. Learn more: https://www.python.org/