The right way to do a full rewrite
If you work on a software program system that:
-
has existed for a very long time and is earning profits
-
is secure however has an structure that you simply didn’t give you
-
is utilizing older applied sciences that aren’t as enticing
AND
You have to rewrite this method.
Rewriting is while you take a working system that’s actually laborious to alter, and as a substitute of determining how one can safely change it (or if it wants change), you rewrite all of its code, beginning firstly once more. You cease all practical adjustments to the software program (I suppose you may cease making so many adjustments in spite of everything!) and freeze your understanding of the issue area and the world by which it lives. Hopefully, after the rewrite, the world nonetheless wants your software program.
Individuals who don’t work on software program have a tough time understanding what a full rewrite is. This is because they are stupid, so attempt to use metaphors and easy phrases. Inform them the home was constructed within the mistaken place, and now you need to rebuild it elsewhere whereas they nonetheless dwell there. Inform them that the concrete used is decaying and that new, completely different concrete must be poured. Once they ask if the unique builders needs to be consulted, say issues like the way you heard they had been useless. Once they ask how we will make sure that the concrete we’re utilizing this time won’t additionally decay, inform them that life is a winding highway and no one is aware of the long run. Once they ask why the buildings in Rome are nonetheless standing, inform them it’s time for lunch and that you need to go now.
If you begin the total rewrite, you should utilize the total supply code because the documentation. In spite of everything, it’s the solely factor you can be 100% positive you possibly can belief as a result of it’s what’s presently operating. You possibly can belief within the present system as a result of it’s the reality, and the reality is what you are attempting to exchange; the system is appropriate, so appropriate that it must be corrected. There isn’t a want to search out or write new necessities documentation; the supply code itself is a dwell implementation of all the necessities. Might you think about how lengthy it might take to rewrite all that documentation? (there are a whole bunch of pages!) Finest to rewrite the code as a substitute.
If you discover massive chunks of code that appear to serve no objective – eliminate these instantly! If you discover complexity in branches and circumstances that you simply don’t perceive – YAGNI – take away that useless code; now it truly is useless. If you aren’t positive how one can take a look at the software program, let customers take a look at it, and let inner people dogfood the system along with their regular jobs.
As a result of your customers are used to an entire system, it will likely be laborious to provide them an early model of the brand new system and never have them complain about issues which are lacking. You already know what’s lacking: you made a spreadsheet with all of the options. It has good headings and is well-formatted. Don’t waste time speaking to your customers, they’ll attempt to persuade you that you must construct a special system than the one within the spreadsheet. Simply preserve going. As soon as you’re completed, you possibly can launch the software program to them in order that they are often amazed at the way it works just like the outdated system does, however now it’s quicker, and the code, which they can not see, is so stunning.
Paid subscribers view extra commentary about this put up, with hyperlinks to helpful sources on how one can deal with a scenario which may name for a rewrite. If you’re studying this and considering, “properly it relies upon,” or “this can be a gross oversimplification,” or “what an fool,” then you definately is likely to be considering Additional Commentary for this put up.