Recent Posts

Recent Comments

  • Stew: I’m not easily impressed. . . but that’s imprssieng me! :)
  • Olli: Two and a half year later – nothing changed.
  • Arrays: Steele made a wonderful piece about programming languages for the JAOO developers conference called 50 in 50....

Top Commentators

Archives


« Being a crew member at JAOO | Main | Why do I keep coming back as a speaker at JAOO Aarhus? »

What is beautiful code?

By Therese Hansen | July 2, 2008

First of all: What is beauty?

For beauty includes three conditions, “integrity” or “perfection,” since those things which are impaired are by the very fact ugly; due “proportion” or “harmony”; and lastly, “brightness” or “clarity,” whence things are called beautiful which have a bright color.

Thomas Aquinas, Summa Theologica.

This definition of beauty by Thomas Aquinas was at the center of a talk at JAOO Aarhus, 2007. The speaker Marcel Molina took this classical definition and applied it to code.

  1. Integrity: Integrity is about fitness for purpose – how well does the solution fit the problem?
  2. Proportionality: Good structure with perfect relation between parts of a system.
  3. Clarity: Simplicity and clarity of code.

After the talk Kresten Krab did an interview with Marcel Molina, Glenn Vanderburg and Chad Fowler about the beauty of code and they concluded that it is something worth striving towards. Not because you want to be an artist but because it is good for your clients.

You can see the interview here:

The idea is that making beautiful code has practical value and is not just an egotistical desire on the part of the programmer who wants to be an artist. Beauty is used as an indicator of quality. Even when the beauty is in the source code and not visible to the customer of a software product it is still desirable in terms of the trade-off between cost of creation and cost of ownership.

Kent Beck talks about common code smells and the smell of ugly code can be very useful, but can the notion of beauty be of practical use as well?

Can we build on the thinking of Marcel Molina and Thomas Aquinas and get nice practical rules of thumb about beautiful code?

Category: JAOO | Tags: , , , , , , , | 4 Comments »

4 Responses to “What is beautiful code?”

  1. 16,147 km | JAOO Community Blog Says:
    July 15th, 2008 at 8:56 am

    [...] What makes code beautiful? [...]

  2. ntschutta.com » Blog Archive » Beautiful Code Says:
    July 16th, 2008 at 3:46 am

    [...] Glenn Vanderburg recently posted a link to a conversation about beautiful code recorded at JAOO. The 20-ish minute chat is full of lots of nuggets including a Thomas Aquinas [...]

  3. Aesthetics in every angle of JAOO? | JAOO Community Blog Says:
    August 1st, 2008 at 3:18 pm

    [...] What makes code beautiful? [...]

  4. Красив код | NeXt Says:
    August 3rd, 2008 at 8:28 pm

    Trackback:
    [...] http://blog.jaoo.dk/2008/07/02/what-makes-code-beautiful/ има доста интересно интервю между Marcel Molina, Glenn Vanderburg и [...]

Comments