4 ms·
15. (Shea's Law) The ability to improve a design occurs primarily at the interfaces. This is also the prime location for screwing it up. So true. Parnas' pap
by 6ren 14y ago
15. (Shea's Law) The ability to improve a design occurs primarily at the interfaces.
This is also the prime location for screwing it up.
So true. Parnas' paper on information hiding and decomposing into modules is of course also about choosing the interfaces https://docs.google.com/viewer?url=http://www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf https://docs.google.com/viewer?url=http://www.cs.umd.edu/cla... (bonus: he describes the genesis of the paper, see the "quick view" of the top of this google search https://www.google.com/search?q=filetype%3Apdf+parna+on+the+criterion+for+decomposing+into+modules https://www.google.com/search?q=filetype%3Apdf+parna+on+the+...)
Unfortunately, once you've chosen interfaces that hide the details and things likely to change, it becomes harder to change the interfaces, in case you were wrong in your predictions of what will change in the future... Or, if you just didn't understand the best way to approach the system... (how could that happen?)
It's hard to change because other modules depend on this interface. Unit tests operate on the interfaces between modules, so they need to change too... and you won't have the safety net they provide. Documentation must change. etc.
Therefore, in practice, interfaces are not changed.
- wsc981 14y agoI thought it was an interesting point and it reminded me of something. I've worked on an iOS project with a really ugly web API. I could improve the project internally quite a bit by making a native iOS API that I would talk to, which would hide lots (but not all) of the uglyness of the web API. So I guess if one deals with ugly interfaces it may be wise to wrap the ugly interface in a cleaner one. As an added benefit, the project is decoupled more from the ugly interface, perhaps permitting to replace it with something better in the future.
- rosser 14y ago"All problems in computer science can be solved by another level of indirection." — David Wheeler [1] [1] https://en.wikipedia.org/wiki/David_Wheeler_(computer_scientist) https://en.wikipedia.org/wiki/David_Wheeler_(computer_scient...