I don't think I believe that. Maybe you are using *SOME* of the stuff from the textbook, but clearly not all of it. The textbook couldn't possibly be as wrong as much of your code has been.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.