Capybara: Preventing server errors from failing your test
Capybara can fail tests after all steps when the Rails server raises an error on session cleanup. Filtering known missing-file errors avoids false failures.
E-mail deliverability
High-volume transactional email often gets blocked by spam filters and denylist issues, making reliable delivery hard even with standard SMTP relays.
Parallelize Development Using Git Worktrees
Use git worktree to keep multiple working trees on one repository, so you can test, compare versions, and switch branches without disturbing current work.
Regular Expressions: Quantifier modes
Greedy, lazy, and possessive quantifiers change regex matching behavior and performance; poor choices can trigger heavy backtracking or even denial-of-service bugs.
How to list updateable dependencies with Bundler and Yarn
List outdated gems and packages that can be upgraded, with filters for allowed versions and dependency groups to narrow bulk updates.
Linux: How to make a terminal window title reflect the current path
Terminal emulators can show unhelpful titles like the shell name instead of the current directory. Bash and Zsh can update the window title automatically with an escape sequence.
DNS debug tools
DNS lookup tools help diagnose domain resolution, showing addresses, name servers, and resolver responses with different levels of detail.
Using the Truemail gem to validate e-mail addresses
Email address validation inside the app avoids external SaaS dependencies and can catch bad domains before sign-up. DNS-based checks with MX-only lookup balance reliability and safety better than SMTP probing.
Git diff: Deemphasizing code that was only moved around
Long diffs can hide real edits inside large code moves; git diff --color-moved=dimmed-zebra dims unchanged moved lines and highlights changes.
Capybara: Running tests with headless Chrome
Running Capybara system tests in Chrome without a visible window reduces CI friction and supports Docker, device emulation, PDF handling, and remote debugging.
How to negate scope conditions in Rails
Finding the opposite of an ActiveRecord scope is tricky with NULL values and older Rails versions; invert_where, subqueries, or Arel can negate conditions safely.
Ruby: How to determine the absolute path relative to a file
Use File.expand_path with __dir__ or __FILE__ to build file paths that stay correct regardless of the caller’s working directory.
CSS variables aka CSS Custom Properties
Live CSS custom properties cascade through the DOM and can be reused in other values, enabling flexible theming and Web Component styling.
Controlling issue grouping in Sentry
Sentry groups similar error events into one issue, and custom fingerprints or merge rules can combine timeouts and other recurring failures across code paths.
Rails: How to get the ordered list of used middlewares
rake middleware reveals the ordered Rails request stack, useful for adding, removing, or profiling middleware that runs on every request.
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.
Sentry: Different ways of deferring notifications for an issue
Persistent or unavoidable Sentry issues can still be monitored without email spam by using ignore constraints based on time, occurrences, or affected users.
Automatically validating dependency licenses with License Finder
Dependency licenses can break closed-source projects when unapproved OSS terms slip in. License Finder validates all dependencies during test runs and flags restricted licenses early.
ActiveRecord: String and text fields should always validate their length
String and text columns need model length validation to prevent database exhaustion and avoid runtime SQL errors on oversized input.
Shorthand function properties in ES6
ES6 object literals support concise method syntax and inline getters, replacing verbose function properties and Object.defineProperty() for simple computed values.
HTTP Client in RubyMine
RubyMine’s built-in HTTP client tests web APIs from .http scratch files, supports sequential requests, and can reuse response data with JavaScript variables.
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.
Ruby: Referencing global variables with the built-in English library
Ruby’s special global variables are harder to read and can fail without require 'English', especially in Rails where the library is not loaded by default.
Ruby / Rails: clone vs. dup vs. deep_dup
Copying Ruby objects can preserve or drop frozen state, singleton methods and mixins, while nested references stay shared unless a true deep copy is used.