4 ms·
"expectation-congruent programs should take less time to understand" this statement feels tautological, I don't think there's a single correct set of expectati
by keefe 13y ago
"expectation-congruent programs should take less time to understand"
this statement feels tautological, I don't think there's a single correct set of expectations
- happimess 13y agoIt's not a tautology. If the brain's benefit from "branch prediction" is low, then some other factor (e.g. length of code) could overwhelm the effects of predictability. So they're making a genuine claim, which is that expectation-congruence is the most important factor. My experience bears this out. In most of my professional life, I've abided by coding standards, even if I consider the standards imperfect. That's because of the very real improvements to the team's productivity when code does what it looks like it does.
- keefe 13y agonot quite a tautology, I was being a bit facetious... imho the concept of understanding is tied up with the meaning of expectation, so much so that by definition the code I don't understand doesn't do what I expect - if it did, then I'd understand it!