You adopted AI but the delivery timeline didn’t change. Our paper explains why →
August 28, 2020

Do not Copy and paste code to minimize the impact:

By Sapan Parikh

Have you ever seen code in your module, which was so complex that you decided to copy and paste it entirely rather than changing it to accommodate your requirement? What does it say about you and your codebase?

Though a seemingly harmless action at the time of copying and pasting can become the root of many issues in the future, imagine, one will have to remember to fix the problems in all the duplicated code all the time. If all duplicate code instances do not get fixes, these bugs may reappear in different places in the application. Remember, code is a liability; the more of it you have, the more time you will spend in maintaining it.

When intentional duplication becomes the way of safely making changes, you don’t have enough tests, or your tests are not trustworthy. Also, the system may not follow SOLID principles, which makes it tough to extend and change.

About the Author

Sapan Parikh

Co-founder and Software Craftsperson at Incubyte

A tech evangelist and mentor, Sapan has been fuelled by two things in his 15+ year professional career; coffee and his love of designing self-motivated, high-performing and passionate software engineering teams. Being a software craftsperson at heart, he has created and coached teams of over 500 software developers spread across the US and India with the sole objective of forging exceptional software products with an unfettered focus on quality.

Table of Contents

    Share this resource