How to iterate over an Enumerable, returning the first truthy result of a block ("map-find")

Need the first derived value from a collection without mapping everything twice; Ruby can do it in one pass with break or lazy filter_map.

Heads up: Capybara 3's text matchers no longer squish whitespace by default

Capybara 3 no longer squishes whitespace when matching text across elements, so tests that relied on rendered text comparison can fail unless normalization is enabled.

RubyMine: Efficiently filtering results in the "Finder" overlay

RubyMine Finder searches can return huge result sets; file masks, directory limits, regex, and other filters narrow matches and speed up locating the right code.

Testing for Performance: How to Ensure Your Web Vitals Stay Green

Frontend changes often erode loading speed and visual stability. Web Vitals tests can lock in LCP and CLS scores by checking them in the browser under throttled network conditions.

How to auto-resize a textarea (or other inputs) in pure CSS

field-sizing: content lets textareas and other inputs grow to fit their contents, but Firefox and Safari still need a JavaScript fallback.

You don't always need a custom matcher to write clean RSpec tests

Repeated RSpec assertions can be extracted into custom matchers, but some cases are better served by private helper methods when reuse would be too awkward.

Different ways to set attributes in ActiveRecord

ActiveRecord attribute assignment methods differ in persistence, validations, callbacks, timestamp updates, and readonly handling across Rails versions.

Error handling in DOM event listeners

DOM event handler exceptions are swallowed, so later listeners and dispatchEvent() continue running. Uncaught errors still reach the browser log and window error event.

Don't sum up columns with + in a SQL query if NULL-values can be present.

+ arithmetic in SQL turns the whole result NULL when any operand is NULL; SUM and COALESCE(..., 0) avoid silent loss of totals.

Inspecting the page content in Capybara

Debugging Capybara page output often requires inspecting visible text, raw HTML, or parsing page.body with Nokogiri when matcher failures are hard to interpret.

Rails: How to write custom email interceptors

Global mail interception in Rails can prefix subjects by environment and redirect staging mail to a fallback address unless recipients are allowlisted.

Differences between transactions and locking

Concurrent database access needs two different tools: transactions for atomic multi-row changes and locks for exclusive access; using the wrong one causes lost updates and deadlocks.

Rails: Report CSP Violations to Sentry

CSP violations can be sent to Sentry for monitoring, but browser extensions and high-traffic sites may generate noisy reports and filtering remains limited.

Simple gem for CLI UIs

Small dependency-free library for interactive terminal input and progress bars in CLI apps, with filtering prompts and basic formatted output.

Gatekeeping: Guide for developer

Developer workflow for review-gated changes in Linear and GitLab, with branch, merge, reject, and staging steps to reduce client rejections.

Cancelling the ActiveRecord callback chain

ActiveRecord callback chains can halt or roll back transactions differently across Rails versions, and accidental false returns may stop legacy callbacks.

RSpec: How to define classes for specs

RSpec constants declared in specs leak into the global namespace, risking name collisions and brittle tests. Use stub_const, a Class.new variable, or self:: to keep helper classes isolated.

Adding comments to ambiguous database columns

Ambiguous database columns can need schema comments when meaning depends on history or code. Units, boolean flags, timestamps, and STI-specific fields benefit most.

Style Guide for Git commit messages

Git commit messages benefit from a clear subject, concise length, and imperative wording, with a body that states what changed and why.

Taking screenshots in Capybara

Capybara test failures can save screenshots and HTML automatically, with manual capture also available through save_and_open_page, save_screenshot, or Rails ScreenshotHelper.

Chrome DevTools: Treasure (Overview)

Chrome DevTools provide practical tools for performance analysis, debugging, breakpoints, throttling, and layout inspection in everyday web development.

JavaScript: Sharing content with the native share dialog

Native share dialogs on mobile and desktop let users hand off links, text, and titles to installed apps; navigator.share works only on HTTPS pages.

RSpec: Inferring spec type from file location

RSpec Rails can infer spec behavior from file location, removing manual type tags and enabling request helpers like get and post where appropriate.

How to: Self-hosted fonts via NPM packages

Self-hosted webfonts can satisfy GDPR requirements without bundling font files manually. Fontsource NPM packages include weights, glyph sets, and smarter CSS loading.