General Discussion for Lesson 3.21


#1

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


#2

I need help with the change event.

My student needs the user to be able to type the same thing twice and have the system accept the input.
Its an adventure game and the user needs to be able to type “east” return and “east” return. The program is ignoring the second east. He tried setting the text input to “” after he processed the input but that is still not working.

https://studio.code.org/projects/applab/Lz6PjwjMDK9VKbO22_fsog/view

BTW, I am differentiating this assignment. Most of my students really struggled with Lessons 18 to 20. However, my 4 top students had not issues with it so had much more time to work on the U3L21 project. They all like to program games so they are working on a text based adventure game. We did a simple adventure game last year and i also pointed them to this PDF. https://pha.schoology.com/link?a=202567017&path=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D0B2Z4GOoRXHWUR0puZ184dVJFZVk


#3

Hi Caroline,

It looks like there is a bug in App Lab here with the change event in which the second time you type east the change event is not firing. We have notified the engineers and they have tracked it as to do item.

In the mean time there are a couple options for a work around.

  1. Add a button and use the button click instead of the change event to say when you want the text to be checked. This is probably the simpler option but maybe less appealing.

  2. The other option is to use onKeyEvent. If the student moves all the current code for parsing the input into a function like this:

    function parseInput(){
    // all the codes
    }

Then they can just add the following code to call that parse function when the enter key is pressed:

onEvent(“id”, “keypress”, function(event) {
if(event.keyCode==13){
parseInput():
}
});

This code uses key events which student would not have learned yet (they are introduced in lesson 25). You can check out the details in that lesson but the basics is the event parameter keeps track of a bunch of information one piece of which is the key that was pressed. Each key has an ID number and enters ID number is 13.

Hope this helps get the students program running until the bug can be fixed.

Thanks for letting us know about the issue!

-Dani


#4

I am grading these now and I don’t feel like this project was a success for my class. I had the 4 strongest programmers create text based adventure games instead. They loved it and really took off. But a number of other students didn’t succeed at all and I don’t know if anyone got all the different logic statements in the rubric. That was alot! Also everyone kept the must-be-a-question logic, even though it didn’t add to the user experience of their chat bot. I hope this lesson gets revisited.

I’m trying to figure out why this lesson didn’t work.
I did a chatbot lesson with these students in pencil code last year and it went better I thought. I didn’t try to put a much into it with logic and used simple regular expressions rather then the includes syntax.

Clearly a big part of why it didn’t work is I am rushing and didn’t give them as much in class time and one-on-one help as they needed.

Its also very verbose and made the blocks really difficult to use. The long statements and the small screen doesn’t help them read their code. We haven’t taught them to comment so I think its hard for them to see and remember the structure of the code. I don’t think the flow charts helped that much.

It also seems like we are asking a lot. 10 keywords, plus help and commands, 5 or so different types of conditional statements. To meet that seems pretty tedious and includes lots of typing. I would be bored.

I don’t know if the topic was very engaging. I can see that its meant to show the students they can do something useful, and I tried to build on that by having some of the students in an entrepreneurship program do it as if it was going to be on their product website. However, what we create is so far from being actually useful I wonder if it would be better to not try to make it real and go for funny.

This might be a fun one to make collaborative. Where each person writes the response to a few different keywords and then we combine it.

Definitely need to introduce comments and how to block off sections of code to show the structure before or as part of this for next year. And I will need to spend a lot more in class time.


#5

Caroline -

Thank you so much for the thoughtful feedback. It’s feedback like this that really does change the shape of the course. We had already identified that we needed to take a look at the Digital Assistant material, but in light of your feedback, I think we will need to consider more substantial changes. Perhaps making it collaborative, as you suggest, or switching the topic context, or something else. If you are interested in being involved in some of the planning for those updates someone on the team can reach out to hear more details about ways to improve this lesson once we get to the point of editing it.

Thanks again for always giving such detailed and thoughtful feedback.

Dani


#6

Definitely happy to help this summer.


#7

Hi! My students are just now finishing stage 21 (it’s the second week of May, AP’s are half over). Sigh. This curriculum is taking way too long to complete. I just don’t see how I am going to get through this all next year. I haven’t even gotten to unit 4! I know I’ll be faster at teaching this next year, but this is still just so much to get through.

Anyway, most of my students are not having any issues with stage 21. But I do have one student who, no matter what we do, the change event is just not working for her. In fact, none of the events is working (we got mouse over to work once, but then it stopped working). I had her create a submit button instead and that worked once, but now that’s not working. I am puzzled. It’s working fine for everyone else.


#8

By the way, I agree with Caroline. 80% of my students really struggled with lessons 18-20. The ones who didn’t struggle were in AP Comp Sci with me last year.

I actually liked the flow chart portion of this lesson the best. I gave students large pieces of poster paper for them to lay out their flow charts on. I think once they saw the whole app in this very visual way they understood the more complicated logic. I am thinking next year that I will have them just do the flow chart and not actually write the code, which I agree is tedious, especially in blocks. I also love the idea of making this a collaborative project.

The flow charts are very nice hanging in my room. Students in my other classes are impressed by the complex logic, and administrators always like to see artifacts of learning.

I will not be completing the remaining lessons for this unit so that I can move on to unit 4 for the last few weeks of school.


#9

Hi @cshah

Thanks for your feedback and concern about the length of the course. You are not alone in those feelings! We had lots of feedback on that and are currently updating the course to shorten it. You can check out more information about the changes here .

For the issue with the change event can you have that student submit feedback from her account with details of what is going wrong? That way I can pass it along to our engineers.

Thanks

Dani