Unit 5 Lesson 12 - Code Studio intermittently working or not

Link to the project or level: Code.org - App Lab

What I expect to happen: I should be able to type the newly established variables into the Watcher, and see that they were established correctly.

What actually happens: The variables will sometimes show correctly in the Watcher, and sometimes show “not available”. Sometimes, they simultaneously work for me when I am looking at a student’s project on my end, but show as unavailable for the student on their end. I believe the code is correct, and that there is an error happening somewhere in Code Studio, or that there might be some sort of connectivity issue…?

What I’ve tried: I’ve tried having the student establish a nonsense variable that does not rely on tables and retrieving data. You’ll see that variable established on line2. I also had them take out the entirety of their code, leaving only the establishment of variables to ensure that nothing downstream was interfering with what we were seeing.

Some kind of race condition. A race condition is when two things are running at the same time. You get different results depending on which finishes first.

So what you have is getColumn in a race with the watchers panel. If getColumn finishes first then it looks normal. But if the watchers panel finishes first you see <not available> because the database has not returned a result yet.

You can cause this problem consistently by turning the speed to turtle slow. This may be a temporary problem caused by code.org having a connection slow down.

You should open a ticket.

1 Like

Thank you. This is helpful. We were indeed moving the speed of the turtle a lot because we wanted it to speed up when working through a table containing 600 entries and then slow down when appending to a filtered list.

How do I open a ticket? This class is my first experience working with code.org.

email support@code.org or you can go here Submit a request – Code.org and fill in the fields.

Race conditions are hard to fix. So you probably should not expect a fix soon.

1 Like

Thanks again. If it is something that we can avoid by not using the speed slider, we may just circumvent it that way. I have noticed, but not learned how to use, the Debugging Tools: Break/Step Over/Step Out/Step In. Perhaps if I learned how to use these and taught the students that technique instead of relying on the slider, we will have fewer issues?

Do you know of some documentation teaching me how to use those tools?

I would say yes. The App Lab interface has many of the same features you find in a professional programming setup. Teaching students how to use it fully is such a good idea. But first you need to learn.

The best thing I have found is here Code.org Tool Documentation However, it doesn’t cover the debugging tools.

I have started work on this Advanced App Lab debugging - Google Docs
Is it useful? If it is I will continue making it.

1 Like

Wow, this is super-helpful. I just skimmed it to see if it was covering the buttons I don’t understand. Now that I see it does, I am going to work through it to try to learn how to use them effectively. THANK YOU.

It isn’t done yet, since you find it useful I will work on it.

1 Like

Finished version of the document App Lab Debugging: The Missing Manual - Google Docs

2 Likes

Don - this is fantastic! A really great resource, which I will use with students in future. Thank you for your time and effort!