Sitemap
codingwithgobot

Gobot is a tangible programming drawbot for kid learning

Debug and Algebra

--

The process of debugging GoBot is very similar to solving elementary algebra problems. Let’s compare 5–2+X=3+1 and the following program. (See what the yellow block mean here.)

Press enter or click to view image in full size
Press enter or click to view image in full size
This program failed to make Gobot draw digit 6

To solve the algebra equation, first we need to rearrange it into X=(3+1)-(5–2). Similarly, we separate the program into two parts. We use yellow to represent the first half and green to represent the latter half.

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size

Finally we decide X=4-3=1, and we see the angle in the joint of yellow and green lines is 180 degrees off. Therefore we replace the right turn with a left turn.

Press enter or click to view image in full size

You also can see debugging is actually more demanding than an common elementary algebra problem. You can argue the knowledge of two-dimensional vector and transformation is also required to solve these questions.

Get An-Sheng Jhang’s stories in your inbox

Join Medium for free to get updates from this writer.

It’s important to point out the debugging here is also very similar to a typical debugging programmers would encounter in their daily job. Locating where the error is essential to debugging.

Check our Kickstarter Signup for exclusive discount!

--

--

An-Sheng Jhang
An-Sheng Jhang

Written by An-Sheng Jhang

General Manager at Stoneware Technology, NYU Applied Math Ph.d.

codingwithgobot
codingwithgobot

Published in codingwithgobot

Gobot is a tangible programming drawbot for kid learning