WEBVTT 00:00:02.640 --> 00:00:05.920 Computer Coding for Kids: Think Like a Computer. 00:00:08.420 --> 00:00:12.140 A programmer must learn to think like a computer. 00:00:12.140 --> 00:00:18.560 All tasks must be broken down into small chunks so they are easy to follow, and impossible to get wrong. 00:00:19.620 --> 00:00:24.120 Thinking like a robot. Imagine a cafe where the waiter is a robot. 00:00:24.520 --> 00:00:30.400 The robot has a simple computer brain brain, and needs to be told how to get from the cafe kitchen to serve food 00:00:30.410 --> 00:00:36.529 to diners seated at tables. First the process has to be broken down into simple tasks the 00:00:36.529 --> 00:00:43.759 computer can understand. Waiter robot program one. 1. Pick up food. 2. Move from kitchen 00:00:43.759 --> 00:00:48.439 to diner's table. 3. Put food down. Disaster. 00:00:48.439 --> 00:00:51.439 Using this program the robot grabs the food 00:00:51.439 --> 00:00:55.989 from the plate, crashes straight through the kitchen wall into the dining area, and puts 00:00:55.989 --> 00:01:01.129 the food on the floor. The instructions weren't clear: we forgot to tell the robot to use the 00:01:01.129 --> 00:01:07.449 door. It might seem obvious to humans but computers can't think for themselves. 00:01:07.449 --> 00:01:14.449 Waiter robot program two. 1. Pick up plate with food on it. 2. Move to kitchen to diners table 00:01:14.799 --> 00:01:21.799 by: Move to door between kitchen and dining area. Move to the door from the table. 00:01:21.800 --> 00:01:28.160 3. Put plate down on table in front of diner. This time we've told the robot waiter to use 00:01:28.170 --> 00:01:33.740 the kitchen door. It makes it through the door, but then hits the cafe cat, trips, and 00:01:33.740 --> 00:01:35.120 smashes the plate on the floor. 00:01:36.000 --> 00:01:37.300 Still not perfect. 00:01:38.400 --> 00:01:41.280 The robot doesn't know how to deal with obstacles like the cat. 00:01:42.020 --> 00:01:45.680 The program needs to give the robot even more detailed instructions 00:01:45.680 --> 00:01:47.400 so it can move around safely. 00:01:47.940 --> 00:01:52.560 Waiter robot program three. 1. Pick up a plate with food 00:01:52.630 --> 00:01:59.549 on it holding level at all times. 2. Move from kitchen to diner's table by: Move to 00:01:59.549 --> 00:02:04.189 door between kitchen and dining area checking for obstacles and steering around them. 00:02:06.180 --> 00:02:10.000 3. Put plate down on table in front of diner. 00:02:10.800 --> 00:02:12.400 Success at last? 00:02:12.600 --> 00:02:14.600 In this version of the program 00:02:14.610 --> 00:02:18.370 the robot successfully delivers the food to the diner avoiding any obstacles. 00:02:19.340 --> 00:02:24.920 But after putting the plate down, the robot remains standing at the table while food piles up 00:02:24.930 --> 00:02:30.910 in the kitchen. Finally the robot can deliver the food safely but we forgot to give it instructions 00:02:30.910 --> 00:02:35.050 to go back to the kitchen and get the next plate.