views:

1312

answers:

8

hey guys

in the context of freelance programming (for the web), how do you calculate the cost and ownership of the source code.

So, say I'm working on a project for a client, and I've worked how long the project might take, and what my hourly/project rates are going to be.

Is it fair and/or normal to not include the source code as part of the package?

Or at least, is there some kind of mark-up, in terms of price, that should be considered if you are including the source code?

Or even am I within my rights, in an ethical context, to not give the option of providing the source code?

I'm asking because, within the code I might be using libraries that I've developed in my own time, and which are quite powerful, but which take no time at all to include in the project, and which, while powerful enough, cannot be incensed or sold as a separate product (like say, a CMS).

In any case, how do you deal with these situations? and if I were to provide the option of having the source code after completion of the project, how would I calculate the cost of the source? would it be a flat rate or a percentage of the project or what?

cheers!

UPDATE:

Hey guys, I read through all your answers, and they've all been really helpful in different ways, so thanks for your time, much appreciated

+3  A: 

The normal situation with freelance programming is that the client will own the source code. That being said--depending on jurisdiction and many other factors--if it's not specified in any contract it will often default to the freelance programmer.

Generally if the freelance programmer wants to retain ownership of the code, it should be make the cost to the client cheaper as the code is worth something and ownership allows reselling, reuse in other projects and so on.

How much cheaper it is depends on too many other factors to give you a number. Factors are:

  • How much upside potential there is in ownership;
  • What rights the client and the freelance programmer retains in respect to reuse and resale;
  • Whether the client is locked in to using the freelance programmer for maintenance;
  • etc.
