Skip to content

Grinding Gears

Tales of code crunching from the FreeAgent Engineering team

  • Development
  • Data & ML
  • Infrastructure
  • Mobile
  • Tooling
  • Security
  • Culture
  • Careers

Titlecase, underscore and laser guns

Posted by Karolina Drobnik on June 10, 2021

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

➼ Read other posts about debugging or regular expressions or ruby or ruby on rails

Engineering Principles at FreeAgent

Posted by Olly Headey on May 14, 2021

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

Posted by Matt Bearman on March 25, 2021

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

➼ Read other posts about ruby or ruby on rails or testing or timecop

Dog working at a computer

Testing Child Processes in Ruby

Posted by Andy Stabler on January 6, 2021

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

➼ Read other posts about process management or ruby or testing

Breathing New Life into Dormant Code

Posted by David Whitby on October 30, 2020

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

➼ Read other posts about accounting or code or domain or ruby or ruby on rails or tax

The perils of a bad date

Posted by Lorna Noble on August 13, 2020

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

➼ Read other posts about ruby on rails

Switching to Feature Testing with Headless Chrome

Posted by Sneha Somwanshi on June 26, 2020

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

➼ Read other posts about continuous integration or testing

How we built the FreeAgent Furlough Calculator in a week

Posted by Kevin Jacoby on May 28, 2020

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

➼ Read other posts about accounting or software engineering

Image of a caterpillar

How To Write A Good Bug Report

Posted by Dave Jones on October 24, 2019

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

➼ Read other posts about bugs or debugging or github or issues or software engineering

To Error, or Not to Error, that is the Question

Posted by Struan Robertson on September 13, 2019

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

Posts navigation

« Older posts
Newer posts »

We're totally hiring!

See our current engineering vacancies

Built with ❤️ by the FreeAgent team.