“Recycle the right way” – The right computational blend

This blogpost was sitting in the draft for almost a year! Goes to show how busy a teacher’s life is, eh? Anyway – the student who built is has moved to a different school but her work with this specific project will remain a major milestone in interdisciplinary learning for me.

Back in 2023, this student was assigned an open-ended project in their Health class. They could choose a topic of social health and safety and build a presentation around it. Given their interest in Computer Science – and coding specifically – they decided to make an app using Code.org’s App Lab. They had learnt this application when they were in my CS class at the time.

The app would be called Recycle The Right Way and would activate a game which challenged users/players to choose from a wide range of appearing objects. Their job was simple – pick the correct bin to put the item in. Each correct choice would grant them points and incorrect choice would deduct points.

The app was built keeping a specific geo location in mind – in this case Aberdeen, Scotland. Hence the type of bins being used were – General / Food and Garden and Recycled items.

The backend

One of the trickiest bits of this app was building a dataset in the back which would hold the images, names, relevant bins they are linked to etc. So the first bit was setting up the data table to hold all the information. It looked something like this.

This design is representative only since the original data set is no longer accessible. But you will have to imagine this data set as containing 40+ entries for a wide range of items – both recyclable and non-recyclable. The student spent quite a bit of time getting this data ready – specially the image link bit since App Lab is surprisingly clunky with getting that info into a dataset.

The frontend

The look and feel was also equally appealing. The graphics were well chosen along with the visual effects used. Applying their knowledge of UI and UX, the student was able to build an intuitive interface with easy to follow directions. Some screenshots below.

As you can see the layout is simple but professionally done. The color palette is consistent and the options are clear on every screen. The dataset in the backend was used to set up the image flow using array data structures. This allowed the code to use randomiser type functions to extract different items at any time – making the game more dynamic and interesting.

Here is a snippet of the code that was at play.

The logic here is that if the brown bin icon is clicked – assuming that is where the user thought the visible item must go – then the code checks if it is indeed correct by using the random number as the index lookup value. If it is, then correct variable is incremented and a visual feedback is given to the user. If not, then incorrect is incremented and the same follows.

At the end of these blocks, the randomvalue is once again generated for the next image to be displayed.

Takeaways and student reflection

One of the big reasons this project has stayed in my memory despite the passing time is because of how wonderfully it linked two subject areas. Computer Science/Coding and related methodologies are often associated with Math or Sciences. But to see it linked with something that reaches a wider audience and can be accessed by an audience of any age, was a unique and unforgettable experience.

This project was also selected for Raspberry Pi’s annual Coolest Projects in 2023.

Here is a screengrab of the student’s thoughts on this project at the time.

Bottomline

Linking Computing with other subjects has always been a highly valued focus for me. Watching this unplanned project come together so seamlessly was a fascinating thing to see. The blend of curricular content from different subject areas not only allows for strong student engagement but also helps create such unique and far reaching solutions. This student could have chosen to make one more Google Slide presentation and captured the idea in basic terms. But to them go above and beyond the call of the assignment is what makes teaching such a fun profession. I eagerly look forward to see more such examples coming out the classrooms.