News

Why use Factory Bot instead of creating test data manually?
I recently taught a Rails testing class where we wrote tests using RSpec, Capybara, Factory Bot and Faker.During the class, one of the students asked, why do we use Factory Bot? What’s the advantage over creating test data manually?The answer to t...

Catch a batch: Making Mayhem 5 times more responsive
Milliseconds matter: that’s equally true for Olympic champions, online gamers, and gaming startups. Even little breakdowns in an online platform backend like excessive database calls or in-memory data manipulation can severely slow down the gaming...


Limit Everything: Timeouts for Shell Commands in Ruby
I have talked about limiting everything before, but I love examples, so I thought I would start bringing some out of the woodwork. How many times have you whipped out backticks or one of the million other ways you can shell out in Ruby? If you are...

Why does Rails 6 include both Webpacker and Sprockets?
Since you're reading this post, chances are you've heard Rails 6 installs both Webpacker and Sprockets and you're wondering WTF is going on. By the way, it's a whole May of WTFs for Rails.Wait, don't Sprockets and Webpacker basically do the same t...


The Secret to Rails OO Design - Literate Programming
I often tell people that I learned Ruby via Rails. This is pretty much the worst way to do it, but I'd learned so many programming languages by then that it didn't hinder me too much. The one thing that it did do, however, was give me a slightly t...



Ruby adds experimental support for end-less method definition
Ruby has added a new method definition syntax as an experimental feature.As to why:Ruby syntax is full of “end”s. I’m paranoid that the ends end Ruby. I hope Ruby is endless. So, I’d like to propose a new method definition syntax.- mame (Yusuke En...