'16-'17 General Discussion for Lesson 3.7


#1

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


#2

#3

I told students to be sure to create functions for this lesson and app lab won’t let them. @baker Thoughts before my next 3 sections of students?


#4

UPDATE: ------ I wrote this without looking at the stage first -----

Won’t let them because functions aren’t in the toolbox, I presume? I guess we should put functions back in the toolbox.

But in the meantime, how about you coerce them into typing them out in text mode :slight_smile:

You can always type anything, even things that aren’t in the toolbox. And functions aren’t that bad.

function funcName(){


}

You can double-check your typing by flipping back to block mode. If it works, then it means you probably typed it right.


#5

Wait…I don’t know what you mean by “won’t let them”. Functions actually are in the toolbox for every level after the first one.

Is it not letting students continue? Can you point me to a particular bubble number?


#6

@baker - Seems to be just Bubble 4. Phew!


#7

Sounds like this is resolved? Bubble 4 introduces 2 new commands: penColor and penWidth.


#8

Take that back. It’s so locked down, you have to tell the kids to do exactly as instructed. I wanted them to practice making functions. I told them to go on anyway.


#9

@carmichaelc If I understand you correctly, I think my students struggled with the same thing. Sometimes they wanted to use a different (more advanced) strategy for solving some of these problems but the program would “correct” them and suggest the method described in the directions.

I did notice that there was value in making sure students understood WHY they were getting the error. It brought up some misconceptions about needing to put a pen up or down at a certain time and how we could make our code more efficient over all. I totally get that as the teacher sometimes we might want to make the professional decision to have students approach the problems differently than how the code.org module suggests they do them. I learned that by reducing what students were given, they started to ASK about concepts that they hadn’t learned yet. It was nice to have students ask for the tools rather than having me force the tools in their hands/minds.


#10

FWIW we just completed our work to scale-back the validation in these levels so it should be less restrictive. It should check for the presence of any new functions students are supposed to use, including loops. It should go live by EOD today, and I hope it’s better.

–B


#12

@baker Stage 8 #2 - Needs an extra penDown and penUp in the function so 4 of total. Student discovered just put the pieces that it needs in the function. It doesn’t even need to draw triangles and the lab will congratulate him.


#13

@kaitie_obryan We worked around it by putting an extra set of penDown and penUp at the bottom of the function after the penUp they already had in their code. They are getting the error because there is a bug in the AppLab, right?

See Below for Stage 8 Bubble 3

penUp();
moveTo(150,150);
drawTriangle(100);
moveTo(250,300);
drawTriangle(150);

function drawTriangle(sideLength){
penDown();
moveForward(sideLength);
turnLeft(120);
moveForward(sideLength);
turnLeft(120);
moveForward(sideLength);
turnLeft(120);
penUp();
penDown();
penUp();
}

Also, students don’t have to do anything and it congratulates them on Stage 8 Bubble 2

penUp();
moveTo(150,200);
drawSquare(100);
moveTo(100,350);
drawSquare(25);

function drawSquare(size){
penDown();
moveForward(33);
turnRight(90);
moveForward(33);
turnRight(90);
moveForward(33);
turnRight(90);
moveForward(33);
turnRight(90);
penUp();
}


#14

HI Carol,

A few things:

  1. yes, I found the bug in stage 8 level 3 (we were accidentally looking a penUp before penDown in the function. Thanks for reporting it! Unfortunately, I’m not sure when it will go live because things are locked down for the Hour of Code.

  2. It’s worth understanding what our puzzle validation does and doesn’t do in app lab…

This is from our October Newsletter where we explained it and some of the rationale for why we do it this way.

This is explains why you don’t have to do anything to make Stage 8 Puzzle 2 say congratulations. Hope this helps. Let me know if you have other questions.

Validation in Unit 3

Understanding the coding puzzles in Unit 3 that identify issues with student work

In the pilot year of the course, none of the programming exercises were checked for correctness… This meant that a student could simply click ‘Finish’ and get a green bubble on any puzzle without actually writing any code., So there was a larger burden on teachers to check and verify that a student actually did something. In response to pilot feedback, we added a lightweight form of “validation” behind the scenes that acts as a partial checklist for a student’s code solution. For example, a “validated” coding level in App Lab checks for certain properties in the student code, such as the existence of a function definition and call to that function but it does NOT check the pixel-by-pixel output. Many automated testing programs do the opposite – they check the output of the program, without regard to how it was implemented. With our programming unit, we want to emphasize the ‘how’, and also allow for more varied, creative student output.

What this means for you:

  1. A green bubble still DOES NOT necessarily mean the solution is totally correct. It only means that the student wrote some code that contains at least the minimum elements necessary to produce a solution for the task at hand.

  2. The most likely thing you’ll face in your classroom is a student claiming that they wrote the code perfectly but App Lab says it’s not right. This usually means that the student went about writing the code in a way we weren’t expecting or that’s not in line with the requirements of the task.

  3. Note that if a student is stuck, or can’t figure out why a solution isn’t passing the validation, feel free to move on to the next puzzle and continue working.

But… this is a new feature
There may be cases where a student produces code that is in line with the requirements of the assignment but is done in a novel way that we did not capture with our tests. If you think this is the case, after double-checking, please report it by emailing teacher@code.org and include the share link to the student’s work!


#15

@baker. I apologize that I didn’t pay attention to this section of the newsletter when I looked it over a few weeks ago. This explains it all. Thanks!


#16

ok, maybe I’m missing something here but students are clicking on a block before they pull it into their code and it is not giving them the documentation or examples how to use it. This is particularly troubling in stage 7 level 8 for the penrgb block.


#17

@ann.heltzel It is more of a “hover” over the block than a “click” on the block. When you hover over the block you get a pop-up that describes the function in a blue box and in the lower right hand corner it says “see examples” in that box. The “examples” is where the documentation is. Does that help?


#18

Bringing that first blue box up is not a problem. It’s when we move the mouse to See examples on this level that we get page not found. I had other students in level 8 that were not having this problem. I haven’t checked all the levels, only this one at the moment.


#19

Hi Ann,

I’ll take a look. I poked around and couldn’t find a page not found error. Can you tell me the specific stage/lesson and level numbers, as well as the block. For example:

Stage 7, Level 8, block: rgba(…)

or just copy paste the url and tell me the block.

Thanks,

–Baker


#20

Hi Baker, you have the level correct. Stage 7, level 8, penrgb

When I hover, the blue message box comes up. When I put the cursor over see examples nothing pops up so I click and get the page not found error. Very strange.


#21

That is odd. I cannot reproduce this error - the documentation shows for me. At the risk of sounding pedantic, have you tried reloading the page and trying again?

–Baker