Tomi Chen

duosmium logo and text

Duosmium Results

January 2021 – Ongoing Source Live on the web

Web Science Olympiad

Duosmium Results is a Science Olympiad tournament results archive. Originally Unosmium created by RoboMarth, two other students took over the project, creating Duosmium. I joined the team in January 2021, contributing code and results. In February 2022, I took on a complete rewrite of the (previously Middleman) site in Eleventy. This significantly cut build times, especially with the addition of Netlify’s On-Demand Builders. I also rewrote the sciolyff package in JavaScript.

Duosmium Results is used by students across the country for Science Olympiad results, with over 15k monthly pageviews during the peak season. Duosmium has also been used as the official exclusive results provider for almost 60 competitions, including the 2022 National Invitational and several state and regional competitions.

a screenshot of duosmium results


As Duosmium grew, builds with Middleman were becoming longer and longer. Before the rewrite, builds would frequently take up to 10 minutes, which was not good to say the least. We were on the Netlify free plan, which only allowed 300 build minutes per month. In development, testing changes would require waiting 10 minutes for the site to rebuild, which made it almost impossible to add features or fix issues.

Choosing a new static site generator

After some consideration, I decided to rewrite the site using Eleventy. Not only is Eleventy still actively developed, its structure is very similar to Middleman. Eleventy also enables the use of Netlify’s On-Demand Builders, which further cuts build times.

Because of the similar structures, porting the site to Eleventy was pretty easy. It mostly consisted of changing the ERB templates to Nunjucks and rewriting some helper functions to JavaScript. Rewriting sciolyff, the results format parse, was a bit trickier. I had to be careful not to introduce any regressions!

New features

The new architecture allowed for features not previously possible. For example, superscored results (where team results from the same school are combined) were now possible since they could be generated at request time, and cached indefinitely. If we had to generate them at build time, we would’ve needed to build over 1200 pages, most of which will never be accessed.

Other features I contributed include score histograms, event filtering, explicit placements, high-score-wins scoring, improved search, and a new SciolyFF Previewer/CSV Converter.

I also added tests to sciolyff using AVA to hopefully catch any regressions. I didn’t implement any unit testing because I’m lazy and end to end snapshot testing is “”“good enough”“” 😁