Why has_many :through associations can return the same record multiple times
has_many :through can return duplicate records when multiple join rows point to the same target; :uniq or DISTINCT removes repeated results.
Git: Switching back to the previous branch
git checkout - returns to the previously used branch, and the same shortcut can reuse the last branch argument in commands like git merge.
Rails: Testing file downloads with request specs
File downloads are slow and fragile to test through Capybara. Request specs make exports fast, stable, and easy to verify, with a small end-to-end check for the link.
List of handy Ruby scripts to transcode different file types (often by using GPT)
Tiny Ruby CLI scripts convert text, images, audio and video with GPT, ffmpeg and ImageMagick, avoiding browser uploads and manual parameter tweaking.
MySQL: Disable query cache for database profiling
MySQL query caching hides true database timings during profiling; disabling it and Rails per-request caching reveals actual query costs.
How to write a good changelog
A changelog records notable release changes in chronological order and helps users and contributors track breaking and compatible updates.
Carrierwave processing facts
CarrierWave processing runs differently on originals and versions: class-level processing affects only the original file, while callbacks run for each file instance.
Ubuntu: Disable webcam microphone
System-wide webcam microphone disablement in Ubuntu prevents external USB webcams from being used as audio inputs in PulseAudio and meeting apps.
Ruby on Rails: Finding a memory leak
Memory leaks in Ruby on Rails can be hard to isolate. rbtrace, ObjectSpace.trace_object_allocations_start, heapy, and sheap help trace allocations and narrow down the source.
Geordi 10.0.0 released
Geordi 10.0.0 adds console and test-runner fixes, IRB configuration, and safer PostgreSQL dump restoration, with breaking changes to database drop handling.
Grid by Example: a website about CSS Grid
A curated CSS Grid resource with video tutorials, layout examples, and copy-paste patterns for learning grid placement and track sizing.
Chaining Capybara matchers in RSpec
Chaining Capybara matchers with and retries the full expectation when one check fails, making multiple assertions more reliable on pages that change asynchronously.
UX details for web developers
Implementation details shape a better web interface and prevent common UX and accessibility problems. A living checklist helps developers meet expected behavior.
CSS: Opacity is not inherited in Internet Explorer
In Internet Explorer, opacity on non-static elements may not affect child content, causing fading or hiding bugs. A non-static position on the parent restores the expected behavior.
Understanding z-index: it's about stacking contexts
z-index only matters inside a stacking context, so huge values rarely help. isolation: isolate creates a new context with minimal side effects.
Imagemagick: Batch resize images
Batch resizing images with mogrify updates files in place, while convert writes new output files for thumbnail workflows.
Accessibility: Making non-standard elements interactive
JavaScript-made controls can be mouse-only, leaving keyboard users and screen readers unable to focus or activate them. Use semantic elements, tabindex, ARIA roles, or up-clickable for accessible interaction.
Top Accessibility Errors in 2023
Top accessibility mistakes still block keyboard and screen-reader users: missing text alternatives, broken labels, and tab-order errors are common and easy to miss.
Virtual scrolling: A solution for scrolling wide content on desktops
Wide tables on desktop can be hard to scroll without moving the rest of the page or hiding the scrollbar off screen. Reusing the page scrollbar with position: sticky and translateX keeps the content centered.
Getter and setter functions for JavaScript properties
Property access can trigger custom logic in JavaScript, enabling virtual fields like fullName and read/write synchronization without explicit function calls.
RSpec: Where to put custom matchers and other support code
Custom RSpec matchers and support code need a clear home in spec/support to keep specs DRY and make shared helpers available everywhere.
Developer Soft Skills
Judging when refactoring, optimizing, canceling work, or asking for help saves time and keeps development effort focused on changes with real payoff.
How to not repeat yourself in Cucumber scenarios
Avoid duplicated Cucumber scenarios by sharing setup and assertions with step composition, helper modules, or scenario outlines. Better reuse keeps integration tests DRY and stack traces readable.
RSpec 3 allows chaining multiple expectations
Multiple RSpec checks on one subject can be chained with and or or, avoiding repeated setup and keeping a single call under test.