Copy, Paste.

Via something, I ran into this (online) sarcastic presentation about Copy Paste Programming (Wikipedia). A quick summary:

Best practices: Find the code, copy/paste it, compile, enjoy!
Pitfalls and workarounds: The copied/pasted code does not compile. Copy/Paste larger portion of code.

This reminds me of an actual encounter many years ago, where I was called up by an analyst who was struggling with his code. Upon asking what was wrong, he said the code didn’t work and that it was someone else’s. When I inquired where he had the code from, he said he had it copied and pasted from an existing (and live) application. Right: the context. That wasn’t the worst part, though: when glancing over his design document I found out that it literally instructed him to ‘copy the code from this-and-that application’. I’m not sure who wrote up that document, but obviously someone was in a rush, which evidently came up when I asked the question why he would copy and paste a complete piece of code from another application.

The answer he gave was solid gold.

This entry was posted in Programming. Bookmark the permalink.