Skip to content

Conversation

@vdhelm
Copy link
Contributor

@vdhelm vdhelm commented Jan 17, 2016

No description provided.

@tbekolay
Copy link
Contributor

Thanks for your contribution @vdhelm! I like the idea behind this question -- it's quite a gotcha that you can't mix positional and keyword arguments freely. Even though I know you can't do it, every now and then I do it anyway and get met with a SyntaxError. I also like that there are some interesting design questions that can come up for discussion with more advanced groups (there's sometimes a clear order to the arguments, but the default values you have don't always line up with that order), but the exercise is still interesting for a classroom that won't get to that point.

I'm not sure about the presentation of this question, though. Specifically, the only way for a student to get this exercise correct is to know an admittedly esoteric Python fact a priori, or to try it out for themselves. To me, the argument list fact that we're teaching is not intuitive, so asking people to intuit it is more likely to make them worse rather than better; I would think that the most likely occurrence is for a student to guess 1., then be disappointed when they're wrong. Failure can be a good tool for learning, but in my opinion it should always be avoidable. On other hand, the ability to try things out is one thing I stress as being empowering when teaching, as once you get over that hump and get comfortable trying things, learning happens much faster. So I would err on the side of having learners just try it and then work together to figure out what's wrong, rather than "tricking" them into being wrong, then telling them why they were wrong. (Note: I know that you're not intentionally trying to trick them, I'm attempting to express how some hypothetical students might feel when attempting this exercise.)

I do think that it's useful to teach students this fact though, so what do you think about restructuring the question so that they try to run the code snippet, then pose deeper questions like "Why do you think that Python does not allow default values anywhere in the argument list? Can you rewrite the function so that it will run?"

@vdhelm
Copy link
Contributor Author

vdhelm commented Jan 21, 2016

Hi @tbekolay,

Thanks for your feedback, I totally see your point, I was indeed expecting most students to 'get it wrong' the first time. I always notice how much you can learn from mistakes, which is what I was going for, getting an 'emotional' reaction so that you actually remember what happened.

However, I agree that for many students that might be demotivating, so I'll have a look at how I can rewrite the question to still get the 'surprise' reaction without the negative 'I got it wrong' feeling.

@gvwilson gvwilson merged commit f4f55e4 into swcarpentry:gh-pages Jun 14, 2016
rgaiacs pushed a commit to rgaiacs/swc-python-novice-inflammation that referenced this pull request May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants