4 ms·
Here is a concrete thing to try. Maybe it won't be useful, but it's helped me in the past. Get a blank sheet of paper and a writing utensil. Not a text editor.
by jcpst 4y ago
Here is a concrete thing to try. Maybe it won't be useful, but it's helped me in the past.
Get a blank sheet of paper and a writing utensil. Not a text editor.
Start at the top of your call stack and start making a diagram that resembles a directory tree:
application_code_function(string arg)
library_function()
std_lib_func()
Use arrows, add notes on the side. Whatever helps. Try to get one API call stack.
I don't do this often, but it helps especially when I'm not familiar with the patterns used in the project, or I'm having a groggy day and having trouble thinking "deep". It seems to help to me to try and reason about it away from the distractions of the IDE and the OS.
- pjmorris 4y agoI came here to say essentially the same thing. It seems like this helps students learn programming, and, in some sense, we're all students of whatever new piece of code we're working with today. Some teachers have worked out a fairly comprehensive diagramming scheme for code [0], if you want to take it that far. [0] "Memory Diagrams: A Consistent Approach Across Concepts and Languages", Toby Dragon and Paul E. Dickson