I was thinking about Mandelbrot sets again today, as a metaphor for the difference between the static and dynamic aspects of programming. The static equation of the Mandelbrot set (Z <- Z2 + C) is relatively simple, while the dynamic behavior (a fractal) is relatively complicated.
Suppose you wanted to write a program to calculate a Mandelbrot set. It's a lot easier to just write down the static equation in your program than it is to try to write down what the resulting fractal should look like. "Well it's symmetric, of course, and it also has lots of spirals and branches and tendrils, and they're all connected to each other, and... well... it's hard to describe".
On the other hand, sometimes it's easier to describe the dynamic behavior instead of the static behavior. For example, if you're dealing with a client-server system, it's easy to say "no request should ever cause it to crash or hang". But it's difficult to write code in such a way that this is guaranteed.
In other words, fractals have simple specifications but complex behavior. In contrast, distributed systems have simple behavior, but complex specifications.
A holy grail of programming would be to be able to work on whichever side of the static/dynamic divide is most appropriate for the problem you're trying to solve. Sometimes it's easier to just write the code in some imperative language than it is to specify the emergent behavior. Other times you want to specify constraints on the emergent behavior without bothering with the implementation details. And in most programs, you'd like to be able to do both, and have both sides influence each other.
I think it would be interesting to explore the interplay between these two ways of seeing programs. The yin and the yang, as it were. I find it intriguing that most of the successes in CS so far seem to be based on describing the dynamic behavior of a program by examining the static code. Type theory fits into this category, as does static optimization, formal verification, etc.
We've had much less success (or maybe just less research effort) going the other direction: specifying constraints that the dynamic behavior of a program should fulfill, and then deriving a static implementation automatically. This category includes logic programming, constraint programming, etc.
It's not obvious to me why it seems to be easier to deduce dynamic behavior from a static specification, than it is to interpolate a static specification from dynamic requirements.
Posted on November 28, 2003 12:21 AM
More programming articles
Interesting thought. Pardon the levity of my response, as I'd really like to give it a little more thought, but the first thing that came to mind was a parallel with the logical process: producing dynamic behaviour from a static specification is a process of deduction, ideally an isomorphism (well, barring compiler bugs, language ambiguities, environment interactions and so forth); producing a static specification from dynamic requirements, though, is an inductive process, isn't it? Wouldn't the largest difficulty come from automating the creation of a potentially ambiguous static specification, then incrementally refining that into a state of workability (if not unambiguous representation - but, as noted above, even the result of the inverse process is not free of potential misinterpretation in practice)?
This seems similar to the theme explorered in the book "Watch What I Do", a book about programming by demonstration (the full text of which is available at the above link) which I picked up some months back but which has remained unread since then. Have you looked into this at all?
Posted by: Gnomon at November 29, 2003 02:36 AMYou're right, it is a matter of induction versus deduction. And I suppose it's always possible to handle deduction -- if you don't have a theory of how a set of rules will play out, you can simply brute-force it by running them manually, and find out. And computers are really good at that.
Induction, on the other hand, requires that you come up with some theory of how to proceed. In the general case, it requires creativity and inspiration. And computers are really bad at that :)
As for programming by demonstration, I have come across it a couple times but never really gotten interested. I think I just haven't seen any applications of it that are sufficiently general, and sufficiently powerful, to cross my threshold of interest.
discount nike air yeezy wholesale online"> china wholesale online
discount ugg
boots
nike free shoes
furture
ugg boots
Discount store
Supra Shoes
Supra Skytop Shoes
Supra Society
Supra Thunder
Supra Suprano Hi
Supra Strapped
Supra Trinity
Supra Skylow 1.5
Supra Dixon
Diablo 1.5
Supra Cruizer
Supra Vaider Shoes
Supra Cuban
Laptop Battery Laptop Battery Laptop Batteries
Laptop Batteries discount laptop battery
discount laptop battery
notebook battery notebook battery
computer battery computer battery
replacement laptop battery replacement laptop battery
notebook batteries notebook batteries
chaoying nfl jerseys
Giants Jerseys
Patriots Jerseys
China Electronics Wholesale China
Phone Cheap Cell Phones
href="http://www.thechinaphone.com/index.php?main_page=advanced_search_result&keyword=China%20Wholesale">China Wholesale
replica handbags
Louis Vuitton Replica
Louis Vuitton handbags
fake Louis Vuitton bags
fake Louis Vuitton
replica rolex
replica rolex
fake rolex
buy cheap fake rolex
rolex Submariner
Paul Smith has been collaborating with a few different organizations recently and his latest venture sees him teaming up with Japanese bicycle saddle, Paul Smith bag, on a limited edition leather saddle. The release features Smith’s signature stripes where only 20 will be available at Paul Smith Clothing store in Japan and 8 at the Floral Street store in London. Get on it quick
Posted by: dasf at November 29, 2009 11:49 AMJust wanted to say great job with the blog, today is my first visit here and I’ve enjoyed reading your posts so far
ugg bailey button
Wow, my ugg classic mini will not be coming off now! I’ve had them on for 12hrs strait and I do not want to take them off. Thanks for everything, well worth the wait.
replica watch
Panerai watch for sale
replica IWC
replica Rolex Milgauss
Rolex Milgauss watches
jimmy choo handbags
replica watch
Panerai watch for sale
replica IWC
replica Rolex Milgauss
Rolex Milgauss watches
jimmy choo handbags
Louis Vuitton Replica Tivoli PM
Louis Vuitton Tivoli PM Replica
Posted by: fanqin at December 1, 2009 02:35 AMBurberry Handbags|
Burberry Handbag|
Burberry bags|
Burberry bag|
Chloe Handbags|
Chloe Handbag|
Chloe bags|
Chloe bag|
Christian Dior Handbags|
d&g Handbags|
d&g Handbag|
d&g bags|
d&g bag|
Hermes Handbags|
Hermes Handbag|
Hermes bags|
Hermes bag|
replica Hermes|
replica Hermes Handbags|
nike air max 2009
discount air max 2009
nike mens low dunk
nike air max 360
cheap adidas shoes
Adidas 35TH Anniversary
Women's Adidas 35th Anniversary
adidas adicolor shoes
dicount UGG Lo Pro Button
ugg new arrivals
cheap ugg nightfall boots
ugg sundance boots
ugg ultra tall boots sale
ugg mayfaire boots on sale
replica watches
Rolex watch for sale
Vacheron Constantin replica
croum replica
Louis Vuitton replica
1837 Collection
Christian Louboutin on sale
discount Christian Louboutin Pumps
discount Christian Louboutin Sandals
cheap Christian Louboutin Sandals
discount Christian Louboutin Shoes
copy handbags
ugg boots sale at a time when large heat has set off a winter 08/09 to Ewha.Outlines the
warm wool winter fashion degree to wool crocheted wool ugg boots uk to join after the
body does not stimulate your skin soft, soft comfort UP. Fashion can not without
ugg boots presence in Winter.and ugg boots have many series.such as:
ugg classic
UGG Bailey Button boots
ugg nightfall
ugg kids