Code is not text! How graph technologies can help us to understand our code better.
summary
Claim: code treated as an AST graph and stored in a graph database yields concrete, queryable artifacts — hashed nodes for commits, pattern-match queries, semantic diffs, and visualizations — not vague metaphors. Uses Python ast plus graph DB techniques (Merkle-like hashing, Neo4j/Arango-style storage) to store many commits of Flask, producing a cityscape and module dependency graph. Result scales: 500,000 AST vertices reduce to ~8,000 stored nodes, enabling clone detection, custom linters, and meaningful change analysis.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:58How we usually think about code
- 1:37Our Journey
- 1:54Graphs explained in 30 seconds
- 3:13Graphs in Programming
- 4:05Building the Code Graph
- 5:59Storing the Graph: Merkle Trees
- 9:08AST Example
- 10:27Efficieny of this Approach
- 14:11Querying & Navigation
- 15:47Examples (contd.)
- 16:53Example: Code Complexity The cyclomatic complexity is a quantitative measure of the number of linearly
- 19:21Example: Flask
- 21:16Exploring Dependencies in a Code Base
- 23:16Pattern Matching: Text vs. Graphs
- 25:08Example: Building a Code Checker
- 26:32Adding an exception to the rule
- 27:33Example: Diff from Django Project
- 28:28Basic Problem: Tree Isomorphism (NP-complete!)
- 29:10Similar Problem: Chemical Similarity Benzene
- 31:33Applications
- 33:14Example: Semantic Diff
- 34:29Summary: Text vs. Graphs
related talks
28mKnowledge Graph of Your IT Landscape: Code Is Graph Data
26mGraph Databases will change your (freakin') life
46mGraph Databases: Talking about your Data Relationships with Python
49mModern Graph Databases
25mThinking in Graphs
32mUnderstanding Complexly Connected Data using Graph Databases
41mGraphGen: Conducting Graph Analytics over Relational Databases
01h 00mWho’s Afraid of Graphs?
