

I don’t exactly draw flow charts, mostly because the nodes don’t make sense to me without context. Instead, I read a few lines, understand what’s going on there and then write down the gist of what I understood. I write these down as bullet points with nesting to track branching code. If still find it pretty cumbersome.
TBH, this wouldn’t have been that big of an issue if the code was commented or documented properly. But then again, who is going to go into code written back in 2018 to document lol.
I also have some level of aphantasia so I can’t visualize a workflow that I didn’t create
I’m sure it’s much more common among developers to not understand another developer’s code.
I do mutter the behaviour of the code to myself when studying like you described.
I agree, I do this when I am designing some new module. I tend to write detailed design documents, covering as much behaviour as possible. I then get it reviewed by someone who might have a good understanding of the business process related to the change. This is not very feasible for legacy code because often there is no proper documentation or comments. What I’d prefer in such cases is to implement new modules in a manner where it lies somewhere outside the legacy body of code (different package or module) and expose functions to hook into the legacy code. This way at least the new enhancements follow best practices and don’t become just another patchwork to the increasingly unmaintainable legacy code.
True. I have been thinking of resuming medication myself.