3 ms·
I don't think beauty in code is entirely subjective. Beautiful code is like beautiful mathematics. Simple, clean, and correct by construction. All at once. Ther
by josephg 2mo ago
I don't think beauty in code is entirely subjective. Beautiful code is like beautiful mathematics. Simple, clean, and correct by construction. All at once. There's plenty of ways to implement a graphics engine, web browser, database or OS kernel. Some of them are simpler, faster and more correct. And some approaches will inexorably lead you to a bug ridden mess.
You see this clearly if you ever teach. I would give all my students the same spec. Some students submitted small, simple programs which passed all the tests with flying colours. Some students would submit huge programs which barely worked.
As Alan Kay said once, the right point of view (on a problem) is worth 50 IQ points. At the margins there's subjectivity and tradeoffs. But lots of programs are more or - more often - much less beautiful.