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.
Using the Oklch color space to generate an accessible color palette
Oklch keeps derived colors aligned as a base color changes, preserving contrast more reliably than RGB or HSL for accessible palettes.
Understanding database Indexes in PostgreSQL
Unused and duplicate database indexes can slow writes, waste storage, and complicate maintenance in PostgreSQL; SQL one-liners help identify candidates for cleanup.
How to create a multiline map in SASS/SCSS
Large Sass/SCSS maps become hard to read when they grow, and multiline map syntax is unsupported in .sass. Using .scss avoids parser errors.
Rubymine: Configure CTRL + ALT + SHIFT + c to work with "Test Source Roots"
RubyMine test navigation depends on marking test folders as Test Sources Root; remapping CTRL + ALT + SHIFT + c can copy repository-relative paths like spec/foo_spec.rb instead of foo_spec.rb.
Webpacker: Configuring browser compatibility
Browser support in Webpacker depends on both Babel and UglifyJS; mismatched settings can break legacy browsers like IE11 even when JavaScript is transpiled.
Do not use transparent PNGs for iOS favicons
Transparent apple-touch-icon images on iOS turn black in Safari, so solid backgrounds prevent ugly home-screen and bookmark icons.
How Haml 6 changes attribute rendering, and what to do about it
Haml 6 renders most custom attributes verbatim, so falsy values no longer remove them. Boolean attributes keep special handling, and Haml::BOOLEAN_ATTRIBUTES can extend that list.
Rails: Assigning associations via HTML forms
Rails forms can assign tag associations in several ways, from array columns to join models; nested attributes keep tag changes in one transaction.
Rails cache connection settings
Redis cache connections in Rails can be tuned with custom timeouts, reconnect behavior, and error handling to avoid slow cache operations and missed connection failures.
Simple Form: Rendering errors without an appropriate attribute
ActiveRecord base errors do not render in Simple Form by default; they need explicit handling to display form-wide validation messages.
Using Capybara finder methods with arbitrary matching conditions
Capybara matchers and finders can take a Ruby block for extra DOM conditions when built-in options are not enough. Script calls inside filter blocks need a temporary wait time to avoid Selenium timeouts.
Project management best practices: Technical debt summary
Prioritizing refactoring and upgrade work is harder in larger projects; a maintained technical-debt summary helps compare effort, customer value, and developer value.
How not to turn your application into a spam relay
Abused sign-up and password-reset emails can turn applications into spam relays when user input is reflected in messages. CAPTCHAs, rate limits, and avoiding arbitrary text reduce the risk.
JavaScript: Detecting the end of native smooth scrolling
Native smooth scrolling has no built-in completion signal; scrollTo() and scrollIntoView({ behavior: 'smooth' }) do not return promises, so a scroll idle timeout can wait for the animation to finish.
Rails: Rescuing exceptions for specific exception types
Rails can map selected exceptions to non-500 responses and suppress error monitoring noise, such as returning 404 for missing records or denied access.
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.
Storing trees in databases
Tree data in relational databases can be stored with parent links, paths, nested boundaries, or closure tables; the choice trades write cost against read speed.