This post is correct on a number of points, but misleading or incorrect on several important issues.
FIrst, the distinction between an employee (where the employer DOES automatically own work done within the scope of employment) and independent contractor can be convoluted. The key factor is the rights of the employer to control the manner in which the work is done; employees are told HOW to do the job, contractors are told what results are wanted and THE CONTRACTOR decides how to accomplish that result. Other factors include the use of tools (and to whom they belong), where the work is done, whether the individual is doing work for others, and how the individual is paid. What the two parties call the relationship in a contract is not determinative.
Second, even if the individual is an independent contractor and there is a written agreement saying the code is being done as a work for hire, the project must fit within a VERY narrow set of categories, most of which are not applicable to software. The requirements to even qualify as a work for hire are that it must be specially ordered or commissioned for use as:
- a contribution to a collective work
- as a part of a motion picture or other audiovisual work
- as a translation
- as a supplementary work
- as a compilation
- as an instructional text
- as a test, as answer material for a test, or
- as an atlas.
The only category that I would expect a software project to fall into would be the first one, a "contribution to a collective work" if the contractor is part of a team building a large project and his/her code gets absorbed into the larger body of code. The other categories seem inapposite to software development. Therefore, I think it is generally unlikely that an effective work-for-hire agreement can be made for stand-alone code that is intended for actual use (as opposed to being put into a textbook or test.) I know that software developers sign work for hire agreements all the time (I've seen many of them) but as a legal matter most would probably not stand up to a challenge.
Third, while it is true that a contractor can transfer all or some of his/her rights via a written agreement, and it is true that the author can retake those rights later, it IS NOT automatic. To the contrary, there are a specific set of steps that MUIST be followed to exercise the right to terminate the transfer. For a work (other than a work for hire) created since 1978, the author can termination during a period of five years beginning at the end of thirty-five years from the date of execution of the agreement that originally transferred the rights (or thirty-five years from the date of publication of the work if the right transferred was the right to publish), and ending at forty years from the date of the grant. The author MUST serve advance notice - in writing, signed by all authors or by their agents - AND that written notice must state the effective date of the termination (which has to be within the five-year window), AND the notice must be served not less than two nor more than ten years before the effective date, AND a copy of the notice must be recorded with the US Copyright Office before the effective date of termination. Miss (or mess up) one of those steps and the termination is void.
That's my $0.02. Please note that while I am a lawyer (who works extensively in the geek world) the foregoing is not legal advice to anyone and I only give legal advice to persons who have become clients. If you have questions about a proposed work for hire agreement (or one you've already signed) you should seek the advice of competent counsel.