Subscribe by Email


Saturday, June 16, 2012

Code Restructuring - An activity involved in software re-engineering process model

As we know “Software re- engineering process model” is a model that has been used over the years to improvise the already existing poor code that is no longer accepted.  The poor code is restructured to meet the current standards of software engineering. This model consists of 6 basic steps as mentioned below:
  1. Inventory analysis
  2. Documentation reconstruction
  3. Reverse engineering
  4. Code re- structuring
  5. Data re- structuring
  6. Forward Engineering
This article is dedicated to the discussion regarding the fourth stage of the software re- engineering process model i.e., the code reconstruction. 



What is meant by Code Reconstruction?


- The code restructuring process involves analyzation of the source code. 
- The violations of the programming practices are noted down and later repaired. 
- The revised code is then reviewed and subjected to extensive testing. 
-Firstly, in this stage the program files that are executable are identified with the consultation of the person in the company who is intimate enough with the knowledge of the files and can grant some logic to their existence. 
- Next step, in this stage is the verification of the identified and setting up of the baseline. 
This step requires a lot of investigative work since the executable might have been affected by a lot of factors. 
- The code is verified using the sample input data or test files.
- The baseline for the executable is formed by documented data files and source code files. 
Now the developer who holds the responsibility to re- engineer the code, needs to familiarize himself with the existing code and figure how is going to re- engineer it. 
- He then carries out several walk-throughs and code reviews under many different conditions with its users.
- At this stage, the developer is free to introduce comments in to the code as per its re- structuring needs.
- Other requirements can be stated in the project log. 
- It is very common for the developer to encounter bugs at this stage. 
- The developer needs to discuss with the client and figure out a way of dealing with the bugs. 
- Next follows the identification of the requirements of the process like:
  1. Commenting the code.
  2. Modularity of the code.
  3. Documentation of the code.
  4. Enhancement of the code.
  5. Removal of the unused or unnecessary code.
  6. Removal of the duplicate code.
  7. Removal of duplicate parameters.
  8. Porting of the code to another platform.
  9. Enhancement of the user interface.
  10. Defining the language standard of the code.
  11. Conversion of the code in to an alternative development language.
  12. Improvement and maintenance of the performance.
  13. Optimization of the code.
  14. Improvising the internal error handling capacity of the code.
  15. Inclusion of additional functionality.
  16. Fixing the existing bugs.
  17. Implementing alternate third party products.

More about Code Restructuring


- The code is restructured in identifiable phases i.e., the original code is re- engineered in the phases that have been identified. 
- The software tools here may be helpful in the investigation of the code coverage, unused variables, hot spots, coding standards and so on. 
- Apart from these, manual inspections can also help a big deal in identification and removal of the duplicated and false code, collate parameter definitions and optimize the array storage. 
- On an overall basis, restructuring of the code greatly improves its performance. 
- Even the simplest of the “not so obvious” issue can significantly affect the performance of the code like accessing of the data. 
- Different languages have their own way of storing arrays. 
- Therefore, the way that is used to access this data can hamper the performance to a great extent without coming to the knowledge of the developer. 
- Lastly, the code is tested after the completion of the restructuring. 


No comments:

Facebook activity