Bogdan Gusiev's blog

How to make good software for people

Rails Contribution slides from ruby meetup in Kiev
11 Dec 2012

Here are slides I’ve shown on ruby meetup in Kiev. It’s all about my expirience with power hacking rails internals. Give some inside on how ActiveSupport Callbacks and Rails Router are working.

rails contribution slides

Smart Javascript Initialization Strategy
08 Oct 2012

The JavaScript initialization process is a pain in the ass since dynamic HTML and AJAX became popular. We need to take care all the time about what we need to initialize after every change in DOM. Thanks to jQuery#live and jQuery#on: We have a not-so-right but still very effective solution. It allows us to fix the problem with initialization of typical events. But initialization is not always about binding DOM events. In more advanced cases, it could be wrapping widget class over an element or a custom jQuery method call like a date-picker.

javascript initialization class

Strict validation is a main stream
17 Sep 2012

It’s nice to see that strict validation feature that I’ve done almost a year ago is finally getting popular. Spend a moment and understand what it does by Rails documentation.

rails contribution validation

Full text search - Solr(Sunspot) vs PostgreSQL
16 Aug 2012

This is short notes about my experience with full text search based on PostgreSQL and Solr. Solr was primary used with a help of Sunspot gem that was definitely a good idea, but unfortunately caused some drawbacks. PostgreSQL provides full text search out of the box and to my opinion doesn’t need any additional ruby specific tools other than ORM.

solr sunspot postgresql fulltext search

How many clicks do you need to debug ajax request?
16 Jun 2012

Here I am gonna use Chrome browser as an example:

  1. Open context menu
  2. Click inspect element.
  3. Click “Network” tab
  4. Spawn again an ajax request (at least one click. Sometimes more)
  5. Click on failed request at Network tab
  6. Click “Preview” or “Response” subtab

javascript debug ajax efficiency

Assumption Driven Approach
06 Jun 2012

This post shows some examples of how things can go wrong way because of people actions based on assumptions but not on facts. It is more conceptual than practical, so be patient and don’t blame my grammar mistakes too much.

assumption ruby performance fact

Benchmark your performance patches
01 May 2012

After a dozen performance patches to many gems want to share some practical experience I gain. Tools I’ve picked up was perftools.rb and ruby built-in benchmark library. They are fit well for cases when optimization stays at Ruby level and doesn’t require to fix something in native extensions or dig into IO operations.

gem contribution performance callgraph patch

Web Forms 2.0: Submit with Ajax and Client Side Validation
01 Mar 2012

Web 2.0 world force us to build Forms in a new level of quality. AJAX and dynamic HTML changes a way how forms should work internally. Let’s call it Forms 2.0. And of course this facts bring a lot of complexity every time we deal with forms. Sometimes such form makes a real problem comparing to regular Web 1.0 form. Here will be a talk how to make Forms 2.0 as simple as Forms 1.0.

javascript ajax forms validation html jquery

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