How to use Ubuntu in English, but still show German formats
Keep Ubuntu in English while displaying dates, money, paper sizes and other regional formats in German by setting mixed locale variables.
Git: Rebasing dependent feature branches
Dependent feature branches need an explicit git rebase --onto after the base branch is squashed, or Git may replay already-merged commits and cause conflicts.
RSpec: Defining helper methods for an example group
Helper methods can be defined inside an RSpec example group and inherited by nested groups, but not by parent or sibling groups.
How to define a table prefix for all Rails models in a namespace
Rails namespaces can produce doubled table prefixes when table_name_prefix is set on individual models. Defining it on the namespace module keeps nested model table names correct.
How to find out what is running on a port on a remote machine
Remote ports can hide unexpected services, and nmap can identify the daemon and version behind a TCP port. Useful when a server exposes the wrong service or response.
RSpec Argument Matchers: Expecting non-primitive objects as method invocation arguments
RSpec can verify method arguments that are objects by class, interface, attributes, equality, or custom block checks instead of simple primitive values.
Managing chrome versions for selenium
Browser and driver mismatches can break Selenium tests; Selenium Manager can fetch matching Chrome and chromedriver versions automatically, though the first run is slower.
Webpack(er): Analyze the size of your JavaScript components
Keep JavaScript bundles small with webpack-bundle-analyzer, which visualizes module size and highlights large chunks before production.
Custom error pages in Rails
Custom Rails error pages can be rendered through controllers instead of static public files, allowing layouts, helpers, and tests for 404 and 500 responses.
Don't forget: Automatically remove join records on has_many :through associations
has_many :through associations can leave orphaned join rows after deleting a parent record. dependent: :destroy removes the join records while keeping the associated records.
Rails: Handling actions that need to happen after all transactions
ActiveRecord.after_all_transactions_commit runs work only after every open transaction commits, or immediately when none is open. It suits side effects like email delivery after persisted state changes.
Rails: Testing exceptions with the rescue_responses setting
Rails 7.2 changes show_exceptions defaults in tests, so rescued RecordNotFound often becomes a 404 response instead of a raised exception.
RSpec: Defining negated matchers
RSpec::Matchers.define_negated_matcher creates readable inverse matchers for composed expectations and clearer failure messages, but only for atomic matchers with unambiguous negation.
A modern approach to SVG icons
SVG icons can be sized and colored like text without image tags, icon fonts, or extra server work by using CSS masking.
Regex: Be careful when trying to match the start and/or end of a text
Regular expressions can accept embedded newlines when ^ and $ are used; \A and \z anchor the whole string and avoid unsafe validation matches.
Statistics and Reports on Web Performance Optimization
Web performance optimization affects user experience and business metrics, with case studies and experiments showing measurable gains from faster sites.
How to use Parallel to speed up building the same html partial multiple times (for different data)
Parallel rendering can speed up repeated partials for long lists, but database connections must be cleaned up and transaction-based test setup may break.
Choosing the right gems for your project
External libraries add maintenance and security risk, so picking a Ruby gem needs attention to necessity, test quality, license, maturity, and scope fit.
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.