3 ms·
>it’s harder to read code that to write it Isn’t this only true of bad code? Good code is almost certainly the other way round, harder to write than read… just
by majikandy 3y ago
>it’s harder to read code that to write it
Isn’t this only true of bad code? Good code is almost certainly the other way round, harder to write than read… just like a really good book was much harder for the author than it was for you, the reader.
- ezekiel68 3y agoCode isn't a book. The quote you call into question is semi-famous and I believe the idea is that it's relatively difficult to jump into one code unit of a larger system and get back up-to-speed because one must fill the data cache of their brain with all the considerations for why the author may have done things in a certain way. The algorithm choices and edge cases and exceptional logic paths were clearer to the one writing the original at the time.
- rpastuszak 3y agoI agree with the sibling comment. > just like a really good book was much harder for the author than it was for you, the reader. Now, I suppose this could work for a nested narrative novel, where the reader is meant not to just read the book, but to rewrite and expand it as they're reading it. Adding new ideas, new sub stories on the way. Think 100 Years of Solitude blended with Italo Calvino's Invisible Cities. Seems like the [*]Bible is a good literary example of an async collaboration similar to code: notoriously hard to interpret, and full of dubious historical information and contradictions. I know that Christians call it the "good book", but most of them don't use the word "good" in the same way they'd use it to describe a Nabokov or Eco novel. [*] or most ancient religious texts, like Avesta