Using github to showcase code to potential employers; how should I cite the site I get code snippet from?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
5
down vote

favorite
1












I am just getting into using Github to showcase my code to potential employers. The primary use of my Github is really just to show employers my coding ability.



What is the right thing to do when I copy and paste a chunk of code from a site like stackoverflow? Should I add some sort of a comment?



Here is an example



I am looking for a fast way to calculate the ceiling of an integer division and copy and paste an answer into my code and upload it to Github. Should it look something like this?



q = (x + y - 1) / y;//taken from https://stackoverflow.com/questions/2745074/fast-ceiling-of-an-integer-division-in-c-c



Or I want a function that compares floats to double



/*function found at https://stackoverflow.com/questions/17333/most-effective-way-for-float-and-double-comparison*/
bool AreSame(double a, double b)

return fabs(a - b) < EPSILON;



At work I know other people copy from Stack Overflow to solve a problem and I don't consider this immoral. But I do feel unfair if I copy it, put it on my Github and use it to get hired.



Considerations:



  1. I try to understand the code that I'm copying.

  2. I can try to obfuscate that I copied and rename things but this doesn't make it feel fair to me.

  3. I can somewhere mention that I get answers from SO

The above examples are fairly small but I have seen larger segments of code offered on other sites. I mean I'm not going to copy a full program and make it look like my own, but where is the line crossed from "inspired by someone else's code" to copying it? I don't consider changing around variables to really make it better.



So I'm asking 2 questions



  1. When should I cite a function that is more or less copied?

  2. How should I do it?






share|improve this question





















  • Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
    – Sabine
    Mar 24 '16 at 9:34







  • 1




    Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
    – Brandin
    Mar 24 '16 at 9:35






  • 4




    That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
    – Ajasja
    Mar 24 '16 at 9:48










  • I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
    – Dan
    Mar 24 '16 at 12:27







  • 1




    Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
    – Doyle Lewis
    Mar 24 '16 at 12:56
















up vote
5
down vote

favorite
1












I am just getting into using Github to showcase my code to potential employers. The primary use of my Github is really just to show employers my coding ability.



What is the right thing to do when I copy and paste a chunk of code from a site like stackoverflow? Should I add some sort of a comment?



Here is an example



I am looking for a fast way to calculate the ceiling of an integer division and copy and paste an answer into my code and upload it to Github. Should it look something like this?



q = (x + y - 1) / y;//taken from https://stackoverflow.com/questions/2745074/fast-ceiling-of-an-integer-division-in-c-c



Or I want a function that compares floats to double



/*function found at https://stackoverflow.com/questions/17333/most-effective-way-for-float-and-double-comparison*/
bool AreSame(double a, double b)

return fabs(a - b) < EPSILON;



At work I know other people copy from Stack Overflow to solve a problem and I don't consider this immoral. But I do feel unfair if I copy it, put it on my Github and use it to get hired.



Considerations:



  1. I try to understand the code that I'm copying.

  2. I can try to obfuscate that I copied and rename things but this doesn't make it feel fair to me.

  3. I can somewhere mention that I get answers from SO

The above examples are fairly small but I have seen larger segments of code offered on other sites. I mean I'm not going to copy a full program and make it look like my own, but where is the line crossed from "inspired by someone else's code" to copying it? I don't consider changing around variables to really make it better.



So I'm asking 2 questions



  1. When should I cite a function that is more or less copied?

  2. How should I do it?






share|improve this question





















  • Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
    – Sabine
    Mar 24 '16 at 9:34







  • 1




    Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
    – Brandin
    Mar 24 '16 at 9:35






  • 4




    That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
    – Ajasja
    Mar 24 '16 at 9:48










  • I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
    – Dan
    Mar 24 '16 at 12:27







  • 1




    Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
    – Doyle Lewis
    Mar 24 '16 at 12:56












up vote
5
down vote

favorite
1









up vote
5
down vote

favorite
1






1





I am just getting into using Github to showcase my code to potential employers. The primary use of my Github is really just to show employers my coding ability.



