All posts tagged with 'ruby on rails'

Mission jQuery Zero: How FreeAgent removed jQuery from our application
Just over 3 years ago FreeAgent was running with 4 front-end frameworks, Stimulus, React with Redux, Rails UJS and jQuery and we were about to start adding Turbo to the stack. Running all these different frameworks was not sustainable and we chose to reduce our number of dependencies and first up was jQuery. We called this our legendary jQuery code, code that had helped us grow a business and provide… Continue reading

A case of missing validation messages
I’ve recently worked on two very similar issues within the FreeAgent app, which is a Rails web application. The problem that was reported in both cases was that when a user tried to submit invalid data they didn’t get any kind of message indicating what went wrong. In case it helps someone else (and let’s be honest to remind myself when I undoubtedly come across it again) I thought I’d… Continue reading

The architecture of FreeStyle, our design system
We embarked on a journey to create a design system at FreeAgent over 2 years ago. In this blog post I will describe how we structure our design system code and how it’s being used across different codebases. Technologies we use Our main design system consumer is the FreeAgent web application, a Ruby on Rails application. As a result, we write our components using the Ruby on Rails ViewComponent framework… Continue reading

Readable Dates in Rails
I was playing around in Swift recently, and wanted a reference to 'one day ago'. This is simple enough in human terms: if it's 9:30 on the 18th of September, 'one day ago' means 9:30 on the 17th of September. The Swift code to do this looks like this: Calendar.current.date( byAdding: .day, value: -1, to: Date.now ) ...and that's just a bit much, isn't it? First we need to access Calendar.current, a singleton… Continue reading

So you’re going to be an intern
After months of nerves, interviews and one too many LeetCode questions, you’ve done it. You’ve landed an internship, you’re free from the dread of a long, empty summer and your brain is filled with vague notions of what your internship might be like. I’m here to gather up your brain clay and sculpt it into solid ideas of what things will be like. Before we start, it needs to be… Continue reading

The legendary data warehouse application
In spring 2014, I created an internal Ruby on Rails app called data-warehouse. In this blog post I’m going to describe what it was, how it came to be and why, against what would appear to be all reasonable logic, it became the central part of our data infrastructure for about eight years. Continue reading

Software engineering: 5 things they don’t teach you at university
Introduction Over the past couple of months, I’ve been working as an intern software engineer in the Banking Integrations team here at FreeAgent. Before I started, I had just finished the second year of my Computer Science degree at the University of Birmingham. Whilst university taught me a multitude of skills, there are many that can only be truly gained from working in a company. I’d like to share some… 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

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

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