Monday, June 25, 2012

Rewrite and rewire

1. Chart necessities
    When you start with existing code then usually it's well bloated. There are half formed, half-implemented ideas, constructs remaining from discarded ideas as well as code that's lying in comments. We need to remove all of this and add new code so that the new software ends up being slicker and easier to manage than old software. Code management is a complex job, and it's almost akin to file management on your personal computer or Laptop. Often you horde up files and what not together and when you start on cleaning you come to understad that half of the stuff is junk. So is with code. In any application which doesn't have quality people looking after it, there's a lot of junk code lying around. It's often in the form of unimplemented ideas coded partially which end up in comments. Or structures that are not used anywhere. Or header files that are not included anywhere.

2. Start with barebone infracture
    We start with an empty project and often don't pick up anything from old project. We study the old code, we evaluate it and then import the parts that we think are good enough. We stay away from junk code. We don't use code that's overtly complex or is dependent on too many things. Instad we develop our own simpler code that does the same thing.

3. Add pieces as well as dependencies
    Next as we go on adding functionality to the application, we increasingly find ourselves using more and more code from old code. So we must make sure that we are nitpicking the required code only. Also we do the same for dependencies.

4. Finish product
    This way we finish the project with minimal code from the old application and the constructs we are using are incredibly simple to use. We have just finished one milestone and if we are strapped for time then we send this stuff out as it is for testing.

5. Don't test it yet; remove unneeded code
    Now if we have time then we spend some of it deeply studying the current code and removing anything that doesn't meet the quality criteria. We need to have a threshold for the quality and so we follow the guidelines and we finish the QC.

6. Optimize existing code
    Next we perform some optimization. Experienced devs like us usually have lists of things that need optimization.

7. Refinish project
    So after all this we celebrate the official development freeze.

8. Give it for testing
    And send it for testing. Which is followed by a small bug fixing routine and some time in between we have the gold party.

No comments:

Post a Comment