Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

'being smart' != 'reason to reduce readability'


'accidental complexity' = 'essential complexity' / 'your intelligence'

If you need the code watered down into a deluge of little baby steps to satisfy your own definition of "readability", that's fine. I personally don't find useless dissipation of program logic to be readable.


And have you ever read back your own program after a few months of doing something completely different?

'accidental complexity' = 'essential complexity' / 'your intelligence' You are forgetting accidental circumstances, like your current involvement with this particular code and the particular problems it solves. Code should read like a mathematical proof, exactly because it allows you to follow the steps in between.


Code should read like a mathematical proof, exactly because it allows you to follow the steps in between.

The requisite granularity of the between steps is completely subjective. If you're catering for the lowest common denominator, then you give up some succinctness, which may be more readable to someone unfamiliar with the concepts, but may just act as a time-wasting loss of abstraction that actually obscures readability to those who are familiar. You wouldn't want me to step through the proofs of associativity and commutativity of addition every time the rule is used, would you? That's why we just prove it once, give it a name, and assume a basic standard of intelligence/familiarity for those who have commit access.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: