Mental Models

Today I worked on something kind of hard.  And it’s something I’m asking one of my students to do.  I had to connect three different things together: HTML, a database, and Python.  I was using a tool, PythonAnywhere, that I had introduced to my students earlier.  I, myself, have used PHP, HTML, and MySQL (database), so conceptually, I knew how to make this work, but practically, I wasn’t sure.  My students don’t even have the concept part down, which makes it even harder for them, so I wanted to have step by step instructions to get them started.

So, I took it one step at a time, myself.  I did the easy part first, creating the HTML form to take input.  Then, I went to my Python file and wrote psuedocode for each function I needed: one to add data, one to delete, one to update, one to show/sort.  Then I made my database directly in the shell.  I wrote a single function, connected it to web form, and then tried it out.  This is actually the opposite order in which I told my student to work–sort of.  I had her my the database first.  Then, I had her make a form, then the Python.

The hardest part of all of this was explaining conceptually how all of it works.  I knew.  I could envision from the beginning how the pieces were going to fit together. For me, it was just a matter of trying out the code in this unfamiliar environment.  I was integrating new knowledge into old.  Lots of, “Oh, that’s how they do that!”  My student, who was having a hard time grasping the idea of taking data from a form and storing it somewhere where you could access it in different ways, had no vision, no model for what that looks like.  It was all new to her.  Yes, some of the Python code is familiar, but the context is very foreign.

I’ve been doing some reading about this problem.  What do you do when you have a student who can’t create a model of something in their head?  What if there is no previous knowledge to build on (or very little)? How do you help them learn? Sometimes we use metaphors.  In this case, I could have used a bucket metaphor maybe.  I tried to use a spreadsheet as a model, which sort of worked.

I was excited to have figured out how to make everything work, but struggled to figure out what to do to make it more straightforward for my students.  One thing I think I will do is teach web programming more directly.  We dabbled this year because we had some time, but I think this is the kind of thing my students might encounter and might be interested in.  And I can teach a lot of other concepts through this.  Investing more time on it seems like a good direction.  I need to do some more thinking about what to do when the concept goes straight over their heads.

Enhanced by Zemanta