Mikey Mikey!

Friday, May 06, 2005

Less is more

A second blog for today. I said I'd write on Fridays, but I didn't say how many times!

They say beauty is subjective. However, beauty is also simple. Psychologists say that we find another person beautiful when they are a "good specimen". For example, my idea of what a woman is, will be what I find beautiful. Deciding what is beautiful is a process that involves fine tuning, trial and error, as well as a solid knowledge base (aesthetics if you like). Finally, the beforementioned vary from person to person, culture to culture; they vary depending on one's exposure and experience.

In Computer Science efficiency and elegance distinguish what my CS professor called "big hairy ugly" code and "beautiful" code. With a few minor changes an extract from one of my old papers:

David Gelernter in Machine Beauty argues that: “The beauty of a proof or machine lies in a happy marriage of simplicity and power – power meaning the ability to accomplish a wide range of tasks, get a lot done. […] I call this type of beauty ‘machine beauty’…” (2). Therefore, according to Gelernter, a machine is beautiful if it is simple and powerful at the same time.

Furthermore, “beauty is a truth-and-rightness meter” (1). Gelernter uses Dreyfuss’s 1937 telephone as an example of a technological innovation that has an “inevitable rightness [which] is a large part of its greatness” (7). This illusion of inevitability - in this case appearing to be the way to design the telephone - when achieved, results in “technology that works beautifully and is beautiful” (7). He says that: “Dreyfuss’s the phone” (8); we cannot imagine it any differently now. Summing up, he quotes one designer’s opinion which states: “A useful object has a ‘natural form’ which when is in complete harmony with its function is perceived as having a special ‘rightness’ or fit that borders on art” (8). Hence, a machine characterized by harmony of design and function is beautiful.

It might have been what those insanely abstract courses ("Theory of Computation", "Algorithm Analysis") were all about. As a newly hired junior programmer I am constantly reminded that loops are "evil": "Avoid them whenever possible." As a high school teacher (of sorts - extra afternoon classes) I encouraged my student to solve an exercise today with one loop instead of four.

How do we design and create "beautiful programs":

In addition, we have to be able to understand the concepts of the tool we are using. Norman says that “A feeling of control, a good conceptual model, and the knowledge of what is happening…” are essential to ease of use (174). Using the example of a door to illustrate his point, Norman says that if you need to put a sign on a door that says “push” or “pull” then its design is faulty (174). When designing a program we need to have a “simple, cohesive conceptual model” and then the “details of implementation will flow naturally” from it (179).

Norman points out three aspects to designing a comprehensive model. First, he says that the designer of the model must be able to “tell a story” to “explain to others how it all works” (179). [...] The most important aspect, however, is that the user “should be able to discover and learn how to use it with a minimum of effort” (179). The ideal situation for a successful machine would be if no manual were required (179). Gelernter argues that once we leave out physical limitations and rules in designing a program: “Beauty is the best guide we have” (23). [...]

Another set of guidelines is offered by Gelernter in Mirror Worlds giving us three principles for designing clear programs: recursive simplicity, uncoupling and espalier. A program is recursive “when the whole is structurally identical to its parts - or at least to some of them” (54). [...] As far as hardware design recursive simplicity is applied when a machine is built on a series of levels. At the higher levels we have a clear picture of the machine but the details are not clear, while at the lower levels “the details come into focus” (55). Gelernter argues that the gradual elimination of the details of a design and the multi-layered structure that results is “an art pure and simple”, as he similarly argues in Machine Beauty (56). In computer science, this feature is built into the “machinery” with recursion (56). The second principle is uncoupling; which is when a program is separated into smaller components that are solved separately (73). This breaks the problem into manageable pieces and results in a better organization of the final solution. The final principle, espalier alludes to the support used for trees. This is a way of designing that incorporates a hierarchy with each structure knowing “who its inferiors are, who its superiors are” allowing us to work on only one part of the whole, completely ignoring the top or bottom parts. Finally, you do not need to have knowledge about the whole to work with one part of the program.

And that's all I had to say about that...

No, I have not forgotten the playoffs. I am following them closely... predicting a San Antonio - Miami finals series and hoping for many competitive games.

Suggested reading:

Gelernter, David. Machine Beauty: Elegance and the Heart of Technology. New York: Basic Books, 1998.

Negroponte, Nicholas. Being Digital. New York: Alfred A. Knopf 1995.

Rheingold, Howard. Tools for Thought. Cambridge, MA: MIT Press 2000

Norman A., Donald. The Invisible Machine. Cambridge, MA: MIT Press 1998

Gelernter, David. Mirror Worlds. New York: Oxford University Press 1991.


Post a Comment

<< Home