You should use Rails when Rails' assumptions match yours. But what are Rails' assumptions?
YJIT is a JIT built into CRuby 3.1.0 and higher. YJIT blends three (and more) different languages together. It gets a lot of its power from that. Programmers do that trick in almost every large project. Let's talk about what that looks like, what it means, and what YJIT can show us about it.
In 2024, I’ll have been a programmer for 40 years. If you want to be a programmer for a long time, I have some recommendations. I’ll tell you things that didn’t make sense to me when I started, and now they’re the guiding stars in my sky. That means it’s not about specific technologies. Technologies come and go. Languages come and go. They can’t be your sky.
Most talks are bad. Most slides are terrible. But by treating your talk as a comic, or similar visual story, you can do far better. Also, then there are great sources to steal from. Let's talk about how to make a presentation that ***isn't*** awful, including insights from Scott McCloud's 'Understanding Comics' and a few other good references.
Imagine if you could just pick up any coding problem and solve it. There's a way to get that "fingertip feel" for coding. And it comes from mindful, conscious practice.
Coding exercises are... fine. But there's a kind of exercise we can steal from another industry that works incredibly well. After this talk, you'll be able to create coding studies for yourself, not just find other people's exercises that are already worked out for you.
The talk is in Ruby. But the technique works with any language, library or paradigm. It's also good for pairing.
Ruby keeps getting faster. And people keep asking, "but how fast is it for Rails?" Rails makes a great way to measure Ruby's speed, and how Ruby has changed version-by-version. Let's look at six years of performance graphs for apps big and small. How fast is 2.6.0? With JIT? How close is Ruby 3x3?
Rails 'magic' is just Ruby metaprogramming. You can understand Ruby's metaprogramming features and Rails' more unexpected systems in one go by building your own Ruby MVC web framework, structured like Rails.
This is a three-hour workshop, as delivered at RailsConf 2019 and Southeast Ruby 2019 (sorry, no video!). So I've helped over a hundred people debug this live as they typed it in :-)
Ruby 2.6 added a JIT implementation, called MJIT. How did it happen? How does it work? How do we use it? What code does it work well or poorly on? All this and more... But the video hasn't posted, alas, as of the beginning of 2020.
"The Ruby memory system can be tricky. Configuring it isn't easy. I'll show you a new simple tool to optimize your Ruby binary's memory settings.
You'll learn about the CRuby memory resources and how you check them. Let's optimize your memory usage to keep memory small and keep garbage collection fast."
"How much faster is current Ruby than Ruby 2.0 for a production web application? Let's look at a mixed workload in the real commercial Discourse forum software. We'll see how the speed has changed overall. We'll also examine slow requests, garbage collection, warmup iterations and more. You'll see how to use this benchmark to test your own Ruby optimizations."
A presentation to the Toronto Ruby Brigade of The Littlest ORM, the Five-Minute Ruby
Framework and Just Build Your App on Rack.
"Ever wonder how Sequel, ActiveRecord or DataMapper work? Let's build a working mini-ORM, complete with an application and tests! Ruby makes it surprisingly easy. We'll go over all the code in 30 minutes. There will be a GitHub link so you don't have to type furiously."
"How much faster is current Ruby than Ruby 2.0 for a production web application? Let's look at a mixed workload in the real commercial Discourse forum software. We'll see how the speed has changed overall. We'll also examine slow requests, garbage collection, warmup iterations and more. You'll see how to use this benchmark to test your own Ruby optimizations."
At OnSite Manager, Inc, we took an old established Java application and added JRuby and Ruby on Rails
"on top" of the existing application as new and replacement views and subsections of the application.
In this talk, I discuss the approaches we used for this work.