Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
#rubyconftw 2023 Monadic Approach to Ruby Error Handling Error handling is an essential part of software development. No matter how well-written your code is, there will always be errors. The key is to handle them in a way that minimizes their impact. In this talk, we will build a foundation of error handling concepts, categorizing errors and exceptions in Ruby. We'll look at practical code examples that demonstrate common issues when propagating errors through layers of code. Explore how Monadic Handling abstract away error handling details by combine Monads Result and Service Object in Ruby programming. This talk will empower you understand how to use Monadic Handling Ruby code. You'll leave with a deeper appreciation of monads and concrete strategies for encapsulating errors elegantly in your Ruby applications. Join me to discover how monads enable you to minimize disruption and maximize control over error handling in Ruby.
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
In this talk presented by Du Gia Huy at RubyConf Taiwan 2023, the main topic is the monadic approach to error handling in Ruby. This concept is essential for software developers as it provides a framework for minimizing the impact of errors in applications. Key points discussed throughout the presentation include: - **Understanding Errors:** Error handling is a critical component of software development, with two main error types: expected and unexpected errors. Expected errors are foreseeable and should be accounted for during development, while unexpected errors can arise from external sources. - **Traditional Error Handling:** Initially, the implementation of error handling in Ruby applications typically involves direct exception management within the controllers, which can lead to messy and unscalable designs. - **Improving Architecture:** The speaker emphasizes the need for a clear separation of concerns by introducing a business logic layer, thus allowing better modularization and clearer error management. - **Monadic Handling:** The presentation introduces the concept of monadic handling, where results are encapsulated in monads that signify either success or failure, standardizing error management across Ruby applications. This approach provides clarity and reusability in error handling methodologies, improving the design of performance-critical applications. - **Service Objects:** The use of Service Objects is highlighted as a technique to centralize the execution of business logic and error handling. This allows for greater maintainability and a cleaner separation of responsibilities between components. - **Libraries and Tools:** The speaker mentions libraries such as Dry Monads that aid in implementing monadic strategies in Ruby, thereby enhancing the robustness of the applications. Conclusion and takeaways from the talk include: - Emphasizing the importance of understanding different types of errors and implementing a structured approach to error handling that improves robustness and minimizes disruptions in software applications. - Encouragement for developers to adopt clear and consistent communication around error management within teams, fostering better collaboration and efficiency. - The goal of improving systems so that handling errors becomes a proactive rather than reactive process.
Suggest modifications
Cancel