'16-'17 General Discussion for Lesson 3.5


#1

Use this thread to discuss your questions and comments about how to run the lesson.


#2

#3

A few things that popped up throughout the programming unit:

  1. Students didn’t read the directions. I would take some time at the beginning of the unit practicing to read the directions. Even though Code Studio says “do this” (literally) students would accidentally work a head (for example, make the whole diamond on the first bubble, or not work within the parameters given.

  2. I personally love the checks that Code Studio added where it tells students that they need to re-look at their code. It brought up the issue of efficiency since students would often have unnecessary lines of code in their program. Some students were frustrated because they felt like they got it to work anyway using commands that Code Studio didn’t want them to use (turnRight for example). Some of the students I let move on, others I told them to re-do it. It was a good lesson in understanding the parameters of a task.

  3. One common issue for students was that they said “pen down” or “pen up” when they were just using the “dot” command. We talked about how a dot just makes a dot - it doesn’t need to have pen up or pen down to make it draw a dot.


#5

Many of my students seem to be missing the entire idea of functions in the first few bubbles. At the end of the last stage, we discuss commands they’d like to have. “turn right” comes up. We segue into this stage… “That’s what we’ll be doing in this stage! You’ll be making your own commands!” I play the video.

First (minor) hurdle: Students misinterpret what the “turnAround” function is supposed to do. Many create a turnAround function that contains: turnLeft, turnLeft, moveForward. To be honest, I did the same thing last year. I’m not sure how to make the instructions clearer that the moveForward is not part of turnAround, but it’s meant to come after calling turnAround. However, in the grand scheme of things, it doesn’t seem to affect anything if the students include moveForward inside turnAround.

Here’s where things go downhill… for the following couple of bubbles (particularly making the cross), many of my students (re)define turnAround for each time they call it. Maybe they didn’t watch the video carefully. I have a feeling my students don’t have a clear grasp of defining vs calling a function when they go into this stage. There’s a strong dependence on the gifs and it’s monkey see monkey do. This seemed like a common theme in the programming unit when I piloted the course last year.

I will try to do more checks for understanding and more actual teacher and student stuff instead of running on autopilot and relying on students to effectively absorb the code.org material (as fantastic as it is).

I also think my students aren’t “getting” the concept of functions from the first few bubbles. I think part of it might be that in the previous stage, there was a burning need for a “turnRight” function and a need for its repeated use. I can see how there’s an attempt to re-create a similar need with “turnAround” at the beginning of stage 5, but I don’t think that’s getting through to a lot of my students. They are able to define and call the “turnAround” function (possibly via monkey see monkey do), but when it comes time to apply with the cross, many of my students either just do the task without creating the turnAround function, or I’ve seen some students alter the given turnAround function to include “moveForward” because they thought that was what they were supposed to do from the previous bubble.

Perhaps there would be a stronger connection if students started out with a prior task, drawing a square to the upper right (which many of my students misinterpreted those directions and simply drew a square wherever, then, moved the turtle to the lower left corner) - but redo that challenge using our new tool of defining and calling functions - this time using a turnRight function. However, if this is not a common problem then I’ll continue making my own adaptations for my students.


#6

Frank,

Thanks for this extended bit of reflection. I don’t have quick solutions but…

  1. We’ve recognized some of these deficiencies in Unit 3 in terms of a) explaining concepts and b) lacking a place or space for students to go back to re-learn when necessary and c) lacking unplugged activities that directly tie to the language.

We’re trying some things in the revision of Unit 5 (coming in mid-late December) to address these things. If they work out, then we’ll probably go do something similar to shore up Unit 3.

What I’m trying to say is: you’re not alone. we’re working to make it better. Keep the faith. Keep trying.

  1. As for getting at the idea of functions/procedures right now you might consider referring back to the text compression widget - especially if the difficulty is between defining v. calling a function (very common).

(First this is addressed in one of the function videos, perhaps that’s what you were referring to, but if not, you can certainly re-watch that).

Text-Compression Analogy when you decide to write a function in JavaScript it’s often because you recognize a pattern - a bit of code that you might need to use later, at different point in the program. Remember with text-compression you looked for phrases or letters that repeated. When you put that phrase in the dictionary you were defining a pattern to reuse. Then all occurrences of that pattern were replaced in the text. So if the compressed version looked like this:

