Example of poor commenting

Assignment Help Basic Computer Science
Reference no: EM131368397

As you have learned in the text, the process of compiling code changes it into a machine-readable (rather than user-readable) language your computer can then execute. The compiling process ignores any comments entered by the user, as they have no effect on the operation of the program. However, comments within code are valuable to you and any users who will read your code, arguably as important as the code itself.

Always comment your source code fully. You may be tempted to skip this step in the midst of coding because the program and all of its component classes, methods, and objects are fresh in your mind. When you move on to other projects, or return to a half-finished program later, those comments will be invaluable guides. Comments help you avoid much time and anguish trying to understand the code. The importance of commenting is even further underscored when you work with other programmers or when that code will eventually be maintained by someone else. Without thorough commenting, you have already made the job harder for future administrators of the program-before they have laid eyes on the code or even inspected a single method. Clients that cannot make sense of the code they paid for will be far less likely to seek you out for future programming jobs.

Review the sections of the text that refer to comments, including the three different methods you can use to code comments in Java. Next, go to any open source repository, where software developers collaborate on the development of open source software, and download the code from one or more open source projects. Some potential repositories to explore are: SourceForge (sourceforge.net), JavaForge (javaforge.com), and Google Code (code.google.com).

You will notice that the quality of the programs and the quality of the programming varies greatly. Try to remember that these open source projects are posted by programmers of all different levels of experience, and the projects are in various stages of development. As such, they do not always embody sound programming practices.

Examine the source code for one or more open source projects and locate an example in which: (1) the documentation and commenting within the program leaves something to be desired and (2) more than one control flow statement is used. Inspect the code for the individual source files. If you are able to build the project, run the program a few times so you understand what the author of the program was trying to achieve and how the lines of code in the project work. Think about how the commenting could be improved.

By Day 3, post a response that summarizes your findings. The post should:

  • Include a link to the open source project you chose as an example of poor commenting, or attach an example source file to your posting.
  • Identify the methods within the example program you believe are not sufficiently documented.
  • Examine the control flow statements to determine what they do and if their purpose is clearly documented.
  • Explain why you feel the current commenting within the project needs improvement.

Copy the example code into your post, replacing or adding detail to the current comments in order to make the program easier for a user to understand.

Reference no: EM131368397

Questions Cloud

Create a common-size income statement : To retrieve the data for your company, go to the Stocks area and enter the ticker symbol. Finally, choose Financials and then the statement type.
Explain whether you agree with frankls opinion : Explain whether you agree with Frankl's opinion that it is important for a person to have the freedom to choose one's attitude in a given set of circumstances and to choose one's own way.
Summarize an article on muslim tourist perceived value : You need sumarry of an article on Muslim Tourist Perceived Value in the Hospitality and Tourism Industry
How do you think the five stages of group development : How do you think the five stages of group development (forming, storming, norming, performing, adjourning) will be different for virtual teams as compared to traditional teams?
Example of poor commenting : Identify the methods within the example program you believe are not sufficiently documented. Examine the control flow statements to determine what they do and if their purpose is clearly documented.
Calculate the firm''s expected ending cash balance : Finally, how would your ending cash balance change if the firm uses any cash in excess of the minimum to pay off its short-term borrowing in each month?
Analyze the inverted pyramid and its implications : Write the given essay assignment.- Analyze the inverted pyramid and its implications.
Demonstrate your knowledge and understanding of materials : Demonstrate your knowledge and understanding of the materials cited on the Background page. Supplement these with relevant sources you locate on the Web.
Create a cash budget for june to october 2012 : Create a cash budget for June to October 2012. The cash budget should account for short-term borrowing and payback of outstanding loans as well as the interest expense. The firm ended May with a $30,000 unadjusted cash balance.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Name of the system that systemd replaces

1. What does the d in systemd stand for in Linux? 2. What is the name of the system that systemd replaces (the older system name)? 3. What is a service unit when referencing systemd?

  Analyze the residuals from this experiment

Write down a regression model that can be used to predict crack length as a function of the significant main effects and interactions you have identified in part (b).

  Write analogous steps in dimensioning computer network

Write four steps which you think a transportation engineer takes when dimensioning such highway. What are the analogous steps in dimensioning computer network?

  Design an fsm of a new protocol to allow these features

Assume that our network may corrupt packets, but it never loses or duplicates a packet. We are also concerned about flow control. We do not want the sender to overwhelm the receiver with packets. Design an FSM of a new protocol to allow these feat..

  Determining the arithmetic sequence

If you have an arithmetic sequence, the first number is 2 and the common difference is 4, what is the 4th number in the sequence? The next term in arithmetic series 3, 4.5, 6, 7.5 is?

  Compare and contrast between make-to-stock and make-to-order

Write your own personal statement or comment with the essay below with each question.1. Compare and contrast between make-to-stock and make-to-order systems. In your comparison, why does each system require different types of contracts?

  Which property of the matrix multiplication is demonstrated

Define a matrix A = [12 16 4;23 1 21;9 10 1] and B = [2 7 14;3 11 2;-9 10 12]. Perform matrix multiplication A*B, and call this D. Find the transpose of A, and call this E. Find the transpose of B, and call this F. Find the transpose of D, and call t..

  Determine the frequency content of the outputs

Thus, if a system creates "new" frequencies, it must be nonlinear and/or time varying. Determine the frequency content of the outputs of the following systems to the input signal

  Computer science vs computational science

Write an appropriate ME expression capturing the essence  - Weak artificial intelligence

  How many phase angles are needed

Consider a QPSK system that will transmit three bits of information per symbol. (a) How many phase angles are needed? (b) draw a vector diagram for such a system?

  Integration of enterprise systems with inter-organizational

Include a cover page containing the title of the assignment, the student's name, the professor's name, the course title, and the date. The cover page and the reference page are not included in the required assignment page length.

  Use a row function

Create a new table that adds a new column to the l_foods table. Use a row function that will add together the price and the price_increase columns. Name the new column new_price.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd