Ruby: __FILE__, __dir__ and symlinks
Symlinked Ruby scripts can break relative path loading because __FILE__ points to the link path. __dir__ or File.realpath(__FILE__) keeps library paths correct.
Git: How to view a file from another branch
Access a file version from a different Git branch without checking it out, using git show with branch and path syntax.
Rails: Concurrency-safe API request counting with `upsert`
Lost updates make Ruby-side counter increments unsafe under concurrent API traffic; a Postgres upsert with a unique index performs atomic request counting.
Rails: Use fixture helpers like `users(:alice)` in the Rails console
Rails console fixture lookups are awkward when only fixture names are known; a small initializer adds users(:alice)-style helpers for loaded fixture records.
Rails: Restrict deletion of a parent record using scoped associations
Block parent deletion when specific child-record conditions exist by combining scoped has_many associations with dependent: :restrict_with_error and ordered callbacks.
Rules of thumb against flaky specs
Flaky specs often come from brittle matchers, nondeterministic record limits, and UI components that load or animate asynchronously.
Rails: Composing an ETag from multiple records
fresh_when can combine multiple records into one ETag so associated data keeps cached pages invalidated when any rendered record changes.
Unpoly 3.14.1, 3.14.2 and 3.14.3 released
Maintenance releases for Unpoly 3.14.1–3.14.3 add preserved viewport scroll positions, :has() support with Unpoly suffixes, and source maps in the npm package.
An introduction to Hybrid search
Hybrid search combines vector retrieval and BM25 keyword search to catch paraphrases and exact terms, improving recall when either method alone misses relevant documents.
How to disable irb's welcome banner or how to enable it for the Rails console
irb 1.18.0 adds a startup banner with version and hint information; it can be hidden or enabled in the Rails console through ~/.irbrc.
Ollama: Structured Input and Output
Reliable LLM integrations need prompts and parsers that keep retrieved context separate, constrain output shape, and recover from preambles, extra fields, or invalid JSON.
Printing background color of elements
Printed pages often drop background colors, which breaks charts and other colored elements. print-color-adjust: exact keeps backgrounds and preserves white text legibility.
Dynamic super-overridable methods in Ruby – The Pug Automatic
Ruby metaprogramming can generate methods that remain super-able inside the same class or trait, enabling reusable modular behavior.
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.
You don't need a vector database to build a RAG system
RAG can work with ordinary search: relevant results are placed into the prompt, and vector embeddings are only needed when synonyms and semantic matches become the main gap.
Claude Code productivity tips
Keyboard shortcuts, fullscreen TUI mode, status bar customization, and IDE integration make Claude Code easier to use and keep prompts, history, and code context visible.
How to auto-rotate images before OCR or computer vision tasks
Rotate scanned pages to upright before OCR or vision LLM processing; Tesseract OSD with sector probing improves orientation detection when pages are sideways, upside down, or noisy.
Tracking External API Performance in Rails Logs
Track time, call counts, and token usage for slow external APIs in Rails logs and Server Timing, making LLM regressions and prompt bloat visible without a debugger.
Faking and testing the network with WebMock
Network-dependent tests can avoid real HTTP by stubbing remote responses and asserting requests with WebMock, including query strings and bodies for GET and POST.
Handling NULL values in SQL comparison logic
NULL values break ordinary equality and negation checks in SQL, so rows can disappear unless queries handle unknowns explicitly with IS NULL, IS DISTINCT FROM, or COALESCE.
Optimizing images for LLM inference
Reducing image size and trimming whitespace lowers vision-token cost while keeping text readable; OCR-based strip slicing can keep dense pages within context limits.
Ollama: Strip image data from VCR recorded requests
VCR cassettes can bloat with base64-encoded vision payloads and leaked Basic Auth credentials; sanitizing request bodies and custom matching keep recordings small and playback reliable.
Ollama: How to generate deterministic results
Ollama output varies between runs by default; reproducible results require temperature: 0 and a fixed seed in request options.
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.