Please be careful the cake is a lie

MongoDB replica set tags with mongoose

MongoDB replica set tags are a handy way to refer to a subset of nodes. Imagine a scenario where you have three nodes in your replica set and you want to dedicate one server to reporting or background jobs. This can easily be achieved by replica set tags combined with preventing that node from becoming primary.

Object-oriented controversies: Tell Don't Ask vs the Web

Lately I have been thinking a lot about object-oriented principles and ways to better apply them in my day-to-day work. The more I think the more questions I have. Principles and best practices contradicts each other more often than not. This post is not a rant but rather me trying to understand some portions of object-oriented programming.

View components in Rails

I started poking around with Rails just after the release of 3.1. Since then not much changed in how we approach the view layer. We use the same abstraction or to be more precise we are stuck with the lack of abstractions and doing everything on the lowest possible level of string manipulation.

Sharing code between ActiveAdmin resources

Recently I’ve been working with ActiveAdmin a lot, since we use it as an application framework to build an internal admin-like tool. It serves us very well most of the time but the level of magic it introduces is considerable.

Sending and testing emails in Go

My last project was to create a notification service for our back-end. It had to support a few different ways to send out notifications and of course sending email was among them. Go’s awesome standard library makes it super easy to send out emails. After some initialization it comes down to one function call. For example sending email via Gmail would look something like this: