Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
If you work around Ruby long enough, you’ll learn that certain ideas are just taken as gospel. Don’t use for loops, avoid global state, use symbols pretty much wherever possible. This talk will go deep into the ‘why’ behind some commonly accepted advice on Ruby, dig into the internals, and what we find might just surprise you. rubyday 2020 - Virtual edition, September 16th 2020. https://2020.rubyday.it/ Next edition: https://2021.rubyday.it/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "Cool, But... Why?" by John Crepezzi, presented at RubyDay 2020, delves into the rationale behind common Ruby coding conventions often accepted as established norms. This talk challenges developers to critically analyze these conventions and to understand the underlying reasons rather than simply following them without thought. John discusses various topics that new and experienced Ruby developers often grapple with, emphasizing the importance of asking 'why' instead of just accepting conventional wisdom. Key points discussed include: - **Skepticism in Learning Ruby**: Newcomers often question Ruby's efficacy, especially regarding performance, and may feel confused by its syntax. This skepticism often evolves into excitement once they become familiar with the language's features. - **The Myth of "Bad Ruby" Practices**: John highlights that certain coding practices labeled as 'bad' in Ruby are often based on outdated or misunderstood norms. For instance, the use of for loops is critiqued for lacking flexibility; however, he argues it should not be outright avoided without considering the context. - **Benchmarking Performance**: John introduces the Benchmark tool, demonstrating how different implementations of iterations, including for loops and each methods, can be compared. Through benchmarking, he reveals the nuances in performance, such as for loops being slower than the each method because Ruby translates for to each. - **Method Missing**: He explores method_missing as both a powerful and risky feature, showcasing its complexity and the potential performance overhead it incurs, along with implications for code maintainability. - **Defining Methods**: John touches on the functionality of define_method, explaining its complexities and the reasons why it may introduce performance issues. He argues for caution in its utilization, particularly how it can affect garbage collection. - **Best Practices and Common Misconceptions**: John advocates for using symbols over strings for performance, clarifies the implications of using 'and' and 'or' versus their counterparts, and emphasizes the importance of documentation through comments. In conclusion, John encourages developers to foster a mindset of inquiry and experimentation to become more proficient in Ruby. The main takeaway from the talk is that questioning accepted practices and understanding the ‘why’ behind coding standards can significantly contribute to individual growth as a developer and mentor. This talk is a call to action for Ruby developers to not just follow trends but to critically evaluate and experiment with their coding practices.
Suggest modifications
Cancel