BUAAOO fourth unit and Lessons Learned

The fourth unit operations blog

This module architecture design and summary

Claim:

UML diagrams parser implemented, most of the properties can be interpreted class diagram, a state diagram and the sequence diagram, and needs can be determined according to three simple rules class meets certain rules FIG.

Architecture implementation:

I think this unit work focuses on understanding the basic use of UML diagrams and properties, as well as the use of java management of complex data structures.

  • node is the father of all UMLElement retain some basic operations and common attributes, UML each element corresponds to a Myelement

  • For each new Node, all the corresponding Node id is resolved, and then stored with each other node. Form a tree structure.

  • For cyclic operation, most of the use of floyd algorithm or a recursive algorithm.

  • Handler uses three classes of common belonging to a single handler class, inherited method does not use, in order to prevent a class too bloated.

  • For element do not care, no implementation, both to ensure easy to expand the architecture, but not so distracting.

  • Still using redundant data storage to facilitate queries to the same elements in different ways

Traveled pit:

  1. The original data organization is linear, convenient maintenance and decoupling. All nodes are stored Id attribute node, and finally get the top-level node in the parent query id, the original intention of doing so is easy to find classes by name, but in fact did not achieve this purpose, inviting the complexity of the top class and maintenance of difficulty

  2. folyd algorithm does not pay attention to the order of nesting cycle leading to inadequate.

  3. Failed to notice the importance of scalability, appear endpoint for the helpless. In fact, I started to have a spot endpoint, but because there is no implementation, and mylifeline not compatible, so wrong. The most fundamental reason is that I failed to find it is to explore and interact with the message when the endpoint, the test data is not fully led to this bug appears.

Still need to enhance the capabilities of the code:

  1. The ability to create powerful test data. The reason why so many strong measure linked, mainly because he did not make the test data, thanks to head imagination. I imagine beyond the test methods are:

    • Test Method redundant data, generate test data is established according to certain rules, and may be manufactured at different locations of the null pointer exception.

    • Test limits around the boundary test method, that is, for example, he wants to test cycle, it constructed a number of different cycles, try to open the brain-hole test session, come up with some method to test himself had not thought of

    • Testing outside the limit, the robustness of the process is often more important, beyond the strict limits of course, there are no special instructions, but real, to come up with that kind of data is necessary

    • Share test method: you share their strong test data to others, will also receive super data from others. "Gangster recognition and proximity" is also to me as the representative of the Northern compulsory silver

  2. The first idea enough thinking ability to withstand attack. Since the first ideas are often directly determines the overall architecture, if architecture is not suitable for the beginning of the expansion, then later want to get rid of, just like a shitMountain just as bad, because you start thinking this is not comprehensive, which later led to no dare to delete redundant storage.

  3. Write the code of concentration. Why every time I write cycle OO job so long? Mainly because really sit still, experience is not easy to solve the problem when he wanted to do things any other general tension. But in fact completely useless. So really we need to learn bigwigs perseverance

  4. debug and Share

Understand architectural design and OO methods as well as the evolution of four units tested:

Architecture:

  1. In the derivation unit, my understanding is that reuse similar approach to architecture and then put everything back to write again. Why not just copy it? I am worried because the last part of the implementation details of the NA. After all, I was not able to really decoupling methods and classes. Because let go of the hands and feet, a method often took more than one function, only limited by the number of methods to ensure the line. And the naming of a small problem, leading to their immediately afterwards can not understand what they are doing.

  2. In the elevator unit made a great improvement in the architecture scalability. The first two operations almost no major changes (but because the changes are too small, so ignore many of the details). But the third time more difficult, I was not able to adapt over. I really thought about playing third operation will increase the selected layer. So the way to get the passenger elevator has undergone great changes. The architecture is a management categories, subcategories form several functions, it is necessary to consider resource contention issues thread. This framework should guarantee both performance on the basis of correctness.

  3. I think jml unit is to teach us how to achieve architecture reuse. Help us reproduce the real scenario requires infrastructure reuse.Let me Tucao, the last section of the first two sections and is really a unit of it? The main difficulty of this unit is focused on algorithms.

  4. In UML unit, presumably also for the reuse of architecture teaching, I learned in addition to reuse inherited another method - associated. Both to ensure that all the original method can be used, but also to ensure the complexity of each class will not be high. The premise is that the original method does not need to make any changes, but the new method is completely irrelevant.

