In praise of the quick hack
Copy and paste, quick hacks and big balls of mud. These are rightly frowned upon in the software industry, but they happen elsewhere too. Often the programmer gets the blame for being lazy. Programmers will invariably blame poor management. But the real culprit is usually more simple: the budget.
So your client's website is behaving badly due to an unforseen issue. Your client has no budget (he's not lying, he really has no budget), do you:
- Do nothing until he has a budget
- Spend a few hours implementing a proper fix to the solution
- Hack a quick 10 minute fix that you know will work
The decision here is not a programming one, it's a business decision. Let's analyse them:
1. Do nothing
Not your problem. No budget, no fix. You refuse to work for free. On the other hand if you don't fix it, his business may go down the drain. You loose a client.
2. Fix it properly
Doing a proper fix for free would be equally mad, unless you have no other clients. You can't tell other paying customers their projects are delayed whilst you spend the day working for free. You may loose more than one client.
3. Hack it
In your current situation, hacking it is the only real option. Keep the client happy, keep him in business and hopefully he will repay that with future work. Win-win.
Rinse. Repeat. Big Ball of Mud.
Now come and visit the village of my in-laws and try driving through the main crossing. There was a road, once. You now need a 4x4 if you don't want to get lost in the holes.
The council has taken the decision to do nothing due to lack of funding. And no company will fill the holes in for free, even though it wouldn't cost much and would take about 2 hours. The real solution would be to resurface the entire road, but that is permanently beyond anyones budget.
So you drive round the largely un-tarmacked back alleys. Slowly destroying those too. And sooner or later your car ends up looking like the one in the photo. And not just your car. Everyone looses, no one wins.
Thank you for the quick hack. It keeps the world running.