Skip to main content
Post Closed as "Needs more focus" by CommunityBot, ChrisF
Post Made Community Wiki by Shivan Dragon
added 264 characters in body
Source Link
E.Z. Hart
  • 1.1k
  • 8
  • 13

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

Just to clarify (based on Jaroslav's answer below) - I'm not talking about using code snippets here; what I see (disturbingly often) is copying-and-pasting of vast swaths of code, or a ten-line piece of code to get some user data (complete with inline SQL query) pasted into dozens of PHP or ASP.NET pages. So, duplicate code from elsewhere in the same project.

Update: There are several really good answers here; I've explained in the comments why I chose Scott Whitlock's answer, but I would also highly, highly recommend whatsisname's answer if you're dealing with customers who are familiar with manufacturing at all.

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

Just to clarify (based on Jaroslav's answer below) - I'm not talking about using code snippets here; what I see (disturbingly often) is copying-and-pasting of vast swaths of code, or a ten-line piece of code to get some user data (complete with inline SQL query) pasted into dozens of PHP or ASP.NET pages. So, duplicate code from elsewhere in the same project.

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

Just to clarify (based on Jaroslav's answer below) - I'm not talking about using code snippets here; what I see (disturbingly often) is copying-and-pasting of vast swaths of code, or a ten-line piece of code to get some user data (complete with inline SQL query) pasted into dozens of PHP or ASP.NET pages. So, duplicate code from elsewhere in the same project.

Update: There are several really good answers here; I've explained in the comments why I chose Scott Whitlock's answer, but I would also highly, highly recommend whatsisname's answer if you're dealing with customers who are familiar with manufacturing at all.

Tweeted twitter.com/#!/StackProgrammer/status/52882828832149504
Clarifying based on Jaroslav's answer
Source Link
E.Z. Hart
  • 1.1k
  • 8
  • 13

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

Just to clarify (based on Jaroslav's answer below) - I'm not talking about using code snippets here; what I see (disturbingly often) is copying-and-pasting of vast swaths of code, or a ten-line piece of code to get some user data (complete with inline SQL query) pasted into dozens of PHP or ASP.NET pages. So, duplicate code from elsewhere in the same project.

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?

Just to clarify (based on Jaroslav's answer below) - I'm not talking about using code snippets here; what I see (disturbingly often) is copying-and-pasting of vast swaths of code, or a ten-line piece of code to get some user data (complete with inline SQL query) pasted into dozens of PHP or ASP.NET pages. So, duplicate code from elsewhere in the same project.

Source Link
E.Z. Hart
  • 1.1k
  • 8
  • 13

What's a good, concise way to explain the dangers of copy-paste programming to non-programmers?

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out in the reviews, and each time I have to explain why this is a problem (this is especially difficult with clients who know just enough about programming to understand that reuse is a good thing, but not enough to understand why copy-paste isn't a good form of reuse). Obviously, I can (and do) explain the problem in terms of code maintenance, but it would be nice to have a good, concise analogy for this problem that would hit home with non-programmers. Bonus if the analogy illustrates why search-and-replace is not an effective solution for this problem. Any suggestions?