5 minutes into the video and you've made more sense than the last 10 videos I've watched around Go concepts. Incredible approach to teaching while covering real world scenarios. Amazong job. Subbed!
@edwingarcia50433 жыл бұрын
What makes you think that the other videos didn't help you to get ready for watching this one video? 🤔
@johnryan60202 жыл бұрын
@@edwingarcia5043 That happens too, doesn't it. Great point (if not misplaced)! Most likely, it doesn't materially negate the effectiveness of Francesc's approach. It's a vector field and Rob seemed to clearly be using a short-hand to say, "damn, this vector has a magnitude and direction that helped me."
@ogreeni Жыл бұрын
I’ve been learning go for less than a week, and just encountered your channel. Sad to see you no longer upload, these videos are really good.
@davudsafarli53564 жыл бұрын
Thank you! I don't understand why no one starts by giving simple example like you do
@ozerbdy6 жыл бұрын
Very clear explanation, with mental leaps just at the right times. And also blending the real world use cases into the examples is very well thought of. Thank you!
@JustForFunc6 жыл бұрын
Wow, that's such a nice thing to say! Thanks 😊
@Filhodanuvem3 жыл бұрын
From time to time I come back here and watch a random video. It inspires me so much. Thank you.
@RamiAwar2 жыл бұрын
I love the preaching of good practices like not using the context to pass values unless absolutely necessary. This aligns with how I like to write code, even though I've seen other developers use context to pass non-request scoped data. This channel seems to be a hidden gem!
@RamiAwar2 жыл бұрын
Kind of got scared by the video length at first though, glad I watched it anyways.
@derdere7803 Жыл бұрын
I keep coming back to this video over time. It has a lot of value. Thanks for taking time and doing that. Where are you by the way, get back here and produce some more please.
@yeboahnanaosei4 жыл бұрын
This video is my go to reference material on go's contexts. Thank you very much
@alfaex.6 жыл бұрын
i read a lot of posts on medium and the GO blog about context and i was completely lost... with this video it was very easy to understand. Amazing job
@YBWang-pi9qq3 жыл бұрын
Amazing explanations with examples. One of the most talent instructors. Thanks you and keep doing it.
@UnknownStuff04174 жыл бұрын
Great video. A very important concept for setting up and handling things like timeouts and even exceptions in Go. I don't see this being addressed in other Go overview sites/videos. Really happy to come accross this. However, perhaps its just me but I don't think the last point/topic on sending value between "client.go" and "server.go" had appropriate phrasing from @justforfunc. I get his explanation for "foo" id to properly show up, the client has to include it as a header/body/uri-id as they are purely HTTP request data/communication. But that has nothing to do with inherently Go or even "context". I sort of interpreted this context as some internal "Go" communication between the client.go and server.go processes. And really the context in both client.go and server.go are between the those process' and operating system, but something like an HTTP client and server are really good examples to show where "context" is very applicable. Really good video but slightly misleading.
@willhawkins73916 жыл бұрын
Francesc, I know this is an old Just for Func but I went back and watched it today and wanted to say Thanks! Great episode. As others have said, the explanation is perfect! Just what I needed. Thanks again and keep up the great work!
@mattmarshall18343 жыл бұрын
Great video. I'd been reading about context this afternoon and this very much tied up some mental loose ends I still had.
@daveteare19607 жыл бұрын
I really enjoyed this episode - thank you! I've seen context used a lot and never really understood it until now. ❤️
@mohsanabbas68353 жыл бұрын
Best video on the topic. Thanks
@vbcv15 жыл бұрын
I wonder how many developers would recognise "modern bear" t-shirt. Thanks for fueling up my desire to learn Go! Woof 😋
@juliankandlhofer75534 жыл бұрын
Great video! I watched 2 talkes before and was more confused about contexts after watching them. this video explained everything!
@MiguelAngelLastYear7 жыл бұрын
Priceless, as always. What about an episode about how to create applications that work at the same time on multiple servers, as a cluster? The guides I have seen are ambiguous and do not share the good practices they proclaim. That, or an episode about when it is recommendable to create gorutines and when not. Thank you, Francesc!
@JustForFunc7 жыл бұрын
+Miguel Ángel Jimeno Arce can you give an example? Do you mean something like a cluster database?
@MiguelAngelLastYear7 жыл бұрын
JustForFunc yeah, a cluster database, a load balancer, a proxy to redirect http traffic, or a massive scanner which distributes traffic between available servers (my original idea was something pretty similar to this) and when it finalizes, joins results. Thank you!
@EnginDumlu7 жыл бұрын
Thanks Frances, was a clear explanation. Can you please do the next episode about package initialization, sharing variables (like db / session) around between packages?
@newshatavakoli59603 жыл бұрын
Thanks for the great video. This video was just the right speed and amount of explanation that I needed, very to the point. Watching you code through the examples, I learned things other than the context package too.
@markmcdonnell7 жыл бұрын
thanks Frances, the quality of this video and its contents is exceptional :-)
@raam_sevak6 жыл бұрын
I kept trying sending value with a context over the http to another machine, I stopped after I watched this video. Very detailed! I love your videos :D
@notangryjustdismayed7 жыл бұрын
very timely upload. was just playing around with this today and i wasn't quite sure if i was using it properly. thank you!
@JustForFunc7 жыл бұрын
I hope it will help you! Feel free to ask any questions at the end :-)
@notangryjustdismayed7 жыл бұрын
thanks, this was a great video! one question i still have is this: i see a lot of talk about not storing contexts anywhere, and only passing contexts around as parameters. i don't have a problem with this, but i wonder why this is so important? what would be some of the unintended consequences of a struct holding a reference to a context? does the same rule apply to cancellation functions? (ok that was more than one question. i'm sorry) cheers!
@pm712417 жыл бұрын
I was a little puzzled by your suggestion to not use Context values to store information which affects program flow. I mean... I understand the argument, but I fail to see the alternative for HTTP middleware. First, sure, it's a given that it should only be used for request-scoped values and request-id is a prime example. But you recommended to pass request scoped values which affected program flow as parameters. That is of course in general correct for any code, but for HTTP middleware you are kinda stuck with the http.Handler interface (reponsewriter, request). So how would you pass, say, "user id" to a handler you wrap around without creating your own alternative to http.Handler and making your code less composable?
@chimmychingo67032 жыл бұрын
Loved this video. Watched a few that didnt quite get through, but this really brought into the right “context” xD
@DineshGowda244 жыл бұрын
Thank you for this, this is amazing. I have read about context package, but couldn't really understand. But this 36 mins have been priceless. Very well done.
@xcvsdxvsx4 жыл бұрын
Thanks so much! 7 minutes in and I now understand what the code does that I was trying to decipher.
@aguiwang78762 жыл бұрын
I am big fan from China who watch your video every day before sleep! 😀
@vishalsh16242 жыл бұрын
Amazing explanation with real world examples. Thank you so much!
@ZenMonkIlya2 жыл бұрын
Excellent explanation. This is very helpful. Thank you!
@luvpranay3 жыл бұрын
Learning Golang from Bayer Mayfield. The best
@tomah9116 жыл бұрын
I'm so glad I found your KZbin channel ! This video is perfect to understand how to use the Context package, thx !
@sergeywhite88974 жыл бұрын
Thank you, you're REALLY doing well. Thank you one more time!!!
@Ysonichero4 жыл бұрын
Thank you Frances, it’s really help me to understand context package.
@faroukfaiz83962 жыл бұрын
This is some good quality content!
@AbdulMannan-rv5yx3 жыл бұрын
Really nice, clear my head lots on this package
@unknownknowns4202 жыл бұрын
phenomenal explanation, thanks!
@matheusaraujo44952 жыл бұрын
Very nice explanation! Thanks
@darrensapalo3 жыл бұрын
Incredible talk.
@codesworth7 жыл бұрын
This helped me understand the context package much better, thank you!
@kamal-xd7id7 жыл бұрын
Do you have any other example for context with value other than request id? It would be better to understand this concept if you can. Thanks!
@adnanrashid67434 жыл бұрын
Really enjoyed the explanation, very clear 👍🏽
@tanoybhowmick87154 жыл бұрын
Please keep the good work up. So good.
@MD-xx6ob6 жыл бұрын
You've done a great job ! You're accent is very clear for a frenchie like me
@JustForFunc6 жыл бұрын
Merci beaucoup, je fais mon mieux
@OfferoC7 жыл бұрын
Nice vscode setup. Can you describe the exact set up somewhere in a post or video?
@publicuser9934 жыл бұрын
That's what i needed. BIG THANK YOU
@alesresta7 жыл бұрын
I've been learning so much watching your videos! Thank you very much.
@Alfrednohike9909 Жыл бұрын
Hi, I would love to hear from you, as someone with a lot of experience in Golang, do you think SOLID Principles important in practice, and in interviews? Would I be asked a lot of questions, and how would I go about that, considering that SOLID Principles are mostly OOP concepts, and Golang is not a real OOP language. I am also curious about the same for design patterns like Builder, Factory pattern etc
@davidagyakwa2883 жыл бұрын
Deep dive in context ...id be glad
@vs4vijay4 жыл бұрын
One of the best explanation!!! Thanks.
@susisorglos32157 жыл бұрын
Hey, very nice video! Could you make an episode about you vscode setup and the extensions you are using? Thanks!
@mehditorkamani98905 жыл бұрын
Amazing... Short and sweet!
@paragkamble3 жыл бұрын
Thanks Very clear explanation.
@GertCuykens7 жыл бұрын
Nice, learnt allot. PS can you also give the reason behind values not propagating like cancel please?
@jayeshthamke78604 жыл бұрын
Exceptional work!
@lhpegz Жыл бұрын
lets say about following the trace-id and span-id, both are probably good values for contexts right?
@mehradsadeghi3 жыл бұрын
Thank you for this video.
@keepondev4 жыл бұрын
Amazing explanation! thank you so much
@ericnyamu52495 жыл бұрын
thanks Thor.I now understand Go better
@Jordan-kk5xj2 жыл бұрын
Regarding the ability for the HTTP client to "cancel" the request via the context which notifies the HTTP server, I assume this would only work with such a golang client and a golang server, correct? I.e. this is impossible with say a Java client and golang server, correct?
@michalvyskocil5 жыл бұрын
Hi, amazing stuff! I was still struggling on how to use context skimming the official docs. However this is simply awesome. Especially thanks for showing that you can't send context values across network.That would be stupid idea anyway :-)
@john_rambo_270986 жыл бұрын
Beautiful, Excellent, Mind Blowing, Priceless
@nwjlions7 жыл бұрын
Really informative video. Thanks Francesc.
@DreammzShow4 жыл бұрын
Thank you for the great videos. This is really helpful.
@phillippotter13594 жыл бұрын
Really helpful video, thank you dude, keep up the great work!
@kamal-xd7id7 жыл бұрын
Learned Context in one go, without even pausing a single sec. :) btw which editor you are using and i saw you have some template like hand -> f(w http.Responsewrite, r *http.Request), how to do it?
@ericb.97777 жыл бұрын
Very clear, as always, GO on
@dmytro.tsapko7 жыл бұрын
Hi, looks like using context.WithTimeout somehow tears down TCP half-connection from client to server, that's why you got context closed on the server side. I didn't get how it closes the half-connection. But the question is why context.WithCancel does not tear down TCP half-connection after invoking cancel() ?
@chevs113 жыл бұрын
That was very useful, thanks!
@Oswee6 жыл бұрын
I really, really, really would like to see complete series about how to create IDIOMATIC Client Server WEB application with most common CRUD operations using gRPC and MySQL. Client and Server should be just simple Go programs. Would like to see: IDIOMATIC Directory/File organization in context of github.com/myusername/. gRPC service interface, and message/+field idiomatic naming and organizing into packages. Package +nested package importing. Compiling nested .proto's. TLS secured gRPC communication. Idiomatic endpoint URL constructions. Context. Displaying in browser - single record, list of records, single record + list. Submitting form, updating record, creating nested records - like, when customer is created, also some log record in the same DB is created pointing to the same customer (tx). And so on so on. Basically, EVERY beginner want to see complete IDIOMATIC example of writing production ready basic DD web-page. Nobody is teaching this. 98% of tutorials and books teaching the easiest way - Just mess everything into main.go and use mock data! This is total BS! This is not how good things should be teached. It is much better when you see, how great foundation looks like and then starting to tweak, and to learn all those used patterns in details. When you have no context in head, it is impossible to learn right way. Iterating thru the trial & fail is way to learn for sure, but it is not the most effective! It just wastes too much human time. YES - this kind of tutorial will take time to record. But this will be the SINGLE PERFECT TUTORIAL in the whole f*g WEB.
@sweetmoment81965 жыл бұрын
Just one word, Awesome
@bathaivan43234 жыл бұрын
very helpful, thanks very much
@jojoross4 жыл бұрын
useing a function (sllepAndTalk) you created for half of the video ,and not showing how that function worked was a waste of my time. thank you for frustrating me back to the doc.
@johnbalvin54016 жыл бұрын
how do I set up visual studio to add the package library while I writting code? I always need to do it for myself and is anoying
@AlexTitarenko876 жыл бұрын
excellent explanation
@nolliepoper7 жыл бұрын
This was super helpful, thank you.
@AnhNguyen-vu7mc7 жыл бұрын
Hey Francesco, huge thanks for your series of videos. was wondering if you can post the code repo on github
@JustForFunc7 жыл бұрын
+Anh Nguyen it's on GitHub.com/campoy/justforfunc
@trompelek3 жыл бұрын
like your tee!
@kauehmoreno89675 жыл бұрын
I got a doubt. When u write a handler with select case, context will be cancel only because your time.After are holding execution and than
@kauehmoreno89675 жыл бұрын
I got it!! It will be able to run on a different goroutine returning value and catch it into select statement
@MrGreen-kq4ds4 жыл бұрын
amazing video , thank you!
@grantseltzerrichman20517 жыл бұрын
This was great, thanks so much!
@JohnHAdams-vo2pk4 жыл бұрын
Awesome!!!
@polypus744 жыл бұрын
13:48 hallelujah!!!
@sphaniy6 жыл бұрын
Francesc, Did you do the episode on the internals of the context package?
@JustForFunc6 жыл бұрын
Yup, literally the episode after this one
@SergeySaraev-xe4fl7 жыл бұрын
Very Nice! Thatk you Francesc!
@ffridiejr7 жыл бұрын
Very helpful. Thanks.
@pnsvinodkumar5 жыл бұрын
super awesome!
@capnnukasun8104 жыл бұрын
thanks! really helped (at work)
@jjrumi7 жыл бұрын
T-h-a-n-k y-o-u. ------------------------- I was really going to send you a message requesting exactly this :) Love your channel so far. Keep it up!!!!
@sayansikdar43853 жыл бұрын
where can I find the codes which are written here?
@garciajero6 жыл бұрын
this is so good.
@TylerShawful3 жыл бұрын
That poor plant in the background needs water
@redsnakeintown6 жыл бұрын
Couldnt figure out what you did in the Decorate. I think I need some sleep..
@RandomShowerThoughts5 жыл бұрын
it was basically a middle ware which adds in a request id into the context and returns the next function as a call
@Simon-xi8tb2 жыл бұрын
where is the sleepAndTalk fn ?
@ColmMalone4 жыл бұрын
Who's here from the Aug 20th Go Time podcast? BTW at 21:00 - since go1.13 - you can now do this in one call with: golang.org/pkg/net/http/#NewRequestWithContext
@bargrz5 жыл бұрын
Subtitles on: 'Hi! I am Franciscan boy!' :p
@Waffle-ish3 жыл бұрын
Disclaimer: kinda new to golang XD What do you mean by "defining a request without using tags?"
@kianyanglee46187 ай бұрын
What's the != symbol at @15:46? Shouldn't it be !=?
@SaxonChuang4 жыл бұрын
I have no idea about how the function sleepAndTalk know we cancelled
@KotBinary4 жыл бұрын
I had the same question. So, I googled this: gist.github.com/astenmies/2f180213d310aa16b4b8c4e637be9441
@SaxonChuang4 жыл бұрын
@@KotBinary thanks :)
@kewang16127 жыл бұрын
I was following along typing in another window and 13:51 scared the xxxx out of me... :)
@jojjan936 жыл бұрын
Great video francesca ;)
@JustForFunc6 жыл бұрын
That's not my name
@jojjan936 жыл бұрын
JustForFunc: Programming in Go hehe 😁
@jojjan936 жыл бұрын
JustForFunc: Programming in Go i know, i just couldnt remember which video it was where at the end someone couldnt say your name :)