RSS

Patterns of Software: Richard P. Gabriel'den sistem tasarımı ve hayat üzerine incelikli bir kitap

11 Sep

Bir insan hem çok sıkı bir matematikçi hem dünya çapında bir Lisp programcısı hem de mükemmel bir yazar olabilir mi? Kodlarken sergilediği ustalığı sözcükleri ve cümleleri şekillendirirken sergileyebilir mi? Ağzında “gümüş kaşık” ile doğmamış olsa bile her türlü başarısızlığa rağmen devam edip başarabilir ve milyon dolarlık bir şirketi kurup yönetebilir mi? Ve sonra hemen her şeyini kaybedip yeniden başlayabilir mi?
Görünen o ki eğer söz konusu kişi Richard P. Gabriel ise yukarıdaki soruların cevabı evet. Gabriel’in Patterns of Software kitabını okumayı dün sabah bitirdim. Uzun zamandır okuma listemde iki ancak geçen gece başlayabildim ve birkaç gün süreceğini düşünüyordum okumanın. Gabriel o kadar akıcı ve güzel yazmasaydı en az birkaç gün sürerdi. Sonuçta odada kan çanağı gözler, uçup gidivermiş birkaç saat ve garip bir ruh hali içinde bir ben kaldım.

“Desing Patterns” dendi mi hemen herkesin aklına meşhur GoF (Gang of Four) ve aynı isimli kitapları gelir, “Patterns of Software” de eklenmeli mutlaka listeye. Hap çözümler için değil. Bir nebze derinlik ve ufuk kazanmak için.

Kitaptan bazı notlar. Soyutlama üstüne:

The danger of clarity is that it is uncompromised beauty; and it?s real tough to to improve uncompromised beauty. Many second- and third-rate sculptors can fix a decent sculpture?I saw a group of them one summer making replacement gargoyles for Notre Dame Cathedral in Paris?but which of them would dare repair Michelangelo?s David? Who would add a skyscraper to the background of Mona Lisa? Who would edit Eliot?s poems? Clarity is dangerous.

If a programming language is optimized for the wrong thing?like pleasing efficiency, mathematical precision, or clarity?people might not be able to live with in or in it: It isn?t habitable, piecemeal growth isn?t possible, and the programmers who must live in the software feel no responsibility or ownership.

Christopher Alexander‘ın çok önemli bazı fikirleri ile yazılım ve sistem mimarisi dünyasına açılımlar:

Compression is the characteristic of a piece of text that the meaning of any part of it is ?larger? than that particular piece has by itself. This characteristic is created by a rich context, with each part of the text drawing on that context?each word draws part of its meaning from its surroundings.

Habitability is the characteristic of source code that enables programmers, coders, bug-fixers, and people coming to the code later in its life to understand its construction and intentions, and to change it comfortably and confidently.

Piecemeal growth is the process of design and implementation in which software is embellished, modified, reduced, enlarged, and improved through a process of repair rather than of replacement.

İyi bir programcı ve ortalama bir programcı üstüne:

This implies that abstractions are best designed by experts. Worse, average programmers are not well-equipped to design abstractions that have universal usage, even though the programming languages used by average programmers and the programming language texts and courses average programmers read and attend to learn their trade emphasize the importance of doing exactly that. Although the designers of the programming language and the authors of texts and course instructors can probably design abstractions well, the intended audience of the language?average programmers?cannot and are therefore left out. That is, languages that encourage abstraction lead to less habitable software, because its expected inhabitants?average programmers working on code years after the original designers have disappeared?are not easily able to grasp, modify, and grow the abstraction-laden code they must work on.

Yine soyutlama ve dikkat edilmesi gereken noktalar üstüne:

Another problem with complex abstraction arises from the observation that abstractions are about ignorance. The prime idea of encapsulation is that the implementation is hidden, thereby preventing assumptions about the implementation. Some complex abstractions, however, contain information about the implementation that is legitimately required, such as its performance, the algorithm, coding tricks, and resource usage?keep in mind that almost all interaction issues are about resource conflicts. When the implementation is truly hidden, its user is forced to use real scientific methods to infer or discover the needed information. Rather than preventing assumptions, hard encapsulation tends to guarantee incorrect assumptions.

Ve biraz da Lisp üstüne:

In that first year we hired around 15 people, including all three employees of a very small Lisp company in San Diego. We established ourselves as competitors of Symbolics, Lisp Machine, Inc. (LMI), and Franz, Inc., a small company based in Berkeley that was selling a Lisp dialect called Franz Lisp (get it?).

We used inlining as the basis for coding those parts of the system available from the interpreter. For example, there is an operation on binary trees called car, which takes a binary tree and returns the left-hand branch. This function must be available from the interpreter, and the compiler must compile itefficiently. So the interpreter’s version of the function is written like this:

(defun car (x) (car x))

It looks a little puzzling, but the compiler open codes the call to car into a series of machine instructions, and the effect of the defun is to register the existence of a function accessing that series of instructions.

Kitabın mimari, estetik ve sistem tasarımı arasındaki ilişkiler üstüne olan bölümlerini, Alexander yorumlamalarını okurken yer yer bir Zen Budist ya da Taocu eseri okuyor hissiyatına kapılabilirsiniz. Yazılanların 30 yılı aşkın çok dikkatli inceleme, derin düşünme ve pratik sonucu ortaya çıktığını bilmek kolay ve kestirme bir değerlendirme yapmayı engelleyecektir herhalde.

Gabriel gibi bir programcının ve yazın ustasının Türk kilimleri ve buradaki simetri, altsimetri durumlarından bahsettiği kısımlar ise Hoftstadter‘in “Gödel Escher Bach“ındaki bazı bölümleri çağrıştırabilir. Baş dönmesine karşılıklı hazırlıklı olun.

Gabriel’e bir teşekkür borçluyum. Object Thinking‘den sonra bir hayli karışan kafamı iyice karıştırdığı ve tez zamanda beni Alexander okumaya sevk edip başıma daha büyük dertler açacağı için! 😉

Advertisements
 
2 Comments

Posted by on September 11, 2006 in General, Lisp, Literature, Programlama

 

2 responses to “Patterns of Software: Richard P. Gabriel'den sistem tasarımı ve hayat üzerine incelikli bir kitap

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: