Bogdan Gusiev's blog

How to make good software for people

New Rails Release with a few features from me
23 Jan 2012

Upcoming Rails 3.2 release has many useful features.

Some of them are coming from me:

  • ActiveRecord #pluck method
  • Strict validation concept
  • Customizable mass assignment sanitizer behavior
  • Gotcha for select[multiple] tag

Here is a more detailed description than in the Changelog.

rails changelog contribution

New release of Datagrid: Mongoid, Rails Engines and HTML columns support
10 Jan 2012

Datagrid version 0.5.0 has been released.

Datagrid is a Ruby on Rails plugin that helps you to build and represent table-like data with:

  • Customizable filtering
  • Columns
  • Sort order
  • Localization
  • Export to CSV

Here are some major features from new release.

datagrid gem rails changelog

Improve your Email delivery code with Mailtrap
18 Nov 2011

Today, I want introduce the Mailtrap web service aimed to help developers build and improve their email delivery functionality.

Usually people use same SMTP settings for all environments, but this actually creates many problems in Staging and Development environments. Mailtrap is a special SMTP service for these environments aimed to solve specific problems.

smtp development service environment

Slides: Fighting with fat models
11 Nov 2011

Here are my slides from RubyC conference.

This presentation covers a hot topic for projects that are more than a year old - it’s fat models. The problem appear naturally as models are the best place to allocate business logic code. There are number of existing techniques to manage large amount of code in Rails application. But they are suitable only in a half of use cases. For the rest of them we can use Traits pattern that is described well in this presentation.

Fighting with fat models

model service dry slides rails

17 Oct 2011

My article about Resque was posted on Engine Yard last week. It has very good notes from EY engineers and doesn’t have my regular grammar mistakes. Enjoy your reading.

resque framework contribution

Advanced RSpec Techniques presentation
08 Jul 2011

I’ve always pay attention to Rspec and posted some articles about Advanced Rspec features. Right now about 2k tests written by me personally in 3 years of development with Rails.

Here is the slides from my talk about all invented patterns and best practices:
Do rspec: fogotten features of RSpec

subject rspec context behavior dry slides

Reporting made easy by Datagrid gem for Rails
26 Jun 2011

4 years ago I was working on some enterprise projects with a lot of reports. From that time I was thinking about perfect report gem that would provide easy DSL for making filters and sortable columns to build reports and make it all reusable with standard OOP techniques. Since that time this idea never left my head and now finally I have enough knowledge and opportunities to build such tool.

rails activerecord datagrid gem report

Patching dbext vim plugin to support Rails naming conventions
30 May 2011

dbext is an excellent vim plugin that allows you to execute SQL queries directly from vim. For example: select * from <word under cursor>. When dbext is used with Rails there is a problem that you can work with some variation of table name like:

  • UserRole
  • user_role_id
  • user_role_ids
  • user_role

But still wants to use it as table name in your database queries so that you won’t type it manually.

rails vim dbext patch convention sql

Logging HTTP api calls just like database queries
24 May 2011

Http api calls are pretty similar to SQL queries - they query data from external source to process them in ruby space. So I think it's a good idea to log them just like ActiveRecord does with SQL queries.
  Location Load (25.1ms)   SELECT * FROM "locations" WHERE ("locations"."id" = 2548) ORDER BY title

api http logging ruby rails debug gem

Finally get rid of WordPress and PHP
20 May 2011

After a few tries migrate to blog engine with programming language I know well, I finally found jekyll - lightweight static site generator. My main concerns in this choice was:

  • Edit posts in my favorite text editor with favorite markup
  • NO PHP
  • Syntax highlight out of the box

jekyll wordpress php migration liquid criticism