Monday, February 18, 2008

We are all DOOMED!

Today, I had a 'We are all DOOMED!' (WaaD) day at work. This typically happens when I have a C++ demonstration in the department. Today, I had 4 straight hours of it, starting with the first year engineers and ending with the second years. The good news is that I did not lose my patience with any of the undergraduates. The bad news is that I have already given up on the hope that these undergrads can actually learning any programming.

The second years had, what I would call, a walk in the park today. Their assignment literally involves writing less than 10 lines of code in two hours. Their tasks get progressively tougher. But of the dozen students that I had today, none of them managed to finish the task. Everything else was already provided and they could just cut-n-paste the code. These are the actual lines that they had to write:

double y = 0;
for (int i=p.size()-1; i>0; --i)
y = (y + p[i]) * x; return (y + p[0]);
for (int i=p.size()-1; i>0; --i) d[i-1] = i * p[i];
Some of them could not wrap their heads around translating a simple math expression for evaluating polynomials into a loop. These people are worth saving. So, I generally ask them to imagine that all they have is a normal calculator and write down what they would do, step by step, if they had to compute it by hand. Then I asked them to analyse what they did and translate that into code. Some of them managed to figure it out, some of them did not. They will get better at this with time.

Many of them have the simplest problems with the language itself. They don't understand what the keywords mean and they don't know the meaning of the curly braces used to mark blocks of code. When I meet these students, I just know that it's going to go very badly. When they cannot even read or write the language, I don't understand how they could ever hope to finish the task. These people are not worth saving. They will never improve if they do not do their homework.

All of them have one major problem. They have trouble reading the instruction sheets that are in English. I'm not joking. These people have already been given everything necessary to complete their task, in a step by step manner, in the instruction sheets. If they are capable of reading it, they should have no problems doing it. Sadly, one student actually asked me if I spoke Chinese! I refused to answer her and continued to speak only in English.

Actually, I should not just express my frustrations of the undergrads. I am actually just as frustrated at one of the other demonstrators. This is not the first time that I heard him utter nonsense. He actually suggested that a student use a global variable to keep track of a value. I was utterly shocked when I heard that. However, I did not say anything as I did not want to undermine this demonstrator. Good thing was that the course leader came along and corrected the problem.

This lead me to one sad conclusion. All the horror stories that I've heard of computer science PhDs who fail job interviews because they cannot even write a simple for-loop, are probably true. It wouldn't surprise me at all if they were. I just hope that I'd never need to interview anyone like these in the future.

PS: It is a cardinal sin to use global variables unless absolutely necessary and it should never be necessary for correctly designed software. Some people did not believe me when I told them that a computer cannot do a square or cube or any other power.


Dan said...

ah, you make me miss the engy dept.

Wei Shen said...

Farnie! But I dont und computer language at all. I guess some PhD in biological subject would have said the same to us.