Guidelines of using/viewing code?

Discussion in 'Spigot Plugin Development' started by Lidle, Jun 26, 2016.

  1. Was just wondering the general guidelines of using others code. I know not to copy and paste a whole plugins code to pass it off as my own, but I was wondering if it's ok to decompile a plugin to help understand how a certain aspect of code works/get a general idea of how to do something. You know, what to use and how to use it, that sort of thing instead of constantly googling for answers. Upon viewing anothers code, I would give them credit in my plugin as well. I was wondering if this sort of thing is allowed/what the actual 'rules' of viewing source code is.
  2. Generally it's excepted to view code/get ideas. Now copying them is another story, definitely don't copy much/any code from a premium plugin. But generally it's okay to decompile just to read the code
  3. JamesJ


    Depends on the license of the plugin.
    • Agree Agree x 2
  4. Programming is largely building off of the work of other people. It's the nature of the trade. Code posted publicly on GitHub should come with a license that describes in what manner a viewer may use the author's/authors' code. That said, the license is not mandatory and often isn't included. There may be a default license policy hidden in some legal document somewhere.

    At the end of the day, as with other rules that are rarely enforced and consequentially violated on a regular basis, it boils down to a moral judgment call. Ask yourself why you want to decompile and view somebody's code. If it's for the sake of learning -- say you want to know how a particular method or class is used, or what structural rules more experienced developers follow -- I see no problem at all with decompiling and viewing to your heart's content.

    If you intend to make a more-or-less copy of the code, on the other hand, and especially if you mean to profit from it, then that strikes me as unfair. But I'm sure you know that, or you wouldn't have bothered asking about this. :)
    • Agree Agree x 2