This is rather short-sighted. Whenever code is copied, the two instances will go and live separate lives. Code is never static, over time that copy becomes a partial reimplementation of the original.
There are a few conditions when copy-paste is acceptable:
- You can guarantee that the original code does not have any bugs and thus the copy does not have any bugs, now or in the future. Otehr
- You can guarantee that anyone making changes to this code in the future is aware of the copy and the original and their respective contexts.
- You can guarantee that the context of the original and the copy never changes in a different manner.
- You are happy to reimburse testers and developers for the time wasted tracking down bugs caused by ignoring any of the three above.
No comments:
Post a Comment