3 ms·
> someone would just go and read source code of some program from start to finish. Well, one has to start reading from somewhere, and the start seems like a go
by Joker_vD 3y ago
> someone would just go and read source code of some program from start to finish.
Well, one has to start reading from somewhere, and the start seems like a good way to start, is it not? Well, actually, no, it's not, because you have to waddle from main through like ten levels of procedure calls until some actual work starts being performed, but if you don't know where exactly the interesting parts are the only other options are either try to grep (doesn't work reliably in repositories where the authors like short and cryptic names) or to read source files until you find the relevant place.
> It would be something like reading an encyclopedia starting from the letter A.
I actually did something similar as a child, except I'd just open it on a random page and start reading. There is nothing really wrong with that as a recreational reading IMHO.
- kaba0 3y agoI remember there was a blog post saying that everyone should write an ARCHITECTURE.md file as well for their projects. It’s content can be a great starting point(s).
- deleted 3y ago[deleted]
- lofatdairy 3y agoYeah the encyclopedia analogy is actually better than GP probably intended because both encyclopedias and source code can take on a branching, fractal information flow. I obviously don't read an encyclopedia start to finish linearly, but as a kid I would start on a random Wikipedia article that caught my attention, and just keep clicking blue links, backtracking whenever I've gone to far. Reading a new codebase is usually not so deep, but it's a similar process of previous definitions.
- sophacles 3y agoI used to do this with the paper encyclopedia too... Id sit on the floor surrounded by books open to a page with slips of paper, pencils and whatever else was around as markers. I'd try to keep track of where i came from so i could backtrack through my side quests. When tabbed browsing came around it was a relief, the browser did all that for me well enough. Unsurprisingly I frequently find out how many tabs is too many for my current computer (less frequently than 20 yeas ago tho since browsers and computers are a lot better than they used to be.)
- yakubin 3y agoWith the difference that encyclopedias are cyclical, whereas a working program has to reduce at some level to primitives.
- deleted 3y ago[deleted]
- dfxm12 3y agoThere is nothing really wrong with that as a recreational reading IMHO. Yeah, but I think that this is beside the point since the encyclopedia isn't colloquially literature, either.