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.
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.
This should be part of the curriculum.
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.
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.)
This is part of a club to teach kids coding, creativity and digital literacy.
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.
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.
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.
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.
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.
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.
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.
This feels like a buzzfeed quizz for developers. If you think about each step long enough you can't really get a wrong answer
As always, there's an XKCD [1] for this!
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.
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:
https://www3.nhk.or.jp/nhkworld/en/shows/texico/