Tbh I had no idea this was even a thing until recently. I've been working with Rails for a while now and somehow never came across it. So let me explain it the way I understood it. You know how we normally do associations in Rails, User has many Posts, Post belongs to User. Two different models, two different tables. Simple. But what if a model needs to reference itself? Like same table, same mode
Let me rewind to a Tuesday afternoon I’d rather forget. We had a Rails monolith that had grown fat and happy over five years. The dashboard—a beautiful, chart-filled monster—was running a 12-second query every time the CEO clicked “refresh.” Twelve seconds of GROUP BY, COUNT(DISTINCT), and LEFT JOIN hell across a million-row events table. The CEO didn’t yell. He just stared at the spinning cursor
I'm a fullstack web developer with 6 years of experience. Python, Rust, JS, databases, and APIs. That's my day job. I had never touched electronics. A few weeks ago, I decided to build CyberKey. The itch came from something boring at work: my VPN disconnects when I lock my computer, and I have to type a TOTP code several times a day. Unlock my phone, open the authenticator app, read the code, type