Hacker News new | ask | show | jobs
by PartiallyTyped 1908 days ago
Reading other people's code is perhaps the second most important skill after programming.

There's a great analogy in the essay Babble [1]. In the essay the author explains the process with which humans construct sentences. They say that we learn to babble, we perform a search in the space of all possible sounds, we weigh those possible continuations, select the most probable and filter them using some function. As we grow and through multiple interactions with others and in particular our parents, we improve our filter function. In tandem, we also need to improve our babbling function, that is, we need to improve the search space and the weighting that we give to the noises so that we chain them in interesting ways.

By analogy, we learn to code-babble by working on projects, and by reading other people's code, we learn to filter.

The author notes that it is of equal importance to train both filters in the case of speech, as deficiens in one can leave you either mute or appear as uninteresting, or incoherent. By analogy, deficiency in code babble leaves you unable to construct interesting patterns, and deficiency in code filtering leaves you with a create but otherwise garbage of hot spaghetti.

[1] https://www.lesswrong.com/posts/i42Dfoh4HtsCAfXxL/babble