Collectors in the wild! by José Paumard

  Рет қаралды 14,649

Devoxx

Devoxx

6 жыл бұрын

The Collector API has been added to the JDK 8, and was left in the shadow of the Stream API. It is quite logical, since a collector is made to consume the elements of a stream: no Stream, no Collector. We have a set of ready to use, very powerful collectors in the Collectors class: toList and groupingBy, to name a few. Those two facts hide the collector model to process data, and how powerful and efficient is this API.
This in depth talk is all about collectors: those available, because we need to know them, those that we can create, those we had no idea they could be created, and the others, as there is in fact no limit to what can be done with this API. The concept of downstream collector will be used to show how we can write entire data processing pipelines using collectors only, and pass them as parameters to other pipelines.
We will be careful about keeping a high level of readability in our code, and also talk about performances.
This talks is composed of slides and live coding on simple and complex examples.
José Paumard
José is an assistant professor at the Institut Galilée (Université Paris 13) and a PhD in applied mathematics from the ENS de Cachan. He has discovered the Java language in 1995, and has been teaching the Java technologies at the university since 1998. José is also a Java Champion and Java Rockstar.
José has also been working as an independant for numerous companies, in a variety of areas. He is a well known Java / Java EE / Software Craftsmanship expert and trainer. He also publishes "Java le soir", a technical blog in french (blog.paumard.org/), with about 750 pages of courses about Java / JEE in open access.

