This really is humbling, but most likely something most can connect with. I'm presently adding functionality to some PHP application I authored for any client 24 months ago. Within the interest of full disclosure, it was the very first "real" application I ever constructed from the floor up, meaning which i really met with clients to find out and write a spec. Then i built the applying on my own, learning SQL when i went (I'd some prior rudimentary PHP experience).

The customer approached me now to create modifications to existing functionality in addition to add new modules towards the application. I recognize since Used to do an undesirable job of modularizing the applying from the beginning to create additions simpler. Presently, the code is made of almost 20,000 lines of code (it's a fairly sophisticated, if narrow application).

I am battling with if you should "rewrite" the applying to create future changes simpler and much more efficient. I ought to explain the character of my agreement using the client is a by which I'll be alone making modifications later on. They're not going to seek another developer with this application.

The budding programmer within me always really wants to do things within the cleanest and many efficient way to be able to satisfy my very own Obsessive-compulsive disorder, however i do plan to bill the customer for just about any time I spend spinning. Morally, Personally i think fine with this particular since the initial rate which i billed them was low - they were given a reliable, working application that has been carrying out with no intervention from me for just two years, and I received my first real development project on my small resume. My dilemma is all about when you should choose to rewrite a credit card applicatoin with regard to future development.

Please weigh along with your ideas. I am sure I am only some of the one that has ever endured this issue.

If anybody has any queries for me personally that can help all of them with a solution, I am now hooked on this website and can respond rapidly :)



There is a secret 3rd choice to the rewrite / don't rewrite decision: rewrite it a little at any given time continuously. This is actually the genius of refactoring, it's not necessary to create a monolithic decision to blow the entire activly works to smithereens and begin on your own, you are able to approach things piecemeal and work at a much better design being an ongoing goal. Don't rebuild the home in the ground-up, rather fresh paint the family room, then redesign your kitchen, then rewire the living room, then redo your window, then landscape the yard, then fix the rooftop, etc. Eventually you finish up inside a Grandfather's Axe situation, permitting you to definitely change more with time than you most likely ever possibly could in a single huge chunk.

This can be done at a variety of levels, making little enhancements with many every checkin (using extract method, relabel variable/method, etc.) to create portions of code more readable and much more maintainable. Or making large enhancements using devoted budgets, working incrementally from point A to suggest B but getting the firm goal of reaching point B (the enhanced design). You are able to still make breaking changes but you have to be wise about creating them. Instead of just changing some little bit of functionality with a few brand-new way (i.e. API) to do things you can preserve that old bits in position and add new stuff additionally into it, you'll be able to flag that old bits as obsolete after which later remove them, after individuals have received lots of time to create a elegant transition towards the new method of doing things.

When are you aware it’s time for you to rewrite a credit card applicatoin

Once the client pays for this.

This really is fairly in accordance with me. My first application seemed to be freelance, and would be a 60,000 line classic ASP monster.

I get calls to keep it once in awhile, even though I have considered spinning it, the fact is that it really works (though occasions have transformed), which my client's confidence may be worth getting me pull a couple of fur out when modifying it.

99% of programs are garbage, it simply is dependent how experienced you're whenever you take a look at them :)