3 ms·
This is the same as asking why certain pieces of art or music are beautiful. Any two random people would likely disagree over their interpretations of beauty,
by donw 18y ago
This is the same as asking why certain pieces of art or music are beautiful. Any two random people would likely disagree over their interpretations of beauty, but as a whole, many works would likely receive a drastically high 'beautiful' vote, like Pachelbel's Canon.
That said, with code, I think there are a few properties which are considered 'beautiful' or 'tasteful', not in and of themselves, but combined with that impalpable aesthetic we call 'beauty'.
Of all of these, I think the only one most programmers would agree on is that truly incredible code is nominally quite brief.
- ComputerGuru 18y agoI agree with you absolutely with regards to no two people having the same exact idea, but I don't think even the latter case is an exception - brief may be efficient but not "stylish" and "beautiful." Just like the other properties, it depends on the person looking at it:)
- gizmo 18y ago> truly incredible code is nominally quite brie That's probably true. But that makes me wonder... People have a hard time appreciating poetry in their second or third language, because you need to have such vast knowledge to get the subtleties of the poet's intentions. I suspect the same holds for code. The more skilled and more experienced the programmer, the more complexity he can handle. And he'll find beauty where mortals like us are simply confused. I can't appreciate Shakespeare, but I suspect it is as great as many claim it is. I would probably dismiss Shakespeare as unnecessarily complex and verbose if I didn't know better. Worth thinking about the next time you're annoyed at a piece of complex code, and really want to refactor it so everybody can read it. You may be destroying something beautiful.