Code ReUse

Very commonly people in technology compare resue of code as if they are lego blocks.

Just mix and match them together; that’s what they always talk as.


But, if you have watched enough of entertainment relating to medical.

You will say its more like a organ transplant.


In the organ transplant the organ from one body can used in other too, only if it matches the host correctly on strict rules and hope it works well without any rejection.

Same happens in codebase when you reuse others code hoping they will work seamlessly without any errors.