What’s your type? Generating type signatures with Sorbet and Tapioca
Blue Ridge Ruby 2023 • June 2023 • Asheville, NC • ↗ slides
You’ve likely heard of Sorbet, a gradual type checker for Ruby. Using Sorbet, developers can harness the flexibility and creativity of a dynamic language like Ruby, while also benefitting from the safety of typing.
However, in most apps, Sorbet will need some help type checking gem dependencies. This is the purpose of Tapioca, a gem that generates type signatures for other gems so they can be type checked by Sorbet.
But how does Tapioca accomplish this? In this talk, we’ll dive into the tools and techniques used by Tapioca to reflect on Ruby code, and even walk through the process of building a new feature in the Tapioca codebase!
Generating RBIs for dynamic mixins with Sorbet and Tapioca
RubyKaigi 2023 • May 2023 • Virtual • ↗ slides
Last year, Tapioca became the official tool for generating RBI files for Sorbet. Using Tapioca, developers can quickly generate accurate RBIs for external Ruby gems, allowing them to use Sorbet in their projects even if most gems have not yet added type signatures.
In this talk, I’ll explain how I implemented new functionality in Tapioca to help it generate RBIs for dynamic mixins in Ruby gems. Along the way, we’ll learn about how Tapioca uses information about the Ruby object model to generate RBIs, and how this work has impacted the Ruby language as a whole.
To Mock, or Not to Mock?
RubyConf • November 2021 • Denver, CO • ↗ slides
Mocking: it’s one of the most controversial topics in the testing world. Using mocks, we can more easily test parts of our applications that might otherwise go untested, but mocks can also be misused, resulting in tests that are brittle or downright self-referential.
So… how do we know when to use mocks in our tests? In this talk, we’ll identify three important questions that can help us make that decision. By the end of the talk, you will have a framework in mind to help you answer the question: to mock, or not to mock?
Five Errors You Encounter When Upgrading Your Ruby Gems
WNB.rb Meetup • March 2021 • Virtual • ↗ slides
Sometimes, upgrading your gems can cause errors in your application. These errors pop up when you’re least expecting them, and they can often be categorized into common groups… kind of like Pokemon! In this talk, we’ll discuss five types of errors you might see while upgrading dependencies, as well as the techniques (or “moves”) we can use to solve them.
The Bug that Forced Me to Understand Memory Compaction
RubyConf • November 2020 • Virtual • ↗ slides
Did you know that Ruby 2.7 introduces a new method for manual memory compaction?
Neither did I.
Then a user reported a bug on a gem I maintain, and well…
In this talk, I’ll tell you a story about how one bug forced me to learn all about memory management in Ruby. By the end of this talk, you should understand how memory is allocated on the heap, how Ruby implements garbage collection, and what memory compaction is all about!
Successfully Onboarding a Junior Engineer in Three Steps
RailsConf • May 2020 • Virtual • ↗ slides
How you onboard someone to your team can have lasting effects on their professional success, growth, and happiness, but many teams treat onboarding as an afterthought. In this talk, you will learn how to successfully onboard a junior engineer in three steps, with the goals of building their trust, instilling confidence in their technical abilities, and enabling them to be an autonomous contributor to your team.