Chris Jarling

I'm starting to redesign this website. I like the idea of building in public, and this is a good case for doing so. I've documented progress on other projects before, but I want this to be a series of blog posts, not something tucked away in a project page. There may not be too many interesting things to tell in the process to justify more than a few posts, but at least it will prevent the old "I'm busy with my redesign and do not have time to write" dance from happening....

Continue reading

Say you have a Post model that should have a maximum of 3 Tags asscotiated to it. There are multiple ways to achieve that:Use the built in length validationIn models/Post.rb:has_many :tags validates :tags, length: { maximum: 3 } The default error message for this would similar to "tags too long". This sounds weird, so the translations should be adapted: en.activerecord.errors.models.posts.attributes.tags.too_longCustom validation has_many :tags validate :tags_count def tags_count errors.add(:tags_count, "not more than three tags allowed") if tags....

Continue reading

You know what social media is. You are using it. We both are. Different people use social media in different ways. Some like to post a lot of things and try to get as many likes for what they post. I used to. My contributions never got many likes though. One time, when I was in university, one of my photo posts on Tumblr went viral. I remember what a foreign feeling it was to get a notification every few seconds. Then Tumblr banned nsfw content, drifted into irrelevancy and my life progressed about 8 years without any virality except for covid.I use social media in a consuming way....

Continue reading
9th Jun, 2022

On the Ergodox EZ

In September 2021 I bought a keyboard with a weird key arrangement that was split in half for a lot of money. I've been using it almost daily for the last 9 months. Following are some thoughts on the keyboard that are neither complete, nor very structured and should under no circumstances be understood as a full review.While I will talk critically about some aspects of the board, please keep in mind that I think that this is a really good keybard and I like it a lot.The hardware & build qualityAll in all, the Ergodox EZ is built really well....

Continue reading

I used the day to make some updates to the site that I wanted to do for a while now.No more webfontsI removed all webfonts from the site. It now uses Trebuchet MS for almost all texts (except for code lines, which are set in Courier New).I thought about this for a while now. Currently, I try to simplify my life in a lot of areas, both digital and analog. Having no webfonts on this site sounded like a good idea in terms of simplicity. I still have this thought in the back of my head though, that a website with a good design has to be fancy....

Continue reading
28th May, 2022

Learnings #1

What this isI currently have two problems. Let me tell you.I learn a lot of things in a day. Most of them are loosely related to software development, but there are other topics I learn about as well. For some of those, I write articles on this site. But most of the things I learn feel too small to write a distinct blog post for....

Continue reading

<style> .slava { background-image: url("data:image/svg+xml,%3Csvg width='108' height='93' viewBox='0 0 108 93' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54 0L107.694 93H0.306423L54 0Z' fill='%230057b7'/%3E%3C/svg%3E%0A"); width: 120px; height: 100px; background-repeat: no-repeat; margin: 0 auto; } </style> <style> .ukarini { background-image: url("data:image/svg+xml,%3Csvg width='108' height='93' viewBox='0 0 108 93' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54 0L107.694 93H0....

Continue reading

The other day I needed to build a circle with a gap as SVG. Here's how I approched it.Tl;drUse stroke-dasharray to define the gap in the circle. You'll want three values:Offset from the start of the circle (right hand side, 90 degrees)Size of the gap in the circleFill the rest of the circle (any number greater than what is left from 2 * pi * radius - (offset + gap size), see "Placing the Gap" below for more detail)So, something like this:<svg width="250" height="250"> <circle cx="110" cy="110" r="100" fill=&...

Continue reading

If you are using RSpec to test ruby code, you probably have a preference for how your output should look. I think a lot of people like the default output format that looks like this:....F.....*..... Obviously, this is wrong. I tend to put a lot of effort in my describe context it texts to make sense when read out after another, so I want to see it. I earned that. I don't want no F...F*...F..F, I want the beauty of my prose to touch my eyes and my soul....

Continue reading
© 2026 Chris Jarling - fc8d137