Sharing Code

  • Developing T-SQL is like gourmet cooking; you accumulate recipes and techniques over the years; adopt from books and the experts on TV, and then improvise in your own kitchen. If you're a professional blogger, you have to put fresh material out every week; that script you wrote months ago is old news. It's not like someone is ripping off your stand up comedy act.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Copy code snippets for internal reuse (with or without modification) is absolutely fine with me (I usually add the web page where I found it). Otherwise I still wouldn't use a tally table.... 😉

    But having someone rewriting a few hundred lines of specific code and use it without any reference would already be crossing the line, since it isn't about applying basic concepts but implemeting a specific solution.

    An article or a blog post does not only contain a code snippet, but (usually) a lot of useful explanation and/or test scenarios. To use more than just the code snippet without any reference is where plagiarism starts from my point of view.

    However, I'm not sure how to deal with "extended" code snippets that are used by vendors and sold without any reference. If they make money out of it, they should at least quote the source. I think.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • TravisDBA (1/25/2011)


    WayneS (1/25/2011)


    Plagiarism - no, I won't allow it.

    Copying code and using it: I prefer that the code comments have a link to where it was found. But, most importantly... see the tag line in my signature - I think that sums it up pretty good!

    Yep, kind of a no brainer though. If you can't explain what the code is doing that your copying, then of course, you should not be using it at all, but particularly on a production system. Duh! 😀

    Yes, it is a no-brainer. But... how many people have you run into here that you know are doing just that?

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • terry.lewis 52981 (1/25/2011)


    WayneS pretty much sums up my attitude. I've been the beneficiary of countless code samples found on many sites, and I try to give credit to the author(?), or at least the publisher of such code. I expect the same as a professional courtesy. If I publish code to the internet, and its any good, then I expect someone to use it, so I don't publish anything that I would object to seeing in someone elses product.

    However, when it comes to prose, keep your hands off!

    In addition to giving credit to the author... it helps those reading your code to possibly see a better, more thorough explanation of just what that code is doing. For instance, the "quirky update" article of Jeff's.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (1/25/2011)


    TravisDBA (1/25/2011)


    WayneS (1/25/2011)


    Plagiarism - no, I won't allow it.

    Copying code and using it: I prefer that the code comments have a link to where it was found. But, most importantly... see the tag line in my signature - I think that sums it up pretty good!

    Yep, kind of a no brainer though. If you can't explain what the code is doing that your copying, then of course, you should not be using it at all, but particularly on a production system. Duh! 😀

    Yes, it is a no-brainer. But... how many people have you run into here that you know are doing just that?

    Alot, but this forum (besides having some really brilliant people in it) has also been known to have some pretty dull pencils in it too in the past. So maybe this forum isn't really a good example for that 😀

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • TravisDBA (1/26/2011)


    WayneS (1/25/2011)


    TravisDBA (1/25/2011)


    WayneS (1/25/2011)


    Plagiarism - no, I won't allow it.

    Copying code and using it: I prefer that the code comments have a link to where it was found. But, most importantly... see the tag line in my signature - I think that sums it up pretty good!

    Yep, kind of a no brainer though. If you can't explain what the code is doing that your copying, then of course, you should not be using it at all, but particularly on a production system. Duh! 😀

    Yes, it is a no-brainer. But... how many people have you run into here that you know are doing just that?

    Alot, but this forum (besides having some really brilliant people in it) has also been known to have some pretty dull pencils in it too in the past. So maybe this forum isn't really a good example for that 😀

    Ahh, bad choice of words on my part. Let's try:

    But... how many people have you run into here on the various SSC forums that you know are doing just that?

    From what I can tell, this is kinda rampant over the internet - just grab the code and use it, without knowing what it's doing.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • majorbloodnock (1/25/2011)


    For me, it's an incredibly simple equation. The number of times I've trawled the Web to see if someone's already solved the problem I'm encountering is huge. The number of times I've found a knowledge gap in the Web that I can fill is very small. I owe the public a favour or two, so it would be churlish if I didn't try to make a contribution here or there. As for recognition, I don't really care. So long as no-one's benefiting from putting their name to any of my work ('cos I don't like being exploited), I'm not after any credit for what I do put back.

    I agree. I'm sure I've benefitted more from others in this area than they have from me. I always put in a comment thanking the original author. Some of you folks may have a credit in my code somewhere 🙂

    Ken

  • "Small minds copy ideas but great minds steal them outright and make them their own."

    Or something like that, can't remember exactly where I stole that line.

    I have posted a lot of code online that I wrote. Some of it is based on ideas I have seen elsewhere. Some of it is my own original invention, but that doesn't mean that plenty of other people didn't invent it on their own too.

    I may have even re-posted code to answer peoples questions that I got online. I may not remember where I got it; I have thousands of SQL scripts that I have written over the years. I sometimes find it easier to locate things I have written and posted online, than searching through all the files on my computer.

    The code on the link below is my orginal code, but that doesn't mean plenty of other people haven't done something similar, and it could certainly be improved. In fact, by posting it online, several people provided feeback for improvements I made and re-posted.

    Date Table Function F_TABLE_DATE

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519

  • Michael Valentine Jones (1/26/2011)


    "Small minds copy ideas but great minds steal them outright and make them their own."

    Or something like that, can't remember exactly where I stole that line.

    How do you think Bill Gates got Windows?:-D

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • TravisDBA (1/27/2011)


    Michael Valentine Jones (1/26/2011)


    "Small minds copy ideas but great minds steal them outright and make them their own."

    Or something like that, can't remember exactly where I stole that line.

    How do you think Bill Gates got Windows?:-D

    Basically the same place that Mac and Linux got their windows.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Eric M Russell (1/27/2011)


    TravisDBA (1/27/2011)


    Michael Valentine Jones (1/26/2011)


    "Small minds copy ideas but great minds steal them outright and make them their own."

    Or something like that, can't remember exactly where I stole that line.

    How do you think Bill Gates got Windows?:-D

    Basically the same place that Mac and Linux got their windows.

    Funny that you should mention the Mac

    "We have always been shameless about stealing great ideas."

    Steve Jobs, Triumph of the Nerds (1996)

    http://en.wikiquote.org/wiki/Steve_Jobs

  • I always put all my articles, codes, ideas in the public domain and specifically disclaim copyright. So you can't plagiarize my works because I have put them in the public domain. You can copy my articles without giving credit. (Who cares about credit? I like cash.)

  • I've put some code up here (years ago), then a few years later was trying to solve an issue, did a google search, and what was the first item that came up? - yes, my own bloody code that I'd forgotten about.

    Many times I've used other people's code in my own, and I think that if you do that, you have an obligation to give something back to the community, whether it is the code that solves your issue, or something that you've done that you can see will fix other's issues.

  • Over the years I have been helped by many people who shared their code and ideas. When I publish code here or other places I do so to return the many gifts I have received from others. Sometimes paying forward is the best way to help the community and provide a means for helping those with less experience.

    When I share, I share code as demonstration or prototype code. Having spent most of the past 20 years as a consultant, I never share production ready code because if the code is in production it is probably owned by a company I have produced it for.

    I agree with Grant that not getting credit for my articles is an irritation. I have had that happen several times and had to address the issue with the plagiarizer.

    I hope you all have had a Merry Christmas and that you have a great New Year.

  • If you don't want your code reused, don't share it.

Viewing 15 posts - 16 through 30 (of 36 total)

You must be logged in to reply to this topic. Login to reply