Interpretation of code Daquan (3)

Source: Internet
Author: User

Interpretation of code Daquan (3)

-- Some Ideas in Chapter 4

The title of chapter 4 is "Procedure for creating subprograms". My post-reading experience is "The idea is good, but there is no way to implement it for the time being". This chapter tells you that it is best to write a PDL segment before writing a sub-program.Thinking levelLanguage used to describe the algorithm or program logic. In fact, I don't think it is necessary to write standard syntaxes. It is also possible to use Chinese. Its important feature is in the aspect of thinking rather than concrete implementation, for example, do not use malloc (blocksize) for "allocating a piece of memory.

Although the author of the first version was written in 1993, today, 13 years later, I still find that there is no way to operate it. Why, there is no good tool. The editor vendor's point of view is still in a simple understanding of the Code, just think of it as code, rather than a complex document with multiple features (is this not easy to understand, I will explain below ). However, the improvement in programming methods and the development of computer hardware are now possible.

I think a good modern enterprise code document should have the following items:

1,Detailed notes. Including the functions of the method, the features of parameters, the features of returned values, precautions, and calling sample code. In vs2003 and later versions, these basic implementations have been implemented.

2,Algorithm Description (PDL)It can be Chinese or other languages that are easier to understand.

3,Specific Code. In each line of code, you can easily correspond to a segment in PDL.

4,Test cases.It can be data or test rules.

5,Version information.Each method or class should contain version information, including the modification time, modifier, and version code, which can be traced back to the original problem and the characteristic version can be selected during compilation.

6,Select production version and release version.During Enterprise release, only final products related to detailed code can be generated.

No editor can do this currently, but it has many advantages. Enterprises can control software production throughout the process. It is also possible to implement these features using the current technology, such as enhancing the XML annotation function.

By the way, write your own other ideas. Modern Programming actually does not have many algorithms that require confidentiality. The code written by 90% of programmers is just an algorithm or logic designed decades ago. Therefore, in fact, software production has entered a large-scale production era. Therefore, the editor vendors should also provide a large number of reusable code examples. Most of the Code should be copied and pasted, and make some modifications. At least for the same company. In addition, the production of framework code should also be generated by a flexible code generator. Programmers only need to fill in the code. In the future, programmers may have a finer division of labor like the Construction Industry (designers, gujimiters, database workers, acceptance workers, etc ).

A good editor should also have a library function. I do not know if you have used regulator. This is one listed in "Top Ten DOTNET Tools". In fact, what I like most is the search function, you only need to select one regular expression. I think the same is true for writing code. For example, if you have a "XP style menu", you can find a variety of options for you! (In fact, there are already many tools on the Internet to achieve this goal, but they are not very useful ).

At last, there were so many questions that I could not take any notes. Haha.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.