Continuous Integration and Delivery for Ruby on Rails using CircleCI

Continuous integration and delivery pipeline can have a significant impact on the dev team's productivity and stability of production releases. In this tutorial, I describe how to automate testing, security checks, and deployments for Ruby on Rails apps using CircleCI. I cover a basic CI setup as well as more advanced features like concurrent specs, dependencies caching, NodeJS/Webpack setup, Heroku deployments, and GitHub integration.

Ruby on Rails ActiveRecord PostgreSQL Data Integrity and Validations

Most Ruby developers work with Rails and Active Record for PostgreSQL database interactions. It provides a ton of magic and is simple to start with. Data integrity problems start creeping up once the code base and database structure gets older. In this blog post, I will describe a couple of techniques for ensuring data integrity and validation in Ruby on Rails web apps.

Screencast - Sublime Text Mouse-Free Development Advanced Productivity Tips

Sublime Text is my editor of choice for developing Ruby on Rails and JavaScript web apps. In this screencast, I present a couple of more advanced productivity tips and configs that let you minimize the usage of mouse during development.

Active Admin Gem Tips and Performance Optimizations for Rails Apps

Active Admin gem is a popular tool for building admin interfaces in Ruby on Rails apps. In this tutorial, I will describe a couple of less obvious tips and performance optimization techniques.

Optimize Docker Rails Deployment Speed with Dokku using a Custom Image

Dokku lets you setup Rails hosting infrastructure on a simple VPS without much dev ops experience. Although it is easy to get started, a default config might result in very slow and unreliable deployments. In this blog post, I will describe how I've improved my Dokku based Ruby on Rails (NodeJS with Yarn and Webpack) application deployment speed by over 400% using a Docker image Dockerfile.

Screencast - Showcase of Focus Board, Visual Web Scraper Prototype

In this screencast, I present a prototype of my new side project. It is a simple tool that allows you to visually scrape interesting parts of different websites to create your personal internet dashboard. I want to probe the interest before releasing a public MVP version.

Remove AMP and don’t Affect SEO Rating, Organic Traffic, Performance

I've used to recommend supporting Google AMP pages as a reliable way to increase site SEO rating and organic traffic visitors. Recently I've removed AMP from my website. In this blog post, I will describe how it affected my blog and a couple of more advanced web performance optimization techniques I am using instead of a proprietary standard like Accelerated Mobile Pages.

Screencast - How to Write and Promote a Programming Blog Post

In this screencast, I explain how to write, release and promote a programming blog post on various social platforms even if you don't have an audience yet. I present my typical routine and tools I use when submitting a new post.

Hosting Static Site on Dokku with Free Cloudflare CDN and SSL

Dokku is dev ops for dummies and a simple way to deploy websites on a barebones VPS. In this tutorial I will describe how to use it to host a static site, and setup global assets caching with free Cloudflare CDN and SSL certificate.

Screencast - My Ruby on Rails Workflow, Productivity Tips and Tools

In this screencast, I implement an improvement to subscription payments handling in my side project Abot. I show my typical Ruby on Rails workflow, productivity tools, and techniques.

Quick Tip - Boost Your Productivity with Ruby on Rails Console Aliases

Recently I've started using a productivity technique which saves me a lot of unnecessary typing when working with Rails apps. In might seem trivial but I still wanted to share it because it makes my everyday work easier.

Direct, Secure Rails Client-side File Uploads to AWS S3 Buckets

Many Ruby on Rails apps use Amazon AWS S3 buckets for storing assets. When dealing with files uploaded by front-end web or mobile clients there are many factors you should consider to make the whole process secure and performant. In this blog post, I will describe common pitfalls and an optimal solution when it comes to handling client-side file uploads.

How to Migrate a Ruby on Rails App from Heroku to Dokku

Dokku is dev ops for dummies and a cheaper alternative to Heroku. Recently I've migrated a couple of my projects to it. In this blog post, I will describe how to setup and migrate a Rails app to Dokku with PostgreSQL, Sidekiq, Redis and Let's Encrypt or Cloudflare for free SSL.

How Getting Featured by Hacker News Affected my Passive Income

Two weeks ago my blog post made it to the top of Hacker News. Around 30k people read about my side project Slack bot that day. In this blog post I will describe how it affected the project and my other passive monetization and marketing strategies.

My Toolkit for Writing and Promotion of Blog Posts

I would like to describe a couple of tools which I use to create, release and promote my blog posts. If you already are a technical blogger, or maybe still only thinking about setting up your place on the internet, you might find some valuable tips for your own toolkit.

Track Down and Fix Slow ActiveRecord SQL Queries Performance in Rails

Scaling issues are great because it means that you have traffic on your website. Before you decide that 'Rails doesn't scale!' and start a rewrite to a tech stack with potentially more performance, maybe you should double check queries that your PostgreSQL database executes. Below I describe some tools and techniques you can use to track down, diagnose and optimize slow Active Record SQL query execution.

Practical Differences between Working in Ruby and iOS

Developing iOS mobile apps and server-based Ruby applications is different on many levels. In this blog post, I will present a high-level overview of different aspects of day-to-day working in these technologies.

Ruby on Rails Simple Service Objects and Testing in Isolation

Service Objects are not a silver bullet but they can take you a long way in modeling your Ruby on Rails app's domain logic. In this blog post, I will describe how I usually work with service object pattern in a structured way. I will also cover a simple testing in isolation with mocked services layer.

Optimize Rails Performance with Redis Caching and Rack Middleware

According to (a bit exaggerated) Pareto principle, 5% of your Rails app endpoints could account for 95% of performance issues. In this blog post I will describe how I improved a performance of my Rails application’s bottleneck endpoint by over 500% using a simple Redis caching technique and a custom Rack middleware.

Simple SSL Proxy for Insecure Browser Content with Ruby or NGINX

SSL protection is becoming de facto standard in web and mobile development. One potential problem is that website could be served via a secure SSL connection and still displayed as insecure by most of the modern browsers. It's enough that at least one of its resources is served without SSL. In this blog post, I will explain how to setup a simple Ruby and NGINX server to work as an SSL proxy for insecure content and describe some basic streaming techniques.

Multiple Domains with Free Wildcard SSL from Cloudflare

Domain names you own could be your most expensive to do list. What’s more a domain without a valid SSL will show up in all modern browsers as an insecure content. In this tutorial, I will explain how to minimize the cost of owning multiple wildcard SSL-protected domains using Cloudflare and set them up with Github Pages, Heroku or NGINX.

Reduce Rails Memory Usage, Fix Leaks, R14 and Save Money on Heroku

In theory, you can run both Rails web server and Sidekiq process on one 512mb Heroku dyno. For side projects with small traffic, saving $7/month always comes in handy. Unfortunately when trying to fit two Ruby processes on one dyno you can run into memory issues and leaks. In this post, I will explain how you can limit memory usage in Rails apps.

Productive Laziness - Optimize your Shell Workflow

I would like to share a simple productivity tip that probably helped me save thousands of keystrokes so far. I’ve been using this technique for a while now to maximize my laziness (productivity) during work and so, recently I wrapped it up in an easy to use Ruby Gem.