Three Rubyists having conversations and interviewing others about Ruby and web development.
Jason Goes to Infinity (and Beyond)
On this episode of Remote Ruby, Jason, Chris, and Andrew reunite after a hiatus, starting their conversation with a playful idea of starting a band and Andrew possibly recording a new podcast intro. A trip down memory lane brings forth their childhood musical preferences before they shift to an in-depth conversation about programming.
Andrew and Chris talk about their recent experiences refactoring code and the complexities they encountered, highlighting how such processes can improve performance and efficiency. The discussion touches on topics ranging from Rails features and documentation, the usefulness of Ruby Infinity, the elegance of removing conditionals in programming, and using programming languages like Haskell and Elixir, their unique features, and how they handle conditionals differently. Also, Jason announces he’s planning a Southeast Ruby conference for early 2024 in Memphis and how he wants to focus on the community aspect. Hit download to hear much more!
[00:00:24] Jason, Chris, and Andrew reminisce about their musical preferences during their childhood, and they acknowledge it’s been a while since their last meeting, partially dues to Jason and Andrew contacting COVID.
[00:04:53] The conversation shifts to programming, where Andrew and Chris share that they’ve been writing a lot of code but struggle to remember specifics. Chris talks about his recent work on refactoring the Acts As Tenant gem to depend on Rails Current Attributes instead of the RequestStore gem.
[00:08:24] Chris tells us he’s not sure whether he’ll merge his refactor, as he’s concerned about potentially creating more problems for himself while maintaining the gem.
[00:09:30] Andrew discusses his recent experience of refactoring code, which involved rewriting a method multiple times, working with polymorphism across models, dealing with scopes, and solving problems related to pagination. He found the process challenging but ultimately successful.
[00:12:57] We also hear something that happened where Andrew improved loading efficiency and performance by deferring the loading objects until a button is clicked rather than loading all at once during page load.
[00:13:49] Jason shares an instance where he used Ruby Infinity in his code for unlimited job posts in an application he built a few months ago.
[00:14:56] Chris finds it intriguing that infinity is located under the float class in Ruby. Jason repeats the benefits of using Ruby Infinity, including how it simplifies arithmetic operations in the code and avoids errors.
[00:17:19] Chris shares a story about developing a generic pagination method for APIs in Jumpstart Pro. He mentions the process took several iterations to design a system flexible enough to handle various API structures.
[00:22:03] Chris brings up programming learning experiences and highlights how people often think in terms of “IF statements” while trying to solve problems, which results in their code having many “IF statements.”
[00:24:12] Jason shares a story from a CS class he took, and the first day of class the teacher asked, “How do you make a peanut butter and jelly sandwich?”
[00:25:16] Andrew shares his experience teaching his younger brother who’s studying computer science and how you have to learn how to break down problems, and Chris tells us some instances and emphasizes how these little insights can change one’s perspective on coding.
[00:28:21] Jason ponders about the potential impact of learning programming using a functional language as the first language.
[00:28:52] Chris talks about his experience learning Haskell and its ability to define the same method name with different arguments. He also discusses the utility of removing conditionals in programming, specifically citing the presence method that Active Support adds in Ruby on Rails.
[00:33:43] Jason and Andrew bring up guard clauses, which they prefer over conditionals, and Andrew says are easier to read than If or Unless statements.
[00:36:26] They further discuss the potential trade-offs of using pattern matching methods, which allow for different logic based on input but can complicate code updates.
[00:39:07] Jason mentions that he’s planning a Southeast Ruby conference in Memphis, in early 2024, and wants to focus on the community aspect. He notes that Ernie Miller will be helping him organize it, and he’s aiming for a small, affordable event with around 50 to 100 attendees that doesn’t lose or make money.
Panelists:
Jason Charnes
Chris Oliver
Andrew Mason
Sponsor:
Links: