Personal Assistant
Home Settings
Daily Digest Newsletters Papers Ruby Posts AI Posts Ruby: Blogs and News AI: Blogs and News Gem Updates Gem Discoveries Digest Tweets
Twitter Lists Bluesky Lists RSS Lists Tracked Gems
Sign in Explore
@syedaslam

Syed Aslam

@syedaslam

Memoizing with ||= in Ruby looks clean and idiomatic, until your domain evolves and "false" becomes a legitimate cached value. Here's why ||= doesn't mean "if unset" (it means "if falsey"), and how that subtle distinction silently kills performance. https://syedaslam.com/posts/when-or-equals-betrays-your-memoization/

syedaslam.com

When ||= Betrays Your Memoization | Syed Aslam

Why Ruby's ||= operator can cause subtle bugs when memoizing boolean flags, and how to fix it.

syedaslam.com

3:26 PM · Feb 21, 2026