Saturday, October 15, 2011

Learning Python

My 10 year old son Ben is learning to program. He started lessons from the Internet and has graduated to a Python book. The book is specifically on programming Python for games. Having a game as a goal, makes it interesting for him. From his first program after Hello World! he has been programming simple games.

On one particular occasion, I recall Ben getting really upset because he could not figure out why his program was not working in the way he expected. In this one life lesson, he progressed more than any prior programming lesson before. He had to figure it out. The program wasn't going to fix itself and to reach the goal he would have to put in the effort. In the end, he came to realize that the code he wrote was not exact enough. He missed details that resulted in bad code and the inability for his game to execute. When he got into the details of the code he had written, he had probably 10 corrections to make, whereas he could find none to correct before.

Ben could have given up. And quite honestly, I thought he was going to. He did need some help and encouragement, but ultimately Ben knew he had to work through the problem to get to his goal - a game programmed by himself. If Ben had no goal, he would have swayed from the difficult path and just found something easier to code. To reach a goal is to achieve. However, I also maintain that the simple act of setting the goal is also an achievement. When things aren't executing as you expect, sometimes that simple goal can offer you the persistence you need to push through difficult times.

My son Ben learned more about programming in Python this day than he would have if there were no problems to work through. But what is even more fantastic, is he was exposed to the more macro lesson of only getting to the goal by persisting through the difficulties. It was a good reminder for me.

No comments:

Post a Comment