## Winning the battle over Python programming

Two stories to share after this week's activities with students about programming. I have posted previously about my interest in making Python a fundamental part of my classes this year, and so I am finding ways to include it when it makes sense to do so.

I have a couple of students that are bridging the gap between Algebra 2 and Precalculus with an independent study that I get to design. The tentative title of the course for their transcript is 'Fundamentals of Mathematical Thinking' and the overall goal is to get these students a chance to develop their fundamental skills to be successful in later classes. I see it as an opportunity to really dig in to some cool mathematical ideas and get them to, well, dig into the fundamentals of mathematical thinking. I don't plan too much emphasis on the algorithms (though we will spend some time working on skills in algebra, polynomial manipulation, functions, and other crucial topics where they are weak). Looking at a situation, exploring the way different variables might be used to model that situation, and then really digging in to abstract the variables into a model.

We are starting with what I think is the most fundamental application of this: sequences and series. Even simpler, the first task I gave the students was to look at the number of bricks in the rows of a triangular tower and use Python to add up the bricks in each row. This started as a couple of exercises getting to know Python's syntax. They are then taking programs I wrote to model this problem and adjusting them to find other sums, including the sum of even and odd numbers. One student that completed this task was intrigued that the sum of the latter consisted of perfect squares, but we didn't explore it any further at this point.

I then gave this student a bunch of sequences. His task was simple: model each one in Python and generate the given terms. This is a standard exercise for Algebra & Precalc students by hand, but I figured that if he could do this with Python, clearly he was able to figure out the pattern. I showed him how to write fractions using string concatenation (e.g. 1/3 = 1 + "/" + 3) which enabled him to develop the harmonic series. Today he figured out Fibonacci and a couple other new ones. It was really fascinating to see him mess around think deeply about the patterns associated with each one. I did tap him slightly in the right direction with Fibonacci, but I have otherwise been hands off. I am also having him write about his work to give him opportunities to work on his writing too. When he feels comfortable sharing it (and I have already warned him that this is the plan), I will post links to his work here.

The other new thing was in Calculus. I have shortened my review of Pre-Calculus concepts substantially, and have made the first unit a survey of limits, rate of change, and definite integrals. Most of this has required technology to explore local linearity and difference quotients. On Thursday, I introduced using rectangular sums to find area - they were otherwise stuck on counting boxes, and I could tell they felt it was like baby math. They really didn't know any other way.

In showing them rectangular sums, we had some pretty good discussions about overestimating and underestimating. The students had conversations about how rough the approximation with only 3 - 5 rectangles gave for area under a parabola. A couple of them figured out how to use more rectangles. I told them I was going to write a program to do this while they were sitting and working. I created this program and talked them through how it works. They thought it was too complicated to be worth the time, but I think they did understand the basic idea. I then changed the value of N and asked them what they thought that meant. They got it right the first time. I then pushed the value to higher and higher values of N and they immediately saw that it was approaching a limit. Game, set, match.

Today I had the AP students together working on another definite integral activity that focused on the trapezoidal rule. I showed them the code again and gave them the line that calculates area. It wasn't too much of a stretch for them to work their way to adjusting the program to work for the Trapezoidal rule. We ran out of time to discuss comparisons between the two programs, but they stayed late after class and into their lunch getting it working on their own computers and playing a bit. Here is what we came up with.

The big battle I see is two-fold.

• Help students not be intimidated by the idea of writing a program to do repetitive calculations.
• Give students opportunities to see it as necessary and productive to use a computer to solve a problem.

Sometimes these battles are the same, other times they are different. By using the built-in version of Python on their Macs, I have already started seeing them run commands and use text editors to create scripts without too much trouble. That's the first battle. My plan is to give lots of examples supporting the second one in the beginning, and slowly push the burden of writing these programs on to the students as time goes by and they become more comfortable with the idea. So far I am feeling pretty good about it - stay tuned.

## Flipping, Week 1: Stop the Blabbing.

One of my major goals this year is to stop talking so much. Even in my tenth year, I still spend far too much time explaining, questioning, and presenting in front of the class.

The nature of this talking has changed a lot though. When I first started teaching, it was almost all explaining. That's what I thought good teaching was all about - if you could just explain it the right way, then everyone would get the concept you are teaching, right? A perfect lesson consisting of a perfect development, a perfect explanation of all concepts, perfect example problems, and perfect students. This is how I looked at it during my summer training, and before I got into my classroom.

