|
|
|
|
|
by anamax
6484 days ago
|
|
That's nice, but how easy is it to understand those 2 pages of brilliance later and how brittle are they? Remember - the author is the smartest person who will ever see a given piece of code. The reader, even if it's the same person, will be dumber. Programming isn't literature or poetry. No one ever had to add a mail reader to"Ode to a Grecian Urn". |
|
Part of writing good code, whether two pages of brilliance or twenty of gradual brilliance, is conveying intent in the human-readable parts. The parser doesn't care if all the functions have names like doTheNextThing() or french_onion_soup, but it would be a slap in the face to any future maintainers.
Choosing informative names and separating a program along clear conceptual boundaries can be a greater aid to understanding than any syntactic redundancies. Well-placed comments help smooth things over, particularly notes on why a particular approach was chosen. The names themselves should be able to convey what is going on in most cases.
(For distilled wisdom along those lines, see _Thinking Forth_ by Leo Brodie, also online at http://thinking-forth.sourceforge.net/.)