2 ms·
> Is the reader's brain like a compiler? No. Compilers are very literal. Readers' brains build an imagined world from the hints given by the author. Code is ma
by hnfong 3y ago
> Is the reader's brain like a compiler? No. Compilers are very literal. Readers' brains build an imagined world from the hints given by the author.
Code is mainly to be read by a person. Otherwise there is no reason to keep a copy of the source file after it's been compiled into binary/executable form.
The main difference you pointed out is that for code to be functional it has an additional requirement of having to comply with rigid rules of the programming language, but the "reader" is still human.
- rokob 3y agoCode is not mainly to be read by a person. It is a step to an executable artifact. It is read by a person mainly to modify that artifact. This trope that code is meant to be read is misunderstanding why you are reading it. One doesn’t read code as prose for its own sake. You read code as a means to an end. It is why we sometimes only read the documentation of libraries without reading the underlying code.
- mpweiher 3y agoPrecisely. And studies showed that code is read by humans far less than assumed. And, in my experience, understood even less. Instead, it is rewritten from scratch. See also CADT development paradigm: Cascade of Attention Deficit Teenagers https://www.jwz.org/doc/cadt.html https://www.jwz.org/doc/cadt.html :-)