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.
This is part of a club to teach kids coding, creativity and digital literacy.
One of many lessons that can be taken away from this exercise is to understand your audience and challenge the assumptions you make about their prior knowledge, culture, kind of peanut butter, et deters.
You need something general and flexible, dare I say "intelligent", or you'll be babysitting the automation, slowly adding the thousand little corner cases that you find, to your hard coded decision tree.
This is also why every company with a home service robot, that can do anything even remotely complex as a sandwich, are doing it via teleoperation.
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:
Dad Annoys the Heck Out of His Kids by Making PB&Js Based on Their Instructions (2017) https://news.ycombinator.com/item?id=13688715 https://news.ycombinator.com/item?id=41599917
& infamous: sudo make me a sandwich (2009) https://news.ycombinator.com/item?id=530000
GianFabien•1h ago
t-writescode•1h ago
One of the most important things a programmer needs to do is learn how to tell a computer how to do something. It’s a surprisingly hard skill because each step is way more complicated and has way more variables to go through.
https://youtu.be/FN2RM-CHkuI