Easiest Way Ever To Profile Your Rails App

How much time it takes for Rails to generate your page? We can easily measure that. But what if you want to find bottlenecks, to measure how much time it takes to render partials, to find the code that wastes your CPU? There is one very easy way to find this out.

Read More

How I know I improved at Ruby

While first starting out with Ruby, I coded a Caesar Cipher algorithm (shift each character in a string by n, so ‘c’ becomes ‘e’ if n=2, ‘f’ becomes ‘h’, etc.). And, to contrast, ten few minutes ago I was going through some challenges for practice and came across the same problem. I searched through my own code base and found another solution I wrote ~3 years back.

Read More

Why I don't use Linux on desktop

I installed my first Linux distribution somewhere between 1995 and 2000. It was RedHat, not too bad, not too good, as usual. Soon Mandrake has been released in 1998 (17 years ago, holy sh8t!). It was the first attempt to make Linux friendly. 2015 is the year of Linux desktop. So what do we have for now?

Read More

How to install Passenger for Nginx + few tricks

In this post I’ll cover how to install ‘passenger’ for nginx. What is passenger and why do you need it? Well, if you deploy your ruby applications straight to the cloud (heroku, aws, etc), you can skip this manual. But when it comes to running ruby apps on your own dedicated server (which I personally prefer) you need a bit of magic. If you don’t have your own dedicated/VPS server, you’ll probably won’t find this article very useful.

Read More

Managing Ruby on Rails app assets with Bower

While working Ruby on Rails app, developers tend to add more and more client libraries: Angular, Bootstrap, jQuery plugins. And RoR framework by default offers no any efficient way of managing these dependencies. You either add gems to Gemfile or place your assets under vendor/assets. In first case gem could be updated infrequently, and application starts running slower over the time because of large amount of gems. In another case, updating an asset becomes a pain – you have to handle all these dependencies manually.

Read More