3 ms·
A really interesting finding considering how many comparisons of code to literature exist. I.e. the advice of laying your files out like a “newspaper”, writing
by distortionfield 2y ago
A really interesting finding considering how many comparisons of code to literature exist. I.e. the advice of laying your files out like a “newspaper”, writing your code in logical evolutions like an essay, etc…
- IshKebab 2y agoI've never heard that advice about newspapers? Maybe you're thinking of literate programming. Anyway I don't think it's a remotely interesting finding. Anyone that has done any programming knows that it is not like natural language. We even explicitly know that from the complete failure of languages that try to be programming languages and natural languages like AppleTalk. The fact that you use English words in your identifiers and comments in your code doesn't make it English any more than writing a paper about maths and using `m` for mass means maths is linguistic.
- distortionfield 2y agoI’m not thinking of literate programming, no. I’m familiar with that. I’m referring to a fairly well-known recommendation from Clean Code. https://www.baeldung.com/cs/clean-code-formatting#vertical-formatting https://www.baeldung.com/cs/clean-code-formatting#vertical-f... I don’t agree that “anyone who has done any programming” knows it’s not the same. The number of comments to the contrary in this thread is evidence enough. The parallels between natural and programmatic languages are not just undeniable but often useful, and how the human brain models its understanding of code is orthogonal to that utility.