Demonstrations like this are a regular feature of the Japanese educational TV show "Texico", which teaches logical thinking with the specific goal of preparing young children for programming.
I highly recommend it. It's extremely well made, and quite entertaining even for adults.
It's available in English, 10 minutes per episode, no subscription required:
I saw a YouTube Short of a teacher demonstrating this to her young students. Of course the kids are laughing lots at the results of her literally enacting their instructions and exaggerating the missing necessary info. But I bet they came out with a far more technical thought process.
i once had this "make a PB&J" as part of a written take-home interview.
i knew the schtick -- no matter how precise and complete you are, there is always the possibility for another little gotcha. and that makes it absolute rubbish for a take home because... how much detail do i need to go into to satisfy the manager reviewing this? i think i wrote a couple paragraphs and ended with a little rant about how i know how this problem works and it'd work better in person. i don't know how much they expected somebody to write.
> how much detail do i need to go into to satisfy the manager reviewing this?
it would've been fun to troll by writing the instructions on exactly which muscle to contract and extend for X seconds, and moving in an arc of Y minutes.
It'd be like writing assembly code for your skeleton and muscles'.
I've spent some time thinking about this earlier as this indeed is one way a teacher would introduce a young child to programming (but by using actual bread, pb and j). An important underlying question is why kids would learn programming in the first place if they're not going to be programmers... one answer, which applies to math as well, is that it is learning another way to think. The whole point is that it is difficult to specify exact behavior, especially when you can't lean on someone's already established understanding of the world.
Another related idea (if I don't misremember) is brought forth in the book "Program or be Programmed": that it's not the programming itself but learning that things powered by software are intentionally (by meticulous instruction, like above) made to work like they do rather than just happen to work a specific way. Which hopefully leads to the realization that we have agency and can change how things work in the world, should we want to.
Now, some people are arguing for teaching kids programming via vibe coding and one the one hand I can see their point but on the other hand, it was never about the programming in the first place. Vibe coding is kind of the opposite of the two ideas if you don't first teach them. It's making the PBJ-making teacher/robot go "oh, so you want a PBJ, here's one". There's no learning new ways of thinking. It's also making it seem like things are not intentionally made to work a specific way but more just happened to become that way. Some of that empowerment and agency is lost, I feel, although I can see that there is agency in creating things too.
It’s kind of interesting relating this to LLMs. A chef in a kitchen you can just say you want PB&J. With a robot, does it know where things are, once it knows that, does it know how to retrieve them, open and close them. It’s always a mystery what you get back from an LLM.
- you made one of the biggest ux blunders they all do
- you used what looks like a radio button instead of a checkbox
- i selected one option for each question and was blown away by the fact that you could actually select more options only after the survey was complete
Although this is a facetious take, instructing a robot to follow recipes is a fantastic introduction to coding. I added a visual scripting layer to Overcooked so kids can program robots to make all sorts of dishes (Sushi, Pasta, Cakes etc.)
It’s funny, when I’ve seen this demonstrated, it’s basically literally impossible to get the right result because the test maker doesn’t define an instruction set that you can rely on. They will deliberately screw up whatever instructions you give them no matter how detailed. A computer has a defined ISA that is specified in terms of behavior. A compiler transforms a language with higher level abstractions into this low-level language. I’ve never seen this “test” done with any similar affordance, which doesn’t really teach anything.
This feel diluted compared to what it could have been. Would be better if you had a bunch of instructions and could drag them into sequence at each screen.
I get the point of this but I'm slightly annoyed that it dinged me for not telling it to pick up the knife to cut the sandwich in half when I didn't tell it to cut the sandwich in half. I don't want my PBJ cut in half. It gave me two different options for how to cut it in half and I didn't select either, so it shouldn't need the knife at that phase.
In the early 1980s I read an Usbourne (sp?) introduction to programming book for kids that had a picture of a robot walking through a brick wall while following its programming to ‘take a letter to the letterbox’.
At this rate, it looks like we’ll solve that problem by not having letters/letterboxes.
When I was about 7 or 8 years old, my elementary school music teacher did this same exercise with us, except the goal was to draw a musical staff and the first 3 notes of Jingle Bells (or something along those lines). I can still remember how much fun I thought it was.
My "related" past threads fu is failing me just now but I know there have been threads with this theme in the past, including the video with the dad carrying out his kids' literal instructions in a cute but also borderline uncomfortable way.
There is an alternative to describing the (subjective) “process”. That is to describe a model of the sandwich - the parts and how they can collaborate. The issue is that how to do that is forgotten and unfashionable.
Of course, we need to give the robot a cognitive architecture so that it understands the task, the context, and corrects its actions, and then it will autonomously make such sandwiches every morning for breakfast.
It’s almost like we need some deterministic set of instructions that can be fed to a machine and followed reliably? Like… I don’t know… a “programming language”?
What's the point? No matter how detailed and comprehensive the instructions and steps by the AI, you still don't get a PBJ sandwich to eat. You have to go to the kitchen and do it yourself.
40 comments
I highly recommend it. It's extremely well made, and quite entertaining even for adults.
It's available in English, 10 minutes per episode, no subscription required:
https://www3.nhk.or.jp/nhkworld/en/shows/texico/
This should be part of the curriculum.
i knew the schtick -- no matter how precise and complete you are, there is always the possibility for another little gotcha. and that makes it absolute rubbish for a take home because... how much detail do i need to go into to satisfy the manager reviewing this? i think i wrote a couple paragraphs and ended with a little rant about how i know how this problem works and it'd work better in person. i don't know how much they expected somebody to write.
> how much detail do i need to go into to satisfy the manager reviewing this?
it would've been fun to troll by writing the instructions on exactly which muscle to contract and extend for X seconds, and moving in an arc of Y minutes.
It'd be like writing assembly code for your skeleton and muscles'.
Another related idea (if I don't misremember) is brought forth in the book "Program or be Programmed": that it's not the programming itself but learning that things powered by software are intentionally (by meticulous instruction, like above) made to work like they do rather than just happen to work a specific way. Which hopefully leads to the realization that we have agency and can change how things work in the world, should we want to.
Now, some people are arguing for teaching kids programming via vibe coding and one the one hand I can see their point but on the other hand, it was never about the programming in the first place. Vibe coding is kind of the opposite of the two ideas if you don't first teach them. It's making the PBJ-making teacher/robot go "oh, so you want a PBJ, here's one". There's no learning new ways of thinking. It's also making it seem like things are not intentionally made to work a specific way but more just happened to become that way. Some of that empowerment and agency is lost, I feel, although I can see that there is agency in creating things too.
- you used what looks like a radio button instead of a checkbox
- i selected one option for each question and was blown away by the fact that you could actually select more options only after the survey was complete
https://youtu.be/ITWSL5lTLig
This is part of a club to teach kids coding, creativity and digital literacy.
At this rate, it looks like we’ll solve that problem by not having letters/letterboxes.
They will realize that it is not correct to take the jar from the fridge without first opening the fridge etc.
[1] https://xkcd.com/149/