Tuesday, November 3, 2009

Logic and Programming

Last week I came in with a talk about programming in electronics, where we discussed some of the logical arguments that are embedded in the electronics that we use. I started off by saying that the conditional statements that we've talked about so far are things that we don't control, and I gave them a few examples of topics that we've discussed and other things that are relevant to the students. I then posed the question: "What if we had complete control?" My first example was the classic game of snake, which I chose because of its relative simplicity. I showed them a video that I shot where I played through the game and asked them to think about what happens under certain conditions, and afterward I wrote several of the conditional statements that they came up with on the board. I followed this with a more complex example of a program that I wrote over the summer, where selecting a button changed a picture that was displayed. Next, I showed them a piece of the actual code and asked the students what they noticed about it. When I asked them what it meant, they were able to figure a lot of it out, so I pointed out what was an "if" and what was a "then" and where variables were set. I mentioned that this is only a tiny piece of a code, and when you are looking to code bigger things like World of Warcraft or Halo or Super Mario Brothers, there are thousands and thousands of lines of code to deal with. I ended by asking the students to talk to their neighbor (their desks are in pairs) about conditional statements in some of the electronics they use - and I put up pictures of an xbox, a laptop, an iphone, and a digital camera for inspiration. This was kind of a "pair-share" activity. After 60 seconds, I asked them to share their discussions. Many of them came up with non-programming examples of if-thens, like "if I throw my xbox, then it will break," which wasn't exactly what I was looking for, but some of them did come up with good examples. Because of this and the large amount of time it took to get through the presentation in second hour, I took out the part about the program I wrote for third and fourth hours. I think this helped keep the students in those classes more focused and significantly cut down on time.

In the first two class periods, I wrote down the if-thens from the final discussion on the whiteboard, and I asked for volunteers. When I picked on non-volunteering students, they generally didn't have answers for me. So, in the fourth and sixth hours, I told them in advance that they should have something ready to share at the end, and we went through almost all of the table pairs. Third hour was rather disappointing with the amount of interaction I got, but fourth hour went surprisingly well, perhaps because of the changes I made and perhaps because of the tone I've set in those classes during my first 6 weeks. Sixth hour also went very well - I guess I am learning through my experiences in the earlier classes to improve on the later classes. During sixth hour, a student asked if they could see the simulation that I had run to make the program that I wrote, so I showed them a few example videos from that and was able to draw another parallel with the conditional statements. I think this was a good talk, and I am happy with how it went.

Today I came in prepared to do a Problem of the Week from the Drexel Math Forum, but Ms. Tran felt that the students would fall behind if I did. She was absent today, so she had a sub pass out some notes and a handout for the students to work on in class. The students had never learned the material before, so the notes were their only guide to completing this, along with me. Most of the students chose to ask me their questions rather than look them up in the notes, so in 3rd and 4th hours I talked through some of the main points on the whiteboard. In fourth hour in particular, many of the students refused to be quiet while I did this, so I asked the students who were going to listen to come up to the front, and we went through it with a group of 8 or so students. Of course, those who weren't in that group either didn't finish the assignment or had to ask me the same questions later, but I don't know what else to do. Fourth hour got extremely rowdy, to the point that the teacher next door came in and yelled at the students, then called Mr. Brown in to talk to the students as well. I try hard not to concern myself with discipline issues, but it is very hard to not get frustrated by students who feel the need to "rap" loudly throughout the entire class and insist that they are not doing anything wrong. I think a lot of today was a waste of time for many of the students, and I will talk to Ms. Tran about dealing with this situation in the future. In sixth hour, I got everyone's attention at the beginning of class and went over the important points of the notes before passing out the worksheet for about 3-5 minutes. The students listened, and I think as a result they all seemed to finish within 15 minutes, leaving the rest of the class period open for them to socialize.

No comments: