ruby
ruby
git
How to enable signing commits in Git using GPG keys
Signed Git commits set up in minutes: the modern SSH key method for git 2.34+, from gpg.format ssh config through adding your key on GitHub, so your commits get the Verified badge. Commands included for Mac and Linux.
react
React Code splitting using lazy load techniques
React code splitting with React.lazy and Suspense: break a growing bundle into chunks users download only when needed, with a walkthrough of lazy imports, fallback UI, and why smaller initial loads help user experience and SEO.
Latest
Ruby Hash destruction like from Javascript world (and reconstruction)
Ruby hash destructuring can feel as smooth as JavaScript: the rightward pattern matching syntax extracts values from a hash in one line, renames them, destructures arrays, groups elements, and rebuilds hashes afterwards. Practical examples for cleaner Ruby code.
Powerful switch statement with pattern matching in Ruby
Pattern matching in Ruby turns case statements into a precise switch over data shapes: match and destructure hashes from an API response, combine several patterns in one branch, capture values across patterns, and validate configuration. Ruby 2.7+ syntax examples.
How to deal with infinite scroll in React
Infinite scroll in React gets much easier with react-query: the useInfiniteQuery hook fetches posts page by page, cancels stale requests with AbortSignal, and exposes fetchNextPage for loading more. A complete typed example wrapped in a reusable usePosts hook.
How to simplify TypeScript types and reduce documentation overhead
TypeScript types with many optional fields need comments to explain what goes together. Discriminated unions fix that: split a Task type into per-status variants so invalid combinations fail to compile and the type documents itself. Before and after code included.
Monkey patching in Ruby done right - refine method with prepend and include
Monkey patching in Ruby without global damage: why reopening a class like DateTime directly backfires, how prepend and include change the ancestor chain safely, and how refine limits your patch to a single scope so the rest of the codebase stays untouched.