Coding and cooking, similar more than you think!

Publication date: November 24, 2022

Stefania Altieri, Code Week Leading Teacher in Italy 

During a recent interview, I was asked for suggestions about resources suitable for students of a hotel management school and how cooking could be integrated in coding activities and vice versa. 

Although it might not seem obvious, there is a very close connection between Coding and Cooking, as they are similar in many ways, to name a few they both need creativity, and have a solid foundation from where they develop their activity. You can just follow a recipe, but in order to re-interpret traditional dishes, some inventiveness is required. In coding you can create a programme based on an instruction set or you can remix a project using your imagination. Sky is the limit! 

You will never know everything about cooking or coding, so having an open mindset, will help you – and will be necessary – to get inspired by other people’s ideas and suggestions, in order to improve and maybe make your product better. 

There are several kinds of cooking (Italian or French cousin, Chinese or Japanese food), and cooking areas (you can become a baker, a pizza maker, or a chocolatier). Also, in coding you can find programmes along the lines of different languages such as JavaScript, Python, visual programming and many others. 

Both cooking and coding can make great things, only using some basics ingredients! Garlic for example is not very good on its own, but if you add it to bread or if you make a sauce, it becomes delicious! Same with coding, you have a line of code that is rather boring by itself, but once you have an idea and you add that line to another, it makes the whole programming an amazing product. 

They allow you to conceive astonishing effects and, at the same time, they can be frustrating when some things don’t go as expected and if some errors occur, especially in coding! In fact, this might be the one point where the two activities could differ the most: when making a mistake, for food the worst case scenario could be to have something too salted or burnt, but in programming if you miss a semicolon it’s a fatal error and a software doesn’t work, that is even worst. 

With reference to resources, you can begin with algorithmic recipes maybe using Scratch to explain how to cook different food. As for hotellerie, pupils can explain the rules of the hotel they work for in a sequence of instructions and also the places to explore around as show in this example here. In Scratch they can put their own photos during an outdoor activity and choose a sprite or an avatar to invite people to visit their place. 

You can arrange a treasure hunt (also using QR codes) or create an online escape room using coding instruction sets to find some hidden ingredients of a plate. 

You can draw food with pixel art codes and then transform them in flyers. 

 

     

You can also use an unplugged coding game and put some food on a chessboard and students have to reach the ingredients of a particular food giving instructions to a robot. There’s plenty of combination!  

Once, my pupils invented a game that we called “The Crazy Chef” where they had to put strange ingredients together playing in the gym with CodyRoby giant cards and the big mat on the floor. Through the instructions given to a robot they practised their English and they had to master their knowledge of ingredients to create eccentric recipes, for example a new tasteful cake or a variant of the Napolitan pizza. In this way they had to use their creativity, but they also needed to know food ingredients and how to combine them. They had so much fun with this activity that, some of them brought it home and tried their new creations with their families. 

You can also link the coding resources to a sustainable goal and complete the lesson with the concept of food waste and recycling.  

This can be checked on EU Code Week website and find a suitable activity and think of a possible application in your classroom. 

Finally, you can ask your pupils to suggest how to combine coding and food together and I am sure you will be astonished to find out how many ideas will come out!