A contributor’s story
Open Food Facts’ contributor John shares his experience of working on this collaborative project for the first time ! ☄️
I’ve been working with computers for over 40 years and I’ve always enjoyed getting stuck into the code, despite now being called a “software architect”.
For a number of years I’ve been wanting to find a way to use my expertise to contribute more back to society, rather than just lining my company shareholders’ pockets. After a recent “life purpose” workshop I came to the realisation that educating people about food and its impact on health and the environment was really important to me.
This shouldn’t really have come as a surprise, as I’ve been vegetarian for over 35 years and vegan for 3 years, but I’ve never felt comfortable with preaching to people – I just want to give people the facts so that they can make their own informed decisions.
So, I started doing some research on what it would take to develop the kind of app I was thinking of. I wanted a way for people to list the foods they were planning to buy for the day / week and show them the environmental impact of their choices and potentially suggest alternatives that would lessen their global footprint.
I knew before I even started that data would be critical for this, so I started looking into where I might get this from. Here’s the mind map I was using as I went through this process:
I noticed a large number of references to Open Food Facts, so I signed up for the app and started looking for foods that I regularly consumed. I was very pleased with what I found, but initially disappointed because a lot of the vegan products that I use didn’t have an Eco-Score. I then discovered that Open Food Facts was an open source project…
I’ve never contributed directly to open source before, but I thought I’d give it a try so I signed up to Slack, posted a quick introduction and was almost immediately introduced to Stéphane, Alex, Pierre and team. I asked what I could help with that could have the biggest impact and was pointed towards the Perl-based “Product Opener” codebase. In the meantime I had some annual leave to use up for my regular work, so I decided to book Mondays off so I could dedicate these to working on Open Food Facts.
I haven’t done much Perl before, but once you’ve programmed in more than ten languages then adding another is no big deal. I started setting myself up and found a few issues running with Windows, so I updated the how-to guides with my experience and created my first pull request. The team were very quick to pick this up and keen to approve it as soon as possible.
There was no bureaucracy or sense of protectiveness, this is a truly open project.
I then offered to help with something a little more challenging: Open Food Facts currently has a go at estimating the percentages of each ingredient, based on the order in which they are listed. For example, if a product has three ingredients then the second product can’t be more than 50% as it would then be more than the first listed product. Similarly the third product can’t be more than 33%. It’s a fairly simple and coarse algorithm, but it’s a start. However, there are certain types of ingredient, like flavourings, that never take up more than 5% of a product and the team felt that something could be done to take this into account.
So, I rolled my sleeves up and had a go at introducing a maximum percentage against an ingredient. This gave me an introduction to the world of taxonomies (an introductory article to taxonomies here) and a much deeper understanding of the potential of the platform. For example, I’m also currently very interested in gut health and the contribution that the friendly microbes that live in all of us make to our physical and mental wellbeing. We could easily extend the taxonomies with information from the latest research and provide other types of “score”.
I had previously been worried that I might be limiting myself by working on “someone else’s” project, but I realised that by working together we could produce something that could adapt to whatever priorities an individual had, whether that was the environment, health, packaging, welfare or combinations of all of them.
Anyway, back to the code. Once again the team was really helpful with all the issues I faced, such as updating unit test results, and my second pull request was approved about two weeks since my first introduction to the project.
I now felt confident enough to tackle something more significant. Stéphane was aware of my interest in vegan food and directed me to the latest version of AGRIBALYSE *(*Co-piloted by ADEME and INRAE, relying on the collaboration of agricultural and agrifood technical institutes) that added a number of vegan food categories. Open Food Facts currently calculates the Eco-Score of a product by mapping its product category to the AGRIBALYSE database, which contains environmental impact information for over 2000 foods. My job would be to update Open Food Facts to use the latest version of AGRIBALYSE.
I tackled this in two parts.
The first was to calculate the Eco-Score for products that already had one. The changes resulted in changed Eco-Scores for over 150,000 products. I was a bit nervous about having such a big impact at such an early stage in my involvement in the project, but the team were always encouraging and proactive in reviewing what I was producing.
I then, finally, got to add in the new categories for vegan and other products that had recently been introduced. This now meant that around 9000 products had an Eco-Score where they didn’t have one before, including many of my favourite vegan products. The change was deployed to production just over a month after that first introduction to the team on Slack 😃 !
As I said at the beginning of this article, this was my first venture into contributing to an open source project and I have thoroughly enjoyed the experience. This project, in particular, has inspired and invigorated me in ways that I had not previously imagined so I would wholeheartedly encourage anyone who is contemplating participation, in whatever form that might take, to dive right in!
🪪 Written by John
(🔎 🍊 On the behalf of the entire Open Food Facts team: a warm THANK YOU from the entire community for the work you’ve accomplished in such a short time, John, we thoroughly enjoyed collaborating with you and are delighted to have you on board !)
No Comments