When saving computed values in the database in your rails app, you must be aware that is possible to find unexpected errors in the result thanks to race conditions.
Here I want to help you visualize how race conditions can make you save incorrect...
Working remotely may not seem like the sort of environment where burnout thrives, but it is. Learn about ways to avoid common pitfalls and lead a more balanced work life.
If your company has distinct product and growth teams, I’m willing to bet you’ve seen or felt something about their relationship that doesn’t quite sit right with you. What you’re sensing is dysfunction. It might not be catastrophic levels of dysfunction, but make no mistake, it's impacting your product growth and probably taking casualties along the way, with people on the teams feeling frustrated and adversarial.
Ever need a simple way to retry a block of code in ruby? Maybe you need a maximum number of retries? Exponential backoff? Different handling for different exceptions?
Hey, this week, I am bringing you Active Record tricks to find records with missing associations or with associated records only, and to negate your conditions.
Several years ago, I made a plea to save scoped CSS. One of the top features on my CSS wishlist was on the chopping block, and despite a pretty big push from th
Imagine that you need to put the number of likes for each post in a list, but avoiding n+1 queries.
posts.each do |post|
post.likes.count # n+1 queries
end
One way to avoid n+1 queries here, is to preload the association and the count the records...
Your domain expertise is essential to your job, but it just might be one of the things getting in the way of you being a truly great engineering leader.