
Hiding Elements on the Web
For many of us the word hiding has visual connotations. But remember that the web is perceived both visually and non-visually. In this talk, Laurence Hughes from our Design System team explains that hiding is a tricky front-end development technique, used for both user interface experiences and accessibility-related purposes. He also provides some tips on how we can avoid doing DIY hiding completely. https://youtu.be/AZ6uw4KCOQA Continue reading
Titlecase, underscore and laser guns
Not so long ago, I had an opportunity to peek under the hood of titlecase and underscore methods, the tiny cogs of the “Rails magic” machine. The latter turned out to be a very interesting function—a lot of hard-to-follow transformations, secret injections and the like. All of these bits significantly contributed to an odd-looking bug I’ve been working on. Today, we’ll unravel the implementation of both methods and look in… Continue reading
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