To calculate the overall star rating and percentage breakdown by star, we do not use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyses reviews to verify trustworthiness.
I think this book is just an overview of the most common used functions, since I didn't really understand the basics. I got another book to go into detail. I'm assuming you got to have knowledge of another programming language to understand it better, but I didn't come out learning much.