The beauty of code
A few days ago, Steve Eichert sent me this link to Marcel Molina's presentation at Ruby Hoedown 2007. Marcel explores what makes code beautiful. He lists the three following attributes:
- Proportion
- Integrity
- Clarity
Proportion references the amount of code needed to make a feature work. You wouldn't expect 27 lines of code to multiply two numbers together. The code has integrity if it doesn't break down under non-trivial cases. Lastly, the code should be clear as to what it is trying to accomplish.
This is a very simple and elegant way to describe beautiful code.
Watch the video if you to see how Marcel came up with the assertions.
