Do you use interface as a tagging system for the code, or you have a better way to remember which object does what?
how do you keep in mind a complex system, after the use of the abstraction.
|
Do you use interface as a tagging system for the code, or you have a better way to remember which object does what? how do you keep in mind a complex system, after the use of the abstraction. |
|||
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
Every mind has its limits, we cannot keep in mind large amount of complexities. I would even say that our job, as programmers, is to maintain complexity under control, and there is no silver bullet for this. The cleaner, intuitive, simpler the system is structured, the easier it is to find one's way through. This is achieved by simplifying things where it can be, by decoupling things, by choosing the right abstractions, the right tools, etc. |
|||||||
|
|
I only use interfaces as tags where it is idiomatic in the language/existing source. That practice is uncommon. As for keeping a complex system in mind after abstraction... Well that's the point of abstraction isn't it? If the system is well designed/abstracted, you don't need to keep the entire thing in mind; just the part you're working on. Good names help, because then you can read cthe code rather than remember what that bad name really means. Good types help, since they have obvious purposes. Consistency is vital. Then you don't need to remember details about the code since all of the code follows the same style and practices. It is easier to read, and you don't have to read a lot of code to work on the one part of the system because it is easy to infer what the rest of the code does (and how it does it) when the code is consistent. |
|||
|
|
tagging with interfaceorremember which object does what? I know the serializable interface in java and c# that does not have any method in it but is used to tell the serializer that this class can beserialized. java (@AttributeClassName) and c# [AttributeClassName] also have attributes. – k3b May 15 '12 at 14:34