What is the right thing to do when I copy and paste a chunk of code from a site like stackoverflow? Should I add some sort of a comment?



Here is an example



I am looking for a fast way to calculate the ceiling of an integer division and copy and paste an answer into my code and upload it to Github. Should it look something like this?



q = (x + y - 1) / y;//taken from https://stackoverflow.com/questions/2745074/fast-ceiling-of-an-integer-division-in-c-c



Or I want a function that compares floats to double



/*function found at https://stackoverflow.com/questions/17333/most-effective-way-for-float-and-double-comparison*/
bool AreSame(double a, double b)

return fabs(a - b) < EPSILON;



At work I know other people copy from Stack Overflow to solve a problem and I don't consider this immoral. But I do feel unfair if I copy it, put it on my Github and use it to get hired.



Considerations:



  1. I try to understand the code that I'm copying.

  2. I can try to obfuscate that I copied and rename things but this doesn't make it feel fair to me.

  3. I can somewhere mention that I get answers from SO

The above examples are fairly small but I have seen larger segments of code offered on other sites. I mean I'm not going to copy a full program and make it look like my own, but where is the line crossed from "inspired by someone else's code" to copying it? I don't consider changing around variables to really make it better.



So I'm asking 2 questions



  1. When should I cite a function that is more or less copied?

  2. How should I do it?






share|improve this question













I am just getting into using Github to showcase my code to potential employers. The primary use of my Github is really just to show employers my coding ability.



What is the right thing to do when I copy and paste a chunk of code from a site like stackoverflow? Should I add some sort of a comment?



Here is an example



I am looking for a fast way to calculate the ceiling of an integer division and copy and paste an answer into my code and upload it to Github. Should it look something like this?



q = (x + y - 1) / y;//taken from https://stackoverflow.com/questions/2745074/fast-ceiling-of-an-integer-division-in-c-c



Or I want a function that compares floats to double



/*function found at https://stackoverflow.com/questions/17333/most-effective-way-for-float-and-double-comparison*/
bool AreSame(double a, double b)

return fabs(a - b) < EPSILON;



At work I know other people copy from Stack Overflow to solve a problem and I don't consider this immoral. But I do feel unfair if I copy it, put it on my Github and use it to get hired.



Considerations:



  1. I try to understand the code that I'm copying.

  2. I can try to obfuscate that I copied and rename things but this doesn't make it feel fair to me.

  3. I can somewhere mention that I get answers from SO

The above examples are fairly small but I have seen larger segments of code offered on other sites. I mean I'm not going to copy a full program and make it look like my own, but where is the line crossed from "inspired by someone else's code" to copying it? I don't consider changing around variables to really make it better.



So I'm asking 2 questions



  1. When should I cite a function that is more or less copied?

  2. How should I do it?








share|improve this question












share|improve this question




share|improve this question








edited May 23 '17 at 12:37









Community♦

1




1









asked Mar 24 '16 at 9:28









BruceD

315




315











  • Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
    – Sabine
    Mar 24 '16 at 9:34







  • 1




    Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
    – Brandin
    Mar 24 '16 at 9:35






  • 4




    That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
    – Ajasja
    Mar 24 '16 at 9:48










  • I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
    – Dan
    Mar 24 '16 at 12:27







  • 1




    Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
    – Doyle Lewis
    Mar 24 '16 at 12:56
















  • Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
    – Sabine
    Mar 24 '16 at 9:34







  • 1




    Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
    – Brandin
    Mar 24 '16 at 9:35






  • 4




    That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
    – Ajasja
    Mar 24 '16 at 9:48










  • I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
    – Dan
    Mar 24 '16 at 12:27







  • 1




    Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
    – Doyle Lewis
    Mar 24 '16 at 12:56















Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
– Sabine
Mar 24 '16 at 9:34





Can you reference it in the top of the file? I think that would be better than somewhere in the code. It looks a little messy
– Sabine
Mar 24 '16 at 9:34





1




1




Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
– Brandin
Mar 24 '16 at 9:35




Your example of comparing floats within an epsiolon tolerance does not need to be cited. But I suppose you could if you want. It would give too much credit to whoever posted that in Stack Overflow.
– Brandin
Mar 24 '16 at 9:35




