Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
Functional programming brings you not just fun, but also profit! Have you ever felt curious towards functional programming (FP)? Were you, soon afterwards, intimidated by the mystic terms like monads and functors? Do you think FP is not related to your Ruby work and thus, useless? Guess what-you can actually apply FP to your Ruby projects and reap benefits from it before fully understanding what a monad is!This talk will walk you through the powerful mental models and tools that FP gives us, and how we can readily use them to improve our apps in a language that we all love and understand. https://www.wnb-rb.dev/meetups/2023/02/28
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 "Functional programming for fun and profit!!" features Jenny Shih, a speaker at the WNB.rb Meetup, who introduces the concepts of functional programming (FP) and its relevance to Ruby developers. The main theme emphasizes that FP can enhance Ruby code quality without the necessity of mastering complex terminology such as monads and functors. The key points discussed include: - **Understanding Programming Paradigms**: Shih outlines that programming languages can be categorized into paradigms, such as object-oriented and functional programming. FP is presented as an important paradigm for Ruby developers to explore. - **Three Components of Programming**: Each program can be broken down into value, behavior, and time, which helps streamline understanding FP in context with Ruby. - **Immutability**: A core concept in FP is immutability, which suggests that values should not change once initialized. This approach can help prevent bugs related to unintended variable mutations. Shih advises using Ruby's `freeze` method and the newly introduced data structure in Ruby 3.2 to support immutability. - **Pure Functions**: Shih describes pure functions that only depend on their input arguments, which do not produce side effects. It is emphasized that pure functions simplify debugging and testing. Examples demonstrate how to transform impure functions into pure ones using parameterization and returning new data structures instead of modifying existing ones. - **Handling Concurrency**: The discussion transitions into the concept of concurrency in programming. By separating values and behaviors, FP facilitates easier concurrent programming. Shih compares Ruby’s limitations with the global interpreter lock against Elixir's actor model, which allows concurrent execution of functions safely without implicit state mutations. Ruby's experimental Rector is also mentioned as an emerging feature to improve concurrency. In conclusion, the talk aims to persuade Ruby developers to adopt FP principles, emphasizing that leveraging these concepts can lead to improved code quality and maintainability. The video encourages attendees to explore FP more deeply and utilize its methodologies in Ruby projects, thus making programming both fun and profitable.
Suggest modifications
Cancel