Hackathon with Perl developers around Open Food Facts

perl

Hackathon with Perl developers around Open Food Facts

Product Opener, code name for the software powering Open Food Facts on the web and doing most of the heavy duty, is coded in Perl, a very versatile language which is also Open Source.

product opener and perl

When we attended Open Source Experience, we had the opportunity to chat with the Perl monger group of Paris who, by chance, had a stand next to us. It’s the association that supports activities around the Perl language, which has its devoted hackers.

While sharing about what could be done better on the software, the idea came to not only get advice but take the opportunity to code together. Following a long-established tradition in Open Source communities, we decided to organize a Hackathon together. A Hackathon is an event, on two or three days where people meet to code together on a common project.

A hackathon 

On the 23-24 March, we were 9 volunteers to meet in the small offices of Open Food Facts, and 3 other participants online either through chat (on discord) or video !

perl and open food facts
Ready to solve some issues !

We were a bit concerned because the server’s code is quite large and not very well-organized. The complexity of the code has grown over the last few years mainly through the efforts of volunteers, leaving little time to improve the code quality. Additionally, we couldn’t refactor the application too much due to the large number of users already depending on it (technical debt). Furthermore, product analysis is more complex than it may seem initially, especially when considering global usage.

However, to our surprise, many contributors were already motivated enough to set up the project on their computers. The onboarding process went smoothly, which validated our effort. We truly hope that anyone can contribute to our software.

First contribution came rapidly: the nice Perl wine bottle kindly brought by Laurent D. from Geneva made its way into the database !

Let’s do it – day 1

We had proposed different possible tracks to focus on during the hackathon but it was only propositions. Because hackathon is a participative process, after a friendly time sharing  a coffee and some typical French pastry (croissant, pain au chocolat and so on), we started with a round table of presentation, followed by an explanation of the topics and every one picking some task according to their liking. 

Laurent had already observed a big problem of circular dependencies he wanted to address, and the first step was to clarify which module uses which other module. Another front opened on modernising the test framework (we have tests running on each code modification to ensure we do not break things unexpectedly). As installing the product was mandatory, some decided to take advantage to also enhance onboarding documentation.

At the end of the first day, we already had tangible results and some PR merged while other fronts were still wide open. We ended the day around a drink and snack, as they say in French “après l’effort, le réconfort” (yes we didn’t go as far as a “third time” as they do in Rugby).

perl & open food facts hackathon
Open Food Facts holding the “Most Parisian Perl Hackathon” ever just next Course Des Cafés

Day 2

The next day we were a bit fewer, 7 and 3 online. It was still very productive, everyone truly concentrated on their task. 

One of the tracks was about adopting a modern web framework to let go of the current Perl CGI framework which is aging and also has a more regular design pattern to handle web pages. We identified it was too big of a task to be started during the event but decided to at least discuss the topic. We decided to first lay down the objectives of the change, the constraints, the challenges and list options to evaluate them. We recorded our conclusions in a document, and two candidate frameworks emerged: Catalyst and Mojolicious, which both have their supporters in the group ! We will see who is the first to volunteer a small proof of concept !

Great outcome

Overall this hackathon is a great success. We found very skilled and motivated people that were able to bring real contributions to the project. 

24 changes proposals made their way into the code or the documentation (and one more is an experiment) ! Even now those contributions are continuing to be brought to the team. It had been some time since big rework like that happened on the project, all at the same time ! We had quite an interesting time trying to re-stabilise the code base, and merge concurrent branches ! 

Most of the work done will not be visible to end users, but these changes will contribute to making developper life a bit easier to help new features happen faster and bugs disappear faster too (or not exist at all !).

We were really happy with this Hackathon which provides really enjoyable and convivial moments while also producing really good results and we hope to continue the collaboration with the Perl community as a whole and with the participants to this hackathon in particular.

We are already supported by the Perl Foundation who enable our participation in the Outreachy program this year also ! And also thanks to relays in the Perl community we will have a French intern next month.


🙌 A big thank you to everyone who attended this hackathon !