Marcel Molina Jr. – What makes code beautiful… and why does it matters? 
Marcel Molina has a background in literature. He especially looks for comparisons between natural speech and programming languages.
One talks about beauty in Ruby or functional languages. What? Why?
He goes back through History to search what defines beauty.
- Pythagoras found it in numbers. Harmony, pleasant and successful things have structural qualities (applies in music, architecture…)
- Plato (the truth, the good and the beauty are the highest concepts)
“The ability to grasp mere appearances cannot lead to adequate understanding. At its worst, the appreciation of beauty can mire us in the world of sense experience… but at its best it can lead to the understanding of goodness.”
- Rousseau (well ordered nature)
“I have always believed that good is none other than Beauty in action… and both have a common source in well-ordered nature.”
- St Thomas Aquinas
- [To be continued …ad lib.J]
Marcel proposes us a tool to evaluate beauty. Let’s consider:
- Proportion (size of constituent parts)
- Integrity (something that fulfill what is fulfilled for) [Hammer made of crystal]
- Clarity
Evaluation of beauty is a personal process and a learning process (experience).
Learn different languages for different viewpoints.
Evaluate Picasso as well as Rembrandt
Try different viewpoints to find the appropriate expressiveness.
As an illustration, Marcel Molina used these criteria to evaluate the efficiency of a sample of code - a kind of pattern matching in Ruby.
Finally, he quoted Kent Beck for whom virtues to strive for are proportion, communicability, readability.
Marcel Molina blogs on Projectionist
If you don’t mind, I will complement by…
Expressivity makes code more powerful: increase productivity, improves quality
Try different programming paradigms; try different styles to express suitably the domain
Use metaphors, well known concepts
Readability is a relative concept (see regular expressions, complex recursions or chatty languages)
That will probably not help you to improve beauty of your code but, concerning Plato, I strongly recommend reading of The Symposium, a wonderful discourse about beauty and love.
Ok. [How these words sound strange to me in English!] Let me please switch language and say it again:
« A propos! Je recommande vivement la lecture du Banquet de Platon, un merveilleux discours sur la Beauté et l’Amour. »
(Better! J)



