Thursday, February 1, 2018

D83-85: Introducing Interfaces

AP CSA
We started AP CSA with talking about interfaces.  I used the example that as a teacher, I need a way for everyone to turn in assignments. In my class, that means that I need a way for every student to get paper into the basket.  Each student will take a different route to the basket, other students might be a bit lazier and give their paper to someone else to hand into the basket.   How each individual student (object) does the behavior (method) may differ, but in the end, I NEED each student do have a way to do that.

I also used an example with people getting to school or work.  This would work better in an urban setting, but it still worked well.  I think I could even write psuedocode for the method.  Something like...




You even could extend this with the fact that everyone gets to school at a different time (night custodians get there later), etc.

Later on I asked one of my robotics girls if they used interfaces in their programming portions of robotics and she said "Yes, but I never knew why"... that was kind of the best answer I could hope for.

She said they had common methods like Go that made the vehicles go a certain distance.  This method made the gears change by a different amount depending on the size of the wheel and such.  It was interesting.

To teach interfaces, I also stole a little activity from my collaborator TJ.  Essentially each student needed to implement the Snow interface.  They had to make a Snowflake class that implemented the Snow interface and then we were going to compile them all in Processing.

I don't really think students got YET why we were doing this.  Tomorrow we will do the great snowflake reveal.

This lesson has taught me some of the challenges of teaching design to students.  It is hard for them to know WHY they are really doing something and what the benefits of using interfaces or polymorphism is - it isn't something you can teach quickly or show a ton of examples of.

When I showed students the project, they didn't get they they would need 3 different tabs in processing.  I needed to explain what the purpose of each tab was - 1 needed to be for the interface, 1 needed to be for the class that would implement the interface and the third would be for the class which would describe the behavior.

I have also noticed that in Processing, students aren't required to make constructors which leads to some confusion as to why having a constructor is a good (or necessary) thing to do.

Today, we got back onto BlueJ with a CodeAlong POGIL activity.  The first half of it was very much "typing test" esque but I like how it gradually took off the supports over time.  I think students got a better idea of why an interface was useful.

APCSP
Students worked on their explore task.  I made a little check-in sheet where students tell me where they are in the process.  I check them off for things like choosing a topic, finishing their research, writing responses, and creating a computational artifact.  Since I am not telling them that what they are doing is good or bad, it helps keep students accountable to finishing while making sure I don't influence the content of their writing.  We were on day 3 right now and some students are essentially done.   I am going to give them tomorrow to finish it up and then we will have 4 work days later in the semester for students to either finish their Explore task or work on other things.

Concepts
This class probably hates me right now.  I have really been cracking down on behavior.  It seems to be going better but I know that this might still be a bit of the honeymoon phase of second semester.  We are talking about combinatorics which seems to be going well.  The additional structure also seems to be helping.

One Good Thing
I talked with a dean and a student today and I learned a lot about how to have some tough conversations with students.  I always start with letting the student talk first, but he dragged that out for a LONG time.  He kept asking "What is the expectation when you XX?" that made me realize that A) I need to make sure I know what I expect from students and B) Students actually know those answers... so, it sets up a nice "you know what you should be doing" sort of situation.


No comments:

Post a Comment