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

Refactoring - Essay Example

Comments (0) Cite this document
Summary
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.
Download full paperFile format: .doc, available for editing
GRAB THE BEST PAPER91.9% of users find it useful
Refactoring
Read TextPreview

Extract of sample "Refactoring"

Refactoring Bad programming s exist most of the time. These are s that are more like a traditional kind with long methods and large es.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.
As time passes, additional functionality may be required to be integrated in the program. Doing this may be impossible if the program code is difficult to understand, especially if the one to add functions to it was not the one who initially made the program.
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. Also, when the work needs to be done by a certain deadline, refactoring may not be a good option because the benefits and productivity gain of refactoring may only come up long after the deadline has passed.
Also, refactoring should always be done carefully keeping all possible problems in mind. If a failure occurs with refactoring in a working system, it may cause severe damage to the program. Thus, the principles of refactoring - doing small steps, performing unit tests, applying changes in a predictable manner, not doing restructuring and adding new features at the same time - should always be followed to avoid serious consequences.
Nevertheless, refactoring is still a very useful tool for a programmer. It improves the overall quality of the program and helps to easily maintain it. It is best that a programmer continuously use refactoring in every code he makes. Using it when writing new codes is even better because it will help the programmer himself and others easily understand the code over time. It will also increase the potential of the code during its lifetime.
Works Cited
Fankhauser, Nicola. "An Introduction to Refactoring." Master Seminar: Advanced Software Engineering Topics 17 Apr. 2003.
Hunger, Michael. Refactoring: Benefits and Disadvantages of an Amazing Technique. 25 Oct. 2000. Private Lectureship Applied Computer Science (PDAI). 26 Mar 2006 . Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Refactoring Essay Example | Topics and Well Written Essays - 500 words”, n.d.)
Refactoring Essay Example | Topics and Well Written Essays - 500 words. Retrieved from https://studentshare.org/miscellaneous/1508350-refactoring
(Refactoring Essay Example | Topics and Well Written Essays - 500 Words)
Refactoring Essay Example | Topics and Well Written Essays - 500 Words. https://studentshare.org/miscellaneous/1508350-refactoring.
“Refactoring Essay Example | Topics and Well Written Essays - 500 Words”, n.d. https://studentshare.org/miscellaneous/1508350-refactoring.
  • Cited: 0 times
Comments (0)
Click to create a comment or rate a document

CHECK THESE SAMPLES OF Refactoring

Testing

... for me and seemed to lack responsiveness and flexibility; however, thorough testing is essential for all processes be it the modern approaches such as Xtreme programming techniques or agile development as well as traditional software building techniques. Another issue we have not considered is the impact these support testing methods would have on refactoring. More test methods shall obviously mean more code to alter or to shuffle as I refactored the target classes. It is not clear how difficult refactoring will be at this stage for these tests. Automation can be of help, as such refactored code might be easier to move than full tests; the tests then can be remade after the specs have been replaced correctly in the refactored code...
4 Pages(1000 words)Coursework

Gartner's Value Proposition to Clients

.... Refactoring offers good backward compatibility. Revising allows organizations to optimize their applications to leverage the cloud characteristics of the Cloud provider’s infrastructure (staff reporter 7). Rebuilding enables one to deploy innovative features in the Cloud provider’s platform. Replacing involves discarding the existing applications for use of commercial software provisioned as a service. This option evades the huge cost required of investment in assembling a development team. The major advantage of adopting the Cloud computing provisioning model is that it reduces the costs associated with management of hardware and software resources by shifting the computing infrastructure from on-site to on-network (Hayes 9). Cloud...
4 Pages(1000 words)Coursework

A Systematic Comparison Between Traditional and Agile Methods

... improving the process of project management and to ensure the completion of a project within the specific cost and time. However, both these approaches go behind their own terminologies for the completion of a project. In this scenario, the success of traditional project management is determined through wide-ranging design, longer increments in development. Above all, refactoring, in which the internal working of the existing system is modified without modifying the external behaviour of the system, is considered expensive in traditional project management methods. However, traditional project management is still used for large size projects such as construction projects, in which extensive documentations and careful measures are required...
8 Pages(2000 words)Essay

Software Design Defects Detection and Classification

.... (2010). On the Impact of Design Flaws on Software Defects. Design, 23-31. Ieee. Retrieved from http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5562941 Du Bois,B., Verelst,J.,&Demeyer,S. (2004). “Refactoring –Improving Coupling and Cohesion ofExisting CodeDesignPatterns,” in Proceedings of the 11th WCRE Conference. Gamma,E., Helm, R., Johnson, R., &Vlissides, J. (1994). DesignPatterns – Elements of Reusable Object-Oriented Software. Gueheneuc, Y.-G., &Naouel Moha. (2005). On the Automatic Detection and Correction of Design Defects. In S. Demeyer, K. Mens, R. Wuyts, & S. Ducasse (Eds.), Proceedings of the 6th ECOOP workshop on ObjectOriented Reengineering WOOR. Springer Verlag. Elamkulam, J., Glazberg, Z.,...
8 Pages(2000 words)Literature review

