Recently, because work is not busy, I want to find some things to do after get off work.
Start from some foundations,
So picked up the textbook of the data structure.
I remembered the first experimental question at the school at the time.
- Two-link table polynomial multiplication of two-stranded meniscus.
Write again.
Use some scattered time, completed two days.
There is a harvest in practice!
There is a little gain during the process of writing:
When the big one just on the C language, the teacher said, "self-top" and "bottom up" implementation method,
Multi-class build polynomial addition (subtraction) Multi-class sorting polynomial multiplicit printing polynomial a one multiplied by polynomial
This is a simple "bottom down" implementation method.
Experience, this method may not be used in many times in the work.
In these two days of work, you must implement a functional module menu.
Painting Window-> Draw each item -> ...-> Interface Tissue Initialization ->
-> Load Data -> Message Processing (Proc) -> Update->
-> Implement module function,
In this way, when analyzing the design, it is a "self-top" method.
In the specific implementation, it is a "bottom up" implementation method.
At the same time, there are also some gains:
When I encode, I don't listen to some questions,
Remind yourself to do some operations,
This will increase efficiency in invisibly and reduce the possible possible possible.
Of course, I will experience it, it may be just a few partial parts, waiting to be complement in the future.
1. When a module begins, whether or not the design should be made in advance.
- Since the top, each sub-module is divided into the purpose of achieving it.
It is necessary to clarify the function, and parameters of each sub-module, (parameters can be changed according to the needs of the specific implementation);
2. Does the parameter and return value of the module are considered when the code is written;
Good parameters, easy to call; return value is clear, direct ERROR: such as: Design a set of error code;
3. When writing code, the variable defined is initialized;
It is best to initialize, especially arrays, pointers and control variables, sometimes some inexplicable results
Both are caused by no initialization, and some control variables may cause an exception in the execution of the module;
4. Is there a parameter error judgment, which parameters need to make an error judgment;
5. After the application space is used, MEMSET initialization is used;
6. Apply for memory space, whether it is in the appropriate position when the module is over;
7. When writing code, is it always reminding yourself to have a code of writing code until it is a habit;
These are some gains from a small practice,
Thinking in practice, there may be more harvests;
So in the future practice,
Want to think about "temperature",
It is necessary to "know new" in exploration;