That changed pretty quickly once I actually got started. Explanations were important, but more important was getting students to be somehow involved. My coaching from administration was focused on good questioning over talking and explaining as a way to do this, so I put a lot of energy into this during my first couple years, and it has since stuck.

The problem is that I am often addicted to asking questions when it's really time for students to get working and thinking on their own. I can ask questions like crazy, which might have really impressed administrators in my room at one time, but it probably infuriated (and still infuriates) my students to no end. As good of a question I could have asked, they were still just sitting there thinking and not doing any active learning on their own. Furthermore, when the one or two students do answer a question I ask, it isn't necessarily a real indication of what thinking is going on in the heads of the other students in the room. Students who self select to participate make for a bad sample for the level of understanding in the rest of the room.

The technique to address poor participation (as pushed by my administration in my first couple years) was to cold call students. This is a bad sample in the other direction - pushing a student to go from full listening mode to full participation mode with the rest of students is not an effective way to make dialogue an important part of what goes on in your classroom every day. This is especially the case for students that have poor self esteem about math in the first place. Good conversation is rarely one or two to many. When was the last time you saw twenty people actively involved in a discussion? Why would you really try to get that going in a classroom when it doesn't work for a room full of adults at a faculty meeting?

In reality, real learning doesn't look like a kid staring into space pondering a good question. It involves experimenting, testing a theory, writing down an idea and trying it out. It involves taking what you have produced out of your own thinking and getting active and reliable feedback.

Back to my main point - I am attempting this year to put any direct instruction for a particular day's lesson in two minute video chunks, and limiting the number of these to no more than four per day. A few really nice things have happened since doing this:

• I'm putting a lot of thought into exactly which ideas are best left to video or direct instruction, and which ideas will come out through conversation and the activities. Some things are better taught in a big group, I'm not going to deny this to be the case. Some things are better learned one-on-one, and thinking about the difference has really changed the way I organize the activities for the day.
• My students are spending a lot less time listening to me, and more time engaged in the videos and what I ask them to do. The videos sometimes include straight example problems, but I try to include a couple things for students to actually do, write down, or talk about with the person next to them as they watch. The conversations that students have during the videos are really rich (and remarkably on-topic), and are so much more useful than having me tell them things while they stare at me.
• I can do other things while they are working on the activities I give them. I can see how they are watching the video and make suggestions on things they should be writing down. I can test their knowledge by asking one-on-one questions and get a really good sense for the level of understanding for each student. I can look at quizzes I gave at the beginning of the period, make comments on them, and have a conversation with the students about their work before the end of the period! The quality of my interaction with students has been much higher than before, which has resulted in larger amounts of quality feedback. That is really the goal here.
• My ESOL students are loving it. They can take time with vocabulary, which is the hard part for them, and make note of the mathematics concepts at the same time. Some students are using the videos to create their own glossaries in other languages. I've always suggested that students do this, but until now, I haven't seen them do it so well, let alone of their own volition.
• The learning in my room is messier than ever before - everyone is at different points and is having different conversations. There are papers all over the place. Students are crowded around tables working and are facing all different directions. Seeing this sort of thing happen my first year would have meant that this was a spent lesson, that I had lost them. Here, it just looks like (and is so far proving to me) good learning experiences for students.
• This post is partly in response to one of the new blogger prompts about what I want my students to remember ten years down the road. I really don't care if they remember how to factor quadratics. Moving to a more student-centered learning model though has made the students in charge of making sure they understand what they are learning. I would love if students tell me in ten years that they learned how to learn something new in my class. Real learning is messy, and actually doing math (not watching), making mistakes and growing from feedback is part of the game. There's not as much room for that in the more traditional math structure of "I-Do,We-do,You-do" model because the last part is where the real learning happens. Maximizing that part (and simultaneously providing ways for that feedback to happen) is the real meat of teaching, and it's where I am focusing my energy this year.

Here's to keeping it going as long as possible!

## Python in Algebra 2 - An Experiment

One of my goals is to include some Python programming as part of all of my courses this year, and to do so in a way that isn't just wedging it in where it doesn't belong. We don't have a formal programming class in our school given our size, but I have heard that students are interested in the broad topic of programming, and know that they could benefit. So, I am finding times to get students playing around with it as a tool.

