By Tom

Sharing GPL Code

“Sharing GPL Code” sounds like such a loaded title because the topic is forever hot. But hang with me because the purpose of this post has nothing to do with actually arguing for or against the GPL or code around it.

I know the simple answer is that all GPL code, by very nature of its license, it’s available for sharing, but there’s another aspect that plays into this I want to discuss.

Sharing GPL Code can be more about collaborating on code, right?

And that’s this:

What is the ethics of sharing the code for a project that you’ve built for someone else even if it maintains the GPL?

For the most part, I think it’s fine. But when you’re running a business and you’re building solutions for clients, there’s a little more to it.

At least, that’s my experience.

Sharing GPL Code

Again, this is not a post to argue for or against the GPL. Obviously, I don’t have a problem with it because I continue to work in an industry that has built itself upon it.

Secondly, I don’t get into many of the debates about it because:

  • I’ve never run into a problem with it regarding the law.
  • I agree with the four freedoms.
  • I try to share as much code as I can through various blogs, articles, and projects.
  • I want to respect my clients as much as I want to educate those who want to get into development.

With that said, I thought I’d share some of my thoughts as it relates to working with clients, educating others, and sharing GPL code.

Sharing Code

I don’t mind sharing code on my website that may be part of another project because, after all, it’s under the GPL, right?

But that doesn’t necessarily give me the license to undermine my client’s wishes, does it? That is, if s/he would rather me not share the code publicly, does that mean I shouldn’t?

I find this to be an ethical issue, and ultimately, I think this depends on where yours lie.

I try not to share the code that I’ve written for my clients exactly as I’ve written it. Instead, I will try to take the take the code, generalize class names, function names, variable names, and so on, and then share it from there.

The core algorithm will be the same, but the overall picture won’t be as complete.

Client Respect

This respects, what I believe, to be both the license of the software in question and the requests of the client. In all of my years of blogging and working on projects like this, I’ve never had a problem with this approach.

Not once.

If you’re on the fence as to whether or not you should share code that you’ve written for a client, don’t merely justify your sharing it because it’s GPL and don’t neglect talking to your client about what you’d like to share.

After all, the gist of what you want to share is going to be something you’ve learned or that you want to help others learn, right?

Anyway, at least grant your client the respect of asking if they care. If they do, explain to them the nature of open source and the license under which the software falls, and then offer them an alternative (such as generalizing aspects of the code but not the core algorithm).

The Business Cost

Most of the people who choose WordPress understand the nature of open source. That is, at least to a degree, because they selected WordPress as their solution because of its price tag.

If they still aren’t a fan of it, then it’s really up to you. I err on the side of respecting the client as I’d value my relationship with them over the relationship with a license.

This doesn’t mean I’m trying to keep code private or anything. It’s that I’m attempting to be a respectable person with whom to work

There’s More

When it comes to the issue of licensing, ethics, and the like, there is plenty to discuss. I don’t know if this is going to generate a lot of comments or not, but I don’t want to turn this into a discussion about the legalities of the GPL.

The point of this post is balancing the freedoms granted by the GPL, the respect we should grant those with whom we work, and the ethics and fall between the two points.

Sharing GPL Code and Its Ethics was written by Tom. For more information about WordPress, development, and resources then visit Tom McFarlin’s blog.

Read more here:: Sharing GPL Code and Its Ethics