I agree, the table of contents style is not well-suited. As part of my coding workflow, I recently started opening a terminal and running ranger inside it, and just tabbing over to that terminal to navigate the left-to-right directory structure. So have VSCode open, and open a split terminal window with the regular terminal at top, and Ranger running in the bottom pane. Midnight Commander would work as well - any TUI file explorer really.
I also have started including a “code map” in the architecture.md files of my projects. You can get a nice output by running `tree -L <levels>`, to load a markdown-embeddable tree diagram of the file structure, however many <levels> deep. I add the output to my markdown, and add a comment after each file/folder explaining what it’s for (in less than 10 words each)
Ranger - https://github.com/ranger/ranger
Midnight Commander - https://midnight-commander.org/
What would it look like? I have two ideas.
1. Multiple directory trees that use symlinks to organize files orthogonally. Your typical directory structure may have things split by client / server. But what if I want to split things based on feature? An IDE could make this a lot easier.
2. Along the lines of this post, I’d love if an IDE would make it easier to create bookmarks and navigate between them to walk people through the code. I’d love to leave a comment sometimes that I can click to jump me to another location in the codebase. Stringing these together leads allows you to weave a narrative throughout the codebase to explain how things work!
Is anyone working in these kinds of things??
¯\_(ツ)_/¯
If you're sane and have a DAG of directories, you can just toposort.
Potentially I could extract the TryFrom implementation into a 3rd file, breaking the circle, but tbh that feels like I'm doing that just for the sake for doing that, and it offers no real benefit.
In this case I see a benefit in keeping the struct and its implementation in a file, and another file with a static variable (which btw is around 600 lines, yeah it's a big array) in a separate file.
Don't follow rules blindly and try not to have absolute rules in your life, it'll make things simpler and more flexible.
Circular dependencies between directories are what's usually an indicator of something wrong.