4




4




That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
– Ajasja
Mar 24 '16 at 9:48




That's being heavily discussed :) meta.stackexchange.com/questions/272956/…
– Ajasja
Mar 24 '16 at 9:48












I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
– Dan
Mar 24 '16 at 12:27





I would be hesitant in displaying your stackoverflow skills. There are a certain subset of managers who despise the use of stackoverflow since they feel people can just copy and past things. I would instead make your own application. Something simple with a common task that everyone understands like building a baseball team, or writing a quick API that returns the time. The end result is showcasing your knowledge of building applications and finding a solution to a task.
– Dan
Mar 24 '16 at 12:27





1




1




Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
– Doyle Lewis
Mar 24 '16 at 12:56




Not enough for an answer, but this is in the doc block for a method in a project I'm working on now * Search through an array of objects to see if a given index matches a given value * http://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects I modified the method slightly from what's there, but if I or another developer ever need help with what's going on, and why I chose that code, we know where to look.
– Doyle Lewis
Mar 24 '16 at 12:56










3 Answers
3






active

oldest

votes

















up vote
4
down vote



accepted










From my point of view, copying code is a perfectly valid thing to do, as long as it solves the problem at hand, i.e. if you change the issue at hand to have the code fit is not a good approach. Finding a solution that works in 5 minutes is more efficient than writing a solution that works in 5 hours. As long as you understand how the code works (like you mention).



Citing the source of where you copied it from is the right thing to do. If you used a source but modified the code, you should still specify that you've used it as an inspiration.



Now, about the format of the citation. Really, it doesn't matter, as long as you're consistent across all your code. An employer will like to see that you're thorough, ethical, consistent and can follow a coding standard. (Make sure you also make the code you copied fit in your own coding standard: indentation, casing, braces positions, spaces, etc.)






