In one of my previous posts I wrote down the impressions about Hanami I’ve had while working on my side project, Flashcard Genius. One of the things I mentioned there was that some features you’d expect from a framework are missing or underdocumented. …


I remember hearing about Hanami framework for the first time. It was a few years ago, during a talk on Wroclove.rb conference. It didn’t really catch my attention back then as I was still a newbie in the Ruby world. …


A few months ago I’ve read a book by Pat Shaugnessy called Ruby Under Microscope. It taught me a lot about Ruby’s internals and inspired to dive a bit deeper than normally and try building an extension to the language.

As most of Rubyists know Ruby is a language originally…


If you’ve landed here it means you’ve been hit by this message in your program. In this post I’ll quickly introduce you to what “UTF-8 byte sequences” are, why they can be invalid and how to solve this problem in Ruby.

Short introduction to UTF-8 and other encodings

UTF-8 is, as explained in Wikipedia, is a set…


Today I’d like to share with you a solution to a problem that gave me some headache recently, so you can spend your time on something more interesting (have a ☕ or something).

The task

The goal was to write a rake task that’d:
1. Fetch a big (1GB gzipped) CSV file from…


A few months ago my sister told me to check out a website called codewars.com. It introduced a lot of fresh air to my “boring programmer’s life”, so I decided to share some of my feelings with you.

Codewars is a platform for software developers on which people can solve…


In Leadfeeder we develop our frontend app in Ember.js backed by a Ruby on Rails JSON API. Personally I think it’s a great choice of stack as it lets developers quickly deliver new features without writing tons of code. …


While writing Google Data Studio connectors I needed to fire lots and lots of HTTP requests using UrlFetchApp in order to gather all the necessary data for my reports. Initially I used fetch method that allows only one, synchronous request.
Later, when my connector was ready I wanted to speed…


TLDR: Use ams_lazy_relationships gem ( https://github.com/Bajena/ams_lazy_relationships) to eliminate N+1 queries in ActiveModel::Serializers 🎉

Quick intro to batch loading

A few months ago I came across a post by exAspArk explaining how they built and used the BatchLoader gem to optimize the number of database queries in their apps.

The topic of batch loading was new…


You might be already be familiar with a programming-related term “canary releases” or “canary builds”. Do you actually know what it means and what’s the term’s origin?

A canary release is a special version of the product dedicated for a selected group of people (sometimes they’re volunteers and sometimes they’re…

Jan Bajena

Full stack developer @Leadfeeder. Working on random stuff in my free time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store