Thirteen ways of looking at a Turtle - Scott Wlaschin

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 33

  • @ChristianLeovido
    @ChristianLeovido 4 года назад +18

    1. Object Oriented Turtle 2:22
    2. Abstract Data Turtle 6:58
    3. Functional Turtle 8:31
    4. State Monad 11:51
    5. Error Handling 16:47
    5½. Async Turtle 21:42
    6. Batch Commands 24:24
    7. Actor Model 29:02
    8. Event Sourcing 31:25
    9. Stream Processing 37:35
    10. OO Style Dependency Injection 44:07
    11. FP Style Dependency Injection 46:26
    12. Interpreter 50:31
    13. Capabilities 58:58

  • @Nellak2011
    @Nellak2011 7 месяцев назад

    I had no idea these patterns existed. My knowledge capped out around the result returning function.
    The interpreter pattern blew my mind and reminded my of Clojure's philosophy of "its just data!".

  • @imadetheuniverse4fun
    @imadetheuniverse4fun 2 года назад +1

    the signature coughing boi in audience of every functional programming video on youtube is indeed present 😂

  • @ryanpalmer8180
    @ryanpalmer8180 7 лет назад +10

    Fantastic as always, I learn so much in such a short space of time but it's effortless. Clear and concise.

    • @curiosdevcookie
      @curiosdevcookie 4 года назад +1

      Also, as a consequence, so easy to grasp AND to retain. Many teacher don’t reach either levels, a few manage to make themselves understood rather well but pertaining to Mastery is that the students will be able to additionally to having understood also to retrieve the connections made from their memory some days later. Hope this makes sense!

  • @SeraphimEmmadaio
    @SeraphimEmmadaio 4 года назад

    This is such an enlightening talk format. Giving solutions rather than scoped problems is a great way to teach! Love this talk!

  • @trampflips101
    @trampflips101 3 года назад +2

    6:16: Is a black-box always a bad thing though? You only need to read the API the class gives you and then can use it.
    11:04: You could argue that the tOOtle is also easy to reason about if you only care about reading the API it exports - Turtle(initialState), move(where), penUp(), penDown(), is pretty easy to understand. The point about the functional turtle being easy to test because you can just set the state upon construction so that it's in a particular corner also applies to the tOOtle, also just set the initial state via the constructor. You can also emulate the composition/piping shown at 11:00 by returning a reference to the turtle in each of its calls. That way you can Turtle(initialState).move(50).turn(20).move(50)... and so on. The only difference is the state is only known to the turtle, which is actually a benefit, considering he lists the state having to be managed by the client as a disadvantage of the functional turtle. Don't get me wrong, I think the functional turtle is really nice (it is particularly better when it comes to passing in dependencies), but I think the tOOtle was trashed a little too harshly, I don't think it being familiar is the only benefit is has.

  • @couryditch8752
    @couryditch8752 7 лет назад +4

    Scott, thank you so much, such a pleasure watching this. So much useful knowledge in this talk.

  • @dcuccia
    @dcuccia 6 лет назад +1

    Brilliant talk - thank you very much Scott Wlaschin.

  • @amirchip
    @amirchip 7 лет назад +11

    Superb talk! I always enjoy Scott's talks :)

  • @detaaditya6237
    @detaaditya6237 4 года назад

    An absolutely wonderful talk! Such an eye opener for me

  • @thalesofthewell
    @thalesofthewell 7 лет назад +9

    30 minutes in, mind completely blown

  • @NillKitty
    @NillKitty 3 года назад

    All 13 of these can be implemented in C# equally as well as F#.

  • @driziiD
    @driziiD 4 года назад

    this man is simply brilliant!

  • @mohamedfouad2304
    @mohamedfouad2304 6 лет назад

    You had me at the turtle slide... damn cute :)

  • @RationalWe
    @RationalWe 7 лет назад +6

    Scott is the best

  • @greenmind2k
    @greenmind2k 6 лет назад

    @50:20 - I have a "Disadvantage" for #11 - "FP style dependency injection" (currying) approach:
    Let's say I have a Data module that contains all the functions needed to query and update my data store. Each one of these functions requires a connection string at the very minimum, and probably a logger function. So if I have 25 Data functions, then I will have to manually create 25 partially applied functions in my application's composition root.
    Additionally, every time I create a new function in my Data module, I will have to create boiler plate code to partially apply the new functions. I hate repeating myself, so that will quickly feel like tedious work to me. I think that counts as a disadvantage of this approach.
    On the other hand, I could simply fall back to OOP and create a DataRepository class (instead of a module) that takes a connection string and a logger in its constructor. Then I will have eliminated all the unnecessary boiler plate code of manually partially applying each and every function.
    Since F# combines OOP with FP, why not take advantage of the strengths of each?

    • @greenmind2k
      @greenmind2k 6 лет назад

      Btw, great talk! I thoroughly enjoyed it, as I have enjoyed all of your talks.

    • @dcuccia
      @dcuccia 6 лет назад +2

      I had the same thought. Maybe the question then is - how can the boilerplate be written once and stored/shared, such that we get back the encapsulation you'd want from a OO constructor/IOC injector? Functional AOP, if you will.

    • @mxBug
      @mxBug 6 лет назад +5

      As long as all of the functions in question have the same (curried) interface, you can indeed create a unified context for them which preserves their dependencies using pure FP abstractions.
      In Haskell and similar languages, you might use the Reader monad or the Context monad, which express the idea of a context in which multiple operations share the same dependencies in a generic way.
      In F#, these kinds of computation contexts are provided by "builders", which allow you to build "computation expressions". More info here: fsharpforfunandprofit.com/series/computation-expressions.html

  • @davidporterrealestate
    @davidporterrealestate 6 лет назад +3

    The throat clearing kept me awake

    • @TheUArabej
      @TheUArabej 5 лет назад

      As soon as I read this - he cleared his throat. I wish you hadn't said that - now i am distracted every time he does that

    • @oscarasterkrans9301
      @oscarasterkrans9301 4 года назад

      It was all planned. :-D The bell was a genius move that makes the structure of the presentation very clear.

  • @pauldzim
    @pauldzim 5 лет назад +1

    Should have done it in Fortran

  • @clearz3600
    @clearz3600 7 лет назад +4

    Couldn't watch it with that noise or cough or what ever it fkin was. I'm sure it was a great talk.

    • @silpheedTandy
      @silpheedTandy 4 года назад +1

      i had a lot of trouble with it, too. gladly, he doesn't clear his throat in the other talk he gives.
      i wonder (honest question) how possible it would be for some computer program to identify all the frames where he clears his throat (and mute the audio there)? i know nothing about sound, so i don't know if this is an easy problem or difficult problem.

    • @silpheedTandy
      @silpheedTandy 4 года назад +3

      aha! i found the same talk from a different conference: vimeo.com/221105519

    • @clearz3600
      @clearz3600 4 года назад +1

      @@silpheedTandy Thats interesting. Id say it wouldn't be very difficullt using even traditional algorithms [fourier transform?] considering that the amplitute of the cough is so much higher than his regular talking voice. You could probably use machine learning techniques to do it also.

  • @slaweks81
    @slaweks81 4 года назад

    OO sample is wrong by design. Another fp guy who uses strawman rhetoric trick:/

    • @aBamieh
      @aBamieh 4 года назад +2

      enlighten us please

    • @detaaditya6237
      @detaaditya6237 4 года назад +1

      How do you think is the right design?