DEV Community

Discussion on: When is a quick and dirty hack justified?

Collapse
 
alainvanhout profile image
Alain Van Hout

A quick and dirty hack is justified when the long-term cost of implementing the hack is less than the long-term cost of not implementing the hack (which might mean going for the clean solution or not doing anything at all). That's of course a value judgement.

Some potential ingredients for such a situation:

  • The business will go under if nothing is done fast (e.g. adding a hack to mitigate a very big security risk)
  • The hack does not add risks (that are larger than the risk it tries to mitigate)
  • The workings of the hack do not create extra work beyond what is feasible to do later (i.e. cleaning up side effects afterwards)
  • The hack does not make it harder to afterwards create a clean solution, from a technical point of view