reconstruction strategies also need to | databaserのブログ

databaserのブログ

ブログの説明を入力します。

In the end how bad odor code? - Effects of measure code smell: Aiko Yamashita and Thomas Flemming, translation: @ Gong Linghui with scientific experiments to measure what code smell hardest to maintain. How to deal with the smell of code? Seniors have taught us, as a developer, our main duty is not to write bad code. Unless you are a man combat and just write a few lines of Perl scripts soon abandoned it, otherwise the most important thing is that you write the code must be easy to read Air Max 2012 Green Orange Black and understand. In the software product lifecycle, maintainable code will usually relieve you and your colleagues to sit in front of computer agony of despair a lot of time. However, the cause of the poor readability of the code is not always so clear, which is why the image coding standards, guidelines, one of the reasons things Proverbs code patterns Air Max 2012 Black Red White and programming languages ​​like existence. A well-known criterion is Martin Fowler 2015 Nike Free 5.0 [1] wrote, 'reconstruction' of this book, the book describes a series of code smell and remove these odors reconstruction strategy. Despite this no estimate of resources, we still face challenges - in addition to learning a lot of reconstruction strategies also need to decide what Nike Free 3.0 the priorities are relatively high. Obviously, they can not be equally important! How do we know that now there will be long-term positive code refactoring work effective? The problem is that Martin Fowler's book does not mention what the reconstruction code smell is critical and what is not. Fowler himself also mentioned that no criteria or indicators can match human intuition. As developers, we can only rely on intuition and experience to determine the need for reconstruction. This could be a nightmare. Faced with thousands of code smell a system where you want to start? In addition, any changes to the code are likely to bring not the intention of side effects. Even with high-quality automated test, modify the code often contains Air Max 2012 Green Orange Black high-risk and costly. If you know what code smell is the most destructive, first dispose of Nike Zoom KD V them just fine. In addition, we hope to show management that we are not wasting time in order to write beautiful code is the code written on beautiful, but our current efforts can bring long-term benefits for the project in the future. [Add]: in the field of software development, code could cause any symptoms of deep-rooted problems can be called a code smell. Typically, in a brief feedback on the code iteration, code smell will expose New Nike Free 5.0 V4 Shoes Black Red some deep-seated problems, iterative feedback here, refers to a small range, controlled manner refactoring code. Based on these problems exposed, people will further checks whether there are other code smell design and code, and then do further reconstruction. Responsible for reconstruction from the developer's perspective, the code smell can inspire when reconstruction, how to reconstruct. Thus, it can be said to promote the reconstruction of code smell was. (From Wikipedia) collect information about code Air Jordan Outlet smell of fact in 2009, the Norwegian Institute Simula need to transform an internal system to a new content management system. This project was outsourced to 6 Java developers. This project is considered to be in-depth research opportunities code smell affect maintainability. In continuing this project for three months, they use a number of tools to measure code smell, daily interviews with those developers, and each developer's Eclipse Air Max 2012 Green Orange Black IDE installed Air Max 2012 Black Red White a logging tool. The logging tool not only modify each file record how long it took, and record spending on search, browse and read the code takes time. In the course of this project, they use an issue tracker issues that developers face tools to register, and then backtracking New Nike Tr Fit Shoes Black Red to the source code files that is causing the problem. In addition, all the developers have to be interviewed. Data collected in this process is far more than just the conventional method of analyzing the code of the warehouse. The following is the observation of the results obtained: 1 observations: universal class is very bad! Source: https: //simula.no/publications/Simula.simula.1460 'Everyone knows that the' universal class is bad, but in the end is not good to what extent? As shown below: Y-axis represents the time spent on the project during the reading of a file modification time maintenance; X-axis Nike Air Max represents the size of the file. Please note, read and modify the maximum file (1844 lines of code) to spend most of the time or more files (less than 600 lines of code) 10 times. This document is a universal category. Also note that 20,000 seconds is almost five hours of work (for a file is too long!). We can also see another edit large files (about 1400 lines of code) does not spend a lot of time. The large file contains a lot of accessor and modifiers, does not contain any logic (as opposed to all-around class). This explains why developers do not spend too much time on it. Large files that contain complex logic (ie Almighty class) can significantly affect maintainability. Recommendation: You should split large files that contain complex logic 653642-400 Blue Orange Lebron James Mens Basketball Shoes Nike Zoom Soldier VIII 8 into small files. A recommended threshold is the file size remains within 1000 lines of code. Observations 2: Data clumps without you want to be so bad ...... Source: https: Nike Air Max 2011 //simula.no/publications/Simula.simula.1456 'mass data (Data Clump)' refers to the number of no relevance semantically collection methods and variables. Under normal circumstances, the file contains the data briquettes contain different types of variables, followed by a series of accessor and modifiers. For example, the following figure Person This class contains a person not directly associated with the information, it can be divided into two classes. Simula researchers created a statistical model to explain whether a code smell increases the likelihood of the emergence of developers Air Max 2012 Blue Grey White encounter problems during maintenance (they will maintain records of all problems faced in the process as well as those files is causing the problem). They found that, in fact, those documents contain data briquettes are less likely to cause maintenance problems! Recommendation: do not worry about those data clumps, unless they contain other code smell. Observations 3: Stick Interface Segregation Principle Robert C. Martin (Bob Uncle) introduced the principle of separation of the interface (ISP) as SOLID