Skip to content

Unit 1 Computational Modeling Assignment

August 14, 2011

After spending all day yesterday with Camtasia to produce the introduction to computational modeling video, I’ve made some good progress this morning and developed my first assignment in computational modeling.

Let me first state my goals in creating this assignment.

  • I want my students to work with the big idea and purpose of computatinoal modeling in mind—using physics and computers to predict the future. This is why I created the introductory video, and it’s also why I’ve decided to start this work from fully working programs, rather than having students follow a set of instructions to write their own programs or discover computational modeling on their own (though I am curious about how one might do this).
  • I want my students to study by first understanding good code, and these use the ideas they pick up to begin to write their own code. I’m no expert in CS education, I’ve read a decent bit saying that one of the best ways to learn to program isn’t to start by writing programs from scratch yourself, it’s to dive into fully written, well commented programs and begin to make small changes.
  • I want my students to see from the beginning how a computer model can achieve agreement with the real world. This is the reason for the first assignment—modify my code so that the object’s motion on screen matches the motion of the cart you observed.
  • I want my students developing connections between multiple representations of physics: the thing they’re seeing, the code that produces the motion, the graph of the motion, the motion map, the algebraic representation and a verbal representation. This is why we’re doing computational modeling in the first place, since I think there are very few other ways to see an object move on the screen, and watch as the graph of the motion is generated in real time.
  • I want my students to tinker. I would love for them to develop their own computational solutions to problems in the text that don’t call for computational work just by taking this code and tweaking it.
  • I want my students to see code as an expert sees it. This is why I begin by giving them a highlighted map of the code that breaks it down into 5 sections, and why I produced a video that explains to them the various pieces of the code. I’m fully aware that videos aren’t the best way to learn things, but I’m curious if they might be useful in this instance.
  • I want my students to progress independently. One of the big problems I find with working on programming is that when my students get stuck, they have a hard time knowing what to do. I need to develop tools to help them better understand errors and what to do when they are stuck.
  • I want to gradually reduce the scaffolding. In the beginning, I plan on giving heavily scaffolded exercises like this one that give students fully working code and ask them to tweak it. As we progress, I’ll offer less and less scaffolding—students will have to add objects to the code, and eventually write large chunks of the programs entirely on their own.

One last big question I’ve come up with in working on this project. A while ago, I remember Bruce Sherwood saying that one of his students commented “you know, all we are doing is writing the same program over and over.” Our orbits program looks just like the projectile motion program which looks just like the mass on a spring program. To me, this is the start of a huge insight—all these programs are the same. We’re using the same idea (N2) to predict the future. I would love for my students to come to this recognition, and I’m curious as to whether or not computational modeling might help them develop a more expert like understanding of problems, so that instead of thinking of this as a rope problem and a elevator problem, they might start to see that they are all Newton’s second law problems.

So here is the two page assignment, uploaded as a pdf in scribd:

View this document on Scribd

This isn’t the best way to view this document, since scribd can’t show the videos I embedded into the pdf.

If you want to see the videos, here is a link to the 100 MB PDF download.

Since few people really want to download a 100MB pdf, I’ve also included the two videos here.

Introduction to computational modeling (10 min)

CVPM first assignment introduction (5 min)

Also, in case you can’t click on the link in the documents to download the assignment package, here’s a link to the assignment as well.

Finally it might help to have a bit of context on this initiative and my students to fully evaluate this. This work is being done in concert with the Georgia Tech Physics Research Group. We’re interested in how introducing computational modeling to high school students affects their understanding and learning of physics—Can they do assignments like this? does it help them to understand physics differently? Can they apply computational modeling in new and novel situations that don’t explicitly call for it, does it change their perception of computer science or physics? How can we measure students’ use of these ideas? And I’m sure along the way we’ll come up with many more ideas.

I teach 9th grade honors physics at a private school. My classes are small (<18) and all of my students have computers (next year, we will be fully 1-1). My students are quite adept with math; most studied algebra last year and will be studying honors geometry this year.

I would love to know any suggestions or questions you may have about these materials or the research project to test the effect of computational modeling on high school students.

