Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both statements about art are true: you will never achieve perfect simplicity, but you should try to get as close as you can!


Minimalism is but one of many art styles, so I disagree with the goal of achieving perfect simplicity.


Sure, but in the context of code and complexity, minimalism is your best bet.


You are against Easter Eggs, I gather? ;)

More seriously, of these two implementation for Python's str.lower(), which is "minimal"?:

    for (i = 0; i < n; i++) {
        int c = Py_CHARMASK(s[i]);
        if (isupper(c))
            s[i] = _tolower(c);
    }


    for (i = 0; i < n; i++) {
        int c = Py_CHARMASK(s[i]);
        s[i] = _tolower(c);
    }
I suspect most would say the second is minimal, but the first is what Python uses, because it's measurably and distinctly faster than the second, and that extra performance is worth the extra maintenance overhead.

That's one reason I believe that programming-as-art metaphors don't really apply. Minimalism as an art form not the same as minimizing the cost function of different uncertain factors.

Anyway, this reminds me of a story from the Tao of Programming, http://www.canonical.org/~kragen/tao-of-programming.html :

There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: ``Which is easier to design: an accounting package or an operating system?''

``An operating system,'' replied the programmer.

The warlord uttered an exclamation of disbelief. ``Surely an accounting package is trivial next to the complexity of an operating system,'' he said.

``Not so,'' said the programmer, ``when designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws. By contrast, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design.''

The warlord of Wu nodded and smiled. ``That is all good and well, but which is easier to debug?''

The programmer made no reply.


Or, as Einstein put it, "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience."

Rephrasing for the software world: "...without having to make appreciable sacrifices in user experience."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: