4 ms·
This makes sense. Reading code forwards overwhelms your working memory because lots of information is at the beginning (e.g. class members). If you read it ba
by noname120 8y ago
This makes sense.
Reading code forwards overwhelms your working memory because lots of information is at the beginning (e.g. class members).
If you read it backwards, you directly dive into the logic, while variable names give away what they're supposed to hold. As you progress further, you get a clearer view, and finally see how these variables are defined.
- tlb 8y agoBetter to organize code backwards in the first place. Within a file, I try to start with the juicy logic and then work down to the boring support functions. C++ makes this slightly inconvenient because everything has to be declared above its use, but JS lets you organize things with very few constraints.