Пікірлер: 27
@ruixue6955
@ruixue6955 6 жыл бұрын
3:30 first example using Collector pattern 6:34 About Streams 7:47 a important statement - *Any processing written with Stream API can be modeled with a Collector* 8:15 intermediate operation 8:46 flatMap() 9:48 map, filter, flatMap do not need any buffer to work 10:40 distinct 11:34 limit & skip 12:12 terminal operation 17:05 demo 17:30 demo input 25:16 joining() 27:20 the 3rd Collector - groupingBy 29:17 *downstream Collector* as an argument of the groupingBy 29:27 how is the downstream collector working 29:42 this downstream collector is acting as a post-processing of a collection, which is the value of the map 30:41 demo time again 35:20 problem 38:53 problem of the complex lambda chain 39:20 a Collector that counts - purposing on making readable code 46:08 *how a Collector is working* 46:17 three base operations - supply, accumulate, combine 47:57 stream API supports parallelization 49:50 String concatenation with Collector 50:44 problem of the given example 51:45 solution with StringBuilder 52:35 the key extra operation of using collect 52:42 finisher operation 53:09 collectAndThen 1:05:06 1:05:40 Collectors.mapping 1:14:20 toMap collector 1:14:56 toMap collector should not create duplicate keys 1:17:34 About types 1:17:51 Collector interface typed with 3 parameters 1:19:55 Set characteristics(); 1:20:29 T is the type of elements in the stream 1:25:55 intermediate operation 1:27:25 filtering 2:03:28 Collector.CHARACTERISTICS
@luisdanielmesa
@luisdanielmesa 5 жыл бұрын
real mvp +1
@lisafox9026
@lisafox9026 5 жыл бұрын
great !!!!
@GuitarreroDaniel
@GuitarreroDaniel 3 жыл бұрын
Thanks man, very useful!
@JosePaumard
@JosePaumard 6 жыл бұрын
You can get the slides of this presentation here: www.slideshare.net/jpaumard/collectors-in-the-wild
@JosePaumard
@JosePaumard 6 жыл бұрын
And the full code of the live coding sessions on GitHub: github.com/JosePaumard/devoxx-be-2017
@samidhamza3656
@samidhamza3656 6 жыл бұрын
Great Work, Thank you
@twocents-xh4bo
@twocents-xh4bo 4 жыл бұрын
Very meaningful, organised and lucid presentation I have seen till date. Must have taken good planning and lot of time to keep it this lucid. Kudos
@sreeramulumedamanuri6070
@sreeramulumedamanuri6070 6 жыл бұрын
Very good presentation
@BurhanCerit
@BurhanCerit 4 жыл бұрын
very informative, ty Jose
@anianand9887
@anianand9887 Жыл бұрын
Very nice talk.. well explained.. thankyou
@gautamawekar1
@gautamawekar1 5 жыл бұрын
Overall good presentation. Need to watch multiple times to extract value out of it. Demos and refactoring are little overwhelming.
@moshecsbgu1
@moshecsbgu1 3 жыл бұрын
Thanks for this presentation. I think it would be a good idea to break long session lectures (such as this one) to several videos parts. It would be easier to consume.
@kedis123
@kedis123 6 ай бұрын
In the presentation at 48:44. Combining two lists BiConsumer
@arunjyothiskaruvannur1430
@arunjyothiskaruvannur1430 5 жыл бұрын
Great presentation. Could you please provide the github url of all demos. It would be useful to practice the code while watching the video.
@barrymamadou3711
@barrymamadou3711 4 жыл бұрын
github.com/JosePaumard/devoxx-be-2017
@weetcka
@weetcka 4 жыл бұрын
github.com/JosePaumard/devoxx-be-2017
@user-dz6il2bx5p70
@user-dz6il2bx5p70 4 жыл бұрын
17:19
@weetcka
@weetcka 4 жыл бұрын
Talk about Optional mentioned at 14:54: kzfaq.info/get/bejne/e9Bgptakm8nVYWg.html
@mohamedsayed8697
@mohamedsayed8697 Жыл бұрын
Thanks
@Gray-bc5qj
@Gray-bc5qj Жыл бұрын
45:30
@anilgola5879
@anilgola5879 2 жыл бұрын
One has to have good knowledge of streams and collectors before reaping dividends from this presentation.
@TheUltimateRage
@TheUltimateRage Жыл бұрын
Which I unfortunately don't. I'm still trying to learn streams as much as I can but I can say a LOT of this is over my head. However, familiarizing myself with reading this kind of code helps to familiarize me with the lingo before I can truly understand exactly what's goin' on.
@TheUltimateRage
@TheUltimateRage Жыл бұрын
I've been studying Java all year. Maybe I'm a complete imbecilic moron or something, but it seriously baffles me how people understand and remember ALL of this shit! I've probably watched 15-20 videos about streams, functional programming, and lambdas, and while it's starting to make sense to me, I still feel ridiculously overwhelmed by this shit!
@mohamedsayed8697
@mohamedsayed8697 Жыл бұрын
I understand that it's frustrating that your are feeling this way and that you can't do stuff like them but you know what? It's okay. Remember everyone is different and these people are experienced and have dealt with that stuff a lot. Also, watching videos is not enough for you to remember this stuff and know how to use it, get your hands dirty and solve problems using this stuff and you will find yourself gradually getting better at it and who knows maybe one day you will find yourself understanding and remembering all of this stuff like them. I hope this helps.
@eshgholah
@eshgholah 3 жыл бұрын
Nice demo. But he reduces the quality of his presentation by detaching himself from his audience. By detaching I mean he makes a lot of complicated steps without taking a pause to involve his audience. He writes code fast and reads it loud which is far from a quality presentation. A clever and nice gentleman but a horrible instructor.
@rydmerlin
@rydmerlin Жыл бұрын
Horrible is harsh but he wasn’t at his best in this one. Agreed. He chooses not to interact much in this presentation and doesn’t gauge how well the audience is following his examples.
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 12 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 13 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 80 МЛН
Collections Corner Cases by Stuart Marks
50:46
Devoxx
Рет қаралды 9 М.
Java 17 Deep Dive by José Paumard
3:04:24
Devoxx UK
Рет қаралды 13 М.
Thinking In Parallel by Stuart Marks and Brian Goetz
1:00:04
Java Streams: Beyond The Basics
49:21
Jfokus
Рет қаралды 71 М.
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,4 МЛН
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 2,3 МЛН
Интереснее чем Apple Store - шоурум BigGeek
0:42
гений починил ноутбук
0:29
Dear Daria
Рет қаралды 2 МЛН
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 602 М.