Re:Ask HN: Are top developers just guessing?
by jdotjdot on Sunday June 07, 2015 @03:01PM
(#9675934)
I think this is helpful more in helping future developers reading the code have more context about what the code is, why it's there, and where it came from, rather than anything to do with ownership claims.
Often times code taken from SO solves the problem but noticeably is structured differently from the rest of the codebase--often with good reason--and this helps the new dev go look back at the SO conversation and see what problems this is solving / if it can be removed.
When I copy code verbatim from SO or another "help" site, I generally put a comment right above that chunk of code, something like:
Don't know if that's enough to protect against any ownership claims though.