StudentShare solutions
Got a tricky question? Receive an answer from students like you! Try us!

Essay example - Refactoring

Pages 2 (502 words)
Download 0
Bad programming codes exist most of the time. These are codes that are more like a traditional kind with long methods and large classes. There are duplicate codes, complex condition and switch statements. And since programming doesn't end once the code is finished and the program is tested correctly, it gets more and more complex as it is being maintained all throughout the program's lifetime.

Extract of sample

This is where refactoring will come in handy. Refactoring is a method of altering the code of a software in various ways so it can easily be understood and the cost of modifying the code will be minimal. Refactoring does not change the observable behavior of the program. All changes are done internally just for the purpose of making the code more flexible and reusable. Maintaining the program's observable behavior is crucial to refactoring. Automated testing for each aspect of the software can be done to ensure the consistency of the observable behavior of the program.
Refactoring reduces the degradation of an application over time by helping the developers easily maintain it. It is like cleaning up the program's code. It also makes the program easier to understand in the long run. Since one of the principles of refactoring is for it to be done in small steps, it can help the developer find bugs after testing each small step. And since you can easily find bugs, the time spent fixing them would be lesser. Thus, it will allow for more additional features to be added in the program.
Refactoring, however, may not be applicable to all program codes. If a code seems to be a total mess, really difficult to understand and has a lot of bugs, then it might be better to rewrite the whole thing than just refactoring it. ...
Download paper
Not exactly what you need?

Related papers

Economic growth in China and its impact on American economy
The Golden Age of the China started soon after its amalgamation with World Trade Organization. The membership of World trade Organization has been of economic and industrial benefits for the country. Secondly, the normalization of the Communist China's diplomatic relationship with United States, have further boosted the momentum of Chinese economic activities. These two events are important…
15 pages (3765 words)
The Children by Nina Fedorova
Lida is the main child.…
3 pages (753 words)
Biopolar Disorder
Mania and depression both may involve states of malnutrition secondary to the psychiatrically diminished awareness of or ability to maintain one's health and well-being. Thus, a metabolic panel along with, in extreme cases, levels of thiamine, albumin, and prealbumin may help determine the extent of self-neglect and compromised nutritional state.…
8 pages (2008 words)
How to think about weird things: critical thinking for a new age and uncertain science...uncertain world.
This essay is about two books, How to think about weird things: Critical Thinking for a New Age by Theodore Schick, Jr and Lewis Vaughn and Uncertain Science.Uncertain World by Henry Pollack. Both books are designed as a means of understanding the world and to not take things at face value. For example, How to think about weird things focuses largely on how to deal with arguments which are…
Financial Industry Megamergers
One of them is connected with the regulatory agreements of megamergers which actually are dependent on the antitrust concentration.…
4 pages (1004 words)
Refactoring Essay
Since a lot of programming effort goes to maintaining software, it is a good practice to keep code easy to read and maintain.…
2 pages (502 words)