The Three Numbers 13
There are only three numbers that are truly meaningful in software design. The numbers are the same as the numbers in relational database design: zero, one, and many.
Zero: if a condition, circumstance, requirement does not exist, then no code should exist (commented or uncommented) to deal with it. This is true for requirements we haven’t seen (future proofing), but is also true for requirements which have some and gone. When a test, function, variable, or class has zero uses, it must be deleted. Recognizing the power of zero helps us keep our code clean.
One: A condition or class, event or circumstance, role or behavior exists, and so we must code for it. There is a limit on how much insulation and abstraction is needed. We can keep things very simple. Moving from zero to one (adding a requirement) is the typical operation, but moving from one to zero also happens.
Many: More than one is “many”. You might as well consider adding a list and/or interfaces. In design, some things repeat and some do not. Those that repeat are likely to continue repeating. Therefore, many is represented first by the value of two. Where there are many, there needs to be some insulation. The open-closed principle tells us that we should open the system for extension. The usual case in design is moving from one to many, but sometimes one will move in the opposite direction by removing interfaces or lists.
The transitions in either direction are important design events.
Trackbacks
Use the following link to trackback from your own site:
http://blog.objectmentor.com/articles/trackback/4478
it is a good [[js d
Classic exposition, I have also mentioned it in my blog article. But it is a pity that almost no friend discussed it with me. I am very happy to see your article.
There is a limit on how much insulation and abstraction is needed. We can keep things very simple. Moving from zero to one (adding a requirement) is the typical operation, but moving from one to zero also happens.
http://blog.objectmentor.com/articles/category/tims-tepid-torrent/page/5
I like the framework from the posts. I bet you are able to even do far better. Compose a lengthy write-up and demonstrate us what you are able to do. I’ve no doubt you?¡¥ll generate even greater data. I’ve subscribed to a lot of blogs but this 1 is actually a keeper!
Very interesting. Thanks tottinger..
Tüm dunyadaki okey oyunculari ile ayni platform içerisinde sohbet ederek canli okey oyunu oyna ve ve internette online oyun oynamanin zevkini çikar.
We have many style beats by dr dre headphones for you to pick up,what you have to do is choose the one you like most. By our professional service, you can buy your favorite monster beats dr dre headphones from us with full confidence. After I got beats by dr dre studio several months ago,I am now so pleasant with these shoes.
Hello Friend,Whichever style of Fashion Shoes you’re looking for, classical, fashionable, lovely or the latest design, you can find your favorite designer shoes in www.dunkpage.com ,several days ago I bought one pair of shoes from there,It’s beautiful and very comfortable!
Your article is really catch my eyes, and help me get much more knowledge, I really hope I could read your posts in future.
All the papa from the Scooter teen guy so, who expired subsequently after simply being hit because of a van like the person experienced relating to an individual’s moped has experienced couple of teardrops tattooed relating to an individual’s are up against to make sure you recognise an individual’s despondency.
I really enjoy your articles. Very well written. Fashion brand replica Men Evisu Jeans from China at on line store
Slewing ring is also called slewing bearing, some people called: rotary support, swing support. English Name: slewing bearing or slewing ring bearing or turn table bearing, slewing ring in the real industrial applications is very wide.
This is really good idea. why not keep a copy of the iPhone data on computer without iTunes and you can restore the file to iPhone when necessary. good luck.