Parse, don't validate

I used to think the reason was to reduce the cost of searching that we need to structure and organize our notes, codes, and everything else. But yesterday, I read “Parse, don’t validate”, and realized I was wrong.

Parsing converts less structured data into a structured form, while validation checks whether the data meets certain requirements. In most cases, both processes start in nearly the same way: by checking whether the given data conforms to a schema. But what happens next is different. Parsing produces a structured value as an output, while validation simply decides whether to accept the data or throw an exception.

The article argues that we should prefer parsing to validation because it saves us from checking and handling the same input over and over. If the data is parsed at the outermost layer, the lower layers can trust the parsed data without repeating those checks.

I realized that the same principle applies to how we handle information in general. The primary purpose of knowledge work is to avoid having to think through the same things again in the future. To take an extreme example, even if AI organizes all our information and makes it easier to find, I don’t expect that alone to reduce the mental effort required to solve a problem.

Prioritize thinking over reading, writing and organizing. If you’ve thought something through deeply enough, how you organize it matters less.