share|improve this answer




























    up vote
    2
    down vote













    I answered a meta question a while back asking a similar question.



    Stack Overflow presents knowledge. Just like a book. If you gain knowledge from a book, then using this knowledge doesn't need citation. You don't cite your grammar school book on use of the English language with any word you type either, right?



    Now if you quote verbatim, you need citations. But only on something that actually has creative value. If I quote Shakespeare, I better do so properly. But somebody has said "good morning" first. And I sure won't mention his name every morning for about 10-20 times.



    Your examples are things that are really just common knowledge. Comparing floating point values? Calculating something from two integers? That's not things worth attributing. Everybody does that. It is obvious that nobody had programming just implanted. We all learned it somewhere and from somebody.



    If you actually learn something from Stack Overflow (and I realize not everybody does), you don't need to copy it verbatim. You will adapt it to your needs, even if your needs are just different variable naming or braces. And if you adapt what you learned, you don't need to attribute it to someone. It's your product, even if you had help creating it. We all have help creating things. Nobody can create things out of thin air.






    share|improve this answer



















    • 3




      From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
      – Brandin
      Mar 24 '16 at 13:27










    • It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
      – BruceD
      Mar 25 '16 at 1:10










    • @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
      – nvoigt
      Mar 25 '16 at 7:22










    • @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
      – BruceD
      Mar 25 '16 at 11:50

















    up vote
    1
    down vote













    Part of being a professional software developer is having a handle on software licenses and how code can be reused. If you abide by these rules, you can easily argue to a hiring manager that you followed standard operating procedure.



    Each website will have a different license, but this recommendation is provided when pulling code from Stack Overflow (or any Stack Exchange site):




    But to future-proof your work, we recommend you do one of these 2
    things, or both:



    A) Add a comment to your code that links back to the post where you
    found it, or



    B) Comply with the MIT as it’s typically used, by
    including the full license text in your source



    You’re doing option A
    already, right? This is just standard operating procedure when it
    comes to finding code on the internet – a hyperlink comment ensures
    you’ll be able to debug down the line. But under the new terms a
    hyperlink comment is more than just pragmatic, it’s a hat-tip, and
    it’s a tit-for-tat that ensures you’ve complied with a contributor’s
    terms




    In general, using code from the internet is fine but I would caution you about overdoing it. If every function in your repository contains a citation to Stack Overflow, I would question your ability to perform on more specific problems.






    share|improve this answer























      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "423"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      noCode: true, onDemand: false,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fworkplace.stackexchange.com%2fquestions%2f64110%2fusing-github-to-showcase-code-to-potential-employers-how-should-i-cite-the-site%23new-answer', 'question_page');

      );

      Post as a guest

























      StackExchange.ready(function ()
      $("#show-editor-button input, #show-editor-button button").click(function ()
      var showEditor = function()
      $("#show-editor-button").hide();
      $("#post-form").removeClass("dno");
      StackExchange.editor.finallyInit();
      ;

      var useFancy = $(this).data('confirm-use-fancy');
      if(useFancy == 'True')
      var popupTitle = $(this).data('confirm-fancy-title');
      var popupBody = $(this).data('confirm-fancy-body');
      var popupAccept = $(this).data('confirm-fancy-accept-button');

      $(this).loadPopup(
      url: '/post/self-answer-popup',
      loaded: function(popup)
      var pTitle = $(popup).find('h2');
      var pBody = $(popup).find('.popup-body');
      var pSubmit = $(popup).find('.popup-submit');

      pTitle.text(popupTitle);
      pBody.html(popupBody);
      pSubmit.val(popupAccept).click(showEditor);

      )
      else
      var confirmText = $(this).data('confirm-text');
      if (confirmText ? confirm(confirmText) : true)
      showEditor();


      );
      );






      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      4
      down vote



      accepted










      From my point of view, copying code is a perfectly valid thing to do, as long as it solves the problem at hand, i.e. if you change the issue at hand to have the code fit is not a good approach. Finding a solution that works in 5 minutes is more efficient than writing a solution that works in 5 hours. As long as you understand how the code works (like you mention).



      Citing the source of where you copied it from is the right thing to do. If you used a source but modified the code, you should still specify that you've used it as an inspiration.



      Now, about the format of the citation. Really, it doesn't matter, as long as you're consistent across all your code. An employer will like to see that you're thorough, ethical, consistent and can follow a coding standard. (Make sure you also make the code you copied fit in your own coding standard: indentation, casing, braces positions, spaces, etc.)






      share|improve this answer

























        up vote
        4
        down vote



        accepted










        From my point of view, copying code is a perfectly valid thing to do, as long as it solves the problem at hand, i.e. if you change the issue at hand to have the code fit is not a good approach. Finding a solution that works in 5 minutes is more efficient than writing a solution that works in 5 hours. As long as you understand how the code works (like you mention).



        Citing the source of where you copied it from is the right thing to do. If you used a source but modified the code, you should still specify that you've used it as an inspiration.



        Now, about the format of the citation. Really, it doesn't matter, as long as you're consistent across all your code. An employer will like to see that you're thorough, ethical, consistent and can follow a coding standard. (Make sure you also make the code you copied fit in your own coding standard: indentation, casing, braces positions, spaces, etc.)






        share|improve this answer























          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          From my point of view, copying code is a perfectly valid thing to do, as long as it solves the problem at hand, i.e. if you change the issue at hand to have the code fit is not a good approach. Finding a solution that works in 5 minutes is more efficient than writing a solution that works in 5 hours. As long as you understand how the code works (like you mention).



          Citing the source of where you copied it from is the right thing to do. If you used a source but modified the code, you should still specify that you've used it as an inspiration.



          Now, about the format of the citation. Really, it doesn't matter, as long as you're consistent across all your code. An employer will like to see that you're thorough, ethical, consistent and can follow a coding standard. (Make sure you also make the code you copied fit in your own coding standard: indentation, casing, braces positions, spaces, etc.)






          share|improve this answer













          From my point of view, copying code is a perfectly valid thing to do, as long as it solves the problem at hand, i.e. if you change the issue at hand to have the code fit is not a good approach. Finding a solution that works in 5 minutes is more efficient than writing a solution that works in 5 hours. As long as you understand how the code works (like you mention).



          Citing the source of where you copied it from is the right thing to do. If you used a source but modified the code, you should still specify that you've used it as an inspiration.



          Now, about the format of the citation. Really, it doesn't matter, as long as you're consistent across all your code. An employer will like to see that you're thorough, ethical, consistent and can follow a coding standard. (Make sure you also make the code you copied fit in your own coding standard: indentation, casing, braces positions, spaces, etc.)







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Mar 24 '16 at 11:04









          Alexandre Vaillancourt

          1,580618




          1,580618






















              up vote
              2
              down vote













              I answered a meta question a while back asking a similar question.



              Stack Overflow presents knowledge. Just like a book. If you gain knowledge from a book, then using this knowledge doesn't need citation. You don't cite your grammar school book on use of the English language with any word you type either, right?



              Now if you quote verbatim, you need citations. But only on something that actually has creative value. If I quote Shakespeare, I better do so properly. But somebody has said "good morning" first. And I sure won't mention his name every morning for about 10-20 times.



              Your examples are things that are really just common knowledge. Comparing floating point values? Calculating something from two integers? That's not things worth attributing. Everybody does that. It is obvious that nobody had programming just implanted. We all learned it somewhere and from somebody.



              If you actually learn something from Stack Overflow (and I realize not everybody does), you don't need to copy it verbatim. You will adapt it to your needs, even if your needs are just different variable naming or braces. And if you adapt what you learned, you don't need to attribute it to someone. It's your product, even if you had help creating it. We all have help creating things. Nobody can create things out of thin air.






              share|improve this answer



















              • 3




                From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
                – Brandin
                Mar 24 '16 at 13:27










              • It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
                – BruceD
                Mar 25 '16 at 1:10










              • @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
                – nvoigt
                Mar 25 '16 at 7:22










              • @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
                – BruceD
                Mar 25 '16 at 11:50














              up vote
              2
              down vote













              I answered a meta question a while back asking a similar question.



              Stack Overflow presents knowledge. Just like a book. If you gain knowledge from a book, then using this knowledge doesn't need citation. You don't cite your grammar school book on use of the English language with any word you type either, right?



              Now if you quote verbatim, you need citations. But only on something that actually has creative value. If I quote Shakespeare, I better do so properly. But somebody has said "good morning" first. And I sure won't mention his name every morning for about 10-20 times.



              Your examples are things that are really just common knowledge. Comparing floating point values? Calculating something from two integers? That's not things worth attributing. Everybody does that. It is obvious that nobody had programming just implanted. We all learned it somewhere and from somebody.



              If you actually learn something from Stack Overflow (and I realize not everybody does), you don't need to copy it verbatim. You will adapt it to your needs, even if your needs are just different variable naming or braces. And if you adapt what you learned, you don't need to attribute it to someone. It's your product, even if you had help creating it. We all have help creating things. Nobody can create things out of thin air.






              share|improve this answer



















              • 3




                From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
                – Brandin
                Mar 24 '16 at 13:27










              • It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
                – BruceD
                Mar 25 '16 at 1:10










              • @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
                – nvoigt
                Mar 25 '16 at 7:22










              • @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
                – BruceD
                Mar 25 '16 at 11:50












              up vote
              2
              down vote










              up vote
              2
              down vote









              I answered a meta question a while back asking a similar question.



              Stack Overflow presents knowledge. Just like a book. If you gain knowledge from a book, then using this knowledge doesn't need citation. You don't cite your grammar school book on use of the English language with any word you type either, right?



              Now if you quote verbatim, you need citations. But only on something that actually has creative value. If I quote Shakespeare, I better do so properly. But somebody has said "good morning" first. And I sure won't mention his name every morning for about 10-20 times.



              Your examples are things that are really just common knowledge. Comparing floating point values? Calculating something from two integers? That's not things worth attributing. Everybody does that. It is obvious that nobody had programming just implanted. We all learned it somewhere and from somebody.



              If you actually learn something from Stack Overflow (and I realize not everybody does), you don't need to copy it verbatim. You will adapt it to your needs, even if your needs are just different variable naming or braces. And if you adapt what you learned, you don't need to attribute it to someone. It's your product, even if you had help creating it. We all have help creating things. Nobody can create things out of thin air.






              share|improve this answer















              I answered a meta question a while back asking a similar question.



              Stack Overflow presents knowledge. Just like a book. If you gain knowledge from a book, then using this knowledge doesn't need citation. You don't cite your grammar school book on use of the English language with any word you type either, right?



              Now if you quote verbatim, you need citations. But only on something that actually has creative value. If I quote Shakespeare, I better do so properly. But somebody has said "good morning" first. And I sure won't mention his name every morning for about 10-20 times.



              Your examples are things that are really just common knowledge. Comparing floating point values? Calculating something from two integers? That's not things worth attributing. Everybody does that. It is obvious that nobody had programming just implanted. We all learned it somewhere and from somebody.



              If you actually learn something from Stack Overflow (and I realize not everybody does), you don't need to copy it verbatim. You will adapt it to your needs, even if your needs are just different variable naming or braces. And if you adapt what you learned, you don't need to attribute it to someone. It's your product, even if you had help creating it. We all have help creating things. Nobody can create things out of thin air.







              share|improve this answer















              share|improve this answer



              share|improve this answer








              edited Mar 20 '17 at 9:43









              Community♦

              1




              1











              answered Mar 24 '16 at 12:13









              nvoigt

              42.6k18105147




              42.6k18105147







              • 3




                From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
                – Brandin
                Mar 24 '16 at 13:27










              • It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
                – BruceD
                Mar 25 '16 at 1:10










              • @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
                – nvoigt
                Mar 25 '16 at 7:22










              • @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
                – BruceD
                Mar 25 '16 at 11:50












              • 3




                From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
                – Brandin
                Mar 24 '16 at 13:27










              • It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
                – BruceD
                Mar 25 '16 at 1:10










              • @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
                – nvoigt
                Mar 25 '16 at 7:22










              • @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
                – BruceD
                Mar 25 '16 at 11:50







              3




              3




              From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
              – Brandin
              Mar 24 '16 at 13:27




              From now on I when I write "Good morning!" I will put a link back to this page, to let everyone know that I have adapted the phrase from the idea posted here. Changes made: Capitalised the first word and added an exclamation point. Date of last change: 24 March 2016 13:27:25 GMT.
              – Brandin
              Mar 24 '16 at 13:27












              It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
              – BruceD
              Mar 25 '16 at 1:10




              It sometimes confuses me, we're born knowing nothing so anything we know we learned from somewhere. How do you know when you're supposed to cite something?
              – BruceD
              Mar 25 '16 at 1:10












              @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
              – nvoigt
              Mar 25 '16 at 7:22




              @BruceD If you quote Shakespeare, you need to cite him. If you read so much Shakespeare you are talking like him, you don't.
              – nvoigt
              Mar 25 '16 at 7:22












              @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
              – BruceD
              Mar 25 '16 at 11:50




              @nvoigt say I only ever read one book with an example of implementing a linked list in C. I study it well. I then, without referring too the book, implement the linked list in a small project. Should the book be sited?
              – BruceD
              Mar 25 '16 at 11:50










              up vote
              1
              down vote













              Part of being a professional software developer is having a handle on software licenses and how code can be reused. If you abide by these rules, you can easily argue to a hiring manager that you followed standard operating procedure.



              Each website will have a different license, but this recommendation is provided when pulling code from Stack Overflow (or any Stack Exchange site):




              But to future-proof your work, we recommend you do one of these 2
              things, or both:



              A) Add a comment to your code that links back to the post where you
              found it, or



              B) Comply with the MIT as it’s typically used, by
              including the full license text in your source



              You’re doing option A
              already, right? This is just standard operating procedure when it
              comes to finding code on the internet – a hyperlink comment ensures
              you’ll be able to debug down the line. But under the new terms a
              hyperlink comment is more than just pragmatic, it’s a hat-tip, and
              it’s a tit-for-tat that ensures you’ve complied with a contributor’s
              terms




              In general, using code from the internet is fine but I would caution you about overdoing it. If every function in your repository contains a citation to Stack Overflow, I would question your ability to perform on more specific problems.






              share|improve this answer



























                up vote
                1
                down vote













                Part of being a professional software developer is having a handle on software licenses and how code can be reused. If you abide by these rules, you can easily argue to a hiring manager that you followed standard operating procedure.



                Each website will have a different license, but this recommendation is provided when pulling code from Stack Overflow (or any Stack Exchange site):




                But to future-proof your work, we recommend you do one of these 2
                things, or both:



                A) Add a comment to your code that links back to the post where you
                found it, or



                B) Comply with the MIT as it’s typically used, by
                including the full license text in your source



                You’re doing option A
                already, right? This is just standard operating procedure when it
                comes to finding code on the internet – a hyperlink comment ensures
                you’ll be able to debug down the line. But under the new terms a
                hyperlink comment is more than just pragmatic, it’s a hat-tip, and
                it’s a tit-for-tat that ensures you’ve complied with a contributor’s
                terms




                In general, using code from the internet is fine but I would caution you about overdoing it. If every function in your repository contains a citation to Stack Overflow, I would question your ability to perform on more specific problems.






                share|improve this answer

























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Part of being a professional software developer is having a handle on software licenses and how code can be reused. If you abide by these rules, you can easily argue to a hiring manager that you followed standard operating procedure.



                  Each website will have a different license, but this recommendation is provided when pulling code from Stack Overflow (or any Stack Exchange site):




                  But to future-proof your work, we recommend you do one of these 2
                  things, or both:



                  A) Add a comment to your code that links back to the post where you
                  found it, or



                  B) Comply with the MIT as it’s typically used, by
                  including the full license text in your source



                  You’re doing option A
                  already, right? This is just standard operating procedure when it
                  comes to finding code on the internet – a hyperlink comment ensures
                  you’ll be able to debug down the line. But under the new terms a
                  hyperlink comment is more than just pragmatic, it’s a hat-tip, and
                  it’s a tit-for-tat that ensures you’ve complied with a contributor’s
                  terms




                  In general, using code from the internet is fine but I would caution you about overdoing it. If every function in your repository contains a citation to Stack Overflow, I would question your ability to perform on more specific problems.






                  share|improve this answer















                  Part of being a professional software developer is having a handle on software licenses and how code can be reused. If you abide by these rules, you can easily argue to a hiring manager that you followed standard operating procedure.



                  Each website will have a different license, but this recommendation is provided when pulling code from Stack Overflow (or any Stack Exchange site):




                  But to future-proof your work, we recommend you do one of these 2
                  things, or both:



                  A) Add a comment to your code that links back to the post where you
                  found it, or



                  B) Comply with the MIT as it’s typically used, by
                  including the full license text in your source



                  You’re doing option A
                  already, right? This is just standard operating procedure when it
                  comes to finding code on the internet – a hyperlink comment ensures
                  you’ll be able to debug down the line. But under the new terms a
                  hyperlink comment is more than just pragmatic, it’s a hat-tip, and
                  it’s a tit-for-tat that ensures you’ve complied with a contributor’s
                  terms




                  In general, using code from the internet is fine but I would caution you about overdoing it. If every function in your repository contains a citation to Stack Overflow, I would question your ability to perform on more specific problems.







                  share|improve this answer















                  share|improve this answer



                  share|improve this answer








                  edited Mar 20 '17 at 10:31









                  Community♦

                  1




                  1











                  answered Mar 24 '16 at 15:20









                  HPierce

                  392210




                  392210






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fworkplace.stackexchange.com%2fquestions%2f64110%2fusing-github-to-showcase-code-to-potential-employers-how-should-i-cite-the-site%23new-answer', 'question_page');

                      );

                      Post as a guest

















































































                      Comments

                      Popular posts from this blog

                      What does second last employer means? [closed]

                      List of Gilmore Girls characters

                      Confectionery