Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you do the same anytime you ask a co-worker a question:

Jim: "Hey Marge, do you know how to escape a flarb?"

Marge: "Yea, call FlarbLib.EscapeFlarb"

Jim: "Ok"

     // <summary>
     // From Marge
     // </summary>
     string escapedFlarb = FlarbLib.EscapeFlarb(unescapedFlarb);
I guess I see stack overflow as just an extension of asking a co-worker. It's just the internet lets us all be co-workers remotely.

Sure if it's some details answer that says why you're doing something a certain way (like must use 2.0 SDK because 3.0 is broken on Linux. See http://so/1234

But otherwise it seems crazy to me to have it litter the code with attributions for tiny snippets of answers.



I guess I don't use SO as extensively as some; in the entire solution (21 projects) is have 2 references to stack overflow. And ofcource, if you use to look something up, no need to add it (unless you might need it later for further information), but if you use (parts of) code posted to SO, don't you want to know how it got in your code? I can tell by the way something is written who wrote it in our company; if 'strange' code is found in the solution, it's good to know why.


The thing is that "how do you escape a flarb" would be closed on SO for being trivial, showing lack of research etc. If, on the other hand, half your commit is something highly nontrivial you got from Marge, you might well note that in a comment, or perhaps in the commit message.


> the thing is that "how do you escape a flarb" would be closed on SO for being trivial

I don't think this is true. I know I look up stuff all the time that's one to 5 lines of code. I could go dig up examples. How about "how do you remove the margin from an LI element" Or how do you un-escape a URL. How do you iterate over a XXX in language YYY. All of those are on SO, all are popular, all are 1-3 lines.

Even a 10 line answer though. "How do you make an XHR request" is at most 10 lines and doesn't seem like it deserves attribution.

Do you attribute every pattern you've read in some book? Every code snippet from MDN or MSDN or a manual? How about blog posts on digital ocean or meteor.com (I mention those because I've been reading those recently)

I can't put my finger on why but attribution for a few lines of code on SO seems anti-productive, anti-cooperation, anti-sharing


Ruminate on the difference between "citing a source" and "giving credit to the author of the source". Marge is not a static document that can be reread later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: