CodePudding user response:
See two interface right processing functionCodePudding user response:
Two interface is now two sets of code, though some are called common interface, Shared leadership mean taking a class to form a set of code, I didn't quite understand what he meant, now two interface right-click pop-up menu resource ID is same, is to let them in a class a common response to a set of response function?CodePudding user response:
Please keep in mind: the source code itself whether writing structured object-oriented or comply with the design patterns or agile... Is not important, the important thing is whether you using structured or object-oriented or comply with the design patterns or agile... Method named identifier, read, modify, inspection, test source code,Mean you program structure seems more reasonable, more concise, does not necessarily than looked a mess when running or modify the program structure are less likely to make mistakes, more convenient to modify, wrong where is easier to find the cause of the error and the error, it is easier to correct mistakes,
Try comparing
Library (on the classification of the book is structured enough)
And
Any search engine (is considered to be a flat structure data, only support full-text retrieval)
Which to process information more convenient, more efficient,
So
Rather than strive to refactor your code make it looks more concise, more reasonable
Learn as laborious grep, sed, awk,... This kind of full-text search and batch editing tools,
The more complex structure, the harder it is to change, the more difficult it is to debug,
Sometimes (or even most of the time), seems more reasonable, more concise code, run up the worse performance, when something goes wrong, the more difficult it is to find reasons to find what went wrong after correction, the more difficult,
Programmers do not try to avoid mistakes, but focus on quickly discover and correct mistakes, really in a quick way to solve the mistake easily, "rapid failure" than "to prevent error", Fred, George
Before Microsoft c # editor's development director Jay Bazuzi listed some questions to help find the right direction; He felt that former colleagues should use these questions to ask yourself; Actually regardless of where is the work of developers should always ask yourself these questions:
In pieces to ensure this problem will not appear again, "what should I do?"
Pieces to a less "Bug, what should I do?"
Pieces "to ensure that the Bug is easy to be repaired, what should I do?"
In pieces "to keep on changing fast response, what should I do?"
In pieces "to ensure that my software running speed, what should I do?"
If most of the team can ask yourself from time to time, is bound to benefit from, because these are really powerful,
CodePudding user response: