Since copyright is instant and automatic the amount of "work" required to produce it has no bearing at all -- a 4 line limerick gets as much protection as a 20 volume encyclopedia. Besides the US courts long ago rejected the "sweat of the brow" argument.
The distinction between a recipe and a program is completely arbitrary and has more to do with the fact that recipes predate copyright law while software came after.
Suppose I made a very advanced "fry-bot" (like McDonalds uses) that could peel the potatoes, slice them, season them, deep fry them for exactly the right amount of time, and then serve them in little cups. Would the program driving all this activity deserve a copyright? But really haven't I just taken a recipe and turned it into a computer program?
If I write a recipe in C++ notation does it suddenly become copyrightable?
This is just another rehash of the "on the internet" trope that is so often pilloried here. Copyright law is still in the 18th century while the culture is not.