Do you reference websites when you implement something you found on Google?

Updated by Brook Jeynes [SSW] 2 years ago. See history

123
<introEmbed body={<> If you end up using someone else's code, or even idea, that you found online, make sure you add a reference to this in your source code. There is a good chance that you or your team will revisit the website. And of course, it never hurts to tip your hat, to thank other coders. </>} />
private void HideToSystemTray()
{
       // Hide the windows form in the system tray
       if (FormWindowState.Minimized == WindowState)
       {
              Hide();
       }
}

❌ Figure: Bad example - The website where the solution was found IS NOT referenced in the comments

private void HideToSystemTray()
{
      // Hide the windows form in the system tray
       // I found this solution at http://www.developer.com/net/csharp/article.php/3336751
       if (FormWindowState.Minimized == WindowState)
       {
              Hide();
       }
}

✅ Figure: Good example - The website where the solution was found is referenced in the comments

Acknowledgements

Adam Cogan
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star