Planning Your Program

One of my students in CSE 231 wrote me an email today regarding my post Teaching Functions as a Concept. I want to post parts of his email, because I think it is very insightful.

I read the whole thing [your blog over break] and some of the content was very interesting. The content about how the class did not seem to understand how to break a problem down into smaller problems to tackle and make into functions – that is mostly what I wanted to send you an e-mail about. I help [several other students] every week, [from our section and other sections]. They ask me questions and I try to explain it as best as I can without giving them code. It is similar to how I try to help people in class. Anyway, even now that seems to be a problem with at least the two people I help extensively with the projects we are assigned. They seem to be very against the idea of planning before programming. They both get very frustrated and overwhelmed, no matter what size the project is, but still would rather dive in than plan ahead. Because of this they both still have problems with functions. It takes them a long time to come to the conclusion that that is what they should do. They do get there, but if they planned ahead they would see that much sooner.

I think that this is partly due to the beginning of the course not having an emphasis on planning before hand. When I taught myself I also dove in, and after much experience I have switched to planning ahead. However a lot of students wont get that much experience, and aren’t necessarily taking more programming. This means that after the class they may not use python as much simply because if they want to do something they may get overwhelmed quickly and drop the project. For the two people I help the only reason they stick with it long enough to get a handle on what they are doing is because it is graded.

Therefore I feel like when they teach this class later if they were to move the curriculum back by a week. And the very first week of the class to emphasize the methods that can be utilized by students to systematically break down a larger problem into smaller chunks that can be handled by functions an what not. Another thing to stress in the course that i have noticed is when to use functions anyway. Not just getting to the realization that it is easier, but when it is more helpful to take the time to make a function than to simple write out the code where they need it. I have seen [students] write functions that are called just one time, purely so that [they] can say [they have] a function. If the beginning of the course emphasized how to break down problems into smaller ones, when you introduce functions I think it would be much easier for students to see when and when not to use them. Throughout the course I feel like there is a lot of content and examples of different ways to do things, but not enough explanation of when a different approach may be better than another. This leads to methods that do work, but are unnecessarily complicated.

One thing I do realize is that it is an introductory course and also just one course. There are only so many lectures, and a ton of material and many concepts that need to be covered. Some of these suggestions are impractical for this course in that respect. But it is something to be considered, even if just a small aside during one lecture or something.

-Salim

My thoughts exactly, Salim – it’s what I’m writing a course proposal about for my engineering education class this semester. I’ll post the final proposal when I finish it, but I have Part 1 posted, which addresses the lack of problem-solving skills in today’s CS students.
And Salim, thanks for the feedback. :]
Advertisements

One thought on “Planning Your Program

  1. I’ve found that live coding helps with this: I grow a small program in front of students, then reach the point where I can say, “OK, this is getting a bit complicated,” and pull some of the code out into a function (typically the body of a loop, or a three- or four-part if/elif/else chain). I do it again a couple of minutes later, then say, “OK, now we’re going to add yet another feature — let’s do it as a function to begin with, rather than adding the code in-line then extracting it.” Seems to work pretty well..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s