Introduction to Comments
Internal documentation of programs is done by the use of comments. All language provide a means for writing comments in programs. Comments are textual statements that are meant for the program reader and are not executed. Comment if properly written and kept consistent with the code can be invaluable during maintenance.
The purpose of comments is to explain what the code is doing not how it is doing it. So comments are not needed for every line of code. The ability to express natural language comments as part of a source code listing is provided by all general purpose programming language. So certain questions arise related to comments are:
1. How many comments are required and essential for code purpose?
2. Where the comments should be placed in code?
3. Are comments maintainable and reliable?
4. Can comments guide the reader?
5. Do comments follow the logic flow or break it?
These questions have their definitive answers. So comments provide the developer with one means of communicating with other readers of the source code. Comments can provide a clear guidance to understanding during the last phase of software engineering life cycle that is maintenance.
To show the use of comments many guidelines have been proposed. There are basically two categories of the comments.
Prologue Comment or Header Comment Block
Descriptive Comments or Other Program Comments
(a) Prologue Comments or Header Comment Block
Prologue comments appear at the beginning of every module: module including the who what where when and how pars. So we must include the following information in header comment block for each component or module:
1. What your component is called.
2. Where written the component .
3. Where the component fits in the general system design.
4. When the component was written and revised.
5. Why the component exists.
6. How the component uses its data structures algorithms and control.
First the name of the component must figure prominently in the documentation .next the block identifies the writer with phone number or e mail address, so that the maintenance and test teams can reach the writer with questions or comments. During the system lifetime , components are often updated and revised either for fault correction of because requirements change and grow. So it is important to track the revisions so program documentation should keep a log of change made and who made them.
As we know that a component is a part of a large system. The block should indicate how if first in the component hierarchy. This information is sometimes conveyed with a diagram or with a simple description. The header block should also explain how the component is invoked.
More detailed information is required to explain how the component accomplishes its goal given as:
In brief the format for such comments is:
1. A statement to give title to the component or module.
2. The name of the component designer ( author)
3. The calling sequence required for the interface description.
4. A development history that includes
5. Date when first version of this modules was released.
6. Modification dates and description.
7. A statement of purpose that includes the function of the modules.
8. A discussing of pertinent data and its various structures such as important variables arrays linked list tree etc. And their use restrictions and limitations and other important information.
9. Required algorithm description.
(b) Descriptive Comments or Other Program Comments
The header comment block acts as an introduction to the program. Additional comments enlighten readers as they move through helping them to understand how the intentions described in the header are implemented in the code. Such type of comments are called as the Descriptive Comments. These comments are embedded within the body of source code and are used to describe processing functions. A primary guidelines for such commenting is expressed by van tassel:
Comments should provide something extra not just paraphrase the code.
In addition descriptive comments should;
With proper identifier mnemonics and good commenting adequate internal documentation is assured.
If the code organization reflects a well structured design, if the statements are formatted clearly and if the labels variables names and data names are descriptive and easy to distinguish then the necessary number of additional comments is small. That is following simple guidelines for code format and structure allows the code to be a source of information about itself.
Comments have a place even in clearly structured and well written code. Although code clarity and structure minimize the need for other comments, additional comments are useful whenever helpful information can be added to a component. Besides providing a line by line explanation of what the program is doing, the components can also break the code into phases representing major activities. Then each activity can be divided into yet smaller steps, each only several lines in length. This purpose is accomplished by the use of pseudo code which can be embedded in the code itself. Even when code is revise, the programmers should update the comments to reflect the changes. In such way the comments build a record of revisions over time.
Latest technology based Software Engineering Online Tutoring Assistance
Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Comments homework help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Comments, project ideas and tutorials. We provide email based Comments homework help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Comments. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Software Engineering homework help and assignment help services. They use their experience, as they have solved thousands of the software engineering assignments, which may help you to solve your complex issues of Comments. TutorsGlobe assure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.
tutorsglobe.com process of urea assignment help-homework help by online urea cycle tutors
The electric current able the motor run. The motor is connected to the fan that has angled blades.
tutorsglobe.com investment function assignment help-homework help by online aggregate demand tutors
tutorsglobe.com right and left brain concept assignment help-homework help by online co-ordination systems tutors
Tissue and Transplantation Immunology tutorial all along with the key concepts of Immune Responses to Tissue Grafts, Transplant Tolerance, Immunosuppressive Therapy, Immuno-prophylaxis, Kinds of Immunization and Vaccine
Theory and lecture notes of Combinations of Functions all along with the key concepts of Arithmetic Combinations of Functions, Composition of Functions, Domains on Composition of Functions, Polynomial Functions and Radical Functions. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Combinations of Functions.
Importance of Fungi tutorial all along with the key concepts of Wine Production, Beer Production, Bread Production, Fungi as a source of protein and discovery of Antibiotics
Theory and lecture notes of Pumping Lemma for CFLs all along with the key concepts of Pumping Lemma for CFLs. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Pumping Lemma for CFLs.
structure and bonding tutorial all along with the key concepts of Electrons in Atoms, The periodic table, Bonding Forces and Energies, Primary interatomic bonds, Ionic bonding, Covalent bonding, Metallic bonding, The atom
tutorsglobe.com extraction of lanthanides assignment help-homework help by online lanthanide series tutors
Industrial Chemical Processes tutorial all along with the key concepts of Basic chemicals, Speciality chemicals, Consumer chemicals, Where are chemical sites located, Chemical industry: how safe and how environmentally regulated and challenges for chemical industry
Theory and lecture notes of Addition and Multiplication Rules all along with the key concepts of Unions, Mutually Exclusive Events, Specific Addition Rule, Non-Mutually Exclusive Events, Addition Rule, Intersections and Dependent Events. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Addition and Multiplication Rules.
tutorsglobe.com importance of inventory management assignment help-homework help by online inventory management tutors
Chemical Pest Control Methods and Their Formulations tutorial all along with the key concepts of What is a Pest, History of Insecticide Development, Ideal Qualities of an Insecticide, Generations of Insecticides, Pesticide Groups, Pesticide Formulations, Types of Formulations
www.tutorsglobe.com offers structured programming concepts homework help, assignment help, case study, writing homework help, online tutoring assistance by computer science tutors.
1952952
Questions Asked
3689
Tutors
1473974
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!