The understanding layer for AI code

You’re shipping code you can’t explain.

Mati reads what your AI wrote and teaches the load-bearing concepts inside it, right where they live. Understand your code. Get more out of AI.

untitled.py4 worth understandingsample
1import time
2import yaml
3import requests
4
5API_KEY = "sk-prod-9f2a1b8c4d7e3a6b5c2d1e9f8a7b6c5d"
6
7
8def load_config(path):
9 with open(path) as f:
10 return yaml.load(f.read())
11
12
13async def fetch_user(user_id, cache={}):
14 if user_id in cache:
15 return cache[user_id]
16 time.sleep(0.05)
17 res = requests.get("https://api.example.com/users/" + user_id)
18 cache[user_id] = res.json()
19 return cache[user_id]
pythonMati reads it first

a file your AI wrote · sample

scroll · Mati reads it first, then you can click anything

When a concept is used the common wrong way, Mati shows what correct usage looks like. It teaches the mistake. It does not patch your file.

what it reads · the catalog

A curated catalog across Python, JavaScript, and TypeScript.

Growing toward the code people actually write.

Sources
A local folder, or any GitHub repo you can access.
Languages
Python, JavaScript, and TypeScript.
Memory
Mati remembers what you learned and brings a concept back for review right before you would lose it.
  • Python generators
  • Mutable default arguments
  • Python GIL implications
  • Context managers
  • Async/await without gather
  • Identity vs equality and small-int caching
  • Closure late binding in loops
  • Generator one-shot exhaustion
  • __slots__ and its tradeoffs
  • The descriptor protocol
  • MRO and cooperative super()
  • The __eq__ / __hash__ contract
  • Shallow vs deep copy
  • Exception chaining and raise from
  • __del__ is not a reliable destructor
  • Shadowing builtins with local names
  • Integer division and float precision
  • Mutating a collection while iterating it
  • Relying on dict insertion order
  • f-string evaluation timing
  • Truthiness and the falsy-zero trap
  • Decorators and lost function metadata
  • Argument unpacking and keyword-only params
  • Chained comparison semantics
  • Import-time side effects and circular imports
  • Double-underscore name mangling
  • String immutability and accidental copies
  • Class attribute vs instance attribute
  • Iterator vs iterable distinction
  • Default argument evaluation at def time
  • Walrus operator scope and readability
  • Threading vs multiprocessing choice
  • Blocking calls inside the event loop
  • Race conditions despite the GIL
  • asyncio.gather exception handling
  • Forgetting to await a coroutine
  • Fire-and-forget task garbage collection
  • Thread and process pool sizing
  • Multiprocessing pickling constraints
  • Deadlock from inconsistent lock ordering
  • Bridging sync and async code
  • Django ORM N+1 query problem
  • Django queryset laziness and caching
  • Flask request and app context lifecycle
  • Flask app factory and blueprint pattern
  • Django middleware ordering
  • Django signal pitfalls
  • WSGI vs ASGI implications
  • Django atomic transactions and on_commit
  • Django migration drift
  • ORM bulk operations skip hooks
  • Flask module-level state and workers
  • Django settings across environments
  • list vs collections.deque
  • Membership test on list vs set
  • String concatenation in a loop
  • Generators for memory-bound pipelines
  • Sort key functions and stability
  • Hidden quadratic patterns
  • Unsafe pickle deserialization
  • eval and exec on untrusted input
  • yaml.load vs yaml.safe_load
  • subprocess shell injection
  • Path traversal from user input
  • Hardcoded secrets in source
  • Dependency resolution surprises
  • __pycache__ staleness
  • Exit codes and signal handling
  • Environment variable configuration patterns
  • this binding in JavaScript
  • == vs === in JS
  • Closures capturing loop variables (var vs let)
  • Hoisting and the temporal dead zone
  • Prototype chain and Object.create
  • Reference vs value semantics
  • NaN comparison and Object.is
  • Floating point arithmetic and money
  • JSON.parse and JSON.stringify data loss
  • Sparse arrays and array holes
  • Getter and setter surprises
  • The arguments object vs rest parameters
  • IIFE and module scope isolation
  • Generators and the iterator protocol
  • Symbols and well-known symbols
  • Truthy and falsy coercion pitfalls
  • var vs let vs const scoping rules
  • Destructuring defaults and missing keys
  • JS event loop and microtasks
  • Sequential await vs Promise.all
  • Unhandled promise rejections
  • setTimeout drift and timer guarantees
  • Async race conditions on shared state
  • The explicit Promise constructor antipattern
  • Floating promises and fire-and-forget calls
  • useEffect dependency array semantics
  • Stale closures in React hooks
  • useState batching and functional updates
  • The key prop and list reconciliation
  • useMemo and useCallback misuse
  • useEffect cleanup and leaked subscriptions
  • Express middleware ordering
  • Express error-handling middleware signature
  • Async errors in Express route handlers
  • The Express next() contract
  • Storing derived state in useState
  • XSS via innerHTML and dangerouslySetInnerHTML
  • Prototype pollution
  • any vs unknown
  • structural typing
  • as assertions are not runtime casts
  • control-flow narrowing and its limits
  • discriminated unions and exhaustiveness with never
  • types are erased at runtime
  • const assertions and literal widening
  • index signatures and unsound index access
  • strictNullChecks and null in the type space
  • conditional types and infer
  • SQL injection via concatenation
  • O(n^2) from nested list membership
  • Hash set vs list for membership tests
  • Amortized vs worst-case cost
  • When constant factors beat big-O
  • Memoization space and invalidation cost
  • Accidental O(n^2) string building
  • Premature optimization vs algorithmic choice
  • Cross-site scripting via unescaped output
  • Secrets committed to source control
  • Weak password hashing
  • Missing CSRF protection
  • Insecure direct object reference
  • Timing attacks on secret comparison
  • Overly permissive CORS configuration
  • Optimistic vs pessimistic locking
  • Idempotency keys for safe retries
  • Exponential backoff with jitter
  • Thundering herd on cache expiry
  • Cache invalidation strategy
  • The dual-write problem
  • At-least-once vs exactly-once delivery
  • Circuit breaker for failing dependencies
  • Eventual consistency tradeoffs
  • Check-then-act atomicity bug
  • The lost-update problem

143 concepts in the case today

Understand the code you ship.

Open Mati on something your AI wrote that you’re not sure you fully get.