Hacker News new | ask | show | jobs
by beevai142 3430 days ago
The code is next to the explanations in the books. Who decides whether your implementation is "completely different", especially if you admit that yours is not a clean-room implementation, since you read the book? Do you want to expose yourself to a legal risk? Or hire a lawyer to determine what the legal risk is?

It is also not that clear all of the algorithms are fully original clean-room implementations written by the authors --- the techniques in the book are well-known and previous implementations do exist, written by other academics. As such, claiming copyright on some the codes is not morally defensible, even if legal.

It's just better to not read the book at all. Since you cannot use the codes as is, if you want to learn about the theory behind it, it's better to pick a different book.

1 comments

> it's better to pick a different book

In my experience and opinion, Numerical Recipes hits a pretty unique spot by explaining enough about the ideas behind and how the algorithms work, that one can start implementing them (with or without reading the code) but not getting theory-heavy and full of equations and proofs, like a real numerical analysis textbook.

Kahaner, Moler, Nash: Numerical Methods and Software is a similar book, maybe even better, but it's from 1988 and never updated, and it's not nearly as widely known. Also it covers a smaller range of topics.

The point stands, though - NR gives a nice introduction, and allows you to dabble with code and algorithm. But the NR code is didactic, it is not production quality (nor is it intended as such). Together with the restrictive license terms, that means:

For anything to be used in the real world, in production, you're better off taking code from somewhere else.

What alternative to use depends on the topic/algorithm in question. But NR should just be a starting point, not what you actually use.