Yes, Ok. We get it! There is no business case for clean code and/or refactoring. Try to explain the benefits of converting to php configs to a muggle (none tech people) and witness the blank stare of unequivocal hatred and disbelief. Therefore, if it's not understood no business minded person will be willing to pay for it.
I'll attempt to very briefly outline in a none technical way why clean code and refactoring are mandatory.
Ok, so you're pushing your dev team to produce something, because to win the project from your competitors you had to over promise to the client. All fine, standard business practice, right?
In your mind you don't care what is created, as long as it 'works' and can be demonstrated to the client and it's quick.
Quick generally means pressured and as demonstrated in the images, the results are... variable. I'm not suggesting that development should be slow, I'm suggesting time needs to be taken in specific areas to reduce the amount of time wasted later on.
Now let's imagine, the client says, they no long want a drawing of Spiderman, but of Harry Potter. For an artist to change the existing images this would indeed be a difficult.
Thanks to the changeable nature of programming, things can be changed. can be, doesn't mean should be or that it's piss easy to do. Albeit, there is a lot less wasted paper when dealing with code, it still takes time.
Going back to the image, we can see the glaringly obvious quality issues with the quicker / pressured solution.
Now imagine you have hundreds of images and they are all interconnected and it has all been built under pressure. Getting the big picture now? It's difficult to change without making a mess and it probably already is a mess.
Ok, so how can this problem be resolved?
Promise the world to the client on a budget of nothing, win the contract and be the hero of the office for a day.
Then, instead of pressuring the dev team to 'produce' anything. Follow these steps:
- Fix all issues and update in the existing code base and ensure quality conventions are being followed. It probably won't be easy, but it will be worth it.
- Simplify, simplify and simplify more. Simplify everything: all configs, build process, CI runs. (If you can't get a rough idea what's going on as a none-tech, then it needs to be simplified further.)
- If a new project triple and quadruple check the setup has been done properly and simply.
Once these steps have been done development will be quicker.
Therefore, I now conclude that refactoring is a cost cutting benefit, not an expense nor a weirdy beardy, specy techy indulgence.
Investing time at strategic points for the project to be done 'properly' and simply will save a disproportionate amount of time later on when you have to attempt to deliver the ridiculous promises that you made to the client.