Anyone know anything about intellectual property law (in the UK) as it applies to software? I may be about to embark on a major new project at work, for which I'll need a few parts of my contract clarified or revised (I'm not really employed as a developer at the moment; I just do what's needed to make my systems management tolerable).

As far as I can tell, a piece of software has particular copyright, which by most contracts would remain with the employer. What I don't get is that often there will be an optimal solution to a given problem, so that in some sense all other decent solutions should be the same. How different would subsequent programs/scripts have to be in order to avoid being found derivative (and additionally, to avoid appearing so)?

I may also be confusing copyrights with patents. I realise they are different but I'm not sure I understand how...

Anyone recommend any places to look this stuff up? I realise that the ultimate advice has to be to seek legal counsel, but I'm not quite there yet.