What is a reduction and why Fibers are the answer for Ruby concurrency | julik live

Ruby concurrency relies on different primitives, and Ruby 3 changes make Fibers a stronger fit for lightweight parallel control flow.

Guide to localizing a Rails application

Rails app localization affects text, URLs, formats, images, caching, and time zones; estimating effort means checking each layer for language-sensitive behavior.

Case sensitivity in PostgreSQL

PostgreSQL compares strings case-sensitively, which can break email and username lookups and uniqueness checks. Lowercasing values or using case-insensitive matching avoids common bugs.

How to Make Your Code Reviewer Fall in Love with You

Better code review habits help reviewers focus on meaningful feedback, reduce friction, and speed your own learning while making future reviews easier.

PostgreSQL: How to use with_advisory_lock to prevent race conditions

Prevent concurrent processes from running the same code at once with PostgreSQL advisory locks. Useful when no row exists to lock and a timeout or failure response is needed.

Allow capybara to click on labels instead of inputs for checkboxes

Custom-styled checkboxes with hidden inputs can’t be toggled by Capybara’s check and uncheck; allow_label_click: true lets tests click the label instead.

Fast rubocop autocorrection alias

rubocop autocorrection can be slow on large codebases because it scans sequentially; a parallel precheck narrows the files before running -a.

The numericality validator does not care about your BigDecimal precision

validates_numericality_of converts values to Float or integer, so high-precision BigDecimals can round and fail comparisons unexpectedly.

What edge_rider offers you

ActiveRecord relation helpers reduce object instantiation, simplify association traversal and preloading, and bridge Rails version differences with a unified API.

Be careful when using buttons without a "type" attribute

Buttons without a type attribute default to form submit behavior, so pressing Enter can trigger the wrong action. Set type="button" for non-submitting buttons.

We have deprecated Rack::SteadyETag

Rack::SteadyETag generated stable ETags for responses that only changed in CSRF tokens or CSP nonces. Rails apps should be configured to return identical HTML for the same resource and user.

Operators "in" and "of" are very inconsistent between CoffeeScript and JavaScript

in and of mean different things in CoffeeScript and JavaScript, making property checks and iteration easy to mix up.

Test-Driven Development with integration and unit tests: a pragmatic approach

Dogmatic red-green-refactor TDD can be tedious; a pragmatic mix of integration and unit tests uses scenario titles as a todo list and supports iterative development.

Modern CSS supports individual transform properties

Individual transform properties make CSS transforms easier to read, animate, and maintain, with broad browser support for scale, rotate, and translate.

ASDF: A Version Manager To Rule Them All

asdf manages multiple runtime versions through one CLI and supports legacy version files like .nvmrc and .ruby-version for smoother migration from rbenv.

Jasmine: Preventing unhandled promise rejections from failing your test

Async rejections can fail Jasmine tests as unhandled promise rejections when the promise is not awaited or returned. jasmine.spyOnGlobalErrorsAsync() lets tests ignore or inspect the global error.

Take care of indentation and blank lines when using .erb for plain text emails

Plain text .erb emails preserve indentation and blank lines, so indented template code can insert unwanted spaces or extra newlines. Trim mode and unindented markup prevent formatting bugs.

RSpec: Run a single spec (Example or ExampleGroup)

Limit a test run to one example or group with :focus, fit, fdescribe, or fcontext; unfocused suites fall back to running everything.

CSP: strict-dynamic

CSP nonce-based policies can replace brittle host allowlists, while strict-dynamic lets trusted scripts load additional scripts in modern browsers.

Jasmine: Adding custom matchers

Custom Jasmine matchers add reusable expectations for tests, including tailored pass/fail logic and clearer failure messages.

Use find_in_batches or find_each to deal with many records efficiently

Processing large record sets can exhaust memory when loading everything at once. find_in_batches and find_each keep memory usage lower for long-running data updates.

CSS: Combining different length units with calc()

calc() enables CSS values to combine percentages and absolute units, such as sizing an element to fit a container with fixed side margins.

How to fix: irb / rails console randomly crashing

irb and rails console can crash unpredictably because of multi-line autocomplete; disabling it may stop the failures.

Sidekiq 7: Rate limiting with capsules

Sidekiq 7 capsules let queues run with separate concurrency limits, useful for protecting apps or APIs from too many parallel jobs.