All posts tagged with 'ruby'
Down the Ruby Mine, Part II: Ruby’s seemingly illogical logical operators
Hello there, my name’s Sam and I’m one of the Summer 2019 Engineering Interns at FreeAgent. As part of my time here I’m writing a series of blog posts on Ruby language features. If you’re a first time Down the Ruby Mine reader then don’t fret, because the posts aren’t dependant on each other. However, if you are interested, you can find the first post here. Today we’ll be exploring… Continue reading
Down the Ruby Mine, Part I: The code insertion trinity
Hey there, my name’s Sam and I am one of four software engineering interns working at FreeAgent over the summer. This is my first time writing in Ruby and I’ve had a great time exploring the language. As developers I believe it’s important to develop a fundamental understanding of the core of a language, even when its supplemented by a feature-rich framework like Rails. Over the next few weeks I’ll… Continue reading
What We Value – Writing Code At FreeAgent
Writing software is hard. The problems we’re trying to solve are generally not trivial. They will have caveats and edge cases. They will rely on unreliable dependencies. The problem may evolve and the solution may need to be tweaked. The solution we’ve carefully crafted might not have taken into consideration something that later seems obvious. The problem might even change entirely. Continue reading
Ruby 2.5: How’s That Backtrace looking?
It’s Christmas night, the air is cool and the stars are unseen through the heavy cloud. Children have left tablet and a nip of whisky out for Santa, and carrots out for the reindeer. One of the children wakes up! Rushing out of bed, she heads to the living room, curious to see if she can catch Santa and reindeer in the act of present delivery. When she gets there,… Continue reading
Ruby 2.5: Not Blocking My Rescue
Rescuing specific exceptions excessively can cause problems, but if you've ever had need to rescue within a do/end block, you might have found yourself using wordy syntax. Ruby 2.5 has a solution for you. In Ruby 2.5, we’ll get a little syntactic sugar for handling exceptions inside do/end blocks. You can see the feature discussion on Ruby’s Redmine instance. If you’ve ever used the shorthand for rescuing inside a method… Continue reading
Ruby 2.5: yield_self
yield_self is coming to Ruby 2.5. What is this long requested feature, and how does it work? Some features take a while to get into a Ruby release. As you can see from the original request on Ruby’s Redmine issue tracker, yield_self has been brewing for 5 years. It has been waiting on a good name, and the Ruby team has settled on one. But what is it? To understand… Continue reading
Ruby 2.5: The Christmas Present
Let's talk a wee bit about Ruby 2.5. This starts a week of looking at upcoming features in the language. Here at FreeAgent Towers, we use a lot of Ruby. The application itself is written in Rails, and our website is static HTML, CSS and JS, but is generated with Middleman. We love it, and so we follow its development closely. One of the exciting points in the Ruby year… Continue reading
Schrodinger’s Ruby array
When can a single array instance in Ruby both be empty and contain items simultaneously? Read on, and find out! Continue reading
Rest in peace, @mathie
There wasn't supposed to be anything particularly unusual about today. It started out as a typically drizzly Edinburgh summer morning, grey clouds hanging low above the castle, with just a hopeful glimpse of blue in the distance offering the prospect of a little respite later in the day. It wasn't until I arrived at my desk and checked our Slack channels that I first heard the shocking news of the… Continue reading
Querying the past
I’ve been learning to love the ActiveRecord query interface over the past few months. Whilst I find it infuriating when I’m battling it to do what I actually want, I also relish the power and convenience it gives me for many simple queries. So, when it came to designing a query language for historical data in our systems, ActiveRecord was a natural choice. We can now do queries like: FA::Subscriptions.… Continue reading