This summer, I completed an 8-week internship in the Department of Computer Science and Technology at the University of Cambridge. The project focused on Fluid, a new programming language aimed at facilitating the presentation of research outputs in a transparent, self-explanatory and interactive way. Fluid hopes to make climate science more open, understandable and accessible, and in doing so contribute to informed change. Fluid was initially funded by the Alan Turing Institute, the UK’s national institute for data science and Artificial Intelligence (AI), and it is an ongoing collaboration between the University of Bristol and the Institute of Computing for Climate Science (ICCS) at the University of Cambridge. As an engineering student with limited prior coding experience, this internship was out of my comfort zone, but I was eager to enhance my programming skills and contribute to this interesting initiative.
Under the supervision of Dr Roly Perera, Research Fellow at the ICCS, I gained valuable experience working on the project and troubleshooting/collaborating with fellow interns. I learned to use terminal-based coding and navigation, Linux and Git for version control, which proved invaluable and are useful transferable skills for other projects in the future. I also learned PureScript and JavaScript, languages I had not previously used before. Overall, the internship significantly expanded my computational abilities, and I am grateful for the experience.
Background
Fluid is an experimental programming language implemented in PureScript that aims to provide transparent and explorable digital media. Unlike traditional charts and diagrams, which often obscure the underlying data, Fluid allows users to interactively explore how specific visual elements relate to the data from which they were derived. For example, a user can select a bar in a chart and immediately view the subset of the dataset that generated it, remove an outlier from the dataset or modify parameters to observe how changes affect the results.
Fluid achieves this by incorporating bidirectional dynamic dependency analysis into its runtime. This analysis tracks how outputs, such as charts or tables, are computed from input data. Using this information, Fluid automatically enhances visual outputs with interactive features, enabling users to directly explore and manipulate the data through visualisation, without requiring the programmer to explicitly code these interactions.
By making the structure and relationship between data and its visual representation transparent, Fluid aims to enhance the interpretability of visual elements, enabling users from scientist to journalists, to better understand and explore the data behind charts and models.
Internship
The first week of the internship was predominantly spent installing the necessary packages, libraries and dependency management tools, including Yarn, Spago, Node and Puppeteer. Since the code was initially developed on a Linux system, we experimented with various methods to run it on Windows. This was not as easy as first anticipated and ultimately, we decided to use Ubuntu through the Windows Subsystem for Linux (WSL), which is an easy way to run a Linux environment in a Windows machine without the need for a separate virtual machine or dual booting.
Once the setup was complete, Dr Perera assigned us small tasks to help familiarise ourselves with the programming language and the various tools and their interactions. For instance, one task involved fixing a graph that displayed a point with a radius of 2 in Chrome but a radius of 0 in Firefox. Although these initial tasks seem simple now, they were very valuable for developing a solid understanding and the correct methodology.
Over time, the tasks grew in complexity. As an example, I was assigned the task of implementing Puppeteer-based testing for the Fluid web app. For this, I used Toppokki, a PureScript library for creating and managing user interface components. The tests opened the web app in headless Chrome and Firefox browsers and applied a variety of tests such as checking for the presence of expected figures, verifying that clicking elements produced the correct responses, and ensuring that code errors were properly handled. I also integrated Mocha, a test reporter, to organise logged messages and test execution, making debugging easier.
As part of the task, I had to find a way to start the server, run the tests, and then properly close the server. Closing the server after the tests had completed proved to be more challenging than anticipated!
During the internship, I communicated frequently with my supervisor who was knowledgeable and supportive. Initially, I found the tasks time consuming and at times frustrating, and I appreciated the support and guidance I received. Over time, I became more independent and was able to write code and tests on my own.
Reflections
After numerous reclones, version incompatibility issues, tutorials and ChatGPT assistance, I have come to appreciate that research is a very nonlinear process, often requiring persistent experimentation and approaching problems from different angles to achieve the desired outcomes. As the project progressed, the pace of work gradually increased, making each achievement more rewarding. Although it was a steep learning curve due to my lack of previous experience, in the end I was able to make genuine contributions to the project and the code I wrote was integrated into the Fluid codebase (https://github.com/explorable-viz/fluid). Through this experience, I gained valuable skills in programming languages research, software development, data analysis and data visualisation. Overall, I thoroughly enjoyed the challenge and the opportunity to contribute to this project.
Acknowledgements
I would like to thank Dr Perera for his continuous support, Colin Crawford and Thomas Frith for valuable discussions and the LEAP programme at Pembroke for their grant towards my summer accommodation. Without this support, I wouldn’t have been able to complete this internship.