Thanks to the current SEO nightmare, I can no longer use search engines the same reliability as before. Stackoverflow is too toxic and often all I need is to properly look up some more obscure stuff about some API, which “could just be googled”. AI, of course, is very unreliable.

Searching code on Github, then adjusting it in many ways to my needs (like to a different language, renaming variables to make more sense, additional optimizations, etc.) seems way more feasible nowadays. However, while there’s a lot of code with very permitting licenses (including public domain licenses), others are not so much, and I don’t want to argue against them, often I’m even understanding the reasons behind their decisions. I even try to give credit wherever I can, or look up the original source of an algorithm I find being referenced by someone else.

  • farcaller@fstab.sh
    link
    fedilink
    arrow-up
    28
    ·
    8 months ago

    By all means, use the publicly available code within the limits its license permits. Always strive to give credit back (I oftentimes add notes to where I took config bits even in my private my-eyes-only repos to have some breadcrumbs).

    Remember that licensing and copyrights are kind of separate things. People own copyright to their work (unless they explicitly give it up), and licenses are the terms on which you can use their copyrighted work.

    Know the basics of the OSS licenses and know which ones you can copy things from verbatim (e.g. don’t touch AGPL code unless you also use AGPL). Generally, I just keep the original license and add a note to my license file saying that e.g. this code is licensed under Apache 2.0, but some parts are MIT.

    It gets somewhat murkier when you use someone’s code and base yours on that. IANAL, and that’s very much the legal territory. If at all possible, just reuse the original copyright and license and then derive your work (given the license allows that).

    Being on the receiving side of this a few times (people using my code verbatim in their projects I stumbled upon) it leaves a bit of a sour taste in the mouth when you see your copyright header replaced with someone else’s completely. Don’t do that. All the three times it happened to me, the other party was quick to remedy the situation, though (2 added the original copyright note back, 1 removed all my code). So just don’t do that. Make a habit to read that dumb tall copyright notice at the top of the file every time and you’ll quickly learn what to expect.

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      7 months ago

      e.g. don’t touch AGPL code unless you also use AGPL

      Just to clear this up: copyleft licenses, GPL variants for example, require the license of your code to equally preserve the freedoms provided to your users, or in other words also be a copyleft license. There are some loopholes like GPL on a server, but be very careful when using copyleft code unless you want to use a copyleft license as well.

      It gets somewhat murkier when you use someone’s code and base yours on that. IANAL, and that’s very much the legal territory. If at all possible, just reuse the original copyright and license and then derive your work (given the license allows that).

      That all depends on the license AFAIK, but IANAL. Most FOSS licenses allow you to do whatever you want while preserving copyright claims, and that includes rewriting or changing the license. GPL forces copyleft, so even if you rewrote it from scratch, you could still be liable if you saw the original code.

      For example I’ve heard that corpos bootleg copyleft code by having completely separate teams doing design and implementation. The implementation team can’t ever see any part of the original code, and they have limited communication with the design team. I think that would also go around the copyright claims as well.

      If at all possible, just reuse the original copyright and license and then derive your work (given the license allows that).

      Or just slap a GPL and subsume everything within a vortex of FREEDOM, and thusly become a true FOSS dude

      • farcaller@fstab.sh
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        Or just slap a GPL and subsume everything within a vortex of FREEDOM, and thusly become a true FOSS dude

        Yeah, no. I suppose this is sarcasm, but just in case: not every license is compatible with GPL, GPL has a few versions, and not everything is GPL-3-and-above.

        Personally, I prefer Apache-2.0. It just seems more fair.

      • ZILtoid1991@lemmy.worldOP
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        Issue with GPL is, that I mainly developing stuff for gaming, and GPL is hard or tough to monetize, and stuff will get even spicier when we have conservations whether code is asset itself (especially scripts).

        • Shareni@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          GPL is hard or tough to monetize

          What do you mean?

          stuff will get even spicier when we have conservations whether code is asset itself (especially scripts).

          That’s true. What about LGPL?

    • glimse@lemmy.world
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      7 months ago

      (I oftentimes add notes to where I took config bits even in my private my-eyes-only repos to have some breadcrumbs).

      I’m not much of a coder anymore (and even then, it was self-taught hobby projects) but this is soooo good to do aside from just giving credit. I’d leave comments “I learned about this from here: (link)” so I could go back and reference it later.

      I made a simple batch script to generate project folders at work and then a year later our standards changed…I would have had to start from scratch if not for the links I left because I forgot everything I learned