OO way to understand:

  1. Derivation unit, I was thinking mostly based process, although began to consider unravel the relationship between the various objects, but the actual class or only a few, limited to the term structure based on class. The teacher suggested that it may achieve a derivation interface. But only now getting a bit to understand the meaning of the interface. The third time jobs because too lazy to distinguish three kinds of recursion, write a lot of repetition and difficult to maintain code.

  2. Elevator unit, according to still a noun class configuration. This time there are efforts to try to unravel the burden on each object. About functional decoupling has done a part like handler, lefthandler and the like, but the effect is not very satisfactory, performance, communication and exchange of handler and the bottom and top of a relatively big brother is not easy to achieve more complex. Not well understand the importance of leaving a smooth interface

  3. JML unit, reflects the importance of OO methods. Since a node is something like the use of well-managed property. The query graph unit in addition to knowledge, the main inquiry is to examine the overall ability of some information. Description OO is not only a reproduction of the structure of reality, it is an optimization, not only can check in true tree structure, you can also add redundant structure

  4. UML unit, I think I did okay in this section. May be the reason the tree is relatively easy to extract an object, I can create a little bit of class average based on the complexity of the distribution functions and entities. Will not have to reject the get, set method. You can acquire skilled in the properties of the parent class. But some can be concluded that the parent class does not perform much summed up roughly Tai Fu class --NODE children, the code repetition rate is a little high.

Testing:

Honestly, I grow in testing is not great, because every time are placed on writing code or test the program, but did not spend a lot of time to share, but do not understand the principles of automated testing.

Testing can be considered from the following aspects:

  1. Simplistic features to ensure that no mistakes can be let go.

  2. Stress tests, with a large number of high data reproducibility several tests generally measure the errors such as burst stack

  3. Boundary testing, manufacturing data from the limiting boundary data

  4. Global test and test a combination of local, focused on specific functions can be tested, especially the part related to more than one object or multiple layers or multi-cycle, we should intensify efforts to test

  5. Write data generator, control some of the more important features, can generate large volumes of data and better data

  6. share it

Course harvest:

  • For the ability to control the java code has been significantly improved, initially thought to be a lot of immature restrictions, such as so many documents too much trouble, get and set methods determined not to pass internal data structures (but this will make the data exchange variations and modifications have trouble), always in the brain for a way to stay a very long time to start DIY, but now almost think you can start with code code.

  • Added algorithms attention. I do not know because the original use of the wheel already exists, it will not algorithms, each will use very LOW way to achieve have been very simple function. Rational use of the algorithm can not only increase the accuracy but also shorten the development cycle

  • Mastered several important development model, such as producers and consumers, viewers, factories and so on. Architecture design more flexible. Learned to use input - handler, input and output interfaces, project directory structure

  • OO thinking preliminary master, it is reasonable to decouple each object function. Understand and initially tried to test the function of thinking, slowly understand the importance of scalable structure, the initial attempt to unit test

  • You can not overestimate the speed to write their own code to start writing as soon as possible, as soon as possible to complete the test as soon as possible.

Program Improvement suggestions:

  • Testing session in class really too difficult. I think the morning classes will begin has not yet had time to digest the exam, even write code directly practical operation, the code is relatively weak for the students is a very high degree of difficulty of thing. If you put out some time, so that we digest the contents of the PPT, check information, or leave some think, is a better method to improve

  • Personally I feel like announcement messages too casual, just to get started, when a total of github, gitlab, oocourse forum, blog garden, large Banqun, in small groups to inform so many ways. Most importantly, informed on a platform, other platforms may not be synchronized. Because she did not properly function of each platform, only concerned gitlab, missed some important node (of course, blame did not start to adapt to independent time planning), hope that the next clear a primary notified party, and at the beginning of the notification group do some reminders.

  • 15 minutes cooling time is a bit long. I remember one time that had already passed the evaluation, but found a bug, then another 30 minutes to pay up when just over 10 minutes, and the results to correct mistakes in the original. (Later it seems to be little brother fishing a teaching assistant, but did not enter a strong measure), if the last two hours, five minutes post once wonderful world that there is.

Guess you like

Origin www.cnblogs.com/Idolphint/p/11072060.html