4 ms·
Hi, I'm the author. I submitted this yesterday, but I didn't even get 1 upvote, so I'm glad to see it here today as I think it is a very important topic for di
by robertelder 11y ago
Hi, I'm the author. I submitted this yesterday, but I didn't even get 1 upvote, so I'm glad to see it here today as I think it is a very important topic for discussion. Feedback from the submission on Reddit has suggested that this article is too long which I now acknowledge. I'd be happy to hear any critiques you have.
- specialist 11y agoGood article. Interfaces and modularity are core concepts, worthy of much attention. Especially questions like how to do functional decomposition, finding the right abstractions, and good interface design. I'll chew on your statements about the success of Python. Though my first love was LISP, I'm now far more comfortable leaning on static typing and composition. --- The best book on software design I've ever read was written by two economists. Design Rules: The Power of Modularity http://www.amazon.com/Design-Rules-Vol-Power-Modularity/dp/0262024667 http://www.amazon.com/Design-Rules-Vol-Power-Modularity/dp/0... This book didn't change how I program so much as changed how I think. Like the difference between making and criticizing art. Whereas SICP gave me new mental models, Design Rules gave me new philosophies. More like Design of Everyday Things did.
- nickpsecurity 11y agoThanks for the link. Let me repay you with one: http://www.amazon.com/Design-Essays-Computer-Scientist/dp/0201362988/ref=sr_1_1?s=books&ie=UTF8&qid=1456549011&sr=1-1&keywords=design+of+design+brooks http://www.amazon.com/Design-Essays-Computer-Scientist/dp/02...
- alexc05 11y agoNice! I haven't read it yet, but just from the title it's made me think that interfaces are at the very least among the most important things I've learned in the last five years. Dependency injection probably competes for the top spot (though interfaces work really well there too) Anyways, looking forward to reading it
- tejohnso 11y agoI read it and didn't find it to be too long, but the sections on copyright and patent seemed out of place. It was a pleasant read and brings up important concepts for consideration. Reminded me of this https://www.youtube.com/watch?v=5tg1ONG18H8 https://www.youtube.com/watch?v=5tg1ONG18H8
- nkurz 11y agoAn interface is the intersection between the system and the environment. An implementation is the system minus the interface These definitions seem at odds with each other. The first sentence would imply that the interface is part of the implementation, but the second says that the implementation and the interface are exclusive. What do you feel you gain by defining things in this way, as opposed to saying something like "the interface is the portion of the implementation with which the system interacts"?
- robertelder 11y agoYes, this was something that bugged me as well. In the article, I touched on this by noting that it makes sense to also think of the "contract" definition of an interface. Meaning that the "contract" is really just a set of intentions or guarantees, so it doesn't really 'take up any space'. It would almost seem appropriate to use infinitesimals from calculus when trying to measure how much of the system is composed of the interface. A good interface should be clearly visible from the outside, but it should be as lean as possible to avoid overconstraining what the system can do.
- mac01021 11y agoWhy does the line "add_numbers 3 4 = 7" qualify as part of the interface for the haskell function, while the interface part for c/python is taken to include only the name/arity/type-signature of the function?