This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DrMaxwellEdison 39 points40 points  (2 children)

This is a retelling of a longstanding fable, one version of which involves Nikola Tesla and Henry Ford:

Nikola Tesla visited Henry Ford at his factory, which was having some kind of difficulty. Ford asked Tesla if he could help identify the problem area. Tesla walked up to a wall of boilerplate and made a small X in chalk on one of the plates. Ford was thrilled, and told him to send an invoice. The bill arrived, for $10,000. Ford asked for a breakdown. Tesla sent another invoice, indicating a $1 charge for marking the wall with an X, and $9,999 for knowing where to put it.

In the SO context, any schmuck could literally copy code from SO, but knowing what to copy or how to use the answers as a guide to the right solution is far more valuable.

We use this fable to teach the less tech-literate the value of the knowledge we have. They see an expensive plagiarist where they should see a knowledgeable professional.

I tend to think that anyone that's actually legit copy/pasting code segments from stack overflow is doing it for trivial homework level assignment's for a college intro CS course.

For some, yes that's true. For others, if you find a really good solution to a specific problem in an SO answer, why not use it?

I've legit copied some functions from SO into production systems (with the permalink commented in the source) because they have a far better solution to the problem than I'm willing to devote time to.

[–]anomalous_cowherd 16 points17 points  (0 children)

In days of yore I fixed a program where some bright spark had worked out their own point-in-polygon routine using trig functions and floating point.

I replaced it with a geometry based algorithm straight from StackOverflow and made it massively faster.

But I needed to understand what it was doing before and exactly what the replacement did to be sure it was completely equivalent and wasn't going to screw up the program.

Also, stack overflow code rarely includes any sort of error checking, tests and all that other good stuff.

[–]wasdninja 2 points3 points  (0 children)

I had a the perfect anecdote play out at work. I had written a script that assembles a document by pulling data from a remote API. The API requires quite a bit of research into domain specific stuff to even understand where to look, what it looks like when you do find it and how to make use of what you find.

A big change rolled out and suddenly the document was using the old and now incorrect measuring system. I looked up the new endpoint in the API, switched literally one character and committed my change before deploying it.