cletus
I've been on the receiving side before- the note about the default to the freelancer is interesting but not surprising. As a note to the OP, as a client, I would much prefer code ownership be clear in the contract, regardless of who gets it.Also, why not explain to the client why retention of the source code carries value? I could easily see a person unfamiliar with programming not immediately seeing the reuse value.
Thanatos
Ownership should be explicit in the contract but I've worked for companies--some of them quite large--who haven't specified this in the contract and where I'm from in that situation it actually defaulted to me. I could've really burnt them on it had I been so inclined (which I wasn't).
cletus
@cletus +1: thanks cletus, good points. maybe it makes sense to break down different rules per "item" of software. so maybe the client keeps client specific code, but only gets the DLLs for generic code?
andy
@thanatos +1: excellent points.
andy
Many consulting companies will end up with their own libraries that they reuse on different projects. It wouldn't be that unusual for them to retain ownership of those libraries, grant a licnese for their use on the project and the client retain ownership of anything specific to that project. Complicated but it happens.
cletus
+3  A: 

This best piece of advice is to discuss the matter with the client before you start the project.

If you do that, then any price that you both agree on is fair. If you ask too much, he has the option of taking his business elsewhere. If you charge too little, well...

Also be clear as to what rights he is getting. In other words is it an exclusive license? A non-exclusive license? Can he use it on more than one computer? FOr more than one application? Can he sell it to someone else?

Basically look at what companies like Microsoft, IBM etc do. You can find samples of all kinds of licensing models.

JonnyBoats
@jonny: cool, thanks Jonny. I'm pretty much not experience at all when it comes to business. when you say, "look at what companies lie microsfot (...) do" what do you mean exactly? also, when you say "licensing models", do you mean something like contract templates...? cheers!
andy
+4  A: 

IANAL, but here's the basics:

  • UNLESS YOU HAVE A WRITTEN CONTRACT OTHERWISE you own the sources. After the US entered the Berne Convention, you get copyright automatically, and you can only give up that copyright if you have a written agreement that makes the code a "work for hire."

  • Most customers won't be pleased with that.

What this suggests is that you should make a written agreement with your customer, and you should make that agreement beforehand.

Remember that a verbal contract isn't worth the paper it's written on, as Sam Goldwyn said.

From the standpoint of ethics, I think you're entitled to keep your ownership of the code; the customer is entitled to be able to use the results.

For an interesting comparison, talk to a wedding photographer. They maintain copyright on your wedding photographs, and if you want more, you have to bu them from the photographer.

Charlie Martin
@charlie: umm, good point about the photographers
andy
And conversely, if the wedding photographer didn't get a model release from those he photographed, he can't use those photos for other commercial purposes, either, even though he owns the photographs.
Curt Sampson
Yup, although (it's been a LONG time) I imagine there's a model release in the standard contract.
Charlie Martin
+7  A: 

A very good question, and I have heard different ways that consultants deal with this issue.

If you already have a completed set of libraries and you wish to use them for a client's project, it is perfectly legitimate to license those libraries to the client as a separate fee, and many consultants do it this way.

If you do not have libraries, but you have done freelance work for many years and you have built up a repository of code and code snippets that will make your work go faster, your hourly rate should reflect that.

If you do custom development work for a client (other than libraries), it is customary for the client to receive (and own) all of the source code that he pays you by the hour to write. If the client is smart, he will insist on you signing a release that deeds the code to him. The client can, of course, give you rights to use the code in other projects, in exchange for a lesser hourly labor rate. This is less onerous than it sounds; the code actually written for his specific business is seldom usable verbatim in other projects (if it were, the client could have bought a generic solution instead of coming to you for a custom job).

If you provide source code to the client for your libraries you can charge extra for that, and license it to him in a way that allows him to have access to the source code but not redistribution rights (i.e. the client can only use it in-house). How much you charge depends on how much the client is willing to pay. Charge something that fairly compensates you and makes the client happy also.

The important thing is to understand what your value is, charge accordingly, and make sure that this agreement and understanding is in place BEFORE the work begins. Discuss costs with the client. Help him understand the worth of your expertise. Find a mutually beneficial arrangement.

Robert Harvey
+1; this is more or less what I'd started to write.
pd
@robert: +1 excellent points, thanks robert
andy
+3  A: 

The fairest approach is to term your contract in terms of "client code" and "addon code". Then make the license "the client receives ownership of 'client code' and a licence to use the 'addon code', but may not resell or distribute 'addon code' without prior consent". This way you can't revoke a clients permission to use a product they paid for but they can't resell it without also purchasing a distribution license for your addon code.

Alternatively simply retain all rights to all the code and forbid 'distribution' of the source code.

how do you deal with these situations? and if I were to provide the option of having the source code after completion of the project, how would I calculate the cost of the source? would it be a flat rate or a percentage of the project or what?

The same way you calculate any intangible cost:

price > (your_expenses + your_commission) and price <= client_budget and price ~ market_price
SpliFF
+1  A: 

Similarly to what Robert mentions, I commonly request that contracts I enter into assign to me ownership of libraries that I write during the course of the project but that are not directly related to the end result[1]. In the same contract I include perpetual, non-transferable license for the client to use the libraries and receives any updates to them. That way they're getting the use they've paid for but I keep ownership of those pieces of code for use in other projects.

That said, I rarely work on a hourly basis, so the distinction of whose time I'm using to write those libraries is moot. If I were working on an hourly basis a different arrangement might be required, but when I do encounter that I generally don't bill the client for that time or at a substantially reduced rate.

[1] obviously there's some room for negotiation in that clause.

cori
+1  A: 

One related thing to keep in mind is that the source code is not the be-all and end-all of the product. There's a lot of other knowledge you need to take a big pile of source code and make a working application out of it. Someone else who has the source to your application is going to find it much more expensive than you will to release and modify it, so the dangers of giving out source code are not as high as you might think.

As far as ethics goes, I would never leave a client in a position where, if I got hit by a truck, he couldn't hire someone as skilled as I am and carry on with his project.

Curt Sampson
+1: good point curt, thanks
andy
+1  A: 

If a freelancer wants to retain ownership of the code her or she writes, they should supply a service level agreement to their client. It wouldn't be fair for a freelancer to maintain ownership of their code and then be unavailable to maintain it because they were currently working on another contract. Conversely, it wouldn't be fair for a freelancer to break their current contract because the last one needed maintenance.

So the idea that a freelancer owns all the code they write isn't sustainable. After several years of accumulating intellectual property, your business model will break down. Your old code will become a liability rather than an asset as more and more clients demand your services. You'll be unable to continue freelancing and meet the reasonable expectations of your old clients.

Rimian