Google And Paste Programming

CopyAndPasteProgramming at Web Speed. The promised age of DistributedSystems is upon us, and there is much rejoicing. It works like this:

Anyone else HaveThisPattern?

"PROBLEM"? I thought it was a career! --PhlIp

Also known as PostModernProgramming.


Re: "if someone has already solved the problem, why reinvent the wheel?"

If someone else on this project has already solved this problem in this code base, then we should reuse the code.

Also, while a good example can be very helpful to the learning experience, tweaking code you don't understand until it's so confused that you can no longer see where it might fail isn't a very good approach for producing reliable solutions.


A variant of CopyAndPasteProgramming -


This backfired on me once. I had a web-based app with a typical CRUD form. It had a spot to enter a date range. I had server-side validation for these dates and it was simple because the app language provided a date validation routine out-of-the-box. However, the customer wanted client-side validation also. I couldn't find a reliable built-in JavaScript function, so instead combed the web for one, and found such a critter. It seemed to work upon testing, and it looked okay upon code inspection, so I put it in. Low-and-behold about 4 months later it stopped working. It turns out the default value evaluator assumed any value entered was octal if it had a leading zero. Thus, "8/1/2007" would pass, but not "08/01/2007". Since octal allows the digits 0 through 7, it passed fine earlier in the year. (I think newer versions of JS have a date validation function, but at the time it was too new to assume every browser had the newer JS.)


CategorySoftwareDevelopment


EditText of this page (last edited November 6, 2014) or FindPage with title or text search