Agile Software Development Methodologies

... software development is considered to be successful in software development projects comprising short increments based on simple design and inexpensive refactoring. For example, if a customer wants to develop a web site and they are not sure what actually they want from the web site. A developer builds a prototype and shows it to the customer and the customer asks the developer to make changes until the web site is developed up to the customer’s expectations. For this kind of software development projects, the agile software development methodologies work very fine. In short, agile software development methodologies are incremental, iterative, supportive, uncomplicated and adoptive by nature and when appropriately managed make possible...
3 Pages(750 words)Essay

Analysis of Refactoring

... 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...
1 Pages(250 words)Article

Creational Design Patterns in Detailed Design and Design Logic Patterns

...amilies of related objects without depending on actual classes. The benefit from this is that it allows creation of new derived types without requiring any changes to code that use base class. Factory Method Definition Factory method is a popular creational design pattern in object-oriented programming and it helps to put into practice the concept of factories. The design pattern may be specifically used to deal with problem of object creation without specifying exact number of object classes that would be created. This method is used when object creation and reuse becomes impossible without duplication of code (Otero, pp.188-189). Problem Refactoring of existing classes of using factories breaks changes existing clients. This...
4 Pages(1000 words)Essay

Programming III ( Advanced )

...to be deserialized on a completely different machine with a different platform (DAnjou, 2005). Serialization in java has been used mainly to facilitate communication between different machines, for persistence, deep copying, caching and cross java virtual machine synchronization. The use of serialization is advantageous since it allows for refactoring , it is customizable and easy to use, allows encryption, compression and authentication thus facilitating secure computing and lastly, the mechanism allows interchange of libraries between java and other programing languages such as C++ among other advantages. Despite the above stated functions and advantages of serialization in java, there are too many disadvantages...
3 Pages(750 words)Assignment

Information Systems

...en model acquired by combining extreme programming and agile methodologies would ensure that the final product is both usable but and friendly. Agile data is applied on the data aspects of the application. Since the functional requirements of the system require the entering and uploading of patient information in a secure manner, agile data techniques are applied on the data aspects of the software system. Agile database development processes and integration include database refactoring, DB regression testing, agile data modelling and continuous database integration (Scott W. Ambler). Works Cited Scott W. Ambler, Mark Lines. Disciplined Agile Delivery: A Practitioners Guide to Agile Software Delivery in the Enterprise. IBM Press,...
2 Pages(500 words)Essay

CIS126 U1 Discussion 2 - 1

... the challenge of their own code with its developers not willing to continue that path. It is important to define correctly the APIs for use in the system other than just using the IDE to refactor the code that requires a very constructive intervention. Object oriented code becomes difficult to handle mainly due to the absence of modularity. The lack of limits in modularity has made frequent developments almost an impossible thing. It significantly compromises the risk of making alterations to the legacy code. Further, there are extra dependencies brought about by frameworks in the open source community. The result is frequent errors and slows down the speed of development. In such environments, code refactoring becomes such a complicated...
1 Pages(250 words)Essay

Outsourcing in Strategic Management Accounting

...ACCOUNTING FOR STRATEGIC MANAGEMENT AND CONTROL 2005 Topic Outsourcing in Strategic Management Accounting Introduction Because of a growth in the number of high-tech companies in the early 1990s, the term “outsourcing” became better known largely. It is often not large enough to be able to maintain large customer service departments of their own easily. The decision to outsource any major function, such as maintenance, is not one that should be taken without due consideration, and careful consideration of all major issues is vital, if the transition to contracted maintenance is to be smooth and acceptable to both companies. Journal Literature Review : Outsourcing that defined as the management and/or day-to-day execution... FOR STRATEGIC...
14 Pages(3500 words)Coursework

Investment Appraisal and Management Control

...Investment Appraisal and Management Control Introduction: Businesses have to make large investments every year. Investments are generally made on buildings, office equipments, transport, etc. It is very essential that management make informed decisions on every investment made since these decisions are not easily reversible, and involve large sums of money, are very futuristic, and have long-term consequences (Bott, 2008). All decisions made by the management affect the company’s revenue in one way or another. Hence, it is important that managers are aware of the consequences of every decision they take, be it, buying a computer for a small company or a vehicle for delivery of goods, or manufacturing plant for the company... Appraisal...
14 Pages(3500 words)Report

