What the hell is monad? Why should you care?

Real world applications are hard to imagine without side effects such as writing to a DB or UI. IO-monads were introduced into the Haskell language to write programs in a robust way. And we have been using monads in our day to day job without even knowing those are monads such as IEnumerable/IObservable in languages like C#, Java.

This talk is to give a basic understanding about monads and why should we care about that, and a little bit about onion/clean architecture.

 
 

Outline/Structure of the Talk

Introduction

Why clean architecture?

What are Functions?

What is Monoid?

What is Monad?

Reasoning about Monads

Key Take aways

Learning Outcome

* What is monad?

* Why do I care? What are the benefits?

* What are the monads have been using without even knowing?

* High level understanding about reactive programming through observables.

Target Audience

All developers

Prerequisites for Attendees

Just basic knowledge in any object/functional programming

schedule Submitted 1 month ago

Public Feedback

comment Suggest improvements to the Speaker

  • Liked Aaron W Hsu
    keyboard_arrow_down

    Aaron W Hsu - Programming Obesity: A Code Health Epidemic

    45 Mins
    Keynote
    Beginner

    Programs are getting fat. They're becoming slow. They're taking up more computing resources. They're getting harder to maintain and more complex from the ground up. Layer upon layer of sophistication is causing us to lose our ability to predict what software will do. Where's that bug? Why is everything going so slowly? Am I even using the right data structures? Where's that important point in the documentation again?

    What's happened to us? In this meta-dive into the nature of our approach to programming, we will explore some of the dangers of our current approaches to programming and the how/why of our current programming obesity problem. We will look at real case studies and see just how bad the situation can be.

    But we will also explore how we can battle these sources of obesity. In this passionate plea for code that we can gain control over again, we will look at examples of how we can return to a state of high-performance on all levels, from code size to code scalability. We will look at the principles that can help us to reach leaner, more efficient, more usable, less buggy code. We will hopefully find some light at the end of the tunnel, and how we can change our outlook on programming to push ourselves towards code that benefits not only ourselves, but also those that will come after us.

  • Liked Alexander Granin
    keyboard_arrow_down

    Alexander Granin - Hierarchical Free Monads and Software Design in Functional Programming

    Alexander Granin
    Alexander Granin
    Sr. Haskell Developer
    Juspay
    schedule 3 months ago
    Sold Out!
    45 Mins
    Talk
    Advanced

    Functional Programming is going through the same process of rethinking as Object Oriented Programming has passed already. FP today is not only something mystical, something barely applicable for day-to-day tasks, but rather a whole philosophy of building big, complex applications, with own tools, approaches and methodologies. We can see a lot of ideas about software design and architecture emerging from the FP community: talks, books, articles. We’re actively discussing Final Tagless, Free Monads, effect systems and other approaches, but it seems the theme not yet covered and we don’t know about possibilities we have.

    In this talk, I’ll tell you about the power of Free Monads in building complex applications in Haskell and PureScript. These applications will be satisfying the requirements like maintainability, testability, simplicity. You’ll know how to create a safe concurrent application state, how to divide the application into layers and how to keep the code sane. In fact, you can do the same with Final Tagless or extensible effects, but the approach with hierarchical Free Monads has some specific properties making it the best tool to separate concerns and create a very interesting eDSLs with different semantics.

    The talk is based on the ideas I’m describing in my book “Functional Design and Architecture”. I also gave several talks about this theme earlier (you can find all my talks here).

    I’ve used these ideas to build software for different companies, including Juspay (Bengaluru), Restaumatic (Poland), Enecuum (Hong Kong). We’ve created several interesting technologies that were not possible to make without Free Monads. Some of them are open sourced.

  • Liked Anupam Jain
    keyboard_arrow_down

    Anupam Jain - Typesafe Functional SQL

    45 Mins
    Talk
    Intermediate

    We'll discuss how to use strongly typed functional programming to build a typesafe and highly declarative DSL to generate SQL, that allows better abstractions and minimises runtime errors. We'll focus on type systems, and build an intuition for row types and how it guarantees correctness for SQL. I'll cover some parts of actual SQL generation.

    A similar talk was given at IIIT Delhi earlier, however that was more geared towards beginners to Functional Programming (link below). I plan to give a more intermediate level talk this time.

  • Liked Tony Morris
    keyboard_arrow_down

    Tony Morris - An Intuition for List Folds

    45 Mins
    Talk
    Beginner

    In this talk, we go back to first principles, defining and examining the definition for a cons list, then take a look at the ubiquitous right and left fold functions on a list.

    The primary focus of this talk is to develop an intuition for how these functions work so that we can best decide when to apply them. Multiple programming languages will be used to help emphasise the independence of the gained intuition. This talk will generally be interactive with the audience as we solve problems and build confidence in our new knowledge.

    Knowing how to apply the various list fold functions is a common question by the student of FP. This talk aims to provide a solid, reliable answer to this question. No prior understanding of list folds is necessary.

  • Liked Tony Morris
    keyboard_arrow_down

    Tony Morris - Zippers

    45 Mins
    Talk
    Intermediate

    The term zipper is a colloquial used to describe n-hole (most often, 1-hole) contexts. That is, a data structure that has a _hole_ or _pointer_ focused on a specific element with the ability to efficiently traverse to its neighbouring elements, providing an elegant solution for the need to efficiently traverse and _modify_ immutable data structures.

    In this talk, we will look at examples of zippers for canonical data structures such as lists and other products and sums. We will then define comonads and see the relationship between zippers and comonads.

    Most of this talk will be spent on the practical application of zippers in everyday programming. We will solve some simple problems using zippers. We will then contrast why we might use a zipper, compared to a lens.

    Finally, for a fun and interesting observation, we will look at the algebraic structure of products and sums, then compute the derivative of these structures. Turns out, a derivative of a data structure is its zipper ("McBride, Conor, et al (2005). ∂ for Data: Differentiating Data Structures").

  • Liked Edward Kmett
    keyboard_arrow_down

    Edward Kmett / Tony Morris - Let's Lens

    Edward Kmett
    Edward Kmett
    Chair of the Haskell Core Libraries Committee, Research Engineer
    Machine Intelligence Research Institute
    Tony Morris
    Tony Morris
    Sr. Software Engineer
    Queensland FP Lab, Data61
    schedule 1 month ago
    Sold Out!
    480 Mins
    Workshop
    Intermediate

    Let's Lens presents a series of exercises, in a similar format to the Data61 functional programming course material. The subject of the exercises is around the concept of lenses, initially proposed by Foster et al., to solve the view-update problem of relational databases.

    The theories around lenses have been advanced significantly in recent years, resulting in a library, implemented in Haskell, called lens.

    This workshop will take you through the basic definition of the lens data structure and its related structures such as traversals and prisms. Following this we implement some of the low-level lens library, then go on to discuss and solve a practical problem that uses all of these structures.

  • Liked Siddharth Bhat
    keyboard_arrow_down

    Siddharth Bhat - Monad-bayes: Probabilistic programming in haskell, tutorial & implementation

    Siddharth Bhat
    Siddharth Bhat
    Student
    IIIT Hyderabad
    schedule 1 month ago
    Sold Out!
    20 Mins
    Case Study
    Intermediate

    We take a dive into probabilistic programming, beginning with a high-level explanation of what probabilistic programming is. We then continue to see how to use the monad-bayes library for performing tasks such as regression in a bayesian formalism. We also look into the implementation of the library, which involves performing an interesting sampling method (markov-chain-monte-carlo) on a very unique space (the space of computational traces of the program). We finally end with next-steps for the haskell community to improve in the probablistic programming space, ala pyro for python

    Here is our tiny re-implementation of monad-bayes, boiled down to the essentials: https://github.com/bollu/shakuni

    Paper on which the talk is based on: http://mlg.eng.cam.ac.uk/pub/pdf/SciGhaGor15.pdf

  • Liked ANKIT JAIN
    keyboard_arrow_down

    ANKIT JAIN - Designing powerful real-time systems using Scala and Akka

    45 Mins
    Talk
    Intermediate

    Sky BML (Beat/Meet/Lose) is a streaming system that produces real time Competitive Intelligence about our Lodging Supply.

    This competitive information is being used, among others, for Market Managers to negotiate with hotels for better rates and avail. Competitiveness is proportional to the share of BML Losses that Expedia incurs. This is why Market Managers focus their energies on minimising losses.

    However, it is not easy to understand why losses occur and consequently their resolution takes proportionately long.Our system tries to simplify this and hence accelerate resolution of losses.

    To develop this system, we fully leveraged the power of different functional features of Scala and used Structured Spark Streaming as the processing engine in combination with Clustering(for better app supervision and lifecycle management of the nodes).

    Similarly, some of the complex challenges are solved very naturally using functional programming features of easily. We had this complex problem of traversing a decision tree (based on conditional expressions) and then evaluating the child nodes(which are also expressions) with different lookup services responsible for mapping the symbols used in Expressions.

    I will be discussing in detail on how we tactically use Functional Programming concepts like Implicits, currying, High-Order Functions to get rolling with this problem with ease.

    Similarly, I will discuss on the way we have apply OOP principles to handle different kinds of inputs(streaming/batch) with minimal code duplication.

    Overall, it will be lot of fun to discuss the way to think about our problems and how our thinking is shaped by different concepts available in Scala.

  • Liked Harmeet Singh
    keyboard_arrow_down

    Harmeet Singh - Type System: The Beauty And The Beast

    45 Mins
    Talk
    Intermediate

    The type system plays an important role in building type-safe applications that reduce runtime exceptions and developer mistakes. This sophisticated system is leveraged by Scala’s most famous functional libraries, such as Scala-Cats and ScalaZ. This feature-rich system allows implementing pure functional programming on the JVM. It is a beast due to its complex syntax, as it prevents developers from exploring its beautiful aspects like partially applying types in Scala. In this talk, we will tame the beast and use its beauty to solve real-life issues faced during coding. Our examples will be based on generics, constraints, type lambdas, and the kind projector plugin.

    The following are the learning objectives of this talk:

    1. Practical use cases of the type system using real-life coding examples.

    2. Implementing custom higher kinded types and handling partially applied types via type lambdas and the kind projector plugin.

  • Liked Anish George
    keyboard_arrow_down

    Anish George - Demystifying Function Sub-typing

    Anish George
    Anish George
    UI Developer
    Thoughtworks
    schedule 3 months ago
    Sold Out!
    20 Mins
    Talk
    Advanced

    What is a Type for a function? When can you say that a function is a sub-type of another function? Why should you even bother?

    Function sub-typing is one of the most confusing areas of FP. In this talk, I'll take a deep dive and explain the core concepts of function types which applies to many different languages. More than just explaining the mere rules, I will be deriving those rules in a step-by-step fashion till the eureka moment so that you will never be confused again.

    The topics covered:

    1. Sub-typing basics
    2. Covariance & Contravariance
    3. Function sub-typing
    4. Implementation gotchas in different languages (Java, Scala, Haskell, JavaScript)
  • Liked ganesan arunachalam
    keyboard_arrow_down

    ganesan arunachalam - Functional programming in C#

    ganesan arunachalam
    ganesan arunachalam
    Developer
    Thoughtworks
    schedule 1 month ago
    Sold Out!
    90 Mins
    Workshop
    Intermediate

    Even though C# is an object oriented language, we could use C# language features like lambdas, delegates, LINQ in functional ways.
    In the 90 minute workshop, we will learn functional programming in c#.
    Most of the things could be possible in Java with new features like functional interface, streams, etc.

  • Liked ganesan arunachalam
    keyboard_arrow_down

    ganesan arunachalam - Reactive programming with WebFlux

    ganesan arunachalam
    ganesan arunachalam
    Developer
    Thoughtworks
    schedule 1 month ago
    Sold Out!
    45 Mins
    Demonstration
    Beginner

    This talk is about giving a high level overview, benefits and technologies available in the market to achieve reactive programming. Though, we could do reactive programming without functional programming concepts, but applying immutable, Monet, etc. in the reactive approach would help us achieve many things like concurrency, readability in a declarative way.

    Talk will be based on Spring Webflux using Netty server and Mongo DB.