Engineering Principles at FreeAgent
Culture is an inherent part of every organisation. It lives and breathes. In our engineering organisation at FreeAgent there are now over 100 fabulous people. It is these people and the culture we have built that are consistently recognised as our two most important strengths. They're also what we fear losing the most. There is a natural cycle of cultural onboarding for new people joining our organisation. In their first… Continue reading
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
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
Breathing New Life into Dormant Code
In the Tax Engineering team at FreeAgent we’re currently working on adding Corporation Tax and Final Accounts filing to our application as we continue our mission to help our customers relax about tax. We’ve been working on these features since June and recently released the Final Accounts report and the CT600 form, but what you might not know is that work on this project originally began back in 2017. So… Continue reading
The perils of a bad date
As you would expect from small business accounting software like FreeAgent, we deal with a lot of dates and times. Ruby on Rails has some really useful helper methods — but there are also a few unexpected quirks in the way that different date and time classes interact. One of those quirks sadly caught me out recently. Picture the scene I’ve written tests, the CI pipeline has passed and my… Continue reading
Switching to Feature Testing with Headless Chrome
At FreeAgent, we run 45,000 tests on every code change to make sure that our rails monolith continues to work as expected. These include unit, integration, and acceptance tests. Recently, we switched from Capybara-webkit to Headless Chrome with Selenium for running JavaScript and acceptance tests. Why did we switch? Capybara-webkit has now been deprecated and uses an old version of webkit engine, so we had to look for alternatives. We… Continue reading
How we built the FreeAgent Furlough Calculator in a week
In light of the Coronavirus events, the UK Government put in place a few measures to help businesses during those uncertain times. At FreeAgent, we quickly adapt to help businesses during this crisis. Our goal is to keep you up-to-date with the government support available. HMRC’s Job Retention Scheme Announcement - allowing employers to furlough employees and claim 80% of their wages plus any National Insurance and pension contributions -… Continue reading
How To Write A Good Bug Report
Hi there! My name is Dave and, as a Support Engineer at FreeAgent, I spend a lot of my time talking to our customers, our support agents and our software developers about the behaviour (and occasional misbehaviour) of our product. Fixing a product issue is an incredible opportunity to delight your users and show that, when push comes to shove, you stand by your service and your customers. During my… Continue reading
To Error, or Not to Error, that is the Question
Setting the scene You’ve got a great new feature - you’ve spent days and months testing and producing it and it’s ready. You’re ready to deploy, turn on the feature switch and GO GO GO. You know people are going to love it - and you’ve thought of all the possible issues that could arise. But disaster strikes - you’re throwing exceptions and things don’t seem to be working the… Continue reading
How we make architectural decisions
"Change is the only constant in life."—Heraclitus The software we build at FreeAgent is constantly changing and evolving. The requirements of our software can change for a wide variety of reasons, including: scalability concerns, changes to the law or organisational changes. It’s impossible to list all the reasons why your software might have to change, but it’s crucial to acknowledge that it WILL change. In order to clearly communicate the… Continue reading