2 ms·
This is a great take on the topic, but it doesn't dive into the topic itself. What are some techniques you've found help with reading code? I'll start: breaki
by shadowgovt 5y ago
This is a great take on the topic, but it doesn't dive into the topic itself.
What are some techniques you've found help with reading code?
I'll start: breaking out trickier bits into isolated units and testing them to confirm my hypothesis. This gives me two pieces of information: it tells me what I do and don't understand about the unit I'm looking at, and it tells me what I don't yet know about the unit's dependencies (because to do a mechanical unit test, I need to mock / fake those deps, so now I know what assumptions I've made about those deps). This is useful for code with some very esoteric pieces in it (I spend a lot of time in graphics-land, where people do bad things to bit fields with equivalent meanings with the goal of saving a CPU cycle or two).