"Beautiful" has several meanings. Some people think clever code is beautiful. Some people think code that reads like poetry or prose is beautiful. Some people think codes that achieve a lot in a few characters is beautiful. Some people think code that respects an arbitrary paradigm (say Object-Oriented Programming) is beautiful. Like with other arts, beauty is a matter of taste. A piece of code could be ugly for you and beautiful for me, or vice versa. Moreover, even for a single person, beauty is hard to define. My definition of beauty is close to that of simplicity. This answer doesn't mean much since I cannot define simplicity precisely either. David Gelenter is one of the Computer Scientists who thought the most about the aesthetics of code. He wrote: Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defence against complexity. More pragmatically, here are four important characteristics of beautiful code: - de-coupling: code is structured in self-contained, re-usable, independent chunks; - simplicity of interface: these code chunks do not take too many arguments and their behavior does not change too much depending on the arguments they take; - evolutivity: adapting the code to new constraints (this includes business domain changes as well as portability) does not require major changes in the design of the software; - coherence: if similar problems are solved in different parts of the software, they are solved in similar ways - opinionated software is usually coherent.