Query Object pattern overview

Database queries are very common in the world of web applications, and even if you’re not particularly familiar with SQL, you’re probably using it regularly anyway. A single, not especially huge application may be firing out thousands of different queries per second, so regardless of...

3 minute read

A brief look at the Active Record pattern

I think most developers (especially the ones working with Ruby/RoR) know Active Record, or at least its Rails` implementation as it’s shipped by default by the framework and just used in most scenarios. In case you’ve somehow missed it, here’s a short description of this...

2 minute read

Introduction to patterns

When we talk about patterns in the context of OOP, we usually think about the Design Patterns. They are common solutions to recurring problems, so if you care about your code, you definitely should know at least some of them. But there is another important...

4 minute read

ES6 may 'break' your Rails app

ES6 has a lot of features that make it fun to work with when it comes to writing code on the front end, but sometimes it may be tricky. Take a look at how you can break your production deploy with a simple string interpolation....

1 minute read

When .gitgnore is not enough

I’m currently working on a project with multiple dev teams contributing together to a few different repositories, combined into one system. And we’re using git, of course. We have very strict branching model. It takes weeks to see your work merged to master, even for...

2 minute read

Why refactoring is important

We usually have no time to refactor, the client wants us to work on bugs fixing or new features. S/he pays for it, so we’re doing what s/he wants. Time goes and we keep adding new features, finding new bugs, debugging, fixing, adding features, debugging...

3 minute read

Pragmatic Programmer - a must read for every programmer

Some time ago I published a post about the books I think every Ruby/Rails developer should read. This time I’ll briefly describe another one - the classic Pragmatic Programmer from Andy Hunt and Dave Thomas. It doesn’t fit the post I’ve mentioned above because it’s...

4 minute read

Why it's worth to know the NullObject pattern

From time to time most of the Ruby/Rails developers are facing a situation when an app is trying to call a method on a certain object, which out of nowhere appears in our system as nil, instead of an instance of the desired class. The...

2 minute read

How well do you know JavaScript?

We all know JS somehow, how confident are you? Is NaN equal NaN? Is null equal 0? What is the result of adding two empty Arrays? If you know these ones, you’re really good, but still can find some more interesting JS facts by reading...

3 minute read

What is CORS preflight for?

Sometimes I really miss the times when everything was so simple, even though lots of things seem to be really easy today. I remember the days we had only HTML, no backend/frontend separation, no frameworks, no CSS*, nothing. So let’s talk about browser-level cross-origin HTTP...

3 minute read

A few things about ActiveRecord transactions

From time to time you have to wrap some magic code in an ActiveRecord transaction. In such cases, it’s better to make sure your code does its job or you’ll face the problems sooner or later. Even if you code only for fun, it’s worth...

3 minute read

Lifelong learning: Codewars

We have so many tools to develop ourselves today that is unlikely to use each of them even once a week. I’ve decided to launch a new series here and it will be related to the process I’m pretty sure you’re familiar with: lifelong learning....

4 minute read

Ruby symbols and its garbage collecting

Symbols are one of the most mysterious things for Ruby beginners. When I was starting with Ruby I also wondered what is going on sometimes and what these symbols are at all. I’m not a programming veteran, but today I know a little bit more...

5 minute read

Programming quotes vol.2

I’ve finally made up my mind, I will definitely launch a subpage on this blog with all the quotes I think are worth to know. But before it happens, here’s the second part of the ones I like most: "No matter how slow you are...

1 minute read

Books every Ruby/Rails dev should read

Do you know how many programming-related books have been written so far? I’m not sure, but to calm down my curiosity I’ve checked amazon.com resources for the “programming” keyword. The result for today is 224,583! Try to read them all and you’ll become a hyper-ultra-expert...

5 minute read

A tribute to Ruby Rack

“Rack is a beautiful thing” - that’s how Ryan Bates started his Railscast about Rack middleware in 2009 and I totally agree with him over 7 years later. Rack is indeed a beautiful thing and to be honest I’m happy I started my Ruby web...

5 minute read

My favorite programming-related quotes

Who doesn’t like quotes? I think I have a perfect situation almost every day (at least for me) to use one of the quotes I know. Even for a non-programming talk with my mother, the tech quotes fit quite nicely. Sometimes a quote inspires one,...

2 minute read

Refactor your code with Form Objects

I’m pretty sure you have heard about Form Objects, but in case you don’t, let me show you the advantages of using them and a simple way to do that. Why? Because I think a Form Object is like a good diet for your Rails...

3 minute read

Rails CamelCase controller name to snake_case file mapping demystified

Have you ever wondered how does your UsersController just work fine when when you place it in the app/controllers/users_controller.rb file? It’s one of the first things in the Rails world that we say it works “automagically”. This magic is not too hard to understand if...

4 minute read

Do you still render your Rails views with ivars?

“Convention over configuration” is the well-known Rails slogan. It helps you to launch your project quite quickly when you stick to the famous “Rails Way”. Unfortunately, not for free. Your code will be hard to maintain, extend and even understand. Sooner or later. My mate...

3 minute read

Why do I prefer MiniTest than RSpec

I’m a lucky guy - I usually work alone so nobody is telling me what to use and how to do it. I have the freedom of choice from the very beginning of the project. Usually. There’s only one thing that remains the same: the...

3 minute read

Discover the world of Ruby frameworks

Lots of developers who start their web development journey choose Ruby on Rails for their first projects. That’s a good choice in my opinion - you can get your app up and running quickly and quite easy. It’s really fun and lots of people enjoy...

6 minute read

Single quotes vs. double quotes in Ruby

If you have a problem mentioned above, please read this article first. After that (and only then!) you’re allowed to continue reading this post ;-) “Use single quoted strings unless you need string interpolation”. This sentence was one of the first things I’ve heard when...

3 minute read

Keep your controllers clean - use Service Objects

Sometimes it’s really hard to find out what’s going on in a Rails app by looking into the code. Especially if it’s your first look at the source. There are lots of methods in the models and controllers and you need to spend some time...

3 minute read

Lightweight background processing for your Rails app

If you’ve ever used Rails Runner you know that it’s possible and actually quite easy to execute Ruby code in the context of Rails non-interactively. You do not need a user to click somewhere to invoke one of your app methods. However using ‘rails runner’...

2 minute read

One thing about your projects that never changes

Writing code is fun and even easy itself - you write some code and it works. Things are getting more complicated when you’re writing a huge app and as long as you enjoy building the project it’s not so bad. But sometimes you are angry,...

2 minute read

A video you'll enjoy as a programmer

There are lots of things on the Internet these days, you need to sort every single information you receive, but believe me: You will not regret watching this Uncle Bob’s video. It’s not a new material and you obviously can agree with the content or...

1 minute read

Initial commit

I’ve been thinking about writing my own blog for a long time and now - after almost a year - it’s finally here for you. The main goal of this blog is to give the open source community back at least a part of what...

1 minute read