3 ms·
I’m not a developer but someone who is curious about development, can you explain what it means to have a good “mental model of the code”. Does that mean where
by bazmattaz 2y ago
I’m not a developer but someone who is curious about development, can you explain what it means to have a good “mental model of the code”. Does that mean where you understand all code and what it does?
- danwills 2y agoYeah I think that's correct. It's the combined effect of being able to read the syntax of whatever language it is (Ie understanding code at a small-scale, which is different for all langs), and also to be able to understand/imagine the overall behaviour of it: at a larger-scale, which I think is largely language-independent. I think of it as similar to imagining how to do something or imagine how something works. The analogy could range from as simple as 'how to make a cup of tea' (a small script, or single method say) all the way up to 'how a car engine works'-level like big codebases (kernel, llvm, code-for-whole-app kinda thing).
- hliyan 2y agoThat's at the deepest level. I'd say you can stop one level up: knowing which function serve which purpose, which functions call which functions, which objects maintain which state etc. If you can trace any input/request from the event handler all the way to the database and back, then that's a very good start.