Skip to Content
Code as Data
book

Code as Data

by Bryan Friedman, Pat Johnson, Olga Kundzich
July 2026
Intermediate
35 pages
52m
English
O'Reilly Media, Inc.
Content preview from Code as Data

Chapter 3. Querying the Codebase—Finding the Unfindable

Every nontrivial change to a codebase starts with these questions: Where is this used? Who depends on this? Which services still call this deprecated API? The answers determine what gets read, what gets edited, and what eventually ships. For most of software history, the tool answering these questions was some flavor of text search with the same operation underneath: Where does this string appear? That worked when codebases were small and the questions were simple. Most large codebases now are knowable in theory and unknowable in practice. Even though the information is there, the tools used to find it can see only the surface of the code, not what it actually means.

Chapter 2 introduced the Lossless Semantic Tree as the representation that makes a codebase queryable as structured data. This chapter is about how that capability actually works in practice.

Fast Search and Semantic Search

Not every question requires the same level of precision. Text search tools like grep or “find in files” are fast, ubiquitous, and useful when false positives don’t matter. Use them to find a distinctive configuration key, a specific string literal, or an identifier unique enough that a certain amount of noise is acceptable. Abstract syntax tree (AST)–based tools go a step further, matching the structural shape of code rather than just strings, but they still stop short of resolving what types and symbols actually refer to.

The problem is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

RAG-Ready Patterns for Data Platforms

RAG-Ready Patterns for Data Platforms

Ravi Vedula, Gerardo Bodegas Martinez, Maruti Chittajallu, Jack Pullikottil
Implementing Data Mesh

Implementing Data Mesh

Jean-Georges Perrin, Eric Broda
Data Mesh

Data Mesh

Zhamak Dehghani

Publisher Resources

ISBN: 0642572333225