☆listen_to★rain_☆on★window_pane

Each special character was referring to a stored pattern in the dictionary.

The dictionary, of course, is like the set of functions you define. Once you define it, you don’t need to define it again. Calling a function is like using the special character in the compressed text - you want to call on a stored definition of something.

In JavaScript when you use the keyword function you are defining a procedure, adding it to the dictionary, so to speak. You only need to do it once for each code pattern you want to store.

…Hopefully you get the gist.


#7

Thanks! I’ll try the analogy. Much of the learning curve is learning (and usually being surprised by (and frustrated by ha)) what students get stuck on. This year either more of my students aren’t figuring out how to “turn right” using “turn left” or I’m just noticing it more since last year it caught me by surprise how any student didn’t catch onto it on their own.


#8

Okay, great.

Just remember, in the grand scheme – there is no javascript AP test. Make a judgement about if you keep pressing forward will students basically get it once presented with more examples and opportunities? Rather than getting mired in one problem. There’s lots of programming to go. If they can successfully create things, you’re winning.


#9

There is quite a bit of practice on Functions in this unit. The PT has each student make their own functions and then combine them in a scene. Its good to note whether or not they have gotten the concept and you will likely be able to remeidate it as you move forward, without having to stop in this lesson.


#10

Hi Baker!
I struggled with preparing for the lesson because of the lack of content on the lesson plan. HOWEVER, between this lesson’s forum and last years, I was able to add to my lesson and feel more comfortable with the lesson. Perhaps incorporating some of the ideas that the team provided on the forum into the lessons will make it easier for others not to have to go back and forth between the lesson plan and the forum. Thank you so much for the ideas:)


#11

I have a student who questioned the #10 bubble question about what is not true about Functions. He said that you can make calls to other functions. I told him to stick to what we have done so far (since I am not super versed at JavaScript myself right now.) He said that earlier in the activities he called a function from another one. Can you please clarify for me what’s happening here.


#12

The student is correct. You can make calls to other functions. The statement on code studio reads - "Functions cannot make calls to other functions … " That statement is not true.


#13

Thanks! Yes, the problem seems to be that they’re not connecting the programming to underlying concepts - I am concerned that they can make stuff happen and/or move onto the next stage without knowing what they actually did. The students who don’t “get” functions (procedures in general) now are even more behind when it comes to the concept of parameters.

I think the text compression widget analogy did help some. What also helped some was giving more examples they could relate to and have students come up with their own examples. I thought in the video there was a fantastic analogy where Chris Bosch mentions a pick-and-roll etc. I don’t know squat about basketball but I got the idea of what he was saying. However, I think at the start I assumed the students absorbed it as much as I did. Maybe in the future I will pause the video and have students discuss with each other what Chris was talking about.

One analogy a student came up with (with assistance) is a function “close program”. If someone barely knows how to use a smart phone, they don’t know how to “close program”. We’d have to define that at first. First, we teach them you press the home button, then swipe the program (or whatever it is on whatever phone). Once we’ve defined “close program”, we no longer have to tell the person “okay, press home, now swipe the program”. We can just call “close program”. We only need to define it once. We can call it as many times as we want.


#14

Frank, this basic topic (abstraction and writing functions) has come up a few times throughout the forum. There are some more analogies suggested in 3.10. http://forum.code.org/t/is-a-loop-an-example-of-abstraction/6133/4

Hope those are helpful.

–Baker


#15

For introducing the idea of Abstraction I showed this video to the class https://www.youtube.com/watch?v=6V1sr0XV_Ng

It is from Harvard CS50 course I use several of the videos related to this in my class. I do not show this whole thing skip to about a 1:40 where he actually starts talking about abstraction. I have the students try to do the activity that he has his class do. Keep in mind the girl explaining it flips the paper on accident so I just had them listen to that part not actually see it so they don’t know it is a cube they are drawing. My students really seemed to enjoy that activity a lot. Just thought I would share.

Also has anyone ever taken this online CS50 course and would have any feedback for me on how it went? I was really thinking about doing it myself at some point.


#16

I really think this video will help explain abstraction to my students. Thanks for sharing