Every time he repeated the mistake I felt like banging my own head on the walls, on the other few occasions I felt like I should be banging his head on the walls! Every single time he would say that he had understood every thing I taught and would remember it, but the very next day he would forget. I told him that you must write the program! You just can’t read it and understand & remember it. But he kept doing the same stuff.He used to study from a book. He kept asking me questions and I used to clarify his doubts. But this was a tedious job; because when I tried to explain, he would not remember a thing about the previous programs & concepts and hence would not understand the program at hand.
Finally, I understood that this is not going to work. I had to do something different.
I simply gave him a book and asked him to read the sections involved in the program and code. I simply sat there - watching. I saw his program had errors(or bugs, technically) but I did not interfere - I let him think. I even asked him to try to run that program though I knew it wouldn’t run (coz of the bugs in it).
This I did for a purpose. Previously I used to tell him about the errors, but that way of teaching didn’t work as he kept forgetting them. So this time, I wanted him to indentify the bugs on his own. At times, I knowingly asked him to add a piece of code that would create errors, just to let him learn ’How not to program!’. With every change I modified the question and asked him what are the things he had learnt. I found this way to be much better. The obvious disadvantage was that I had to go hard on him. Push him to the last limit. Let him commit the mistakes or at times even made him commit mistakes.