вівторок, 2 травня 2017 р.

Kids Learn Programming: Working as a Team

This week Ivan and I decided to show the kids of IT specialists what their parents do at work. The process of software development had been explained at the previous lesson, but the kids wanted to participate in it, write the code and feel as they are a part of the process. Here is how we did it.

A letter was sent to our group by a young businessman who wanted us to write him a game and present a demo version in the end of the lesson. The idea of the game had to be something like a flappy bird: a bird which flies by pressing the space key and has to avoid the obstacles. Here is our example. The customer wanted something different instead of the bird, and the obstacles to be more interesting than regular pipes. He wanted the game to have several levels and be distinctive. He also brought a (generous and loving) dog to watch how his task is moving. The dog stayed with us till the end of the lesson.

Kids got involved in the task, tried to guess who was the customer, started telling their ideas how to implement the stuff. Some of them told that we could make a nyan cat instead of a bird, and make him handle the comets. It was hard to come to a common denominator about the rest and in order to have enough time to do the job so we decided to split. Three kids with one tutor stayed making the cat, and other 4 kids went to come up with ideas about the logic of game levels, environment, and such, plus implement some.
Many of us in order to achieve certain goal act as they feel like. In the end, some really get what they wanted but others fail and agree not to have what they initially planned. That’s not how it’s done in development where the result has to be predictable. So after we collected the ideas and before doing anything, we wrote business stories. They looked like:

Given: as a player
When: I press “Start” button
Then: cat flies straight.
We planned how much time we’ll spend for which story, thought of acceptance criteria and made a table where tasks were assigned to the certain kids. Truth is, in the process when some felt they can do better and the author of the story agreed, the keyboard was taken by the more willing kid. Unfortunately, the timeframes weren’t kept and it took us longer than we planned, but that's the reality.
Brainstorming is a nice and helpful technique. I tried to get an idea from each kid so that we all develop general logic of the game and make something really nice. It worked out better with 4 kids rather than 7. Some were too shy and didn’t want to speak unless they have to. Finally, while all were making the first level, one guy designed and draw the elements for the next levels, eating which affected the cat in different ways. However, that was too much for half an hour that we were supposed to work in separate teams. During this time, at least one level had to be implemented in full. The ones who drew nicely or knew where to get the sprites (the boys) did the drawing. The shy ones (the girls) wrote the code for the level. We did it all using one computer and one projector. In the end, everyone participated in every task.
When both teams were done with the elementary stuff, we came together for the merge. Everyone was excited about how it’s gonna work out together. The teacher did the merge because no one knew how to do it. But when we checked what it looked like, it turned out that there is no code for when the cat bumps into the comets. This we fixed together.
This all was interesting and important. But what we are typically afraid of most is what will others say about our work, thoughts, and ideas. Will they like and share them? So the customer came to look at what he’s gonna earn money with. (The customer was a friend of teachers’ who the kids didn’t know.) He thoroughly examined the functionality, read the stories, and checked if they worked as expected. The most enjoyable comments of his were:
“This looks like a cookie, I didn’t realize this is the comet I’ve got to omit rather than eat!”
“Why does the cat say “Meow” when it bumps? Does it like to?”
When criticizing something, try to do it in a kind and even funny way, still so that the kid understands that his work has to be improved but he won’t get afraid of punishment or being disliked.
To sum up, the kids learnt to put the task in a form of a story (Given, When, Then), learnt to track the tasks and to work together on a common project.