JDK 8: Lessons Learnt With Lambdas and Streams

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 36

  • @ffatheranderson
    @ffatheranderson 6 років тому +9

    Good speaker. Attentive to the auditory. And he shares his own experience and you can see the passion when he does it.

  • @hoangnhuthanh
    @hoangnhuthanh 2 роки тому

    That's brilliant. Your explanation helped me out after days being really confused about functional programming!

  • @LivenLove
    @LivenLove 6 років тому +4

    one of the best videos on lambda

  • @nikosc
    @nikosc 8 років тому +21

    for the record, the course he mentions is free and it's name is "JDK 8 Massive Open and Online Course: Lambdas and Streams Introduction" and it a very good introduction to these topics

    • @darogajee3286
      @darogajee3286 4 роки тому +1

      where to find that course

    • @onke
      @onke 4 роки тому +1

      @@darogajee3286 Dude, do a simpe google search

    • @darogajee3286
      @darogajee3286 4 роки тому +1

      @@onke ohh really its that simple please provide me link ...

  • @jvsnyc
    @jvsnyc 3 роки тому

    At 18:32 from the original sequential Java 7 solution, we see that it will always return the FIRST line of the longest length, in the case of ties (reasonably likely if there are a very large number of lines)...the reduction at 23:20 will always give us the LAST line of the max length in the case of ties, right? Subtle difference, but a drop-in replacement would break a good enough Unit Test? I had to write code to check because Simon is brilliant and I am dense, but yeah, we needed >= if coded as shown at 23:20 to preserve behavior in the face of ties.

  • @derEineOderDerAndere
    @derEineOderDerAndere 7 років тому +2

    great talk, packed in an interesting story - thanks, Simon!

  • @kennethcarvalho3684
    @kennethcarvalho3684 2 роки тому

    Excellent talk by Simon as usual...one thing I didnt get is the recursion example solving the problem of removing state,,,which state is being considered in these code example...Can someone please assist..Thanks

    • @sk8erbyern
      @sk8erbyern Рік тому +1

      Functions by definition do not have state, objects do. When I give you a function and say this function returns true if your input integer is greater than 0 you will get true every single time you call that function with a positive integer. When I say this function will return true if your input is bigger than the previous input you gave it then the result will depend on the previous call you made to the function. I will give it 5 then 10 and I will get true. You will give it 15 and then 10 and despite giving the same input 10 you will get false. This is state. When you called the function it was in a state that would return false to input 10 BUT when I called it at the time it was in a state that would return true to input 10.
      Once he modified the function as a recursive one he eliminated the state. Rather, he moved the state to the application level out of the function itself.

  • @DeepakLalchandaniProfile
    @DeepakLalchandaniProfile 3 роки тому

    Which is the best book to master Functional Programming in Java 8
    Beginner
    Intermediate
    Expert

  • @jvsnyc
    @jvsnyc 3 роки тому +1

    Not everyone gets the point of his very funny story. There were real improvements in "getting more functional" until 14:08 or thereabouts, when he said "I am good". That is, there were benefits along the way, until at some point, well along the evolution towards "being more functional" you are solely pursuing ideological Purity.

  • @anilkinikar
    @anilkinikar 5 років тому +1

    Awesome presentation!👍

  • @coolwinder
    @coolwinder 3 роки тому

    5 mins in, beautiful!

  • @andreashohmann5994
    @andreashohmann5994 8 років тому +2

    For the functional think ... I don't understand what he says ... "You need an XXX"?

    • @michaelpugh260
      @michaelpugh260 8 років тому +3

      I think he said an IO Monad, although I'm not entirely sure. If he did say that, some reference on what it is: en.wikipedia.org/wiki/Monad_(functional_programming)#The_I.2FO_monad

    • @pogo-short-tips
      @pogo-short-tips 8 років тому +4

      he did

  • @spice940
    @spice940 4 роки тому +2

    Went looking for Heisenberg's uncertainty principle after the first slide. Now I am more confused than ever.

    • @sk8erbyern
      @sk8erbyern Рік тому

      You shouldn't have looked for it.

  • @SkalarZiom
    @SkalarZiom 6 років тому

    +Simon, slf4j, log4j don't expose methods with Supplier as method argument. What do you think is the best way to use slf4j and Supplier? thanks.

    • @ITech2005
      @ITech2005 5 років тому

      SkalarZiom I'd personally look to create a wrapper.

  • @rydmerlin
    @rydmerlin 2 роки тому

    The point would be driven home better if you show the implementation of finest and show the lazy evaluation that takes place.

  • @Hakucho64
    @Hakucho64 7 років тому

    Your recursive method used tail-call recursion, so wasn’t it already stack-safe?

    • @dsztu
      @dsztu 6 років тому +1

      Java 8 does not support tail call optimization at compiler level

  • @avneet12284
    @avneet12284 7 років тому

    Excellent talk

  • @prasadpenumarti7388
    @prasadpenumarti7388 5 років тому +3

    18:33 is the highlight. nice.

  • @donwald3436
    @donwald3436 6 років тому +6

    That's not what Heisenberg's uncertainly principle says at all!

    • @nicholas1460
      @nicholas1460 6 років тому

      Right. Which principle was it then? Observer effect?

    • @BharCode09
      @BharCode09 4 роки тому +3

      @@nicholas1460 Actually both are true. It's originally Observer Effect, applied to systems in general.
      But Heisenberg used the same in quantum mechanics (sub atomic level) to explain why we can't accurately measure momentum and position of the electrons simultaneously.
      But later it was proved that in quantum mechanics Observer Effect doesn't apply bcz the sub atomic particles inherently exhibit dual (energy as well matter) property by their very nature. And that's called "Uncertainty Principle" (not Heisenberg's).

  • @SpiritOfIndiaaa
    @SpiritOfIndiaaa 5 років тому

    thanks a lot

  • @markganus1085
    @markganus1085 2 роки тому

    i need to catch up with it later. now it's late at night and i need to go to bed

  • @digisecureagent7679
    @digisecureagent7679 3 роки тому

    String LongestLine = bufferedReader.lines()
    .max(Comparator.comparing(String::length))
    .orElse("");

  • @ryumak
    @ryumak 5 років тому +1

    Another streams and functional programming zealot. You can skip this one.

    • @MrMikomi
      @MrMikomi 3 роки тому +1

      Not a fan? Shame.