makandra dev

YJIT is Ruby's default just-in-time compiler. It is considered production-ready since Ruby 3.2 (source).

Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy...

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...

I noticed that tig 2.5.1 that is provided by Ubuntu 22.04 repositories has inferior bash completion than older versions after...

If a Cucumber run deletes your application directory, an integration fail between Capybara and Capybara Screenshot may be the cause...

While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...

github.com

When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help.

This talk shows simple and advanced usages of the ruby/debug debugger. It goes through a step by step debugging workflow...

On our Ubuntu machines we have nautilus file manager with nautilus-extension-gnome-terminal installed. This adds an entry to...

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...

Rails 7.1 added a new method Rails.env.local?. If you want to stub the Rails env correctly, use ActiveSupport::EnvironmentInquirer like...

esbuild comes with a minifier that is good enough for most cases. If you're looking to squeeze out as...

Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed...

With this command you can run all the spec files which have been edited or added in the current branch...

testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods...

It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...

I recently stumbled over a quirk in the way Ruby handles local variables that I find somewhat dangerous. Consider:

github.com

I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...

makandra dev

While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...

When Rails releases a new version of their gems, they also release a number of npm packages like @rails/activestorage or...

Modern JavaScript includes Intl.NumberFormat to format numbers in different formats and locales. In this card, we describe a wrapper for...

This cards describes an example with a Github Client on how to keep your Rails application more maintainable by extracting...

ActiveModel classes have a class method .human_attribute_name. This returns a human-readable form of the attribute: Person.human_attribute...

In Rails 7.1 it has become possible to annotate partials with the locals they expect: # partial _user_name.erb <%# locals: (user:) %>