NUMERALIS is a web-based application testing the numeracy skills of school children as well as testing “maths anxiety”. Researchers build challenges for children, made up from multiple different tasks. NUMERALIS is available in English and German currently.
About the Updates
There were numerous issues with NUMERALIS when it came to us:
- NUMERALIS is made using Angular.js. The version used in the app was several major versions of Angular out of date and needed to be safely updated to the latest while remaining compatible with other dependencies.
- The application also came with minimal supporting documentation for setting it up locally for developers to work on it.
- The support for multiple languages was very crude and inextensible. It did not use any well-supported internationalisation (i18n) frameworks.
Solution
No one on the team had any strong experience using Angular.js. To get around this, we combined extensive experience in software development with generative AI (Claude by Anthropic) to understand the code and create strategies to solve the first and third issues above, as well as debugging the pain-points in the second issue before creating the documentation.
Claude created a guide to a sequential major version update strategy for us to follow. Each major version of Angular.js has a script which identifies code patterns from the previous major version and migrates it to the next. Following this strategy, we successfully updated NUMERALIS to the most recent version of Angular.js at the time of writing.
Another issue with the app is that it was difficult to use locally without the live database! The code needed changes to accommodate using the Firebase local emulator (NUMERALIS uses Firebase for its backend). Then we created documentation telling developers how to set this up and seed the database.
The major piece was creating an extensible i18n solution for the application. The German version of text was handled by having duplicate fields in the database with a “DE” (for “Deutsch”) suffix. The owners of NUMERALIS wish to add Italian versions of the text and challenges, and maybe more languages in future. So creating duplicate fields was not the best solution. To fix this, we first separated out the German and English tasks into separate documents which had the same names but had suffixes that matched the countries’ codes (“en” for English, “de” for German). Then the field names in the documents could all be the same, making it easier and more generic to handle in code. Next, a well-supported Angular.js i18n solution was implemented for the remaining text in the app which didn’t come from the database, to display different text depending on a user’s location, as detected from the browser.
On Using AI
Using AI in this project made combing through the code and changing all the instances of “someFieldDE” to “someField”, and separating the challenge documents by language, take minutes, instead of hours of tediously combing the code for the if-statements used to swap languages or manually copying the documents and deleting the language as appropriate. It also made researching solutions to the problems, and implementing them, much faster. The i18n piece alone could have been a week or more.


Leave a Reply