So here is a debate question for the legal and scientific minds out there.
One of the books that constantly gets referred to in applied numerical methods is Numerical Recipes. One of the main selling points of this book is that it comes with computer code (in the latest version C++) for nearly all of the algorithms discussed.
There are two problems though. One is that the code is absolutely awful. In every version it is basically a mindless translation of the original Fortran code for each of the algorithms, and as such the code has nearly all of the typical bad design that Fortran programers seem to love. For instance it wasn’t until the latest C++ version that the authors started to use arrays indexed from 0 (as in the C convention) instead of 1 (as in the Fortran convention), despite releasing two previous editions that were supposedly “in C”.
That’s not the worst problem. The bigger problem is that the authors insist that the code in the book comes under a separate license, and that if one wants to even just type the code into their computer they need a license to do so. Even code that is in some way based on the code in the book is considered by the authors a “derived work” and also subject to licensing.
The main problem though is that the book is merely a summary of the numerical methods literature, and as such contains no novel algorithms. Worse still is that several of the algorithms are either: