… At work, as part of a project I’m working on, I wanted to add a new reference to a table. ”Simple enough” - I thought. Spoiler alert, it wasn’t. Adding a reference from one table to another is straight forward in Rails. You create a migration using rails generate and then write in it somethi...
I recently took part in a discussion that brought to light the most unusual argument against having a monolith that I have ever heard - that a monolith is a single point of failure. I want to make clear that I consider monoliths and microservices neither good nor bad, or universally better or ...
ActiveModel is one of my most used tools in Rails applications. I use it in service objects, form objects and objects that represent external entities. Why? Because it provides a nice interface for validating inputs and results, it can have callbacks for pre and post-processing data, and it in...
At my first job I used to take a break every time I got stuck on a problem until one day my boss caught me looking out of the window. He didn’t say anything the first time he saw me, but when he saw me in the same position some 15 min later he yelled “At least sit by your desk and have your la...
I’ve spent a lot of my life worried that people will think I don’t know enough. Sometimes, that worry has made me use big words when I didn’t need to. –Randall Munroe in the foreword to the Thing Explainer I used to be a stickler for organizing code by what it was. Models, decorators, form o...
From my experience Scrum is the prevalent project management framework in software development. Most of the teams I was part of used it to develop, deliver and maintain their projects. Despite its prevalence I always felt like Scrum was bogs me down - that it was more harmful than useful. I kn...
Tom was brewing tea in preparation for a 5 o'clock meeting he knew little about. The agenda was so vague it might as well have been left out - it read “Mark introduces a new system for controlling 3rd party IoT water sprinklers”. That was standard practice for CorpCorp - the company Tom worked ...
I wanted to forward an email one evening, so I opened up the Hey app on my phone, found the email, tapped on the “More” button, and just before I hit “Forward” I noticed a “Share or print…” button at the bottom of the screen. I hit “Share” and to my surprise was greeted by a share sheet. It off...
A walkway at Plitvice Lakes, Croatia As a kid I practiced Judo which is a martial art as well as a philosophy. And my Judo teacher gave us a philosophical story which I came to understand only recently and which helped me achieve more than I though was possible. So I wanted to share it. The s...
Abstract color pour by Pawel Czerwinski Recently I got the urge to write again so I gave this blog a new coat of paint, and decided to give a brief history, the reason I stopped writing and an explanation as to why I moved away from Medium. I started this blog back in 2016 as a way to share a...
The GraphQL logo overlayed over a Japanese shrine At the moment of writing there is no officially supported way to do file upload through GraphQL. Here is a roundup of all available methods to do file upload through it, their pros and cons. This post grew out of a request on the Shrine issue ...
Ruby's new function composition syntax Last week Proc#<< and Proc#>> got merged into Ruby 2.6. This opens the door for function composition. Here’s my opinion as to why this is a great leap forward for Ruby and what needs to improve. Composition vs. inheritance Ruby is an object-oriented lan...
Hand holding a plastic Ruby gemstone Three years ago I wrote about how to choose the right uploader gem for your project. Since the time the original article has been published, all mentioned libraries got updated, one got deprecated, and two new libraries have appeared. I feel it's time to re...
My messy desk Recently I've started working on a small Ruby library. While I was sketching the architecture of it to I was listening to some lectures from Richard M. Stallman which got me thinking about how I should license my library. Note: I'm by no means a legal expert. Everything written ...
The Cloud was made by Fabián Alexis (CC BY-SA 3.0), via Wikimedia Commons Over the years I've had this conversation a couple of times. This post will explain why we use WebSockets, how they can be used, what alternatives exist and when to use them. Why WebSockets? Every time I worked on a pr...
A rabbit dressed up as the karate kid - a cross of RabbitMQ and Sidekiq logos I've had gripes with Sidekiq because of which I switched to RabbitMQ. Here are my thoughts and experiences after a year of using it in production. I got inspired to write this post by the overwhelming response I rec...
A rabbit with a tachometer in it's silhouette When I first started using RabbitMQ I didn't understand its usefulness beyond a job queue, but it's helped me to grow and manage services architectures without headaches. Services Architecture In web development, a services architecture describes...
A shoe stuck in the railing of a bridge in Stockholm Peoples' test suites often get out of hand. Having thousands of tests that run for hours on some CI should be a thing of the past. There doesn't exist code that's too hard to test or code that can't fail. You shouldn't waste your time waitin...
The Copenhagen town hall building Hacking privacy into Facebook's Messenger in 24 hours Hackathons are great. When a friend of mine asked me if I wanted to go with him to Copenhacks I had no idea that we would spend 24 hours reverse engineering Facebook's Messenger, let alone win first place. ...