I wonder, if you wrote a program, that generates all valid javascript programs, given enough time, do you automatically have copyright on all these programs? Or do you need to actually run the program and save the results somewhere?
Also, you would get stuck on code with infinite loops.
Or you could just set a timeout.
So it seems documenting is the real work, and programming is something that can be automated :)