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 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.