Recently at work, I've been part of a committee that is trying to figure out a strategic plan for implementing various features. The features are all big and hefty, with several possible implementation paths, and our goal is to try to avoid the kind of schizophrenic codebase that can result from solving every problem on a case by case basis, with no thought given to the possible simplifications and generalizations. Because this committee is thinking about features that may guide the company for the next year or two, I have to remain vague about what exactly the features are, but I wanted to try to share a lesson that I've been learning. Hopefully the vagueness won't make the lesson incomprehensible.
After considering the broad range of features that we wanted to tackle, we realized that about half of them could be solved all at once, as mere instances of a broader problem. Solving the broader problem, however, appeared to be somewhat of a research project. It wasn't clear whether we would be able to come up with a good solution, or whether it would turn into a tarpit.
So I started diving into more detail about how exactly the broader solution would work. After two days and eleven pages, I realized that it was basically a kind of abstract interpretation. Unfortunately, that meant that it would forever be incomplete (abstract interpretation always has a tension between precision and decideability). This was the first bad omen. Nevertheless, I continued on for a while, hoping that I could come up with some sensible subset of the feature that would be complete enough to be useful, yet still decideable.
Bad omen number two was when I realized that a part of our system that had previously been ultra-lightweight and stateless would suddenly have to either maintain an unbounded amount of state or else sacrifice some degree of correctness. I explored a few alternatives for bounding the size of the state, but eventually decided that there really was no natural boundary.
Bad omen number three was when I realized that because the new feature was intricately involved with the concept of time, the rest of the system would have to be very careful with the parts of our system that did involve storing state. This is because storing information as state effectively delays the flow of time -- so you end up having to store some kind of meta-state as well. Furthermore, in some cases, the correct handling of state seemed to require arbitrarily complicated heuristics in order to achieve correctness.
At this point I stopped diving, and showed what I had so far to the rest of the group. They recoiled in horror, and the feature ended up shelved.
Why did this feature fail? I think that's an important question to ask. One of the other members of the team had said from the beginning that he thought the feature would turn out to be infeasible. Why had he recognized this so early, even though nobody else had?
The answer that I've been coming up with is that the feature was fundamentally declarative, rather than imperative. By that I mean that the feature amounted to announcing some fact to the computer, and expecting the computer to react "in any appropriate way". I contrast this with an imperative approach, where you come up with a well-defined mechanism, and you can immediately see which problems it will solve and which it won't.
Here's an example that might help explain the distinction. Suppose you announce to a Windows XP machine that "This file shall be read-only from now on". In response to this proclamation, you expect the machine to do things like disable selection of that file in the "Save" dialog, have notepad flush its in-memory buffers if it happens to have the file open for editing, mirror the file to multiple remote locations just in case the local copy gets corrupted, add it to the list of read-only files maintained on the company intranet, etc, etc.
In one sense, the statement that "this file shall be read-only from now on" is very well-defined and comprehensible. Humans may think they know all of the things that that should entail. But from the computer's perspective, the possibilities are endless. You essentially have to revisit each and every piece of software on the machine, and imagine how it might be affected. And some of those decisions might not have any clear and definitive answer other than "whatever I happen to want". In short, it pretty much requires some form of AI.
I think that software engineers may have a peculiar vulnerability to this kind of folly. We're used to thinking up requirements, and then expecting that there will be some kind of reasonable implementation path, even if it may be difficult and involved. But there really are two kinds of requirements: requirements about well-bounded mechanisms, and requirements about unbounded declarative invariants. "Go through these motions" versus "make sure P is true". Constructive proofs versus existential ones.
I'm beginning to think that one of the main skills of a good architect is to be able to recognize the difference between these two kinds of requirements, and avoid the ones that smell like AI, or like formal proofs of turing-complete systems. I think that I have a natural tendency to try to chase the declarative wild goose, and that that tendency has been responsible for the demise of several of my spare-time projects. I'd like to think that I'm starting to be able to recognize that tendency in myself, and hopefully I'll be able to start avoiding it in the future.
Posted on April 26, 2005 02:11 PM
More languages articles
People all over the world know the abercrombie and fitch,but not everyone really knows how fashion the abercrombie is,hollister is the Legend maker. Everybody wears the hollister clothing would be the abercrombie mensand the abercrombie womens, if you want know you can search the Ruehl No.925 or abercrombie outlet in the www.google.com .
Posted by: anf at November 13, 2009 12:37 AMUggs on sale now.UGG Classic Cardy Boot makes me different form the other
girls. The UGG Bailey Button Boot is a good choice for female.
Posted by: ugg classic cardy boots at November 17, 2009 12:53 AMThe
39.html">classic cardy uggs boots is another hot boots that worth of buying.And the classic tall ugg boots
will make your winter amusing.And now uggs on sale,if you are looking for such a boot,the ugg boots is good choice this year.
www.enjoywholesale.com
china wholesale clothing,china wholesale shoes,china wholesale electronics,china wholesale suppliers,china manufacturers
china wholesale products,light in the box,wholesale lots,wholesale ipod
china direct,china dropship,china trade,made in china
electronics wholesaler,ebay wholesaler,financial wholesaler
fashion wholesaler,clothing wholesaler,wholesaler magazine
computer wholesaler,external wholesaler,dvd wholesaler,wholesaler definition,china wholesaler,mutual fund wholesaler,define wholesaler,insurance wholesaler
discount ugg boots
forture
ugg boots
Discount store
rolex replica
A.Lange & Sohne replica
Alain Silberstein replica
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
We are the best online sales for the china wholesale . Here you can have a large of choices of kinds Ugg Boots,Converse Shoes,Timberland Boots,puma shoes,Nike Shox Shoes ,Nike Dunk SB Shoes,Nike Air Max,Links Of London,Tiffany Jewelry,Dior Handbags?,jimmy choo handbags ,Cartier Watches, 8GB Mp4 Players,Bluetooth Car DVDs. All our cheap online cheap goods are high quality and original packages, and best service. We offer our customers the best service, 7 days arrive at your door.Enjoy your easy and happy shopping with us.
very pretty,now
Christmas is coming, not have prepare the gifts for your friends? ,Hello! Today I found a website selling
Discount Designer Handbags,
discount Handbags,
Replica Louis Vuitton HandBags ,
Replica Chanel HandBags
,Replica Gucci HandBags ,
Replica Chanel HandBags ,
Replica Coach HandBagsit is so cheap.
LV neverfull.
Gucci Cruise Large Beige Tote
Chanel Hobo Noe
discount nike air yeezy
china wholesale online
discount ugg boots
nike free shoes
furture
ugg boots
Discount store
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
rongTiffany Jewelry Online - Discount Tiffany & Co Jewelry On Sale
Hot Sell Tiffany Jewelry - Tiffany Jewelry Online
Return To Tiffany Double Heart Detachable Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co 1837 Titanium I.D. Bracelet - Tiffany Jewelry Online
Tiffany & Co Bead Bracelet - Tiffany Jewelry Online
Tiffany&Co Atlas Round Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Bar Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Bead Necklace(N242) - Tiffany Jewelry Online
Tiffany&Co Bean Pendant Necklace(N157) - Tiffany Jewelry Online
Tiffany&Co Elsa Peretti Apple Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Butterfly Pendant Necklace - Tiffany Jewelry Online
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
Just 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.
Spring is near,every girl wants to be the bride in the special season.They are eager to put on beautiful Wedding Dresses or the Bridal gowns.During the day the Wedding gowns is the good choose,and the night,if you want radiant,you need the Evening gowns.
About the bridesmaid,they have to wear Bridesmaid Dresses in order to avoid grab limelight with the bride.And the Flower Girl has the Flower Girl Dresses,too.In the wedding,the Cocktail Dresses and the Evening Dresses is necessary,too!And remember,the Wedding Dress of the Bridal Dress must be the most glaring!
replica watch
Rolex Day-Date II watch for sale
A.Lange & Sohne watch for sale
replica Rolex Daytona
Cartier replica
cheap swiss watches
Buy a pair of womens ugg boots for christmas,women's Classic Boots,tall women and women's classic short are the best choice for you,ugg classic boots on sale and cheap ugg boots on www.uggssky.com that welcome you to have a look!
Posted by: womens ugg boots at December 1, 2009 09:09 AMNow more and more young people love to wear puma running shoes,due to the puma shoes make you feel more comfortable and more fashionable,buy cheap puma shoes online that you could go to www.ilovepuma.com the puma store to buy
Puma Future Cat,
fluxion ii
or cat puma shoes,high quality and best sprice with free shipping.
Christian Louboutin
cheap Christian Louboutin Pumps
Christian Louboutin Boots on sale
Christian Louboutin Shoes
Christian Louboutin Boots
nike shox