Is there a repository for perfect code? How about a single example of perfect code (that is non-trivial)? (Hopefully if someone answers that, they'll do it for a language I understand ... Java, or C# or C++ or C.)
One gotcha with the idea of "perfect code" is that it is a subjective term. What are the criteria for "perfect"? Is there a body of rules where each rule, though subjective, is unambiguous (i.e., any two people would give the same "yes" or "no" answer as to whether a piece of code meets each rule, e.g. the criteria should not be "easy to read")?
Thanks for the link. It's a bit deep, being heavy on theory and light on examples of practical application of the technique. (Yes, I'm a wimp.)
Anyways, instead of perfect code, I'd settle for examples of really good code. :> And principles for being able to know it when you see it.
I don't know how often I've looked at code someone else had written and been inspired. It hasn't been often, though. Architects and structural engineers have buildings and bridges to study. Why not software developers?