December 17, 2004

Catch 'Em Young!

At Syracuse, I was Teaching Assistant to Prof. Plumley. It was an engineering course to High School Students and we did a wide variety of things, from building rockets to physics, civil engineering, robotics, windfarm reports and lots of other crazy stuff. On the whole it was a fun course which the students and teachers, both enjoyed. I have continued this teaching habit from time to time. Myself and Prof. Plumley would work on most things together but the C/C++ programming part (lecturing the students) was left completely to me! Probably the most difficult time these students had during the course was learning C/C++ (and no, its not because I was solely incharge).

The course was an introduction to Engineering, so we touched most aspects of engineering and science. It gave the students a good idea which discipline of engineering they would like to get into. But finally I had students I could fit into 3 catagories. Those who end up in love with programming (and some actually read this blog), those who know programming is not their cup of tea, and those who are still confused.

An interesting incident I remember when I was intoducing the course to them. We were talking about algorithms, and I went about giving them a simple example. Their assignment for next week was to get me an algorithm which could add any two numbers between 0 and 99. I got the regular answers from all of them, except one. The one which stood out went about as:

Step 1: Pick a Calculator
Step 2: Enter a number between 0 to 99
Step 3: Press the "+" key
...........
...........
etc. etc.

I found this to be highly amazing. And this is where a good tester comes into play. He needs to fill in the boots of the regular users (most of the students above) and of the not so regular user (the one student who thought of a different manner in which the algorithm could be written). And those who are wondering, I did not penalise him for his approach, but just called him up to my office, told him I loved his approach and asked him if he could tell me another way to do it. He did have an answer to it and he got his high grades!

As we move ahead in the course, I ask the students to program the addition of 2 numbers using C/C++ and once they are done, students exchange programs and they are asked to test the others program. Finding bugs gets them bonus marks. And the student whose program is bugged, if he can tell me how to resolve it, he doesnt lose out on too many marks. Everyone found this exercise very entertaining and when I presented some test cases no one had thought about, it had them thinking.
All I did was give them some scent of the prey and those who were really hungry would hunt it down.

Testing is not only about sitting at the PC and banging away on code, trying to break it down. Its about spreading awareness on how to make the world a more secure place. Its not about improving only your testing skills but about improving the skills of your co-workers or for that of your own organization. Its about setting (and living) high standards that other people will look up to. And try to emulate.

Are you there yet? I feel I have just started!!

On a lighter note, a sweet answer for "Why do we test our code?" by one of the students was, "To improve our grade".

0 Comments:

Post a Comment

<< Home