Do you guys remember the smalltalk toolkit posted here a while ago which their creators made specifically for help understanding new codebases?
https://gtoolkit.com/ or https://moosetechnology.org/
Untapped Way to Learn a Codebase: Build a Visualizer
31–40 of 54 posts
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#32And for huge git repos I always like to generate a Gource animation to understand how the repo grew, when big rearrangements and refactors happened, what the most active parts of the codebase are, etc.
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#33How is it different from regular code browser/indexers?
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#34When I have a codebase I dont know or didn’t touch in some time and there’s a bug, first step is reproduce it an then set a breakpoint early on somewhere, crab some coffee and spend some time to step through it looking at state until I know what’s happening and from there its usually kind of obvious.
Why would one need a graph view to learn a codebase when you can just slap a red dot next to the route and step a few times?
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#35- But I'll admit, this isn't precisely how I would do it today How would you do it today?
But telling people that isn't helpful. I try at the beginning to give more step by step of how I would get into understand the code base if I didn't already know these kinds of shortcuts. (I'm not sure I could write those down, they are just know how and heuristics, like how when you are a starting to code a missing ; can take a much longer time to see than as you've been programming for a while)
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#36https://en.wikipedia.org/wiki/Doxygen#/media/File:Doxygen-1....
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#37I always thought to do this visualization in 3d and maybe with VR. Not sure how useful or pleasing experience it would be. Kudos to the author of the project to get this done!
I got Minority Report vibes. This kind of approach might be what (finally) unlocks visual programming? I feel like most good programmers are like good chess players. They don't need to see the board (code). But for inputting the code transformation into the system this might be a good programmer's chessboard. Though to make it work concretely for arbitrary codebases I feel like a coding agent behind the scenes is 100…
As a bonus, porting Doom to it should be "trivial".
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#38I'd add one more technique that's worked well for me: trace a single request from HTTP endpoint to database and back. In a FastAPI app, that means starting at the route handler, following the dependency injection chain, seeing how the ORM/query layer works, and understanding the response serialization. You touch every layer of the stack by following one real path instead of trying to understand the whole codebase at once.
Visualizers are nice for the "big picture" but they rarely help you understand why the code works the way it does. The why is in the git history and the closed issues, not in a dependency graph.
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#39I created Intraview for VS Code, Cursor, etc., that makes it easy to create code tours with your Coding agent by simply saying, "Create a tour that helps me understand how to get started with this repository."
It has other features, but it was designed for the problem of getting in new code bases and it allows the tours to be saved in the repo as flat json files. You can re-open or share tours with new folks, and if the code changes the system notifies you how to ask your agent to update the tour.
Just a thought.
Re: Untapped Way to Learn a Codebase: Build a Visualizer
#40Doesn’t anyone use debuggers anymore? When I have a codebase I dont know or didn’t touch in some time and there’s a bug, first step is reproduce it an then set a breakpoint early on somewhere, crab some coffee and spend some time to step through it looking at state until I know what’s happening and from there its usually kind of obvious. Why would one need a graph view to learn a codebase when you can just slap a red…
https://heyes-jones.com/externalsort/treeofwinners.html
Take this example. I can step through the algorithm, view the data structure and see a narration of each step.
A debugger is useful for debugging edge cases but it is very difficult to learn a complex system by stepping through it.