It is final project time for my programming students. They are working on projects to show me what they have learned. They are very clever these kids. So clever that sometimes they can’t figure out what the did wrong. That’s were they need me. It’s so good to be needed.
Now there are two basic types of problems. One is syntax problems. The other is logic problems. You’d think they’d be easy to find and fix for an experienced coder like myself. In most cases you would be right. But not it all cases. As I said these kids are clever. They figure things out that I would never ever do. For example they delete things because “I didn’t know what it was for” that the system added automatically and that it needs. I’ve seen a lot of those so in many cases the fix is easy.
In other cases they do something that is new to me. In other cases there are hard to find errors. Missing or extra semi colons are common. At least Visual Studio helps me find some of those. Today a student had a bunch of errors that showed up because a they left a parameter out of a method call. The error messages were no help at all. But experience sure helps.BTW I always make students watch me debug so they can learn how its done. That may be on of the more useful things in the course.
The hardest part of helping students with logic problems is understanding what they are trying to do. I suppose that it is not surprising that they have trouble explaining it to the computer when they have trouble explaining it to another person. This process of thinking about a problem and developing a clear description of what is to be done is hard. They have this idea in their heads but getting it out in a way that doesn’t include magic can be hard. I need to figure out how the help them do this better.
Sometimes students start by asking me the wrong questions. They ask “how do I do [such and such]” referring to a code structure, an object, or some other feature of the libraries or language. Somehow they have decided that will do what they want if only they figure out how it works. Sometimes they are right but not always. Generally I have to ask them what problem they are trying to solve. Often this means I suggest some other way to solve the issue.
This is the old “if all you have is a hammer all your problems look like nails” problem. Students can’t learn everything about a language and its libraries in a few weeks so they try to make all their problems fit the tools they have learned. While I try to assign projects they can do with only the tools that have been covered in class when final projects come around and they have more choices things get different quickly. I think that maybe half the good learning comes in the last week of school when they work on these projects.
Next week the projects have to be done and I get to grade them. I expect to learn a few things in the process. Hopefully my students do as well.