Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile
Dima Fatko 🇺🇦

@fatkodima

Backend, architecture, ruby, linux, databases. Love to investigate low-level things.
Wannabe @github, @gitlab or @Shopify

ID: 2201196558

linkhttps://github.com/fatkodima calendar_today18-11-2013 12:09:46

360 Tweet

523 Followers

178 Following

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

Announcing a new gem for cursor-based pagination in rails - github.com/fatkodima/acti… It is very simple, yet powerful! 💪It has the pieces missing in all other gems like iterating by multiple columns, multiple directions, iterating over joins or ordering by custom SQL expressions.

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

Got a chance to apply a "shitlist" technique (sirupsen.com/shitlists) to incrementally improve the codebase. We have many tests accessing remote services. To stop introducing new offenses, while fixing old ones, an easy change was added. Look, how smart and simple that is!🤌😍

Got a chance to apply a "shitlist" technique (sirupsen.com/shitlists) to incrementally improve the codebase.
We have many tests accessing remote services. To stop introducing new offenses, while fixing old ones, an easy change was added. Look, how smart and simple that is!🤌😍
Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

In the upcoming rails, it will now be much easier to safely introduce counter caches to largish tables🤌. No more database triggers and other hacks! github.com/rails/rails/pu… Thanks to always awesome Jean Boussier for reviewing and merging!

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

The next rails version will have a bit more helpful logs by printing how many queries were made during the action execution (github.com/rails/rails/pu…). This can help to easily identify if the fix for N+1 works, or if caching works, or if the # of queries has been reduced, etc. 🤌

The next rails version will have a bit more helpful logs by printing how many queries were made during the action execution (github.com/rails/rails/pu…).

This can help to easily identify if the fix for N+1 works, or if caching works, or if the # of queries has been reduced, etc. 🤌
Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

Is there a sane reason to call .freeze on constants in ruby❓🤷‍♂️ It makes my eyes bleeding, and I see it is used everywhere all the times. It just makes no sense in some cases; in other cases, it protects from imaginary problems (e.g. from updates), making the code worse.

Is there a sane reason to call .freeze on constants in ruby❓🤷‍♂️

It makes my eyes bleeding, and I see it is used everywhere all the times. It just makes no sense in some cases; in other cases, it protects from imaginary problems (e.g. from updates), making the code worse.
Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

Following the support of hash syntax for `.where`, `.select` and `.order`, the next Rails version will also support hash syntax for `.pluck` / `.pick`⚡️ -github.com/rails/rails/pu…

Following the support of hash syntax for `.where`, `.select` and `.order`, the next Rails version will also support hash syntax for `.pluck` / `.pick`⚡️ -github.com/rails/rails/pu…
Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

People who use rails sharding and have at least a few tens of shards, do you see any problems with rails handling connection pools for them? Or some other nonobvious problems with sharding in rails? Please share your experience 🙏

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

I encourage people to test rubocop with --profile option on their projects. You may find some edge cases why it is slow in your app. Just identified a case where the gem was not able to finish processing one of our files. Quick profile and here we go ⚡️ - github.com/DmitryTsepelev…

I encourage people to test rubocop with --profile option on their projects. You may find some edge cases why it is slow in your app.

Just identified a case where the gem was not able to finish processing one of our files. Quick profile and here we go ⚡️ - github.com/DmitryTsepelev…
Sam Saffron (@samsaffron) 's Twitter Profile Photo

Latest ruby memory profiler allows for trivial profiling of Rails boot memory thanks to Dima Fatko 🇺🇦 gem install memory_profiler ruby-memory-profiler run -- bin/rails r 'Topic.first'

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

The best end of life for each extension library is to be merged into the core, imo. The newest sidekiq 7.3 merged 'sidekiq-iteration' gem, which makes it easy to deal with long-running jobs that iterate over large collections of items. Please, give a try. github.com/sidekiq/sideki…

The best end of life for each extension library is to be merged into the core, imo.

The newest sidekiq 7.3 merged 'sidekiq-iteration' gem, which makes it easy to deal with long-running jobs that iterate over large collections of items. Please, give a try. github.com/sidekiq/sideki…
Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

I am currently profiling a slow rake task and I know that the reason is *lots* of queries. Is there an *existing* tool that will show # of queries, top code lines producing the most queries etc. I am eager to write such a tool and interested if other people will find it useful🤔

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

Presenting a new gem for tracing Active Record, I wish existed earlier 😆 github.com/fatkodima/acti… Many times I crafted code to get similar reports like in the gem - to profile slow tests, rake tasks, jobs, find the most popular queries etc. I hope you will find it useful too.

Dima Fatko 🇺🇦 (@fatkodima) 's Twitter Profile Photo

The next ruby's standard 'net/http' version, which also ends up being used internally by many other http clients and different API client gems, will allow to globally set default timeouts (and not only them) to use if these were not provided upstream 🎉 github.com/ruby/net-http/…