The perfect opportunity in Algebra 2 today came in evaluating algebraic expressions. I don't like reviewing the topic, at least haven't in the past, because in most cases the students remember enough of it to think that they know how to do it, but have forgotten all the nasty bits about order of operations, distributing negative signs, and the infamous -5^2 = 25 when evaluating -a^2 at a = -5. They typically have great interactions reminding each other of the rules, but by the time they get to me in Algebra 2, the idea is no longer fresh. The lesson then ends up being the math lesson equivalent of an air freshener - temporary and stale.

Following my goal, I figured this would be a perfect opportunity to introduce the topic first as a programming topic, and then use the computer as a resource for the students to check their arithmetic. We started the class with some basic order of operations questions:

This was followed by pasting the following into a Python interpreter as everyone was watching:

print "Answers to the Warm-Up Questions:"
print (8*3 - 2*4)
print (27 + 18/9 - 3**2+1)
print (40 + 24)/8 - (2**3+1)

This was following a suggestion from Kevin Krenz to demonstrate the fast way to solve it using the Python interpreter. While they weren't wildly impressed, they did accept that this was an option for them to check their work in these types of questions, and were up for learning how it worked.

I then showed them how to run a Python file on their Macbooks, which all have at least Python 2.6 running on them in the terminal. I talked about working in the terminal as running around in the basement of their computer - lots of power and hidden secrets there to play around with (or mess up if not careful). After learning to do this, they edited a partially completed Python script which I have posted at Github here.

I really liked what happened afterwards, though it did not feel (at all) like a clean, straightforward way of going over algebraic expressions. It was messy. Different people were at different places during the entire 30 minutes we worked on it, which was much longer than I expected. Quite appropriately though, it slowly came together like writing a program often does. Lots of good discoveries and realizations of simple errors that I didn't need to force.

Students realized the difference between 2*x and 2x to the computer. They realized quite cleanly that they needed to tell the computer outright that there is multiplication between a coefficient and a variable. They saw this was not the case for -x although they also thought they might need to write it as -1*x. The Python interpreter pointed this out to them immediately. The interpreter didn't do so well on 4(3 - x) since it considered it a function call, but with some prodding, most students realized it was the same error.

There was enough information in the script for them to figure out how to do exponents, so I was happy not to have to go through that separately. The only really big problem was the fact that Python 2.6 doesn't have the nice floating point capability for division that 3.2 has. For the first problem, part (a), the answer is 0.5, but Python returns 0 since it assumes integer division with a plain / symbol. I went around to student computers replacing x/y with x*1./y, but this became an opportunity to converse with students about division as multiplication by the multiplicative inverse or reciprocal. Another unintended complication that then resulted in more review of pure mathematical concepts.

With all of this done, the students were then pretty proficient at trying to do the substitution by hand and checking against the answers from the computer. Most caught the serious mistakes without too much input from me - the computer did that work for me.

After finishing problem 1, the students got a big kick out of how I told them to program Problem 2 at the end of the script. They were directly teaching the computer to answer these questions through code. I think they saw that programming really is how you teach a computer to do what you want it to do, and had at least a minimal sense of pride in being able to do so.

One student said this was pretty cool, and compared it to a video game. Another appeared to want to kill me the entire time. They were all pretty patient with the activity though, and trusted that this would make them better at what they needed to learn for my class - probably the most important part to this not leading to a serious case of Thursday afternoon mutiny.

In the grand scheme of technology implementation, this activity was nothing more than using Python to replace a graphing calculator with substitution capability. This type of knowledge, however, is important for doing more substantial applications of computational thinking. I think it's important to get students to see what it can do before being interested in creating something as simple as 'Hello world'. That doesn't seem to interest the vast majority of students. While I did most of the programming for this task, this is a gateway to the students doing more and seeing more down the line. Now that they know how to do the basics of editing and running a program, we will be more successful in doing more sophisticated things later on.

## Standards Based Grading - All in, for the new year

I've written previously about wanting to be part of the Standards Based Grading crowd. My quiz policy was based in the idea - my quizzes cover skills only and in isolation, the idea being that if students could show proficiency on the quizzes, then I would know for sure that they had really developed those skills. If they had demonstrated proficiency, but then failed on tests to perform, it was an indication that the problem was seeing all the skills in one place. This is the "I get it in class, but on tests I mess it up" mantra that I've heard ever since I first started teaching. My belief has always been that the first clause of that sentence is never as true as the student thinks it is. The quiz grades have typically shown that to be the case.

