All posts tagged with 'ruby on rails'
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
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
Rails Girls London 2019: A fun weekend of coding
Fast becoming my favourite event of the year is Rails Girls London. Every event is different as you get to spend it with a whole new group of interesting people from a huge variety of industries and backgrounds. This year we headed to the offices of Simply Business in the City of London for the one-and-a-half day workshop, and happily with FreeAgent sponsoring for the first time. Between the pool… Continue reading