The "current pattern" is a technique that allows you to access some per-request data easily without having to explicitly pass it around everywhere. The current pattern, used judiciously, will help clean up your code and make your life swell!
PostgreSQL database locks usually work seamlessly until they don't. Before your Rails app dataset and traffic reach a certain scale, you're unlikely to face any locks-related issues. But if your app suddenly slows down to a crawl, deadlocks likely are to blame. In this blog post, I'll describe how to monitor database locks and propose best practices to prevent them from causing issues.
A few weeks back, I was woken up at 4:30am by my wonderful 1-year-old daughter. I found I had a Twitter DM from my internet-friend Jon Yongfook, and it was sent just a few minutes prior. It turned out Jon was experiencing a DDoS attack.