Copy-Paste Programming
noun
say it: “KAH-pee PAYST PROH-gram-ing” /ˈkɑpi peɪst ˈproʊɡræmɪŋ/
Copying a block of working code to every place that needs it, instead of naming it and calling it.
What is copy-paste programming?
Copy-paste programming is the anti-pattern of copying a block of code that works to every place that needs it, instead of pulling it out into one method and calling it. It feels like a fix the day it's done. Later a bug fix reaches only the copy it was made in, and the copies drift apart: an app shows 10 places left in a class while the front desk shows 9. The better answer is to pull out a method.
In a sentence
- “Copy-paste programming is why the app said 10 places left and the front desk said 9.”
Level: Apprentice · More Software Development terms at this level
Updated