4:07 - Doing too much in a single lambda. 7:19 - Returning a stream in a method. Reusing a stream. 11:09 - Forgetting to consume a stream 14:40 - Mutate objects inside a stream. 20:24 - Overusing forEach 24:08 - Order of operations 30:31 - 'Get'ting an Optional. 37:29 - Checked Exceptions and Lambda
@johnsand32905 жыл бұрын
nice talk, I liked the part about exception handling. Could you upload the sourcecode of your Either implementation?
@nitinagrawal66374 жыл бұрын
A good presentation giving a set of suggestions to do sensible coding.
@romantsyupryk30094 жыл бұрын
Thanks so much for this talk.
@gautamawekar15 жыл бұрын
Nice talk..to the point. Liked the Optionals & Stream exception handling. I wonder why can't java inherently support some utils to support these limitations.
@berndeckenfels4 жыл бұрын
It does kind of with reactive streams, now. They have an error channel.
@nitinagrawal66373 жыл бұрын
Asking a question should not change the answer, nor should asking it twice - I think it depends on the context of the question, depends on the type of question. So before applying any such concept one must understand it first.
@MikeEnRegalia2 жыл бұрын
I take issue with #2. In a use case where most clients calling a method that returns a collection will create a stream from it, it is more efficient to just return a stream directly. Callers who need to iterate twice can call the method twice. Callers who need a data structure can convert the stream easily, using concise code.
@m19u3l116 ай бұрын
In any case, Stream is NOT a collection so if's going to be used in that way expected unexpected results.
@noname78520 Жыл бұрын
awesome talk!
@tungtranvan12863 жыл бұрын
I saw myself in your example. Thank you :D
@kokavamsikrishna39335 жыл бұрын
Greate , Awesome thanks for making this video,
@vijayjayaram6063 жыл бұрын
There is a reason why he referred to Venkat 🙏🏼 at the beginning Venkat owns java streams and lambda 🤘
@temnur5 жыл бұрын
Good for beginners
@jfilipcic Жыл бұрын
I don't understand why the 0,1... iterator gets stuck when run in parrallel. Could please anybody explain it like I'm five?
@mihaiapostol7864 Жыл бұрын
i think because the results of the threads are joined right before the terminal operation, but we never get to the terminal operation because of the distinct(). try using a peek() after each stream operation to see what's happening. it confused me as well
@pnadmin79275 жыл бұрын
So Venkat always say we should use Reactive stream. LOL
@ebn__5 жыл бұрын
Using Java for FP is the common mistake.
@alekseyreviakin30195 жыл бұрын
I watched this video and video about near Java future: kzfaq.info/get/bejne/ntiphKx6xtmriWg.html and thought: "Look Java is almost like Scala now". Maybe Java need own way?
@AngelCintiaRockgirl5 жыл бұрын
lyhahahahha, pretending that Java is actually a real compiler. hahhaahaha