Valuable Chrome DevTools Shortcuts

Chrome DevTools shortcuts speed up debugging by toggling the console drawer, adjusting style values faster, and manipulating elements without the mouse.

A short overview of common design patterns implemented within Rails

Rails code patterns help communicate refactor requests, improve code reviews, and introduce reusable approaches such as service objects, presenters, and query objects.

makandra tech survey - results

Survey results highlight common desktop environments, shells, command-line tools, editors, and Vim plugins used by the team.

Fix for mysql2 error "Incorrect MySQL client library version! This gem was compiled for x.x.x but the client library is y.y.y."

mysql2 runtime failures can stem from MariaDB/MySQL client library version mismatches on Linux, especially Ubuntu 22.04; LTS branches remove the client-version check.

Reading the Rails session hash from a Rack middleware

Accessing Rails session data inside Rack middleware is possible through env['rack.session'], which provides an ActionDispatch::Request::Session object.

Fixing flaky E2E tests

E2E tests often fail from race conditions between the test script, browser, and app. Stabilizing them means synchronizing actions, retrying checks, and reducing timing issues.

Fix: esbuild assets are missing after capistrano deploy

esbuild output can disappear after a Capistrano deploy when app/builds is not committed, leaving public/assets incomplete. Sprockets may ignore files in unknown paths.

Writing strings as Carrierwave uploads

CarrierWave needs a filename for string or stream uploads through ActiveRecord; a small StringIO wrapper with original_filename avoids TypeError and works with Zeitwerk.

PostgreSQL: How to show database size

pg_database_size returns a database’s size in bytes; pg_size_pretty formats it into readable units like GB.

The Easiest Way to Parse URLs with JavaScript

Parsing URLs is simpler with an <a> element than with new URL(...), and it also handles incomplete relative paths; IE11 may omit the leading slash.

Icon font vertical alignment in Windows

Icon fonts can line up differently across Windows, Linux and macOS, and vertical-align alone may not fix the baseline mismatch. Adjusting spacing with display:inline-block, padding and margins is often more reliable.

Hiding the clear input button of Edge (with EdgeHTML engine)

Edge and IE11 render a built-in clear button on text inputs that can conflict with custom UI; input::-ms-clear hides it.

Double loading issue with Ruby default gems

Bundler can activate a Ruby default gem before Gemfile.lock is evaluated, causing a version mismatch and Gem::LoadError when a newer installed release is required.

How to debug issues with zeitwerk and Rails

Zeitwerk autoloading problems in Rails can be hard to trace during boot; Rails.autoloaders.log! and bin/rails zeitwerk:check help reveal constant-to-file mapping issues.

Waiting for page loads and AJAX requests to finish with Capybara

Capybara browser tests can fail while page loads or AJAX requests are still pending; waiting for visible results reduces flickering and unreliable assertions.

Project maintenance: four levels of code quality

Code quality determines maintainability, from merely working code to reliable, readable, and changeable code. Long-lived projects need at least readable code; short-lived code can stop at reliable code.

Rails: Remove Blank Values from Collections

Rails collections often retain empty strings, nil, whitespace, empty arrays, hashes, and false values; compact_blank removes them from arrays and hashes in Rails 6.1+.

Ruby constant lookup: The good, the bad and the ugly

Ruby constant resolution can pick the wrong class through namespace fallbacks, causing autoloading bugs and unexpected references in Rails, especially with nested models.

CSS Support Guide for Email Clients

CSS support in e-mail clients is inconsistent, so HTML email styling often breaks across providers. A compatibility overview helps identify unsafe features before sending.

Postgresql: Paginate and count in one query using window functions

High-latency pagination queries can be reduced to one PostgreSQL statement by using COUNT(*) OVER() to return page rows and total rows together.

JavaScript: Testing whether the browser is online or offline

Browser connectivity can be misleading: navigator.onLine often stays true without usable internet. A real fetch with timeout can confirm whether requests actually work.

How to solve Selenium focus issues

Browser focus loss makes Selenium tests flicker red and green, especially with Firefox and parallel runs. Explicit focus and blur handling and focus-independent tests improve stability.

Squashing several Git commits into a single commit

Combining WIP changes into one clean commit reduces noisy history and simplifies merging feature branches, but rebasing can rewrite or lose commits if done carelessly.

You are not using filter_map often enough

Ruby 2.7 adds filter_map for combining selection and transformation in one pass, avoiding map/compact or select/map chains on any Enumerable.