Timecop vs Rails TimeHelpers
TL;DR - You probably canāt replace Timecop with Rails' built in TimeHelpers, as TimeHelpers only recreates Timecopās freeze method, and canāt handle nested travelling. Timecop is the go-to gem for testing time-dependent code, as it allows you to manipulate the current time during test runs. This is important because without control over the time, flakey tests can emerge in your codebase. A very simple example is testing the created_at attribute… Continue reading
Weāre Gonna Need a Bigger Boat
Earlier this year, the FreeAgent marketing website www.freeagent.com was the target of a volumetric Distributed Denial of Service (DDoS) HTTP flood attack. This was a relatively unsophisticated attack in that it targeted a particular static endpoint of our website with a massive number of HTTP GET requests from multiple remote IP addresses around the globe, as visualised on the map below. Predominantly serving the UK small business base, FreeAgent wouldnāt… Continue reading
Managing Python dependencies across multiple Data Science projects with Poetry
Python is the programming language of choice for running analysis, building models and running machine learning services in production for the Data Science team at FreeAgent. A key reason we chose Python is the great ecosystem of packages available: NumPy, pandas, SciPy and scikit-learn, deep learning frameworks like TensorFlow and more bespoke options for specific tasks like Click for developing CLIs. This wealth of options is a great strength of… Continue reading
We're hiring! Check out our vacancies š
Unpacking Amazon ECS
The following post is a high-level description of Amazon Web Servicesā Elastic Container Service (ECS), the relationship between its components, and how they can be used to deploy a web application. ECS is a fully managed container service. It is akin to Kubernetes, but ultimately it is simpler and has fewer moving parts. ECS offers the security, reliability and scalability that is customary with AWS. The Fargate engine provides a… Continue reading
The Mobile Apps and the Tester
The replatforming of our hybrid mobile app to separate iOS and Android native apps was already well under way when I arrived at FreeAgent as a test engineer for the mobile team. Since then we have carved out processes that the whole team can contribute to, giving us confidence that for each release our apps are in good shape. Here are a few things we are doing to ensure this.… Continue reading
Six years of data science and analytics interns at FreeAgent
Itās hard to believe weāve been running internships in our data teams for six years now, and weāre about to start recruitment for the seventh time. Things have changed a little since our first intern started, as last year saw more than four times as many staff in the wider team and our first remote internship during the coronavirus pandemic. Iāve always tended to think of our internships as a… Continue reading
Testing Child Processes in Ruby
I was recently writing a piece of code that we wanted to act as a supervisor of child processes. We wanted to ask this supervisor the following āHello there, would you mind running this task in a child process? Thanks!ā. From here the supervisor would create a process, keep track of it so we can stop it if necessary, and run the given piece of code in it. This supervisor… Continue reading
Moving 100,000 customers from co-lo data centres to the cloud. With zero downtime.
Running a SaaS app in AWS in 2020 is, in itself, not a particularly remarkable thing. Migrating a complex Rails app that is used daily by over 100,000 customers to an entirely different infrastructure, introducing a new underlying architecture, and doing so without customer downtime, really is something special. In this article we take a look behind the curtain to see how we achieved this recently at FreeAgent. It's almost… Continue reading
Answering bigger questions with BigQuery
Over the past few weeks, weāve configured BigQuery to enable us to combine our Google Analytics (GA) front-end data with our internal back-end data. In this post Iām going to talk about why we needed to do this, how we went about it and what we are hoping to achieve as a result. Whatās the problem? Historically, two separate systems have been used at FreeAgent to track, store and analyse… Continue reading
Empowering our practices: Take 2
āHow can we use our data to understand and empower our accountancy practice partners?ā This is the question that I posed in my previous blog about delivering practice insights last summer. This question was the foundation for my project last year and is the one I came back to continue answering this year. To recap how the project was left at the end of last summer; I had created three… Continue reading