The thing I haven't been able to get at is why I can't get my students to retake quizzes as I thought it compelled them to do. I told them they can get 100%. I reminded them that they just needed to look at each quiz, recognize what they got wrong, and work with me on those specific skills to improve. Then, when they were ready, they could retake and get a better score. Sometimes they do it, but they are always missing either one of those three things. They would retake without looking at the quiz. They would take it knowing what they got wrong, but never asked me to go over the things they didn't get. There were exceptions, but curiously not enough to impress me.

I did some thinking over the last couple of weeks on how I wanted to do things differently, so I wrote up a new grading policy and posted it online. I had renamed my quiz grade to be 'Learning Standards', bumped up the percentage by 10% (to 25%), and reduced the homework and classwork components to 5% each, with a portfolio at 10%, and tests to 55%.  In sharing my new grading policy with people through Twitter, there were some key comments that really guided my thinking.

Kelly O'Shea pointed out the fact that even with the change, the standards were not a huge part of the grade. Even by cutting classwork and homework into the standards, it still wasn't good enough:

A few other people made similar suggestions. John Burk probably put the final nail in the SBG-lite version I thought was safe with this comment:

One problem for getting buy in on SBG is that if it isn't a big part of the grade, and there are still so many non-sbg things, they might not really understand the rationale for SBG.

If I really believe in the power for Standards Based Grading to transform how learning happens in my classroom, I need to demonstrate its importance and commit to it.

The final result? My grades for Algebra 2/Advanced Algebra, Geometry, Calculus 12, and Physics are going to be 90% Learning Standards, 10% portfolio. I am going to give unit tests, but they are opportunities to demonstrate proficiency on the learning standards. In the case of my AP Calculus students, the grades are still 60% unit tests, 30% standards, and 10% portfolio, primarily because I still will be giving tests that are similar to the AP exam with multiple choice, and free response sections. I also had my first class last year with 100% fives, and am admittedly a bit nervous tweaking what worked last year. That said, I am accepting that this, too, could become a thing of the past.

I am a bit nervous, but that's mostly because change isn't always easy. From a teaching perspective, the idea feels right, but it's not what I'm used to doing. The students sounded pretty cool with it on the first days of class when I introduced the idea though, and that is a major positive. I'll keep writing as things proceed and my implementation develops - it feels great to know I'm not alone.

I really appreciate all of the kind words and honest feedback from the people that challenged me to think this through and go all in. If I can do nothing else, I'll pay that advice forward. Cool?

## First Day Activities: Robotics

For our orientation activities this year, we are focusing on getting to know each other, and discussing/interacting/performing skits around digital citizenship and our school's computer use policy. To make sure we have enough time for these activities, but find problems with the schedule, we are going through each day of the block schedule with abbreviated classes. This means that each class gets around twenty minutes to meet.

I love the limited time for the sole reason that I'm not even tempted to talk about policies. It's a chance to do something interesting with the students and whet their appetites for what the class is going to be about. I'm going to share what I did as an opportunity to record what I did on the first day for the future (which I always plan to do, but rarely do) but also to give others ideas.

### Robotics

The students came in to find three full Ziploc bags of LEGO pieces - the last of my collection from back home that was previously in storage. I asked them to build a tower as tall as they could build it using the pieces from the bags. I asked that they keep track of the number of bricks they used in their design.

They quickly got to work - I was impressed with how quickly they jumped into team-oriented roles. Some created a base for the tower. Others started stacking bricks. Another occasionally pantomimed a general shape they should try to follow.

After around eight minutes had passed, we measured the tower. I then said they needed to build a tower that reached at least the same height, but used half the number of bricks they used in the first one. Again, they quickly got to work. They scrapped the nice base they had built and did some interesting sideways building vertically to make up for the pieces they knew they had to remove. Eventually the height reached more than twice the height of their original tower - I was impressed.

We then had three minutes left - just enough to ask students to compare this task to building and designing something in the real world. I mentioned the word constraints to describe what they came up with, but they got the idea. They also mentioned that it would have helped if they knew what all of the constraints and requirements were at the beginning. I agreed, with a smirk.

Then it was off to the next class.

It's good to be back! Expect more posts as I can fit them in.