Harmonisation of International Commercial Law

...Harmonisation of commercial law Since World War II, global trade has grown exponentially and this has caused increasing importance and emphasis on international law principles, with the need for harmonization in the laws becoming more apparent. The modern perception of the law of international trade has been defined by Schmitthoff, who stated: “It is a remarkable fact - as remarkable as the world-wide acceptance of the rule of law and the universal acceptance of corporateness - that the law of international trade shows a striking similarity in all national legal systems.”1 The notable aspect about international law is that it seeks to move away from the limitations of purely domestic law to a transnational perspective... of commercial law...
6 Pages(1500 words)Term Paper

The Potential of the Accounting Profession in Controlling the Economy and Ethical Business Practise

...Proposal on Finance and Accounting Introduction The issue of introduction of environmental regulation in the business community has spawned a lot of controversy and debate. Various parties, who are either for the introduction of regulation or, for the government to free the market, have sprung up to give an assortment of reasons why their stance is better suited for the Australian situation. A free market situation translates to mean that the government has given reign of the market to the business community. In this situation, the market tends to operate without any government oversight. However, in the pro-regulation scenario, a set of policies are enacted by the government that seek to influence, or rather control... on Finance and...
11 Pages(2750 words)Research Proposal

Sustainable Management of Natural Resources

...Sustainable Management of Natural Resources Sustainable Management of Natural Resources Introduction The Resource Management Act (RMA), 1991, is significant in New Zealand: the intention of its establishment was to promote sustainable management practices of physical resources such as water, air, and land (Peel, 2005). In other quarters, this Act is viewed as a controversial Act of Parliament, but the RMA has been effective in protecting these scarce natural resources through regional and district councils across New Zealand. Subsequently, the Act has attracted critic because the decisions enforced under this Act have had adverse effects on both companies and individuals and because others argue that it has failed to manage... Management of...
8 Pages(2000 words)Research Paper

Should the UK Introduce Recommendations for Weight-Gain during Pregnancy

...SHOULD THE UK INTRODUCE RECOMMENDATIONS FOR WEIGHT-GAIN DURING PREGNANCY? DISCUSS THE EVIDENCE BASE FOR YOUR CONCLUSION By of the Class Name of the Professor Name of the School City, State 20 February 2015 Introduction The gestational period for women in the society requires critical attention to ensure the health and safety for both the mother and the unborn child. Biologically, it is normal for women to add weight during pregnancy. This is however different in different women. Depending on their height and weight before pregnancy, it contributes to the differences of weight gain among women, which could have detrimental effect to their health wellbeing. Realizing the risks involved, there raised concerns to what should... THE UK...
8 Pages(2000 words)Case Study

Child Labor

... Issue Report-Child labor The concern over the of child labor continues to grow despite the milestones made in the emancipation of the societies regarding the issues of human rights and freedoms. The concern over the lives of over a billion children across the globe and their future, which hangs on the gloom from the challenge of child labor, is remarkably impacting on the society. Further, the establishment of various entities, organizations, governments and individual works, all focusing on the issue of child labor and its eradication, depicts the vast significance entailed in the subject of child labor. The International Labor Organization (ILO) is among the leading entities that give the due priority to the issue, particularly...
11 Pages(2750 words)Assignment

Project Risk and Change Management of the Trillo Apparel Company

...LASA Final Project Report Contents Executive Summary 3 Project Performance and Status Report 4 Organizational Structure 5 Project and Administrative Teams 6 Project Risk and Change Management 7 Project Management Techniques Employed 9 Conclusion 9 Executive Summary The Trillo Apparel Company is a vast entity whose operations border on the business line of designing and manufacturing. The company headquarters is in Albuquerque in New Mexico. The company has a broad employee composition, ranging from 3000 people. The company operations are vast, notably covering the entire territorial section of the four districts. In the recent years, the company has struggled accordingly to facilitate an operational process that maintains... Final...
8 Pages(2000 words)Case Study

The Drivers and Barriers Affecting the Development of the Financial Services Industry

... Sub Department Introduction The financial industry is probably one of the most important economic sectors in present-day societies. Thus, in the extremely advanced service economies such as the US-the financial industry employs more personnel than the apparel, computers, automobiles, steel and pharmaceuticals industries combined. The financial services industry therefore accounts for nearly 5% of the GDP in the US alone and almost 5.5 percent in Germany, 3.5 percent in Italy, with comparable statistics found in other European Union economies having exceptionally advanced financial intermediaries (Berges et al, 2014). Similarly in other regions of the world such as Japan, the financial industry accounts for nearly 9 percent... Sub Department ...
10 Pages(2500 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.

Let us find you another Essay on topic Refactoring for FREE!

Contact Us