Educational Codebases
I certainly _do not_ want to denigrate the idea of writing code that&#x27;s designed to be read and studied - I think that&#x27;s a great idea, and try to do it. But I&#x27;ve never been really able to &#x27;read&#x27; a codebase, and I don&#x27;t really understand what people who do this are doing.<p>My technique for getting to know a codebase is to look at one thing in particular, probably with the help of a debugger, tracing the call stack and how the data flows and changes. I get to know a whole project in sections, focusing on individual bits of functionality.<p>And if I&#x27;m honest, I rarely ever &#x27;read&#x27; code this way either - I usually do it because I want to add a feature or improve performance, or squash a bug, and I stop when I understand enough to be fairly sure I&#x27;m doing things in a responsible manner - keeping with the architecture and not making what I leave when I&#x27;m done any more additionally complex than is required to accomplish my task.<p>I don&#x27;t understand how people can &#x27;read code&#x27; in any sort of a straightforward manner. The phrasing seems to suggest to me a linear &#x27;reading&#x27; like a book or a technical manual. But you can&#x27;t read code like that. If a project is of even moderate size, there are too many interweaved dependencies. Even a very well factored codebase is at best a top-down or bottom-up tree, and you (or, at least, I) often can&#x27;t understand the trunk without understanding the disparate branches and leaves. I generally can&#x27;t keep all that in my head without a task to focus on.<p>I think it&#x27;s arguably even irresponsible to suggest to newcomers that they should &#x27;read code&#x27; because it sets them up for failure when they try to do it and the complexity inevitably overwhelms them.<p>Do I misunderstand what people mean when they say &quot;read code&quot;?