Thursday, August 18, 2005

Mother Nature

Many great human activities and inventions were inspired by nature in the history and computer science is no exception. In this contribution, Charles expresses an idea that is inspired by the Nature. He compares the program generation (a method that should bridge the wide gap between problem description and its solution and also a method that Intentional Software aims at) to DNA - a description (of a problem) that Nature uses to generate whole human being (the solution). This comparison is a good one, I believe. The only thing that remains is to find the right enzymes producing healthy individuals and no rejects.

Speaking of inspiration by Nature, there are other ideas concerning computer science. Although the Recapitulation theory is being abandoned lately, the connection between Ontogeny and Phylogeny undeniably remains.

If we compared the evolution of programming to Phylogeny and an evolution of one program to Ontogeny, we would get a simmilar connection. If the Ontogeny copies some steps of Phylogeny (as the Recapitulation theory claims), does it mean that in different stages of one program development, its authors should use different styles of programming? Should we start with very basic elements, then design fundamental procedures, create modules and finally use objects and find cross-cutting concerns? Or does it mean that in every well-written more complex program a different programming styles will inevitably appear?

Wednesday, August 03, 2005

Aspect limits second time

Although this blog was opened six months ago, I've discovered its existence only recently. Interestingly, Charles' contribution little formalizes an idea I mentioned six months ago. When I wrote about AOP use-cases and its limits I didn't suspect that it's exactly what Charles means by an insufficient degree of freedom. AOP allows advice to be woven before, around or after a method call only. It does not offer the possibility of waving it into critical section entry or leaving or even into different branch instructions (if, switch, for, while, etc.).

If one intends to implement the same use-case - monitoring of locks acquiring and releasing via AOP - she has different possibilities whether she monitors Java built-in synchronized keyword or whether she waves into methods of the Java 5.0 API (the class java.util.concurrent.locks.Lock). In the former case, she fails; in the latter one, she can do it.