ruby on rails, ruby, open source, conference, rubyconf

RubyConf 2023 Highlights

RubyConf 2023 - Hack Day

Hack Day at RubyConf 2023 - Photo by San Diego Conference Photography

Best talks and moments from RubyConf 2023 in San Diego.

2023 was the first year I attended RubyConf in person. Here’s a summary of the talks and moments that made it special for me.

Community Hack Day

Community Hack Day was so much fun. We had the chance to meet two of our Get To Senior students in person and collaborate with them on Faker. Isn’t that awesome?

Mayra and Salo were there and I was so happy that we got to hack on stuff together.

Honestly, it was just great to collaborate with other Ruby Open Source contributors and the community at large.

Our main goal was to help people contribute to open source during the event. Stefanni and I are maintainers of faker-ruby, and we wanted to improve the performance of the gem, and also clean up and deprecate some generators. And we got to do all of that.

We’ve received a ton of help from the community. We had a whole table full of first-time contributors hacking together, and they opened a bunch of Pull Requests on Faker.

faker-ruby at RubyConf's Hack Day

hacking on Faker during Hack Day - Photo by San Diego Conference Photography

I also learned about vernier, which is an excellent tool for profiling CRuby. And we got tons of tips on how to improve Faker’s performance. So stay tuned for that.

Opening

RubyConf’s opening was magical: dancing, singing, and celebrating the wonderful wizardry of Matz.

The magic of Ruby can take you anywhere. The language feels like home. And I want some beautiful Ruby shoes too 👠

There’s no place like RubyConf.

Talks

After the amazing Hack Day and the magical opening, we had two full days of talks. Here are my favorites (in no particular order).

Which Time Is It? (Joël Quenneville)

Time is hard. Dates are hard. And timezones? Oof - they’re a nightmare!

Have you ever asked yourself: what’s the difference between 1.day and 1.day.ago?

In this talk, I learned the difference between moments in time, durations, and what kind of operations are pure nonsense depending on how you’re representing time in your code.

Popping into CRuby (Jemma Issroff)

Excellent talk about how instruction sequences are “popped” in CRuby, and how Ruby avoids executing unnecessary code.

If you look at Ruby’s source code, you’ll see a lot of boolean popped variables being passed around. I never understood what they were about before watching this talk.

I loved the code walkthrough, going from Ruby code to parsing and compiling, then how it all turns into instructions that are executed by the VM.

And I also learned that Jemma speaks Brazilian Portuguese. How cool is that?

The Secret Ingredient: How To Understand and Resolve Just About Any Flaky Test (Alan Ridlehoover)

Flaky specs annoy the hell out of me.

Flaky specs are all about making wrong assumptions about the code and the context/environment where they run.

There are three main sources of flakiness:

  • Non-Determinism
  • Order Dependence
  • Race Conditions

Alan went over all these sources of flakiness, and strategies to fix them once and forever.

This talk was especially relevant to me because I recently wrote a proposal to deal with flaky specs at my job. We’ve been suffering from a flaky CI for many months, but we didn’t have a clear way to improve the situation.

So I decided to write an RFC, and I proposed to roll out a process/system to deal with flaky specs proactively. That RFC also puts in place a zero-tolerance policy for flaky specs. I will share more about this strategy soon.

Learning more about how other teams deal with flakiness is always fascinating to me.

The Second Oldest Ruby Bug (Jeremy Evans)

Jeremy gave a very interesting presentation about the second oldest Ruby bug.

Issue #4040 was first raised in 2010. It happens when a method is called with a very large number of arguments - you can easily do that by using a splat (*). This raises a SystemStackError:

> RUBY_VERSION
=> "2.7.2"

> Hash[*140_000.times];
SystemStackError (stack level too deep)

There was a great discussion about the source of the bug and his strategy for fixing it.

There were two valid ways to fix the bug. One solution was very straightforward, but unfortunately, it would have to be copy-pasted in every method that would handle splat arguments (and there are many!).

The other solution would be more general and could handle multiple cases, but would also be more complex to understand.

This discussion about the tradeoffs between code duplication and code complexity/generality, and the impact on maintainability and performance was very interesting to me.

Sometimes we pick a solution that is easy enough, but only later realize that this led to a lot of code duplication. And sometimes we try to create a DRY and general solution to a problem, but it’s too complex and hard to understand.

This process of going back and forth on the design until you get to an acceptable solution is a good thing to keep in mind.

List of Ruby bugs to fix

If you want to try and fix a Ruby bug (old or new), take a look at this List of Tagged Ruby Bugs curated by Jeremy Evans. There are hundreds of tagged bugs, many still open, and you can filter them out by tags or areas of the codebase.

Reproducing bugs, commenting on issues, helping with triage, adding documentation, and trying to fix a bug yourself are all great ways to get better at software development and help the Ruby community.

The Future of Understanding Ruby Code (Kevin Newton)

The highlight of this talk is the fact that Prism is opening the doors to many people who always wanted to contribute to CRuby and the parser, but haven’t done so because the code is so complex.

Rewriting the parser and introducing YJIT are some of the most interesting developments happening in Rubyland, and I’m very happy to see the community coming together and helping those developments. The results of this effort will benefit the whole ecosystem, and I’m very excited about it.

By the way, we hosted a live event with Kevin Newton recently and we hacked on Prism together. Click here to watch.

Open Spaces

At the Open Spaces, I had the pleasure of meeting other Ruby creators.

Rachel (ChaelCodes) also loves livestreaming and sharing her knowledge about Ruby on Rails. She delivered a Lightning talk called You Should LiveStream, in which she showed us all the opportunities she’s got because of her coding livestreams. We at hexdevs also got to meet and collaborate with tons of cool people because of our livestreams.

Collin Jillbert is an excellent guy and a joy to chat with, as well as the GoRails Team (Chris Oliver and Kent).

Another cool Open Space was the writer’s table with Dave Thomas, Noel Rappin, David Copeland, Brandon Weaver, Kevin Murphy, and many others. Always great to ask questions and learn from these experts. We talked about technical writing books and editing. And, you know, that never-ending feeling that what you write is not good enough. Even after decades of experience as a writer and developer. :P

Conclusion

As if all of this wasn’t perfect enough, at the end of the conference, I won a Nintendo Switch from Thoughtbot’s Ruby Trivia competition.

Best RubyConf ever ⭐