Master Go Programming With These Concurrency Patterns (in 40 minutes)
Вставка
- Опубліковано 22 тра 2024
- Enroll in my handcrafted course on Microservices using The Go Programming language based on my experience working in the fintech industry at a tech company with over 70 million users. More info available at the URL below:
- kantan-coding.teachable.com/p...
________________________________________________________________________________________________
Master Go Programming With These Concurrency Patterns (in 40 minutes)
☠️ Course Contents ☠️
🔎 (0:00:00) Intro
🔎 (0:01:52) Go Routines
🔎 (0:06:22) Go Concurrency Structure
🔎 (0:09:40) Channels
🔎 (0:15:20) Select
🔎 (0:19:34) For-Select Loop
🔎 (0:20:53) Buffered vs Unbuffered channels
🔎 (0:28:47) The Done Channel
🔎 (0:34:05) Pipeline
Book on Concurrency in Go: www.oreilly.com/library/view/...
Join the Discord to talk to me and the rest of the community!
/ discord
🌟 Hey devs! 🌟 Ready to level up your coding game? Check out this awesome course on Microservices using Go! 🚀 From beginner to pro, learn to build scalable apps with ease. Don't miss out! Enroll now 👉 kantan-coding.teachable.com/p/early-bird-special-pricing
#GoLang #Microservices #CodeWithConfidence 🔥🎉
Fantastic. It is extremely rare to come across this level of concise and easy to follow explanation.
Thank you! 🙂
Incredibly clear explanation, by far the best on YT. Thanks a lot for all the effort!
Thank you! That means a lot 😊
Just wonderful! How a person be to meticulous in his work and care for his learners! Thanks a million!
Thank you for your kind words! I’m happy to help 🙂
Best video I have found on the internet about Go concurrency. You really are great at not missing any important points while teaching. Salute.
Hey thank you. That’s kind of you to say. I’m really glad this video has helped so many people. Didn’t expect it. I’m happy that you found it helpful! 😊
I agree with everyone else's comments. You've done an incredible job of taking a complex and difficult to understand topic and make it clear with a great example demonstrating it. Thank you so much! You've also gained another subscriber.
Thank you! I’m glad that it was helpful. I really hope that everybody can learn to make use of these features of the language 🚀
One of the best I've seen. You are the rare type that can take complex concepts and explain them so well. I hope you continue to make this kind of great content!
Hey, this comment made my day! Thank you. I’m really happy to be able to help others understand complex things 🙂
I subscribed immediately lol. even I could understand the concepts
This is like gold, thanks a lot for this valuable content
the last part how you explained the go routines is mind blowing
this was a mind bending concept and cleared in a easy way
Thank you! I’m really happy that it helped 😊
agreed, my mind was blown as well
Hey man worth waiting keep posting such a quality content
Thanks bro! Glad you think so 🙂
Somehow youtube recommend me this and wasn't disapointed at all. Thanks for the awesome explanation!
That’s great to hear 🙂 I’m glad you liked it!
This was fantastic and well explained. I now have a way better understanding of how channels and select statements work within Go. Great job.
Thank you! I’m glad it helped. Thanks for watching 🙂
Excellent tutorial. There are lot of very smart developers around, but very few who can teach a relatively complex subject in an easy fashion. Kudos, and keep posting.
Thank you! I’m really happy to hear that because it’s what I strive for 🙂
this tutorial/guide has more personality than the entire cast of friends
Lol I’m not sure if this is sarcastic or not but thanks 😂
Finally, this tutorial gives me the aha moment with go channels. Terrific job. Very thorough explanations.
That’s great to hear! Thank you 😊
From now on, you've got one more subscriber. Great content. I can't wait for some more advanced topics like, dependency injection, dynamic typing (interface{}) etc. As a php programmer recently I rewrote one of my microservices, and I was amazed by ease of doing it just with go. Apart of painfully precise data types declaration, and luck of many useful generic functions present in php core, I had almost ecstatic pleasure. Most of the time I do hard core backend staff with data transfer and after speed comparison I fell in love with go 🙂
Welcome! Yeah Go is definitely a great language. It seems it’s starting to pick up in popularity and the topics you mentioned seem like good video ideas so I will add them to my backlog. Thank you for the valuable feedback and thank you for watching ❤️
You really put a lot of effort into this. Well done!
Thank you! I really do try so your words mean a lot 🙂
Definitely the best video about concurrency in go I've seen so far! 🤩
Thank you! I’m happy that it was helpful 😊
Great explanation! This video is the most helpful for me so far to understand concurrency in Go. Thanks, Mate!
That’s great to hear! Always happy to help 🙂
Soothing sound along soothing Explanation, just perfect.
Very clear. Thank you!
Wow such a nice explaination .. loved it.
Well explained! Watched many Go Concurrency videos but this is the best one.
Glad you liked it!
thank you. the principle of pipelines is great and your explanation is simple enough for newbies to understand.
Thank you for your kind words! I’m glad you enjoyed it 😊
Wow! One of the best tutorials into channels I have seen. Really great explanation of what is happening under the hood. For me the first half was a tiny bit boring because of too many details which I already know and which I think every adequate junior software engineer should be already aware of. The second half is perfectly balanced in terms of new material and under the hood explanations. Thanks!
Thanks for the feedback! I’m glad it was helpful 😊
The best concurrency video I have watched so far! Good work!
Wow, thanks! Happy to help 🙂
@Kantan, I'm definitely not regretting subscribing to this channel. I'm learning go and so far you have been a huge help for me to understand complex go concepts. Thank you sir :)
I’m really happy to hear that! Thanks for your comment 😊 it means a lot
Learned Go in 2017.
Never understood them until now.
Thank you!
Happy to help!
Excellent! This established a solid foundation to anybody who wants to understand concurrency not only for Golang but for any programming language.
I’m happy to hear that! Thank you 😊
Really Good Explanation being a beginner in go i was able to understand everything you have taught for concurrency patterns
That’s awesome since that was what I was hoping for! Thank you for the feedback 😊
Very cool demonstration.
I'm just starting at Go but this is not my first language (I've been a backend developer for 12+ years).
This language is getting more interesting at each new video I watch, this is exiting ^^
That’s awesome! No language is perfect but I hope that you’ll come to enjoy this one as much as I have 😆
brother thanks a lot , many concepts like goroutines, concurrent, time.Sleep , it's only been 6:12 and i had cleared all my concepts. I came to this video after watching 10 videos. Thanks you brother.
😂 that’s great bro. I really try to explain things clearly so it makes me really happy to get this type of feedback 🙂
Extremely clear explanation on concurrency . Keep up the good work.
Thank you! I’m happy to help 😊
Great video brother. Hope you keep it going.
I suggest though that you make the videos in 10 minutes series instead of a single large chunk. It becomes pretty overwhelming and difficult to index when I am trying to refer to your videos when working on something. But ey, you just got yourself a subscriber
Good point. It’s hard to sit through longer videos when the topics are complex. I’ll definitely keep this in mind! Thanks bro 🙏
Liked and subscribed. Very good explanation
(but the background music is little bit annoying and distracting)
Thanks for the feedback! I’m glad you liked it 🙂
@@kantancoding please never ever use that background music
thanks for the video bro, love the way you teach ❤️
Thank you bro! I’m happy to help 🙂
The way you explained made it look so easy bro👏.
That’s great bro. I’m glad the explanation worked for you 😄
one of the best video. you explain stuff very well
Thank you! I’m glad it helped 😊
This video helped me a lot to clear my doubts. Thanks
That’s great to hear. Thank you 🙏
Really useful video thank you. This has helped me alot trying to understand async programming in Rust. I've never written go.
That’s awesome that the video is also helpful for other languages. Thanks for the feedback! 🙂
Amazing video just what I was looking for!
Thank you! Happy to help 🙂
the suspense music is so spot on aha Great tutorial, fab
😂 thank you!
Thanks kantan, coincidentally yours video help me to solve Producer-consumer problem.
😂that’s awesome! Seems you are working with some advanced concepts. I’m currently working on some videos touching on more advanced concepts. Be on the lookout and thanks for watching! ❤️
best video to explain how goroutins work. nice!
Thanks for watching 😊
great video mate!
Thanks! I’m glad it was helpful 😊
Nice. Thank you for this.
This video finally cleared goroutine and channel for me. Watched so many videos prior to it hut was confused as hell.
😂🤣 I’m really happy to hear that. With go routines and channels under your belt, you can now take full advantage of the language 🚀
I'm glad I came across this tutorial.
Happy to help! Thanks for watching 😊
Amazing just love to learn in your way....god bless you...🙏
Thank you so much 😀
Thank for you. You've just got yourself another subscriber.
Thank you 😊
Thank you so much for your video 🙏🏻🌹
My pleasure! Happy to help 🙂
This explanation are really good, explained systematically from bottom to top, i came from frontend dev who dont know nothing about conccurent programming, even though i watch ZTM Golang i still cannot fully grasp the idea behind this Pattern.
Love from indonesian bro, already liked videos also subscribed and shared!!
Hey! Welcome and thanks for supporting bro. I’m happy that the videos have been helpful! 😀
great explanation, please make more of this!
Thank you! More videos coming soon 🙂
Do you plan to continue making videos about Go? I really enjoyed your explanation and the background music hit the right cord 👌🏻
Thanks for the feedback! 😄
Yes, I will create more Go videos because Go is one of my favorite languages but this is not a Go specific channel. So for those that will be annoyed if I post videos unrelated to go, it's probably best not to subscribe 👍
Thanks for making this.
My pleasure. Thanks for watching 🙂
This is quite clear, even though I'm not a Go programmer. The music, however, is very distracting. Silence is the best accompaniment for an instructional video.
Thanks for the feedback! It’s really helpful 🙂
wonderful explanation thankyou!!
No problem 😌 thank you 😊
Great stuff, thank you for sharing.
Happy to help 😊 thanks for watching!
Very clear tutorial, perfect.
Thank you! I’m glad it was helpful 🙂
Liked and subscribed i dont think ill regret it !
Thank you 😊
Excellent explaination. Thanks sir🎉
Thanks for watching! Happy to help 😊
fantastic video thanks so much
Thank you! Happy to help ☺️
As a newcomer to the world of Golang and goroutines, I loved every second of this video!
That’s great! I hope more people take up this great language! Thanks for watching my video 😊
Incredibly easy to understand.....Thanks alot
Awesome! Happy to help 😊
Great explanation. Thank you.
Thank you! Happy to help 😊
👏🏼👏🏼 subscribed and bell on
Awesome! Glad you enjoyed 🙂
The background music is annoying.
I find it helpful :)
I didn't even notice it until the end. I am not on headphones, so maybe that's why.
very nice! thx
God bless you, do more for us if possible.
Thank you 🙂 I will definitely try to do more 🚀
Thank you and thanks to youtube algo for this recommendation
😂 happy that it found you! Thank you 🙂
best content, In my learning golang journey.. awesome, mind blowing
Thank you for your kind words, I’m so glad it helped 🙂
Good explanation for Go routine and channels. Well done and thanks. I've a question, what are the tools you're using for the annotations?
Thanks. Sorry but what do you mean by annotations?
@@kantancoding I mean the drawings and writing. Which app and tablet are you using?
you are amazing teacher, the best !!
Thank you! I’m really glad it helped 😊
You're taking over👍
Thanks to you all supporting 😊
One of the beat very helpful ❤
Thank you 😊
Great work!
Thank you 😊
Thanks for your video.😃
No problem! Happy to help 🙂
Hi Kantan Coding! You've got a new subscriber. I'm switching from Java to Go and this video helps me a lot to understand the goroutine, channel and select concepts. Thank you for this video! I think a channel is quite similar to Java's LinkedBlockingQueue. The non-buffered channel would be like a LinkedBlockingQueue of size 1. The concepts are very clear, but I'm still struggling a bit with the syntax. Is it right that Go passes copies of the data into the channel instead of a reference? And is it a good idea to pass references into a channel?
Hey, I’m glad it helped you out! In regard to your question, unlike Java, Go has pointers. So I think you’re question will answer itself if you look into how pointers work in Go. I was actually considering making a video on this topic so maybe I’ll move that up on my list. Anyways, hope it helps!
Very impressed. More videos please
Thank you. Happy to hear! 😉
great tutorial , thank you
My pleasure. Thank you 🙂
I think that example "The Done Channel" is not correct. Instead of call close(done) it should be done
Hey thanks for the feedback! Actually, closing the channel isn't incorrect. In go, when you close the channel, the zero value for the channel's data type will get put onto the channel. So in this case, since the channel's data type is bool, when we close the channel in main, the message false gets put onto the channel.
The for select loop in doWork will then receive that value and it will trigger the return. That's because "case
@kantancoding Thank you for your quick response. Yes you were right. The reason of the missing log was the missing sleep in the end of the main function.
But another question pops up. In the following code if I remove the return statement, the app continuously logs
"work done". Why is that ? It seems that the close function spamming the channel with messages.
```
package main
import "fmt"
import "time"
func doWork(done
I think it's because, the for loop never ends if you remove the return statement@@tzakarda
@@tzakarda Isn't that because we are relying on the channel to close our goroutine? If we get the value from the channel we manually close the function. That's the whole point of using the done channel. Since it's a for loop that is going to run forever, we are passing a done channel from the main function and it is unbuffered, when the goroutine can read from it, the function returns to close itself.
@@tzakarda Because return is supposed to stop the for loop. If you've use OOP languages like javascript, you would understand better.
Your tutorials so addictive, We want MORE!
Thank you 😊
Is there any topic in particular that you’re interested in?
It was easy to understand. Finally I understand the logic behind using the concurrency. I used to see those mentioned in the project code base but didn't understand properly. Now I can implement my own :').
It was a nice video. I wanted to go through more but there are no more videos on golang 🥺
Sorry if I am greedy. I want to have more videos related to golang or design 🥺.
There actually is another video on Go that’s over 2 hours long: How To Structure Your Go App - Full Course [ Hex Arch + Tests ]
ua-cam.com/video/MpFog2kZsHk/v-deo.html
Also, thanks for your comment. I’m glad that it helped 🙂
@@kantancoding Will you be posting videos on backend technology? NSQ, KAFKA, HLD concepts etc?
@@anistoryhindi Are you talking specifically for Go? I've already created some HLD videos. Will do more in the future but HLD isn't a language specific thing.
And yeah, I have plans to make some kafka stuff. I have no experience with NSQ so at least for the time being, no plans for that.
@@kantancoding Not go specific I meant general :)
lovely!
Awesome tutorial ❤
Thank you 😊 I’m glad it helped!
This is Amazing !!!
Thank you! It means a lot 🥲
Keep Going Bro ♥
Thanks for the encouragement brother ❤️
Great! Should you have covered the sync package, too? Wait Groups and all? Cheers!
Thank you! Happy to help. I didn’t want to add too much to this one. I feel like the sync package can be its own video.
Long time subscriber
Your videos never disappoint me
Happy to see people sticking around. Thank you for your support! 😊
Best explanation
Thanks ❤
Really struggling to focus on your voice and not the background music but the comments all say what an essential video this is so I'll keep trying. I hope you'll consider dropping the background music in future videos.
Yeah, I’ve received many complaints about it already so the rest of the videos in the series I have dropped the music.
Unfortunately it can’t be removed retroactively. I hope that you can get through it!
Thanks! I did and it was super worth it
Nice video. One question though, 27:00 the use case you mention is different from the one used in next pattern. In the first one, you are writing into the channel in the for-select loop, whereas in the second one you are reading from the channel. So we should be able to do away with select in the first one. What gives?
Sorry I’m not sure what your question is. Can you clarify for me a bit?
What software/hardware combination are you using to write/annotate on top of the IDE/diagram/photo? Great video!
You can use any tablet and any notes app and just write on top of the image 🤙
Fantastic!
Thank you! I’m happy to help 🙂
great video bro
Thanks bro, glad you enjoyed it 🙂
Cool!👍
hey can u tell me what font , color schmeme/theme u used in this tutorial i really liked it
also what plugin do u use to get vim like things like ur line number is like relative to ur cursour position and u have modes how can i do that
Color scheme is Dracula I think. Font you can find in my video on how to set up your terminal. Jetbrains ides have a plug-in for vim. Hope that answers all of your questions!
@@kantancoding thanks btw love ur content
This is an expensive study material, I admire you🙏
Thank you! I hope that it will help you in your career 😎
The best Golang teacher on UA-cam literally
Hey thank you 😊 I’m happy to hear that it helps 🚀🙂