Great, It really helped to understand coroutines. BTW, It's very impressive that he could keep talking without a break while he writes several lines of codes and runs it. There must have been coroutines running in his brain.
@canaldosouza41036 жыл бұрын
This guy is who made me start kotlin, greet to see him in the Kotlin Conf
@navsingh79346 жыл бұрын
same here man
@akashkroy3 жыл бұрын
I read his programming kotlin
@ChetanSachdeva6 жыл бұрын
I've not seen anyone explaining the internals of coroutines better than Venkat Subramaniam.
@ViperCinema4D6 жыл бұрын
kzbin.info/www/bejne/j6PVhnaJnpxle5o
@navsingh79346 жыл бұрын
he is the best speaker I have seen so far.
@aprofromuk3 жыл бұрын
no 1 can do that :)
@VedantRajdeep10 ай бұрын
That's some introduction. I like how he explained the "Why?" part of the changes.
@Codetutor-DemystifyCoding5 жыл бұрын
This well co-ordinated explanation along with live coding demonstration is simply brilliant. He makes it look simple, but let me tell you, as some one who makes tutorials on KZbin, this requires exceptional skills. Not just coding but presence of mind.
@vasyan1236 жыл бұрын
I'm a simple man. I see Venkat Subramariam in a video title, I click.
@chukzydee6 жыл бұрын
Venkat and/or Florina on the title is enough to make me suspend all I'm doing and click on the video.
@salvatoreshiggerino68105 жыл бұрын
To click is to do the needful
@j-r-hill5 жыл бұрын
It's so true
@AmarPoonia4 жыл бұрын
Same here.. even if I've watched it before, it's so satisfying
@gleb.ignatev2 жыл бұрын
@@chukzydee suspend, you're saying, I see what you did here...
@yasserakbbach73423 жыл бұрын
I refer to Venkat's lectures whenever I get to the mood of seeking out wisdom 😌
@benjaminrangel53136 жыл бұрын
I love Venkat voice, it is so calming.
@jimmyleo54144 жыл бұрын
What a god damn pro, sometimes I need to pause to think about what he said
@0xmg4 жыл бұрын
The buffering does that for me
@thecoderuiАй бұрын
@@0xmg So lucky!
@norulesprateek4 жыл бұрын
What a great explanation! You know he is an absolute professional when he shows how suspend functions are sending the rest of the code (Continuation) of the function as a parameter 28:24 . Everything including async block explanation was just great. He taught me things he wasn't even trying(possibly) to cover in this conf. Thanks!
@aksh16182 жыл бұрын
What a legend. Solved so many queries I had about coroutines with such simple but precise and amazing explanations.
@DF-ss5ep2 жыл бұрын
The one and only. We meet again.
@KaranSharmak4c62 жыл бұрын
Good examples. the multitasking while presentation using vim is incredible. !! Also the sound of claps at end of video says it all.
@anshsachdeva8503 жыл бұрын
This was so captivating. i didn't even felt for a minute that am staring at my screen for 44 minutes. amazing presentation. Anyone reading this comment in 2021 : How to access the launch{} function in coroutines 1.5?
@leomak75802 жыл бұрын
the best speaker ever ) java versions are bumping, new langs come and go. but Venkat is a guy who always was with us )
@johnyrufus3 жыл бұрын
That last example of step by step conversion from sequential -> suspend -> async did the trick for me :)
@a0um5 жыл бұрын
Great presentation. I really appreciated the use of bare bone editors and the love coding. I wish he slowed down a bit around the crucial points but understand it's a lot to cover in the given time. Impressive how he kept going confidently despite the inevitable typos, etc. I still have some questions about coroutines but this talk really gave me some good examples to think about.
@tak68tak4 жыл бұрын
He is really awesome. He is totally different from any other devs. It's like an entertainer or magician.
@methodsignature5 жыл бұрын
I've never seen anyone program in VI before. It felt a bit like black magic.
@thegreatestdao5 жыл бұрын
This guys speech is so captivating!
@aikqboy5 жыл бұрын
He explains it so well and so simply. A very bright man.
@dluxsoft2840 Жыл бұрын
thanks sir ,best lecture on coroutine
@rajushingadiya28602 жыл бұрын
Loved it
@chrismakesgames90754 жыл бұрын
This talk was great. Thanks Venkat!
@jesprotech3 жыл бұрын
Extraodinarly goed presentation! Explaining everything from how we got here, why apply coroutines and the way to do that in Kotlin with great examples. I especially loved that last example where we can see how small changes in the code can make it asynchronous using coroutines. The yield example was really a great step in getting there to explain that. It really helped me to make it even more clear to me what coroutines actualy are, what they can do and where to use them.
@antosha4e6 жыл бұрын
really like a way he explains stuff, his talk about DSLs also nice
@mehmoodrehman63362 жыл бұрын
Topics: 1. Parallel vs Asynchronous 0:50 (Java, Kotlin ahead of Java at least 5-years, Microservices, sequential vs parallel) coroutines make it easy to write asynchronous code. 2. Concurrency vs non-blocking 1:50 (Java example and comparison) 3. Let's examine parallel just a bit, in Java 2:30 (Java example and comparison) Parallel Stream: Structure of [functional] sequential code is the same as parallel code Coroutine: Structure of [Imperative] Synchronous code is the same as asynchronous code 4. Why not be happy with that? 5:20 5. Functional style is awesome 5:20 6. But, handling exceptions is a mess 5:44 7. Coroutines are asynchronous 6:25 launch { //launch () method } 8. From synchronous to asynchronous 9:00 Non-blocking GUI's 9. Blocking to non-blocking 10:12 10. How do coroutines work? 10:12 11. A sequential code 17:14 12. Using suspend 23:20, 24:30 Parallel Stream: Structure of [functional] sequential code is the same as parallel code Coroutine: Structure of [Imperative] Synchronous code is the same as asynchronous code 13. Doing asyn 33:00
@andromadusnaruto1544 Жыл бұрын
Awesome. Much appreciated...👍🏾
@hansmelo325 жыл бұрын
Every the venkat's videos make me to want to be a better developer 💪🏿. Great explanation!
@hassanalizadeh34924 жыл бұрын
Amazing presentation
@JetBrainsTV4 жыл бұрын
Thank you! Cheers!
@harshvardhanjoshi74454 жыл бұрын
Great explanation. Must have been took months to find/create an example code which is this simple but very informative and covers almost everything. Great job.
@JetBrainsTV4 жыл бұрын
Glad you liked it
@karthikrpandian5 жыл бұрын
Amazing talk. Impressed by his coding and explanation going hand in hand.
@МихаилСошников-в9р3 жыл бұрын
Отличная информация, спасибо большое!
@AlexPaluzzi6 жыл бұрын
One of the best talks I've watched in a long time.
@muhammadrahmatullahrahman15344 жыл бұрын
Venkat is such an awesome teacher
@Nithr1s5 жыл бұрын
Just so you know, there is an error in explanation of "suspend" modifier. Explanation by Roman Elizarov could be found here: medium.com/@elizarov/blocking-threads-suspending-coroutines-d33e11bf4761
@ashwin_mahajan3 жыл бұрын
Great great presentation. 🙌
@JetBrainsTV3 жыл бұрын
Thank you kindly!
@pums123 жыл бұрын
Just loved it. Thanks for this simple explanation
@terjemah_alquran4 жыл бұрын
excellent excellent excellent
@igrai4 жыл бұрын
Frankly, found it quite convoluted
@bangoker6 жыл бұрын
Great talk! I like that it was very concise, but I could offer one piece of feedback is to have longer pauses /paragraph breaks. It feels a little bit like a giant paragraph would read. There are sentences, but it there is no place to rest, its just one big big paragraph.
@methodsignature5 жыл бұрын
Yea, it felt a bit like catching a wave. If I didn't have much coroutine experience, I'm not sure I could have followed very well. Some of that was probably the time constraint of the setting.
@Wengelef6 жыл бұрын
Venkat Superman
@pinoy_marites_beh Жыл бұрын
I finally know what to do when someone asks me to put the status bar below the phone and the system back actions on top of the screen! Run for the exit!!!!!
6 жыл бұрын
Instead of suspend measureTime you could have made it inline, i think it would work with await 😀 really nice talk btw, finally understood coroutines
@hhhapz6 жыл бұрын
I think the goal of the talk was to show how suspend functions make a difference, and allow thread blocking versus non-suspension functions.
@JamielSheikh5 жыл бұрын
Excellent stuff, Venkat. Great explanations and witty humor.
@hiteshchalise39885 жыл бұрын
this was fantastic.
@KiumarsAbedian5 жыл бұрын
Amazing talk, but I am curious what the setup is being used for interactive Kotlin/Java coding in vi/vim
@NafiulIslam3 жыл бұрын
Great stuff!
@thiagoalexandreee6 жыл бұрын
Amazing talk, thanks for the content!
@sagarghare98294 жыл бұрын
amazing and so engaging.
@andre-vm5 жыл бұрын
3:10 HOLY MAMA! WATTA HELL IS GOIN' ON? (Nice talk, by the way. Good job!)
@anmoldevgan73206 жыл бұрын
Venkat is God of programming
@smallufo5 жыл бұрын
Live coding! Awesome!
@JohnPywtorak2 жыл бұрын
There are issues with this presentation, glossing over or missing key concepts. I would skip it if you are learning about coroutines. This was exploring, kinda, but really only the last 10 minutes are useful. The presenters book is decent, but this was not a good exploring talk. It appears I will be in the minority here. There are so few good coroutine talks, check out the Coroutines catch them all, best talk and maybe the only one.
@rIyAsE3 жыл бұрын
One of the best talk on coroutines (Y)
5 жыл бұрын
"suspend modifier to a function makes it either asynchronous or non-blocking. " is not true according to the Roman Elizarov's article. medium.com/@elizarov/blocking-threads-suspending-coroutines-d33e11bf4761
@mohammedalzamil71914 жыл бұрын
yes
@animeshroy37464 жыл бұрын
VERY GOOD EXPLANATION...
@StasBar6 жыл бұрын
Great presentation, great teacher!
@HermanBovens6 жыл бұрын
I think I get coroutines now, but I'm not really sure why in the last part of the video, everything still needs to be in a launch {} block. Doesn't the suspend / async / await mechanism already make it asynchronous?
@vyli16 жыл бұрын
async {} can only be called from within a coroutine or a suspending function. In fact in the last example, the async call was not made from launch {} function, rather it was made from the lambda, that was passed as argument to the measure function. Since async {} can only be called from coroutine or a suspending function, he had to mark the lambda parameter from measure function as suspending. launch {} function is a coroutine builder. It hides lot of nontrivial code that you would have to write manually, if you wanted to write a coroutine.
@HermanBovens6 жыл бұрын
@@vyli1 so the call to launch() is indeed unnecessary?
@vyli16 жыл бұрын
@@HermanBovens I'm sorry, I gave you a little bit misleading information. But first to answer your question, call to launch {} IS necessary. Originally I said, that async {} can only be called from coroutine or suspend function. This is not true, it can be called from wherever. However, .await() can only be called from coroutine or suspending function. Since in the code in the presentation we call .await() on result of async {} operation within lambda parameter, that lambda parameter MUST BE suspending lambda. (.await() can only be called from within a coroutine or suspending function). Since we've turned the lambda into a suspending function and we want to invoke the lambda from within measure function, we want to basically invoke a suspending function inside a nonsuspending function. That's not possible. Suspending functions can only be invoked from other suspending functions, or coroutines. Therefore, the measure function itself must be suspending. As I said before, suspend functions can only be called from within coroutines or another suspending functions. And we want to call the measure function. But measure function is suspending. Therefore we need to create a coroutine, from which we can call the measure function. That's why we do the call to launch {}. launch {} is a coroutine builder. It will build all the coroutine boilerplate code for us. So when we invoke our suspending function measure from within launch, our code will be executed within a coroutine, so the compiler will finally let us compile this code. There are other coroutine builders than launch, for example runBlocking {}, but in this case we didn't want to block the main thread, so that's why launch {} coroutine builder was chosen. When I said .await() can only be called from coroutine or another suspending function, what I mean is, compiler won't let you compile a code, where you'd want to invoke suspending function outside of a coroutine or a suspending function.
@santanusur12655 жыл бұрын
If getting Google's stock price took "2 seconds" and Amzn's stock price took 1 second... Then for the last example Amazon's stock price would show up earlier right ?
@edjinretrogamer3 жыл бұрын
Meu Deus, pare 1 segundo pra respirar!!!
@ImaginaryNumb3r5 жыл бұрын
@37:53 So this all is really just syntactic sugar for Thread pools and ComplteableFutures?
@VivekYadav-ds8oz4 жыл бұрын
This guy literally looks like my maths professor.
@studyonline32363 жыл бұрын
How is he auto-filling sentences ?
@Saketjsaket4 жыл бұрын
Which IDE is he using to show the demo?
@abubakrjabbarov23035 жыл бұрын
A very good explanation, thank you!
@FrantisekNovak555 жыл бұрын
isnt this all wrong?slapping suspend on a blocking call doesnt not make it async, its just synchronous within dispatcher thread from launch
@antoniokomangyudistira41504 жыл бұрын
the " A sequential code" part is hard to understand :(
@AjithKumar-vk1fw3 жыл бұрын
👍
@archiequinones64676 жыл бұрын
Wow that was really good!! 😱😱 👏👏 just really wanna show my appreciation here 👏👏
@VivekMore15 жыл бұрын
You have the last name of Venkat spelled wrong in the title
@JetBrainsTV5 жыл бұрын
Thank you. Fixed.
@conorsmall1373 Жыл бұрын
what a killer mustache
@siva_subramaniam Жыл бұрын
Bm -16:58
@rafihmahfooz50745 жыл бұрын
He changed camps, first Scala, now this lol
@jobiraw5 жыл бұрын
is this man from pragimtech.com ?
@JetBrainsTV5 жыл бұрын
No, we don't believe so. Dr. Venkat Subramaniam is the founder of Agile Developer, Inc. agiledeveloper.com
It doesn't offer anything that RxJava cannot do. Coroutines can easily represent RxJava's Single and Maybe contexts but does not handle Observable streams without additional boilerplate. For some use cases where there would be a large number of concurrent requests like a server that has 100k+ concurrent connections, coroutines could be more memory efficient since it requrires less intermediate objects (lambdas). Coroutines represent a single chain in a single object that acts like a state machine.
@igorg.86246 жыл бұрын
... although I must say - sequence continuations in Coroutines are super simple to reason about and much easier to teach to a newbie than RxJava
@GK-rl5du6 жыл бұрын
It doesn't offer anything new as compared with RxJava or even any callback+eventloop models. The main promise of coroutines is that one can write syncrhonous looking code which the runtime executes concurrently. On the other hand, consider Rx... one has to be familiar with the core Rx interfaces like Observable... although this approach was much better than callback hell.. esp considering exception handling.. there's still a learning curve. Coroutines on the other hand will bring concurrency to where you are.
@FrantisekNovak555 жыл бұрын
I love rx, but flatmapping singles is stupid and you need to always return tuples everywhere like an idiot
@jakubgwozdz27806 жыл бұрын
What is that, well, IDE?
@meribold6 жыл бұрын
That's a text editor. Probably TextMate.
@jakubgwozdz27806 жыл бұрын
I like the way it displays output at cursor.
@akashpatra195 жыл бұрын
@@jakubgwozdz2780 Yes, you have to configure. Long back after I saw his talk on Java Streams, I also configured like that. :)
@jayasome1992 жыл бұрын
27:00 Only moment, I can laugh.
@jayasome1992 жыл бұрын
28:30 suspend bytecode -> Continuation
@maxchin25 жыл бұрын
He need pauses.
@syedtayyabulmazhar69454 жыл бұрын
He is coding and explaining at the same time. He is so async.
@_dinesh2 жыл бұрын
TBH, Very hard to follow. Keep the sentences simple and the example simpler.
@sundeepsharma67822 жыл бұрын
Sir, with due respect u have very nice knowledge but ur are speaking very fast, and hard to catch you and i lost my interest.
@nO_d3N1AL5 жыл бұрын
Not his best talk. Surprised and disappointed that he didn't compare coroutines to using threads directly and Futures. He didn't really say what co-routines add that we can't do since Java 5
@pradeepkumarreddykondreddy70485 жыл бұрын
this guy is too fast
@RameshK-dy6yb4 жыл бұрын
for simple basics kzbin.info/www/bejne/rmO0gK2anZV5p9U
@aaaab3845 жыл бұрын
If you have such a thick accent, consider SLOWING DOWN A LOT.