StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Analysis of Refactoring - Article Example

Cite this document
Summary
 This article discusses a solution to this problem is refactoring, or “cleaning up,” where the code is altered to make it readable and maintainable; thus fixing bugs or implementing new features becomes easy. Refactoring in software code will not change the observable behavior of the program…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER93.3% of users find it useful
Analysis of Refactoring
Read Text Preview

Extract of sample "Analysis of Refactoring"

Analysis of RefactoringIt is usual that existing code needs to be maintained--usually to fix bugs or introduce new features. Sometimes, it is not feasible to do this to large programs without restructuring major parts of the code. The existing rode can also have very low readability and be overly and unnecessarily complex, whereby the task of maintenance becomes impractical and inefficient. A solution to this problem is refactoring, or “cleaning up,” where the code is altered to make it readable and maintainable; thus fixing bugs or implementing new features becomes easy.

The term “refactoring” is analogous to factorization in mathematics, where (x^2 – 1), for example, can be factored as (x+1)(x-1), whereby a simpler and more straightforward structure is shown. Just like in mathematics, refactoring in software code will not change the observable behavior of the program, and is not (directly) meant to benefit end users, but only the program maintainers. The semantics of the program should not change. Most large programs will need bug fixes or additional features to meet evolving demands.

Since a lot of programming effort goes to maintaining software, it is a good practice to keep code easy to read and maintain. Refactoring is usually best done if fixing bugs or implementing new features will require ugly, out-of-place hacks. Refactoring will make the design better from a programmer's perspective. The design is made more flexible and reusable, perhaps even modularized. Some of the more compelling reasons to refactor are: code duplication, classes that are too large (in object oriented programming) or methods that are too long, or simply when there are too many comments that are necessary to explain what is going on.

It must be ensured that the observable behavior of the program will not change. For example, a very simple refactoring step could be changing a variable name to make its purpose clearer, e.g. changing a variable or method name, as in “i” to “increment,” or turning an if block into a subroutine. Refactoring, also includes removing dead code. Tests should be run every time a significant portion of a code is refactored, to ensure that no errors have been introduced. Properly refactored code should generally need very little comments, or none at all, since the code should be self-explaining.

Read More
Tags
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Analysis of Refactoring Article Example | Topics and Well Written Essays - 250 words”, n.d.)
Analysis of Refactoring Article Example | Topics and Well Written Essays - 250 words. Retrieved from https://studentshare.org/information-technology/1524572-refactoring-essay
(Analysis of Refactoring Article Example | Topics and Well Written Essays - 250 Words)
Analysis of Refactoring Article Example | Topics and Well Written Essays - 250 Words. https://studentshare.org/information-technology/1524572-refactoring-essay.
“Analysis of Refactoring Article Example | Topics and Well Written Essays - 250 Words”, n.d. https://studentshare.org/information-technology/1524572-refactoring-essay.
  • Cited: 0 times

CHECK THESE SAMPLES OF Analysis of Refactoring

Capital Budgeting PROJECT ANALYSIS

Capital Budgeting analysis Institution Instructor Date Executive Summary The group project is for Westminster College to acquire the Assets of Brainstorm Skis, which will result in full student governance with oversight from Westminster College and the industry Board of Directors.... A careful analysis was carried out to inspect the viability of the project in terms of revenue generation, costs, payback, depreciation, rate of returns, and the projects net present value....
4 Pages (1000 words) Essay

Financial Performance of Pace Leisurewear Ltd through Appropriate Theory and Relevant Techniques

To wear out weaknesses and strengthening the advantages financial analysis is done by the firms.... Financial statement analysis involves, comparing the performance with that of other firms in the same industry and evaluating trends in the firm's financial position over time.... or evaluating the financial performance of the firm ratio analysis and the Du Pont system are used.... (2001) the subordinate classifications of ratio analysis are:According to Fraser, L....
4 Pages (1000 words) Research Proposal

Invoice Discounting: the Profitability of the Firm

The paper describes the CAPM that is based on a number of assumptions, which have been attacked by a number of researchers.... For example, the CAPM assumes that all investors invest only for a single holding period, which is not the case in practice.... hellip; This implication of the CAPM has been contested by a number of researchers....
10 Pages (2500 words) Essay

Finance Industry: The Nature of Debt Factoring and Debt Subordination

The author states that the factor and the investor cannot be too choosy and meticulous while doing adequate research on the prevalent elements of the investment being considered.... The factor should endeavor to get as many guarantees for the debts he is purchasing as can be secured.... nbsp;… Debt factoring and debt subordination are two important mechanisms that present solutions to cash-strapped companies....
10 Pages (2500 words) Term Paper

Financial Analysis of a Local Government in South Florida

This paper will provide a financial analysis of a local government in South Florida.... Financial analysis of a Local Government in South Florida This paper will provide a financial analysis of a local government located in South Florida.... The analysis will be discussed from the perspective of an outside consultant that has been commissioned by the City Council to evaluate financial conditions of the institution.... The analysis will be provided from the perspective of an outside consultant that has been commissioned by the City Council to evaluate financial conditions of the institution....
2 Pages (500 words) Essay

The Financial Status Of The Firm

If the financial staff of the firm has ratio analysis, variance analysis, strategic plans, assurance reports, and any other information I would need access to the information as soon as possible.... If the financial staff of the firm has ratio analysis, variance analysis, strategic plans, assurance reports, and any other information I would need access to the information as soon as possible....
2 Pages (500 words) Essay

Factoring for Business

The paper "Factoring for Business " says that managing working capital is extremely important because this is the money that is utilized to produce the output the firm generates.... If the company is not experiencing a cash flow problem is an indicator that the firm has an efficient production cycle....
7 Pages (1750 words) Term Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us