How to find child nodes that match a selector with JavaScript
Direct child selection with querySelectorAll is awkward without :scope; :scope > ... targets only immediate descendants instead of every matching descendant.
Code splitting in esbuild: Caveats and setup
esbuild code splitting can reduce main-bundle size, but multiple entry points, chunk cascades, and import-order changes can break builds or runtime behavior.
RubyMine and Rubocop: Performing safe autocorrects on save
Enable safe RuboCop autocorrect in RubyMine on save, trading a small save delay for automatic fixes; bulk edits can become slow.
RubyMine: Fixing "Rubocop returned exit code -1. See the logs for details"
RubyMine can show "Rubocop returned exit code -1" when the installed Rubocop version is outdated or incompatible. Updating rubocop often resolves the error, and idea.log helps confirm the cause.
We now have our own memoization gem "Memoized"
Forked memoizer methods now keep their original arity and run faster on repeated calls within the same request.
Cucumber: Identifying slow steps that drag down your test speed
Cucumber test suites can hide slow steps that waste most runtime. --format usage measures step durations and highlights optimization candidates, especially when waiting assertions surface previous delays.
Balance your texts with text-wrap: balance
text-wrap: balance evens out awkward heading line breaks and improves readability for short text blocks, with browser support limited to four lines in Chrome.
Checklist for Implementing Design
Design changes need more than visual parity: implementations should be tested, responsive, touch-friendly, accessible, localized, and consistent with existing patterns.
Ruby: alias_method conflicting with prepend
alias_method can break when a method is later overridden with prepend, causing recursion or bypassing the added behavior.
Best practice: How to manage versions in a package.json
Lockfile-based installs make package versions reproducible, so package.json ranges are usually unnecessary; pinning helps only when avoiding bad releases or unwanted upgrades.
Best practice: How to manage versions in a Gemfile
Gem version pins in Gemfile are usually unnecessary because Gemfile.lock fixes installed versions; use constraints only for lockfile-free setups, known regressions, or blocked upgrades.
RSpec 3 argument constraints use weak equality
RSpec 3 argument matching can accept broader values than strict equality, especially for classes, regexps, and ranges. Use eq or a block for exact expectations.
Rails < 5: How to get after_commit callbacks fired in tests
Transactional test fixtures can suppress after_commit callbacks in Rails, preventing email jobs and other post-save work from running. Rails 5 fixes this; older versions can use test_after_commit.
Local deployment after pipeline succeeds
CI-only workflows can delay local deployments until a commit lands on the branch. A shell alias can wait for the next update and trigger cap staging deploy automatically.
How to configure case insensitive git output
Git diff output uses less, and repeated case-insensitive searches are easier when less -i is configured globally.
Geordi 9.6.0 released: new "did you know?" feature
Geordi suggests related commands and options after successful runs, surfacing hand-picked hints with a low random probability.
Find Where a Rake Task is Defined
rake --where reveals the source file and line that define a task, useful for tracing where assets:precompile comes from.
Vim: Simple way to edit several lines at once at the same cursor position
Column editing in Vim lets the same change be applied to several lines at one cursor position. Ctrl+v visual block mode and insert mode make repeated edits fast.
Capo: putting <head> content into the right order
Head element order can affect perceived page performance, and Capo helps identify out-of-order elements and suggest a faster arrangement.
About Ruby's conversion method pairs
Ruby distinguishes explicit and implicit conversion methods; implicit ones like to_hash should only be implemented when an object already behaves like the target type.
Testing shared traits or modules without repeating yourself
Shared behavior in traits or modules can be tested once with RSpec shared example groups instead of duplicating specs for each class.
How to: Run bundle install in parallel
Parallel bundle install speeds up gem installation during development when switching projects often; bundle config jobs sets the number of worker processes.
ss: How to show listening ports
ss lists open TCP and UDP ports and the processes bound to them, making it easier to find what is listening on a local machine.
Raising JavaScript errors in Ruby E2E tests (RSpec, Cucumber)
Selenium E2E tests can miss frontend JavaScript errors because browser console logs do not fail specs by default. BrowserConsole raises on console errors and supports ignore rules.