If you've ever been working on an application with a domain concept like organizations I bet you had to struggle with custom features, behaviors and complete white labels. Most young fellows start such with the if-else construction which quickly can fall into monster-spaghetti. Can we do better?
Some time ago we mentioned on our blog that according to Clutch, Monterail was ranked as a market leader in Polish development companies, Ruby on Rails developers, and software companies in general. With more testimonials published on our profile, we’ve climbed even higher and managed to become #1 in Ruby on Rails category.
If you've ever found yourself adding another boolean flag to mark your object's state, chances are you would greatly benefit from introducing the workflow or aasm gems. Those two are best-known and most well-proven state-machine solutions in the Ruby world. I had the chance to work with both of them and found the experience pleasing. Today I'm going to concentrate only on the latter. I encourage you to check both and decide what best suits your needs.
A recent confession by Piotr Solnica started another bit of drama in the Ruby world. I started writing this post just after reading Fabio Akita's response to Piotr's post - for me it shows all the problems with Rails' defensive mindset, but it also reminded me that Rails is still a pretty cool framework. Feel confused? Let's solve that.
Have you ever wondered how many simultaneous queries your application sends to the database? A hundred, a thousand, or perhaps a million? Whatever your answer, we should be aware of the influence that this number has on the performance of our programme. I would like to introduce to you the rspec-query-limit gem (you can find the source code on our github in the monterail/rspec-query-limit repository): this gem is a rspec matcher that measures the numbers of queries being sent to the database in Ruby on Rails applications. The main goal of this gem is to prevent the so-called
N+1 problem from occurring, and to make us realize how many different queries are subsequently being sent to the database. Rspec query limit measures queries using Active Support Instrumentation which allows us to measure certain actions in Rails.
Recently, I had my first real experience with deploying a (small) web application. I had to perform a pretty wide research and torture some experienced people with handling the difficulties. I gained knowledge that I consider worth sharing. Let me describe configuration of deployment stack and scripts created for the aforementioned app.
This summer, I spent a wonderful 2 months at Monterail. I’ve been asked to share my overall impression about my time spent there working on an open source project. It was an experience that changed how I view my skills. It helped me believe that I can, so I would like to share with you about how I felt and how I benefited from this experience more than what I did.
One of our designers wanted to make some changes to our job offer page. At first it seemed trivial - just change some HTML inside a rails app. Then we realised that we would need to setup the whole development environment on his Mac. With the help of homebrew this didn't sound like a challenge at all. But then it came to my mind that this might be the perfect case for setting up a development environment using docker and docker-compose (formerly fig).
The snowball effect has just started. While the ball remains quite small, it is still big enough to be seen and it will reach full speed soon. If you don't want to find yourself in an avalanche, you should start preparing today.