Follow

Something I've learned through my dependency auditing work: "linearly skimming or reading a whole codebase in alphabetical folder/file order" is vastly more effective for understanding a codebase's structure than it has any right to be

· · Web · 2 · 0 · 6

And you don't actually need to *understand* any of the code. Just skim it, glance at function names, things that visually stand out, the general shape of the code. You can skim it at scrolling speed and it'll work!

@joepie91 okay i'll bite. skimming stuff is obviously horrifically imperfect and everything but my gosh, you notice things.

@joepie91 Awesome advice. I usually do some weird depth thing, and it's embarrassingly inefficient. I'll try alphabetical next time I need to go code digging.

@KFears I find that depth-wise traversal works pretty well for dense modular code with explicit references, to be fair - but it seems to completely break down in boilerplate-heavy code, do-everything functions, and so on (and those are especially where linear traversal works well!)

My metric for the time being is "does depth-wise traversal annoy me? Then I should switch to linear"

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.