16 Comments leave one →
  1. August 14, 2011 3:49 pm

    Looks good. I am going to steal use this for my pre-intro-physics course. Although I think I will have them install vpython with python 2.6 so that they will have the option of using matplotlib also.

  2. Charlie Payne permalink
    August 14, 2011 3:55 pm

    I plan to utilize VPython as well. I’ve used it with AP Physics B in the past, and it’s worked okay – only okay because with 4X4 block I covered the syllabus in semester. This year I’ll be at a similar school to yours, apparently, and will have one ninth-grade physics first type class, and three Honors Physics, all on a traditional sequence. We are 1-1 with Macbooks. Your intro trumps mine! I’m still working through mine though. I’d love to trade ideas, assignments, etc. Matt Greenwolfe uses VPython extensively in his classes, and might want to share as well. My intro came from a Mechanics and Interactions course at NCSU.

  3. Chris Goedde permalink
    August 15, 2011 7:59 am

    Good luck with this.

    I have to say that I’m extremely skeptical about this project, based on my experience teaching Matlab to sophomore college physics majors, both as part of a class (with weekly computational lab) and as a stand alone course. It will take some students a long, long time to grasp some of the basic concepts of computer program (scope, argument lists, pass by value, return values versus function arguments, loops, etc.), and during that time they will rely pretty much exclusively on trial and error guessing and checking as well as pattern matching.

    My one constructive suggestion is that you really emphasize debugging by giving them incorrect code where they have to find (and explain, in a written paragraph) the errors in the code.

    I don’t really see how you can add all this on top of intro physics, which is one reason I’ve never seriously considered using Matter and Interactions.

    • rwistar permalink
      August 17, 2011 8:29 am

      This seems like an obstructively pessimistic opinion. While I agree with the basic premise of your response, that teaching high-level CS concepts to non-majors is hard, I would challenge the underlying assumption that you need to teach those concepts at all. Most of the ideas you mention are really unnecessary for a simple computational program like the one John is using.

      I would also disagree with your suggestion that you should introduce debugging in this particular context. It’s hard enough for non-majors to understand correct code, so throwing them curve balls with incorrect code will just obfusticate the issue, IMHO.

      Ultimately, the amount and quality of the scaffolding will probably be the key in determining the success of John’s effort. If the students don’t have the support they need, then I agree with you that they will have a hard time understanding the underlying physics.

    • August 18, 2011 7:10 am

      Thanks for your feedback. I need some skeptics to keep me thinking about how to make this better. I do think Python is a far superior language to start working from versus Matlab. I don’t have a ton of experience with Matlab, but my experience using it during an internship working on Gravity Probe B made me think its syntax is fairly arcane and not the easiest thing for novices to jump into. Of course, this might not be the case if students had already used it in some other engineering class or something.

      I’m going to try to avoid a lot of the debugging problems by giving students programs that are already fully functional and spending a good bit of time simply editing code, rather than creating from scratch.

  4. rwistar permalink
    August 17, 2011 8:21 am

    John, my first thought is that you’re going to put pure CS teachers out of business with stuff like this. 😉 Seriously, this is maybe the first really tangible example of “computational thinking” that I’ve seen thus far.

    A few specific comments about your lesson:
    — I think it’s a good idea to have students modify an existing program instead of creating a new one, especially for new programmers in a non-CS context;
    — You’ll need to heavily annotate the code like you did, though, so that the students don’t lose the forest for the trees;– I didn’t quite understand the directions in Step #6, but I assume they relate back to some earlier experimental work that your students were doing in class;

    Relating back to your earlier comments about seeing all these different applications of Newton’s Law, if they really are the same, then that screams “functions” to me. Maybe in a follow-up assignment, you could use a black-box function that can compute the new velocity for different applications to illustrate their similarity.

    About your “experiment”, is it really an experiment? Are you measuring these students’ performances against some other control group that won’t be doing programming? I’m curious about what sort of metrics you will use to evaluate its effectiveness.

    • August 18, 2011 7:17 am

      Thanks so much for this feedback. This is high praise, coming from you. I am working with Georgia Tech to try to make this a real experiment. Unfortunately, this is a bit difficult to do, since you need two parallel sections, one of which you teach with Computational Modeling (CM) and one without. I could do that with my two sections, but since I think it’s really important, I’m not sure how well that will work. Instead, we’re trying to develop a way of assessing how computational thinking might change students’ approach to solving physics problems on paper, and then do some sort of study of students who are taught CM and a control with no instruction to see if those differences show up. We are also planning on doing some sort of attitudinal survey about how students feel about various statements related to computer science and physics.

  5. August 18, 2011 1:18 am

    The problem is that too many of the CS structures mask the physics. If you ‘code’ (Vpython, Matlab, etc) and put a loop in the code…well, the projectiles aren’t in any way looping. If you nest loops, it’s even worse. On the other hand, a spreadsheet is very linear/sequential (or parallel when you go 2D), and far far more transparent. As you step through the problem, you’re stepping down the page. It’s very easy to extend, from basic examples to more realistic versions. Students see the action first, the numerics second, and logic flow third…without getting lost in coding.

    • August 18, 2011 7:20 am

      I used to do numerical modeling in excel, and I have to say that I think that was more obsfucating than Python. My students would end up with a number filled spreadsheet with statements like =$B$2*G2+H2, etc, and have the hardest time understanding what they were doing. They seem to have a much easier time understanding the nature of a loop when quantities have easily understood names like car.pos, etc.

      • August 18, 2011 7:52 pm

        I agree. Spreadsheet programming has to be the most cryptic programming around (and I still sometimes write in assembly language!). It is damned hard in a spreadsheet to see the effect of changing the step size in a simulation or to introduce a new feature (like drag) to an existing model.

        For doing simple physics simulations, python is a good choice. For students for whom Python is too much, Scratch could be used.

        • August 22, 2011 12:36 am

          Not at all. My students have been doing quadratic drag for 20 years– even the non-calc students and high-schoolers. (Misner and Cooney’s ‘Spreadsheet Physics’ (1991) got me started, though I don’t recall what modeling they may have done in that.).

          The drag calculation is easy, and varying the time step is not just trivial but essential for debugging their logic. I have them vary it manually (edit and drag), so that they’re more tuned to the effects. The 1D motion uses 4 columns: t, x, v, a. (2D a couple more). Two familiar linear equations (3 inputs) and one quadratic for air resistance (1 input). That’s it.

      • August 22, 2011 12:15 am

        Students themselves build up the spreadsheet, from simpler versions (instilling ‘reusability of code’) so they understand the SS formulas; after all, they wrote them. It’s also important to keep ‘modular’, of course. We name the columns appropriately (descriptive variables) and usually put the physics formulas as part of the column headings. The fact that the SS variables DON’T match the physics variables is actually an asset. They must mentally and manually (in a virtual sense) connect the various inputs to the cell formula. When you see [=B4+C5*(A5-A4)] it DOES take more mental effort to focus on the roles the SS variables play.
        This dissonance followed by resolution is essential for imprinting. (I think that’s part of the point of the Mazur research: “Confused students are far more likely to actually understand” ).

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: