Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exploring a complex codebase with AI

Avatar for Jesús Espino Jesús Espino
July 10, 2025
1

Exploring a complex codebase with AI

Avatar for Jesús Espino

Jesús Espino

July 10, 2025
Tweet

Transcript

  1. • Ex Kaleidos and ex Mattermost • Software Engineer @

    Gitpod • Public Speaker • Open Source enthusiast
  2. • 4 years exploring the Go source code • Uncountable

    time invested • 6 talks prepared about Go internals • A huge sensation of wasted time…
  3. Demo: - Tool: coding agent (Ona) - Files: None -

    Prompts: - Here is the full source code of the Go programming language. Can you give me a high-level overview of the how to go compiler work, including all the steps in the compilation process?
  4. Demo: - Tool: coding agent (Ona) - Files: None -

    Prompts: - Analyze the dependency relationships between packages in the Go source code. Which modules depend on which others? Are there any cycles? Which packages are highly coupled? Generate a Graphviz schema with the information collected.
  5. Demo: - Tool: Coding Agent (Ona) - Files: None -

    Prompts: - Look through the commits in the last 3 months in the runtime/ directory. What patterns do you notice? Which components of Go are evolving most actively? Are there large refactorings or recurring bug fixes?
  6. Demo: - Tool: Aider - Files: src/net/http/*.go - Prompts: -

    Pots explicar-me aquest paquet (net/http) en català? Fes-ho de manera clara, amb exemples si cal, i utilitza la terminologia tècnica adequada en català. Si hi ha parts complicades, pots fer servir analogies senzilles.
  7. Demo: - Tool: Aider - Files: src/cmd/compile/internal/syntax/nodes.go src/cmd/compile/internal/syntax/parser.go - Prompts:

    - I want to understand how the go parser works and how the AST is represented, can you explain me that? - Instereting, can you explain me in more detail how the Position tracking works? - Is this design unique to go, or is it a common practice in programming languages?
  8. Demo: - Tool: Aider - Files: src/runtime/mgc.go - Prompts: -

    Can you explain me in detail, based on the source code, how the go garbage collector works? - Can you explain it to me like I’m a Junior? - Can you explain it to me like I’m 10 years old?
  9. Demo: - Tool: Aider - Files: src/runtime/proc.go - Prompts: -

    Can you explain me what are the different states that a goroutine can have and what are the transitions from one to another, use graphviz to represent the different states and transitions
  10. Demo: - Tool: Aider - Files: src/runtime/chan.go - Prompts: -

    Give me a detail explanation about how channels works internally in golang, use the source code as the source of truth. - Now I want to know how much I understand the topic, so I want you to ask me questions, I'll answer the question and you tell me if that is right or wrong, and why. Then we can pass to the next question, the question has to be in 4 options test format. Make the questions from very easy to very hard incrementing the dificulty of the questions gradually.