When I do a code review, one of the scariest things I see is logic like this: if Rails.env.production? do_additional_work end Why? Your beautiful tests and tightly integrated CI system won't execute that code. You won't see that code execute as you refresh your browser in development. From syntax errors ... Read more
Rails dominates Ruby web frameworks: the next most popular framework, Sinatra, has 5% of the popularity of Rails . However, that doesn't mean non-Rails frameworks like Sinatra and Grape don't have their place. When does it make sense to step away from ActionController and use another framework? What are the ... Read more
There are at least three ways in which you can control how much CPU time a process gets: Use the nice command to manually lower the task's priority; use the cpulimit command to repeatedly pause the process so that it doesn't exceed a certain limit; use Linux's built-in control groups, a mechanism which tells the scheduler to limit the amount of resources available to the process. Read more
Using the right Ruby interpreter to run your programs can make all the difference. Unfortunately, it can be tough to find resources about different Ruby interpreter options, or about how to choose the right one. Below, we’ve compiled a wealth of information about interpreters in Ruby. Even if you start this article asking "What is a Ruby interpreter?", you’ll learn exactly what you need to know to make the right decision. Read more
A couple of years ago I visited Argentina. I have trouble enough pronouncing my limited English vocabulary and I don't speak Spanish, but after a bit of time, it was pretty easy to order food, buy groceries, and use a taxi. However, occasional hangups that happen during my regular life ... Read more
Most scientific papers are unlikely to change your day-to-day approach as a Rails web developer. How not to structure your database-backed web applications: a study of performance bugs in the wild Yang et al., ICSE'18 is the exception to that rule. This study examined 12 popular, mature, opensource Rails apps ... Read more
Once your Rails app begins seeing consistent traffic, slow SQL queries will likely rear their ugly head, but how can you easily tell where your app is slowing down? Read more
Prior to adding Python performance monitoring , we'd written monitoring agents for Ruby and Elixir . Our Ruby and Elixir agents had duplicated much of their code between them, and we didn't want to add a third copy of the agent-plumbing code. The overlapping code included things like JSON payload ... Read more
If you've followed along with our previous episodes, we've covered many different aspects of setting up a production service. We've used many different products to simplify the day-to-day operations of running and maintaining an application. We've used Scout for monitoring our application, LogDNA for aggregating our logs, HoneyBadger for our ... Read more
Looking for a fresh, 2018 approach to deploying a Rails app to AWS? We've partnered with DailyDrip on a series of videos to guide you through the process. We're covering how to Dockerize a Rails app, AWS Fargate, logging, monitoring, setting up load balancing, SSL, CDN, and more. In the ... Read more