codes for the book Think Complexity