Debugging Secret Coders
January 31, 2019 by Chris Johnson. Filed under
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
pop computer science, public.
My sons have thoroughly enjoyed Gene Luen Yang’s six Secret Coders books. They are graphic novels about three teens who fight evil with programming, and their weapon of choice is the Logo programming language.
Last summer we were reading the fifth book in the series. It ends with this challenge to complete a code snippet that draws a triangle, square, pentagon, hexagon, heptagon, and so on, up to an 18-gon:
My son Lewis said there was a bug in the provided code. Sure enough.
Can you spot it?The make "nsides (nsides + 1) needs to moved inside the repeat loop. As it stands, the completed code would draw a triangle 18 times.
I follow Gene Luen Yang on Twitter, and I suggested that Lewis message him to report the bug. Lewis did, and to our delight, Yang responded:
But that wasn’t all. Yang sent Lewis a copy of the book with this inscription:
Social media is the place where our heroes are made real. Thanks, Gene Luen Yang, for your passion, books, and investment in my son!