Initiate Robot
This Is the Kid’s Corner. Adults Are Welcome But… Behave!
The easiest way to keep you going is to infect others with your passion and share what you hold so dear. Hence I pass basic ideas of “software engineering” to my daughter Natalie. I did not know what to expect initially and hoped for the best, planned for the worst but a bit of both really happened. Read below for the full story on our lesson no. 1 – Initiate Robot.
Make a Robot Head to Keep Your Little One Focused
First thing we did was to create a robot’s head for our little game. It kept my little one occupied for a long while. I helped a bit with the final touches (sticking antennae to the top) and some drawing but the majority of the work belongs to my child. She new it will be used for our “programming game” so it kept her going!
Initiate Robot
This Is the Kid’s Corner. Adults Are Welcome But… Behave!
The easiest way to keep you going is to infect others with your passion and share what you hold so dear. Hence I pass basic ideas of “software engineering” to my daughter Natalie. I did not know what to expect initially and hoped for the best, planned for the worst but a bit of both really happened. Read below for the full story on our lesson no. 1 – Initiate Robot.
Make a Robot Head to Keep Your Little One Focused
First thing we did was to create a robot’s head for our little game. It kept my little one occupied for a long while. I helped a bit with the final touches (sticking antennae to the top) and some drawing but the majority of the work belongs to my child. She new it will be used for our “programming game” so it kept her going!
Next We Started Talking About What Robots Can Do
I asked my daughter what she thinks a robot can do. Apart from obvious superhero stuff she was quite on point. I explained to her that robots are all around us and that our coffee machine is a kind of robot and so are mommy’s mixers and food processors etc. I also told her that humans are less and less needed in production and robots do a lot of work for us.
Designing Our Own “Programming Language”
After all that intro the time has come to specify what and how our robot can do things. We started narrowing down a list of “tasks” that it will be able to perform. Those tasks are equivalents of keywords in any ordinary programming language.
Tasks:
- walk – in pee gee steps
- turn – 1/4, 1/2, 3/4 in clockwise direction
- hold
- drop
- pick up
- crawl – one palm at a time
- bend
- stand
- stop – moving & turning
We also described our robot and I explained that without a clear description we do not know what a machine can do. So the robot has two legs – it can walk and so on. It also has two arms so it can pick up / hold / drop objects and has a head with vision detectors 🙂 so it can see.
Describe the Problem to Solve for Your Kid
Since we have an actual programming language now we can crack on and start to write some code ! Here it was a bit of a temper tantrum moment as my daughter wanted for everything to look super clean and professional… Well I told her: “If I write it for you no one will believe you when you say that you programmed a robot for real…”
After this she started putting down some code on her own. I had to pay close attention though and explain that everything has to be really specific, otherwise our robot will get confused and will show an error (more on this in a minute).
Catch Exceptions and Explain Why They Happen and What They Mean
Even during our first go at the programming Natalie inevitably wrote syntactically incorrect code. I had to explain that robot does not understand things in the same way as humans do and instruction “walk” (up to the obstacle in her mind) does not work. I told her that specific number of steps is always required for robot to perform instructions correctly (and so it is for turns and so on). Eventually she understood and corrected her errors.
But that still was not all of the problems that we encountered and I have to admit I counted on this actually happening so that I could talk to her about errors / exceptions.
In the first problem set she was meant to lead the robot up to an object covered with another object (just some toy under a mat). When she led me playing the role of the robot she said: “robot: dig” and I had to raise an exception: “Error: Don’t know dig”.
This allowed me to reinforce the idea of a programming language consisting only of a very narrow amount of keywords that are written down in our natty_bot programming language specification.
After this occurrence she only managed to walk me once into a wall (definitely not on purpose) 🙂 causing: “Error: No space to walk”.
No daddies were harmed or killed during this game though :).
What’s Next?
Since we worked the basics out I think the next game will be to introduce loops, conditionals and functions in an easy to understand way.
I already explored the subject with my young apprentice and she seemed quite keen and did understand the need for loops straight away.
If you want talk to your child how would he/she program a robot if it would have to collect some items from the floor that were scattered in equal distances from each other. Ask them: “how would you write it the way you do now and do you think you could make it easier for yourself?”
0 Comments